@apolitical/component-library 3.0.2-ac.1 → 3.0.2-ac.2

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
@@ -1,4 +1,4 @@
1
- import K, { memo as Oe, useState as X, useEffect as ae, useRef as pe, useMemo as bt, createContext as Zn, useContext as Ne, Children as An, useCallback as Jr, useReducer as Hn, Fragment as gt, Suspense as pi } from "react";
1
+ import K, { memo as Oe, useState as ee, useEffect as ae, useRef as pe, useMemo as bt, createContext as Zn, useContext as Ne, Children as An, useCallback as Jr, useReducer as Hn, Fragment as gt, Suspense as pi } from "react";
2
2
  import ft from "lodash.clonedeep";
3
3
  import hi from "lodash.set";
4
4
  import { useIntl as G, IntlProvider as gi, FormattedMessage as _e, createIntl as vi } from "react-intl";
@@ -281,7 +281,7 @@ function $i() {
281
281
  }
282
282
  }
283
283
  var Y = v.ReactCurrentDispatcher, V;
284
- function ee(h, $, L) {
284
+ function X(h, $, L) {
285
285
  {
286
286
  if (V === void 0)
287
287
  try {
@@ -367,7 +367,7 @@ function $i() {
367
367
  } finally {
368
368
  re = !1, Y.current = me, te(), Error.prepareStackTrace = le;
369
369
  }
370
- var Ve = h ? h.displayName || h.name : "", gr = Ve ? ee(Ve) : "";
370
+ var Ve = h ? h.displayName || h.name : "", gr = Ve ? X(Ve) : "";
371
371
  return typeof h == "function" && M.set(h, gr), gr;
372
372
  }
373
373
  function ve(h, $, L) {
@@ -383,12 +383,12 @@ function $i() {
383
383
  if (typeof h == "function")
384
384
  return D(h, Pe(h));
385
385
  if (typeof h == "string")
386
- return ee(h);
386
+ return X(h);
387
387
  switch (h) {
388
388
  case l:
389
- return ee("Suspense");
389
+ return X("Suspense");
390
390
  case d:
391
- return ee("SuspenseList");
391
+ return X("SuspenseList");
392
392
  }
393
393
  if (typeof h == "object")
394
394
  switch (h.$$typeof) {
@@ -716,7 +716,7 @@ Check the top-level render call using <` + L + ">.");
716
716
  process.env.NODE_ENV === "production" ? In.exports = Pi() : In.exports = $i();
717
717
  var a = In.exports;
718
718
  const Ri = () => {
719
- const [t, e] = X(window.location.pathname), n = () => {
719
+ const [t, e] = ee(window.location.pathname), n = () => {
720
720
  const r = window.location.pathname;
721
721
  e(r);
722
722
  };
@@ -1593,42 +1593,29 @@ const vl = ({ image: t, className: e, testId: n }) => /* @__PURE__ */ a.jsx(
1593
1593
  }
1594
1594
  return n ? K.createElement(n, { children: e, className: r, ...c }) : e;
1595
1595
  };
1596
- const bl = ({ currentStep: t = 1, steps: e = 1 }) => {
1597
- const [n, r] = X([]);
1598
- return ae(() => {
1599
- const i = [];
1600
- for (let s = 1; s < e + 1; s++)
1601
- i.push(s);
1602
- r(i);
1603
- }, [e]), /* @__PURE__ */ a.jsx("div", { className: "navigation-dots-wrapper", children: /* @__PURE__ */ a.jsx("div", { className: "dots-wrapper", children: n.map((i) => /* @__PURE__ */ a.jsxs(
1604
- "div",
1605
- {
1606
- className: "dot-wrapper",
1607
- "aria-label": `Step ${t} of ${i}`,
1608
- children: [
1609
- /* @__PURE__ */ a.jsx(
1610
- "div",
1611
- {
1612
- className: S("dot", {
1613
- active: i === t,
1614
- completed: i < t
1615
- }),
1616
- "data-testid": "navigation-dot"
1617
- }
1618
- ),
1619
- /* @__PURE__ */ a.jsx(
1620
- "div",
1621
- {
1622
- className: S("line", {
1623
- active: i < t
1624
- })
1625
- }
1626
- )
1627
- ]
1628
- },
1629
- i
1630
- )) }) });
1631
- };
1596
+ const bl = ({ currentStep: t = 1, steps: e = 1 }) => /* @__PURE__ */ a.jsx(be, { children: /* @__PURE__ */ a.jsx("div", { className: "wrapper", children: /* @__PURE__ */ a.jsx("div", { className: "dots-wrapper", children: new Array(e).fill("").map((n, r) => {
1597
+ const i = r + 1;
1598
+ return /* @__PURE__ */ a.jsxs("div", { className: "dot-wrapper", children: [
1599
+ /* @__PURE__ */ a.jsx(
1600
+ "div",
1601
+ {
1602
+ className: S("dot", {
1603
+ active: i === t,
1604
+ completed: i < t
1605
+ }),
1606
+ "data-testid": "progress-dot"
1607
+ }
1608
+ ),
1609
+ /* @__PURE__ */ a.jsx(
1610
+ "div",
1611
+ {
1612
+ className: S("line", {
1613
+ active: i < t
1614
+ })
1615
+ }
1616
+ )
1617
+ ] }, r);
1618
+ }) }) }) });
1632
1619
  const yl = ({ elementId: t, offset: e = 20 }) => {
1633
1620
  const n = G(), r = () => {
1634
1621
  const i = document.getElementById(t);
@@ -1653,7 +1640,7 @@ const yl = ({ elementId: t, offset: e = 20 }) => {
1653
1640
  };
1654
1641
  let st = !1;
1655
1642
  const Gi = ({ isOpen: t = !1, isLoading: e = !1, children: n }) => {
1656
- const r = G(), i = pe(null), [s, o] = X("hidden");
1643
+ const r = G(), i = pe(null), [s, o] = ee("hidden");
1657
1644
  ae(() => {
1658
1645
  const f = i.current;
1659
1646
  if (f)
@@ -2031,7 +2018,7 @@ function Gn() {
2031
2018
  return Ne(De);
2032
2019
  }
2033
2020
  const ss = ({ children: t, user: e }) => /* @__PURE__ */ a.jsx(De.Provider, { value: e, children: t }), Sl = ({ bootstrap: t, children: e, intl: n, showDevTools: r }) => {
2034
- const [i, s] = X({ isLoading: !0 });
2021
+ const [i, s] = ee({ isLoading: !0 });
2035
2022
  return ae(() => {
2036
2023
  t().then((o) => {
2037
2024
  s({ ...o, isLoading: !1 }), Hi(5e3);
@@ -2131,7 +2118,7 @@ const Cl = ({
2131
2118
  text: r,
2132
2119
  children: i
2133
2120
  }) => {
2134
- const s = G(), o = pe(null), [c, f] = X(""), [l, d] = X("closed");
2121
+ const s = G(), o = pe(null), [c, f] = ee(""), [l, d] = ee("closed");
2135
2122
  ae(() => {
2136
2123
  const p = o.current;
2137
2124
  if (p)
@@ -2469,7 +2456,7 @@ const wr = 256, Ze = ({
2469
2456
  height: s = wr,
2470
2457
  ...o
2471
2458
  }) => {
2472
- const [c, f] = X(!1), l = pe(null);
2459
+ const [c, f] = ee(!1), l = pe(null);
2473
2460
  ae(() => {
2474
2461
  const u = l.current;
2475
2462
  if (!u)
@@ -2774,7 +2761,7 @@ function js() {
2774
2761
  function V(D) {
2775
2762
  return j(D) === p;
2776
2763
  }
2777
- function ee(D) {
2764
+ function X(D) {
2778
2765
  return j(D) === n;
2779
2766
  }
2780
2767
  function re(D) {
@@ -2786,7 +2773,7 @@ function js() {
2786
2773
  function oe(D) {
2787
2774
  return j(D) === u;
2788
2775
  }
2789
- ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = F, ue.ContextProvider = q, ue.Element = R, ue.ForwardRef = O, ue.Fragment = C, ue.Lazy = T, ue.Memo = x, ue.Portal = N, ue.Profiler = I, ue.StrictMode = W, ue.Suspense = A, ue.isAsyncMode = J, ue.isConcurrentMode = k, ue.isContextConsumer = P, ue.isContextProvider = z, ue.isElement = B, ue.isForwardRef = H, ue.isFragment = te, ue.isLazy = Y, ue.isMemo = V, ue.isPortal = ee, ue.isProfiler = re, ue.isStrictMode = M, ue.isSuspense = oe, ue.isValidElementType = E, ue.typeOf = j;
2776
+ ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = F, ue.ContextProvider = q, ue.Element = R, ue.ForwardRef = O, ue.Fragment = C, ue.Lazy = T, ue.Memo = x, ue.Portal = N, ue.Profiler = I, ue.StrictMode = W, ue.Suspense = A, ue.isAsyncMode = J, ue.isConcurrentMode = k, ue.isContextConsumer = P, ue.isContextProvider = z, ue.isElement = B, ue.isForwardRef = H, ue.isFragment = te, ue.isLazy = Y, ue.isMemo = V, ue.isPortal = X, ue.isProfiler = re, ue.isStrictMode = M, ue.isSuspense = oe, ue.isValidElementType = E, ue.typeOf = j;
2790
2777
  }()), ue;
2791
2778
  }
2792
2779
  var Er;
@@ -2963,31 +2950,31 @@ function Ss() {
2963
2950
  function _(k) {
2964
2951
  if (process.env.NODE_ENV !== "production")
2965
2952
  var P = {}, z = 0;
2966
- function B(te, Y, V, ee, re, M, oe) {
2967
- if (ee = ee || m, M = M || V, oe !== n) {
2953
+ function B(te, Y, V, X, re, M, oe) {
2954
+ if (X = X || m, M = M || V, oe !== n) {
2968
2955
  if (f) {
2969
2956
  var D = new Error(
2970
2957
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
2971
2958
  );
2972
2959
  throw D.name = "Invariant Violation", D;
2973
2960
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
2974
- var ve = ee + ":" + V;
2961
+ var ve = X + ":" + V;
2975
2962
  !P[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
2976
2963
  z < 3 && (s(
2977
- "You are manually calling a React.PropTypes validation function for the `" + M + "` prop on `" + ee + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
2964
+ "You are manually calling a React.PropTypes validation function for the `" + M + "` prop on `" + X + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
2978
2965
  ), P[ve] = !0, z++);
2979
2966
  }
2980
2967
  }
2981
- return Y[V] == null ? te ? Y[V] === null ? new y("The " + re + " `" + M + "` is marked as required " + ("in `" + ee + "`, but its value is `null`.")) : new y("The " + re + " `" + M + "` is marked as required in " + ("`" + ee + "`, but its value is `undefined`.")) : null : k(Y, V, ee, re, M);
2968
+ return Y[V] == null ? te ? Y[V] === null ? new y("The " + re + " `" + M + "` is marked as required " + ("in `" + X + "`, but its value is `null`.")) : new y("The " + re + " `" + M + "` is marked as required in " + ("`" + X + "`, but its value is `undefined`.")) : null : k(Y, V, X, re, M);
2982
2969
  }
2983
2970
  var H = B.bind(null, !1);
2984
2971
  return H.isRequired = B.bind(null, !0), H;
2985
2972
  }
2986
2973
  function v(k) {
2987
2974
  function P(z, B, H, te, Y, V) {
2988
- var ee = z[B], re = W(ee);
2975
+ var X = z[B], re = W(X);
2989
2976
  if (re !== k) {
2990
- var M = A(ee);
2977
+ var M = A(X);
2991
2978
  return new y(
2992
2979
  "Invalid " + te + " `" + Y + "` of type " + ("`" + M + "` supplied to `" + H + "`, expected ") + ("`" + k + "`."),
2993
2980
  { expectedType: k }
@@ -3006,8 +2993,8 @@ function Ss() {
3006
2993
  return new y("Property `" + Y + "` of component `" + H + "` has invalid PropType notation inside arrayOf.");
3007
2994
  var V = z[B];
3008
2995
  if (!Array.isArray(V)) {
3009
- var ee = W(V);
3010
- return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + ee + "` supplied to `" + H + "`, expected an array."));
2996
+ var X = W(V);
2997
+ return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + X + "` supplied to `" + H + "`, expected an array."));
3011
2998
  }
3012
2999
  for (var re = 0; re < V.length; re++) {
3013
3000
  var M = k(V, re, H, te, Y + "[" + re + "]", n);
@@ -3043,8 +3030,8 @@ function Ss() {
3043
3030
  function U(k) {
3044
3031
  function P(z, B, H, te, Y) {
3045
3032
  if (!(z[B] instanceof k)) {
3046
- var V = k.name || m, ee = J(z[B]);
3047
- return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + ee + "` supplied to `" + H + "`, expected ") + ("instance of `" + V + "`."));
3033
+ var V = k.name || m, X = J(z[B]);
3034
+ return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + X + "` supplied to `" + H + "`, expected ") + ("instance of `" + V + "`."));
3048
3035
  }
3049
3036
  return null;
3050
3037
  }
@@ -3056,8 +3043,8 @@ function Ss() {
3056
3043
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
3057
3044
  ) : s("Invalid argument supplied to oneOf, expected an array.")), o;
3058
3045
  function P(z, B, H, te, Y) {
3059
- for (var V = z[B], ee = 0; ee < k.length; ee++)
3060
- if (g(V, k[ee]))
3046
+ for (var V = z[B], X = 0; X < k.length; X++)
3047
+ if (g(V, k[X]))
3061
3048
  return null;
3062
3049
  var re = JSON.stringify(k, function(oe, D) {
3063
3050
  var ve = A(D);
@@ -3071,9 +3058,9 @@ function Ss() {
3071
3058
  function P(z, B, H, te, Y) {
3072
3059
  if (typeof k != "function")
3073
3060
  return new y("Property `" + Y + "` of component `" + H + "` has invalid PropType notation inside objectOf.");
3074
- var V = z[B], ee = W(V);
3075
- if (ee !== "object")
3076
- return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + ee + "` supplied to `" + H + "`, expected an object."));
3061
+ var V = z[B], X = W(V);
3062
+ if (X !== "object")
3063
+ return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + X + "` supplied to `" + H + "`, expected an object."));
3077
3064
  for (var re in V)
3078
3065
  if (r(V, re)) {
3079
3066
  var M = k(V, re, H, te, Y + "." + re, n);
@@ -3094,15 +3081,15 @@ function Ss() {
3094
3081
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Z(z) + " at index " + P + "."
3095
3082
  ), o;
3096
3083
  }
3097
- function B(H, te, Y, V, ee) {
3084
+ function B(H, te, Y, V, X) {
3098
3085
  for (var re = [], M = 0; M < k.length; M++) {
3099
- var oe = k[M], D = oe(H, te, Y, V, ee, n);
3086
+ var oe = k[M], D = oe(H, te, Y, V, X, n);
3100
3087
  if (D == null)
3101
3088
  return null;
3102
3089
  D.data && r(D.data, "expectedType") && re.push(D.data.expectedType);
3103
3090
  }
3104
3091
  var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
3105
- return new y("Invalid " + V + " `" + ee + "` supplied to " + ("`" + Y + "`" + ve + "."));
3092
+ return new y("Invalid " + V + " `" + X + "` supplied to " + ("`" + Y + "`" + ve + "."));
3106
3093
  }
3107
3094
  return _(B);
3108
3095
  }
@@ -3119,9 +3106,9 @@ function Ss() {
3119
3106
  }
3120
3107
  function T(k) {
3121
3108
  function P(z, B, H, te, Y) {
3122
- var V = z[B], ee = W(V);
3123
- if (ee !== "object")
3124
- return new y("Invalid " + te + " `" + Y + "` of type `" + ee + "` " + ("supplied to `" + H + "`, expected `object`."));
3109
+ var V = z[B], X = W(V);
3110
+ if (X !== "object")
3111
+ return new y("Invalid " + te + " `" + Y + "` of type `" + X + "` " + ("supplied to `" + H + "`, expected `object`."));
3125
3112
  for (var re in k) {
3126
3113
  var M = k[re];
3127
3114
  if (typeof M != "function")
@@ -3136,9 +3123,9 @@ function Ss() {
3136
3123
  }
3137
3124
  function x(k) {
3138
3125
  function P(z, B, H, te, Y) {
3139
- var V = z[B], ee = W(V);
3140
- if (ee !== "object")
3141
- return new y("Invalid " + te + " `" + Y + "` of type `" + ee + "` " + ("supplied to `" + H + "`, expected `object`."));
3126
+ var V = z[B], X = W(V);
3127
+ if (X !== "object")
3128
+ return new y("Invalid " + te + " `" + Y + "` of type `" + X + "` " + ("supplied to `" + H + "`, expected `object`."));
3142
3129
  var re = e({}, z[B], k);
3143
3130
  for (var M in re) {
3144
3131
  var oe = k[M];
@@ -4279,7 +4266,7 @@ const en = ({
4279
4266
  className: d = "",
4280
4267
  gtmContext: u = "Modal"
4281
4268
  }) => {
4282
- const m = G(), [p, g] = X(e), y = (b) => {
4269
+ const m = G(), [p, g] = ee(e), y = (b) => {
4283
4270
  b.key === "Escape" && _(!1);
4284
4271
  };
4285
4272
  ae(() => (window.addEventListener("keyup", y), () => {
@@ -4339,13 +4326,13 @@ const Ct = "emailHelperTextBox_", wo = ({
4339
4326
  redirectPath: n,
4340
4327
  resendVerificationCode: r
4341
4328
  }) => {
4342
- const i = G(), [s, o] = X({
4329
+ const i = G(), [s, o] = ee({
4343
4330
  path: `${Ct}default`,
4344
4331
  type: "default",
4345
4332
  link: {},
4346
4333
  mail: {},
4347
4334
  error: ""
4348
- }), [c, f] = X(!1), l = Jr(
4335
+ }), [c, f] = ee(!1), l = Jr(
4349
4336
  (p) => {
4350
4337
  p.preventDefault(), p.stopPropagation();
4351
4338
  const g = (y) => {
@@ -4520,11 +4507,11 @@ const Ye = {
4520
4507
  }) => {
4521
4508
  const { onChange: r = () => {
4522
4509
  }, onKeyInput: i = async () => {
4523
- } } = n, [{ input: s, displayInput: o, debouncedInput: c }, f] = X({
4510
+ } } = n, [{ input: s, displayInput: o, debouncedInput: c }, f] = ee({
4524
4511
  input: t,
4525
4512
  displayInput: t,
4526
4513
  debouncedInput: t
4527
- }), [{ predictions: l, activePredictionIndex: d, isPredictionSelected: u }, m] = X({
4514
+ }), [{ predictions: l, activePredictionIndex: d, isPredictionSelected: u }, m] = ee({
4528
4515
  predictions: [],
4529
4516
  activePredictionIndex: -1,
4530
4517
  isPredictionSelected: !!t
@@ -4655,7 +4642,7 @@ const Eo = ({
4655
4642
  multiSelectOptions: f,
4656
4643
  id: l
4657
4644
  }) => {
4658
- const d = G(), [u, m] = X(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [y, _] = X(g);
4645
+ const d = G(), [u, m] = ee(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [y, _] = ee(g);
4659
4646
  let v;
4660
4647
  Array.isArray(y) && y.length === 1 && typeof y[0] == "string" ? v = e && y ? e.find((F) => F.id === y[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(y) && y.length === 1 && typeof y[0] != "string" ? v = y[0] : v = { id: "", label: "" }, ae(() => {
4661
4648
  _(g);
@@ -4857,7 +4844,7 @@ const Co = ({
4857
4844
  gtm: { context: n } = { context: void 0 },
4858
4845
  ...r
4859
4846
  }) => {
4860
- const i = G(), s = pe(), o = t || s, [c, f] = X(!1), [l, d] = X(e), u = () => {
4847
+ const i = G(), s = pe(), o = t || s, [c, f] = ee(!1), [l, d] = ee(e), u = () => {
4861
4848
  var m;
4862
4849
  f(!c), d(c ? "password" : "text"), (m = o.current) == null || m.focus();
4863
4850
  };
@@ -5347,7 +5334,7 @@ const $l = ({
5347
5334
  className: s = "",
5348
5335
  hasLoaded: o = !1
5349
5336
  }) => {
5350
- const c = G(), [f, l] = X({
5337
+ const c = G(), [f, l] = ee({
5351
5338
  setUp: !1,
5352
5339
  id: null,
5353
5340
  rating: null,
@@ -5429,7 +5416,7 @@ const Rl = ({
5429
5416
  isDisabled: s = !1,
5430
5417
  className: o = ""
5431
5418
  }) => {
5432
- const [c, f] = X(
5419
+ const [c, f] = ee(
5433
5420
  typeof r == "boolean" || typeof r == "string" ? r : n[0].value
5434
5421
  );
5435
5422
  ae(() => {
@@ -5479,7 +5466,7 @@ const Rl = ({
5479
5466
  );
5480
5467
  };
5481
5468
  function Ml({ className: t = "", userId: e, userName: n, src: r, setUserImage: i, uploadImage: s }) {
5482
- const [o, c] = X(!1), [f, l] = X(!1), d = pe(null), u = async (m) => {
5469
+ const [o, c] = ee(!1), [f, l] = ee(!1), d = pe(null), u = async (m) => {
5483
5470
  c(!0), l(!1);
5484
5471
  try {
5485
5472
  const p = m.target.files && m.target.files[0];
@@ -5590,7 +5577,7 @@ const Oo = ({
5590
5577
  initialFormStatus: l = "NOT_SUBMITTED"
5591
5578
  /* NOT_SUBMITTED */
5592
5579
  }) => {
5593
- const [d, u] = X([]), [m, p] = X(!0), [g, y] = X(l), { formatMessage: _ } = G(), v = async (j) => {
5580
+ const [d, u] = ee([]), [m, p] = ee(!0), [g, y] = ee(l), { formatMessage: _ } = G(), v = async (j) => {
5594
5581
  j.preventDefault();
5595
5582
  try {
5596
5583
  await f(d), u([]), y(
@@ -5675,7 +5662,7 @@ const Oo = ({
5675
5662
  CONFIRMED_PASSWORD: "confirmedPassword",
5676
5663
  CURRENT_PASSWORD: "oldPassword"
5677
5664
  }, Fl = ({ functions: t, ...e }) => {
5678
- const { formatMessage: n } = G(), [r, i] = X(null), [s, o] = X(!1), [c, f] = X({
5665
+ const { formatMessage: n } = G(), [r, i] = ee(null), [s, o] = ee(!1), [c, f] = ee({
5679
5666
  isMoreThanEightCharacters: !1,
5680
5667
  includesNumberAndSymbol: !1,
5681
5668
  includesLowerAndUppercase: !1
@@ -5685,7 +5672,7 @@ const Oo = ({
5685
5672
  id: Te.NEW_PASSWORD,
5686
5673
  type: "password",
5687
5674
  autoComplete: "password",
5688
- placeholder: "•••••••••",
5675
+ placeholder: "",
5689
5676
  label: n({ id: "passwordRules_newPassword_label" }),
5690
5677
  validation: xn(["required", d]),
5691
5678
  functions: {
@@ -5699,7 +5686,7 @@ const Oo = ({
5699
5686
  id: Te.CONFIRMED_PASSWORD,
5700
5687
  type: "password",
5701
5688
  autoComplete: "password",
5702
- placeholder: "•••••••••",
5689
+ placeholder: "",
5703
5690
  label: n({ id: "passwordRules_confirmPassword_label" }),
5704
5691
  validation: xn(["required", l])
5705
5692
  }
@@ -5708,7 +5695,7 @@ const Oo = ({
5708
5695
  "data-testid": Te.CURRENT_PASSWORD,
5709
5696
  id: Te.CURRENT_PASSWORD,
5710
5697
  type: "password",
5711
- placeholder: "•••••••••",
5698
+ placeholder: "",
5712
5699
  label: n({ id: "passwordRules_currentPassword_label" }),
5713
5700
  validation: xn(["required"])
5714
5701
  }), s && u.push({
@@ -6242,7 +6229,7 @@ const Dl = ({
6242
6229
  }
6243
6230
  );
6244
6231
  const Al = ({ members: t }) => {
6245
- const [e, n] = X(!1), r = (i) => {
6232
+ const [e, n] = ee(!1), r = (i) => {
6246
6233
  const { fullName: s, jobTitle: o, organisation: c, photo: f } = i || {};
6247
6234
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
6248
6235
  /* @__PURE__ */ a.jsx(Ze, { name: s, src: f }),
@@ -6398,7 +6385,7 @@ const Al = ({ members: t }) => {
6398
6385
  }
6399
6386
  }, Uo = ({ data: t, cta: e, link: n, gtmContext: r }) => {
6400
6387
  var g;
6401
- const i = G(), [s, o] = X({
6388
+ const i = G(), [s, o] = ee({
6402
6389
  loading: !1,
6403
6390
  registered: t.registered || !1
6404
6391
  });
@@ -6485,7 +6472,7 @@ const Zo = {
6485
6472
  gtmContext: i = "Carousel",
6486
6473
  className: s = ""
6487
6474
  }) => {
6488
- const o = G(), c = Ne(De), f = c && typeof c.id == "string", [l, d] = X({
6475
+ const o = G(), c = Ne(De), f = c && typeof c.id == "string", [l, d] = ee({
6489
6476
  data: null,
6490
6477
  isLoading: !0
6491
6478
  }), { data: u, isLoading: m } = l, p = Jr(() => {
@@ -6639,10 +6626,10 @@ const Ko = ({
6639
6626
  className: s,
6640
6627
  gtmContext: o
6641
6628
  }) => {
6642
- const c = G(), [f, l] = X({
6629
+ const c = G(), [f, l] = ee({
6643
6630
  cardsPerPage: 4,
6644
6631
  isLoading: !0
6645
- }), { cardsPerPage: d, isLoading: u } = f, [m, p] = X({
6632
+ }), { cardsPerPage: d, isLoading: u } = f, [m, p] = ee({
6646
6633
  currentPage: 0,
6647
6634
  loadedPages: [0]
6648
6635
  }), { currentPage: g, loadedPages: y } = m, _ = e.length, v = Math.ceil(_ / d), b = pe(null), E = yt(!0, !0, b == null ? void 0 : b.current);
@@ -6819,7 +6806,7 @@ const kn = "joinCommunityButton", Da = ({
6819
6806
  }, leave: () => {
6820
6807
  } }
6821
6808
  }) => {
6822
- const i = G(), s = Ne(De), o = s && typeof s.id == "string", [c, f] = X(t), [l, d] = X(t ? "joined" : "notJoined");
6809
+ const i = G(), s = Ne(De), o = s && typeof s.id == "string", [c, f] = ee(t), [l, d] = ee(t ? "joined" : "notJoined");
6823
6810
  ae(() => {
6824
6811
  l === "joining" ? d("joined") : l === "leaving" && d("notJoined");
6825
6812
  }, [c]);
@@ -6930,7 +6917,7 @@ const ql = ({
6930
6917
  text: typeof e != "boolean" && e.text || s.formatMessage({ id: "filters_all" })
6931
6918
  },
6932
6919
  ...t
6933
- ] : t, [c, f] = X(e ? ["all"] : []), l = (d, u) => {
6920
+ ] : t, [c, f] = ee(e ? ["all"] : []), l = (d, u) => {
6934
6921
  let m = [];
6935
6922
  c.includes(d) ? m = c.filter((p) => p !== d) : d === "all" ? m = ["all"] : n ? m = [...c.filter((p) => p !== "all"), d] : m = [d], f((p) => (r && typeof r == "function" && r({ current: m, previous: p }), m)), u && typeof u == "function" && u();
6936
6923
  };
@@ -6978,7 +6965,7 @@ const Tn = {
6978
6965
  label: c,
6979
6966
  className: f = ""
6980
6967
  }) => {
6981
- const l = G(), [d, u] = X(t);
6968
+ const l = G(), [d, u] = ee(t);
6982
6969
  if (ae(() => {
6983
6970
  t !== d && u(t);
6984
6971
  }, [t]), !r || !Object.values(r).some(
@@ -7041,7 +7028,7 @@ const En = vi({ locale: "en", messages: Kn }), nn = ({
7041
7028
  className: c = "",
7042
7029
  gtmContext: f = "LoadMore"
7043
7030
  }) => {
7044
- const [l, d] = X(""), u = async (m) => {
7031
+ const [l, d] = ee(""), u = async (m) => {
7045
7032
  try {
7046
7033
  await e(m);
7047
7034
  } catch (p) {
@@ -7087,7 +7074,7 @@ const Qo = ({
7087
7074
  }) => {
7088
7075
  const i = G(), s = pe(
7089
7076
  null
7090
- ), [o, c] = X(!1), f = (l) => {
7077
+ ), [o, c] = ee(!1), f = (l) => {
7091
7078
  s.current && l.target instanceof HTMLElement && !s.current.contains(l.target) && c(!1);
7092
7079
  };
7093
7080
  return ae(() => (document.addEventListener("click", f, !0), () => {
@@ -7288,7 +7275,7 @@ const zl = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
7288
7275
  }
7289
7276
  }
7290
7277
  }
7291
- const [s, o] = X(
7278
+ const [s, o] = ee(
7292
7279
  (l = t[i]) != null && l.id ? t[i].id : r(t[i].id, t[i].text, i)
7293
7280
  );
7294
7281
  ae(() => {
@@ -7398,7 +7385,7 @@ const Nn = "cookieBanner_", Pn = [
7398
7385
  "apolitical-performance-cookie-consent",
7399
7386
  "functional-cookie-consent"
7400
7387
  ], $n = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), ic = () => {
7401
- const t = G(), [e, n, r] = ea(Pn), [i, s] = X(
7388
+ const t = G(), [e, n, r] = ea(Pn), [i, s] = ee(
7402
7389
  !e["apol-cookie-banner"]
7403
7390
  ), o = () => {
7404
7391
  Pn.forEach((d) => {
@@ -8301,9 +8288,9 @@ const we = "discussion_form_", er = ({
8301
8288
  gtmContext: l = "DiscussionForm"
8302
8289
  }) => {
8303
8290
  var O, C, T;
8304
- const d = G(), u = Ne(De), [m, p] = X(
8291
+ const d = G(), u = Ne(De), [m, p] = ee(
8305
8292
  n.isEditing && n.isEditing.text || ""
8306
- ), [g, y] = X(c.error || !1), [_, v] = X(!1), b = pe(null);
8293
+ ), [g, y] = ee(c.error || !1), [_, v] = ee(!1), b = pe(null);
8307
8294
  if (r || (r = b), n.isLoading)
8308
8295
  return /* @__PURE__ */ a.jsx(
8309
8296
  Ee,
@@ -8518,7 +8505,7 @@ const we = "discussion_form_", er = ({
8518
8505
  }, dc = {
8519
8506
  showForm: !1
8520
8507
  }, tr = Zn(dc), uc = ({ children: t }) => {
8521
- const [e, n] = X({
8508
+ const [e, n] = ee({
8522
8509
  showForm: !1
8523
8510
  });
8524
8511
  return /* @__PURE__ */ a.jsx(tr.Provider, { value: { ...e, updateConversation: n }, children: t });
@@ -8550,7 +8537,7 @@ const Mn = () => {
8550
8537
  ae(() => {
8551
8538
  p(i);
8552
8539
  }, [i]);
8553
- const [d, u] = X(e), [m, p] = X(i), [g, y] = X(!1), [_, v] = X(!1), b = bt(
8540
+ const [d, u] = ee(e), [m, p] = ee(i), [g, y] = ee(!1), [_, v] = ee(!1), b = bt(
8554
8541
  () => mc(n, Fn),
8555
8542
  [n]
8556
8543
  ), E = (w) => {
@@ -8687,14 +8674,14 @@ const Re = "discussion_", hc = 280, an = ({
8687
8674
  children: y,
8688
8675
  isTruncated: _ = !1
8689
8676
  }) => {
8690
- const v = G(), b = Ne(De), E = Ne(tr), { author: j, canLike: w, createdAt: U, id: F, likes: q = 0, userLiked: R, comments: O = 0 } = e, C = b && b.id && typeof j != "string" && j.id && j.id === b.id || !1, T = typeof w == "boolean" ? w : n ? !C : !1, x = C && (!e.createdAt || Li(e.createdAt, 10, "seconds")), N = pe(null), [I, W] = X({
8677
+ const v = G(), b = Ne(De), E = Ne(tr), { author: j, canLike: w, createdAt: U, id: F, likes: q = 0, userLiked: R, comments: O = 0 } = e, C = b && b.id && typeof j != "string" && j.id && j.id === b.id || !1, T = typeof w == "boolean" ? w : n ? !C : !1, x = C && (!e.createdAt || Li(e.createdAt, 10, "seconds")), N = pe(null), [I, W] = ee({
8691
8678
  body: e && e.body || "",
8692
8679
  isEditing: !1,
8693
8680
  didEdit: e && e.isEdited || !1
8694
- }), [A, Z] = X(!1), [J, k] = X(
8681
+ }), [A, Z] = ee(!1), [J, k] = ee(
8695
8682
  x ? "highlighted" : "default"
8696
8683
  /* Default */
8697
- ), [P, z] = X("");
8684
+ ), [P, z] = ee("");
8698
8685
  ae(() => {
8699
8686
  const M = N.current;
8700
8687
  if (!(!M || J === "default"))
@@ -8737,7 +8724,7 @@ const Re = "discussion_", hc = 280, an = ({
8737
8724
  const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Pe = e.slugs) == null ? void 0 : Pe.reply) || ((Se = e.slugs) == null ? void 0 : Se.answer) || ((Be = e.slugs) == null ? void 0 : Be.question) || "").toLowerCase().slice(-15)}`, D = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
8738
8725
  ve && ve.focus(), D && D.scrollIntoView({ behavior: "smooth" });
8739
8726
  }, 0);
8740
- }, ee = async () => {
8727
+ }, X = async () => {
8741
8728
  Z(!1);
8742
8729
  try {
8743
8730
  await c(zr(e.slugs));
@@ -8975,7 +8962,7 @@ const Re = "discussion_", hc = 280, an = ({
8975
8962
  {
8976
8963
  variant: "primary",
8977
8964
  className: "destructive",
8978
- onClick: ee,
8965
+ onClick: X,
8979
8966
  children: v.formatMessage({ id: "discussion_delete_delete" })
8980
8967
  }
8981
8968
  ],
@@ -10468,12 +10455,12 @@ const Yc = ({
10468
10455
  latest_children: E,
10469
10456
  children_counts: j
10470
10457
  } = _, U = (((I = b == null ? void 0 : b.like) == null ? void 0 : I.length) || 0) > 0 ? (W = b == null ? void 0 : b.like) == null ? void 0 : W.find((V) => {
10471
- var ee;
10472
- return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (y == null ? void 0 : y.id);
10458
+ var X;
10459
+ return ((X = V == null ? void 0 : V.user) == null ? void 0 : X.id) === (y == null ? void 0 : y.id);
10473
10460
  }) : !1, F = U ? U == null ? void 0 : U.id : "", q = !!U, O = (((A = E == null ? void 0 : E.like) == null ? void 0 : A.length) || 0) > 0 ? (Z = E == null ? void 0 : E.like) == null ? void 0 : Z.map((V) => {
10474
- var ee, re, M;
10461
+ var X, re, M;
10475
10462
  return {
10476
- id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
10463
+ id: (X = V == null ? void 0 : V.user) == null ? void 0 : X.id,
10477
10464
  name: (M = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : M.name
10478
10465
  };
10479
10466
  }) : !1, C = _ == null ? void 0 : _.user, T = (C == null ? void 0 : C.id) === (y == null ? void 0 : y.id), x = rn(i, T), N = typeof _.data.content == "string" ? (J = _ == null ? void 0 : _.data) == null ? void 0 : J.content : (
@@ -10516,7 +10503,7 @@ const Yc = ({
10516
10503
  createContent: () => null,
10517
10504
  deleteContent: () => p({ replyId: v }),
10518
10505
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10519
- updateContent: (V, { body: ee }) => u({ replyId: v, content: ee })
10506
+ updateContent: (V, { body: X }) => u({ replyId: v, content: X })
10520
10507
  },
10521
10508
  likes: {
10522
10509
  createLike: () => m({ replyId: v }),
@@ -10573,7 +10560,7 @@ const Yc = ({
10573
10560
  }
10574
10561
  ),
10575
10562
  f == null ? void 0 : f.map((E) => {
10576
- var Z, J, k, P, z, B, H, te, Y, V, ee, re;
10563
+ var Z, J, k, P, z, B, H, te, Y, V, X, re;
10577
10564
  const { id: j, own_children: w, latest_children: U, children_counts: F } = E, R = (((Z = w == null ? void 0 : w.like) == null ? void 0 : Z.length) || 0) > 0 ? (J = w == null ? void 0 : w.like) == null ? void 0 : J.find((M) => {
10578
10565
  var oe;
10579
10566
  return ((oe = M == null ? void 0 : M.user) == null ? void 0 : oe.id) === (b == null ? void 0 : b.id);
@@ -10607,7 +10594,7 @@ const Yc = ({
10607
10594
  name: (te = N.data) == null ? void 0 : te.name,
10608
10595
  organization: (Y = N.data) == null ? void 0 : Y.organization,
10609
10596
  jobTitle: (V = N.data) == null ? void 0 : V.jobTitle,
10610
- location: (ee = N.data) == null ? void 0 : ee.location,
10597
+ location: (X = N.data) == null ? void 0 : X.location,
10611
10598
  image: {
10612
10599
  thumbnail: ((re = N.data) == null ? void 0 : re.thumbnail) || void 0
10613
10600
  }
@@ -11011,7 +10998,6 @@ export {
11011
10998
  Pa as Modal,
11012
10999
  Qo as MoreMenu,
11013
11000
  gl as NUMBER_OF_USERS,
11014
- bl as NavigationDots,
11015
11001
  ec as NavigationMenu,
11016
11002
  Xl as NotFoundError,
11017
11003
  en as Overlay,
@@ -11023,6 +11009,7 @@ export {
11023
11009
  Ml as ProfileImageChange,
11024
11010
  Ze as ProfilePicture,
11025
11011
  ys as ProgressBar,
11012
+ bl as ProgressTracker,
11026
11013
  $l as Rating,
11027
11014
  Kc as RepliesFeed,
11028
11015
  gc as ResponsesHeading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "3.0.2-ac.1",
3
+ "version": "3.0.2-ac.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {