@australiangreens/ag-internal-components 0.0.41 → 0.0.43

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/dist/esm/index.js CHANGED
@@ -21,43 +21,43 @@ var Ae = (e, t) => {
21
21
  };
22
22
  var Se = (e, t, n) => (de(e, typeof t != "symbol" ? t + "" : t, n), n);
23
23
  var K = (e, t, n) => new Promise((r, a) => {
24
- var l = (s) => {
24
+ var s = (l) => {
25
25
  try {
26
- u(n.next(s));
26
+ u(n.next(l));
27
27
  } catch (d) {
28
28
  a(d);
29
29
  }
30
- }, c = (s) => {
30
+ }, c = (l) => {
31
31
  try {
32
- u(n.throw(s));
32
+ u(n.throw(l));
33
33
  } catch (d) {
34
34
  a(d);
35
35
  }
36
- }, u = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(l, c);
36
+ }, u = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(s, c);
37
37
  u((n = n.apply(e, t)).next());
38
38
  });
39
39
  import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
40
- import { useState as O, createContext as Le, useCallback as te, useContext as _e, useEffect as ne, useRef as ce } from "react";
41
- import { Typography as y, Button as vt, Paper as oe, styled as X, Box as A, IconButton as V, Drawer as xt, Container as Me, Divider as Te, CssBaseline as Ct, Snackbar as wt, Alert as bt, CircularProgress as He, LinearProgress as At, Autocomplete as St, TextField as Tt, FormHelperText as It } from "@mui/material";
40
+ import { useState as O, createContext as ye, useCallback as te, useContext as _e, useEffect as ne, useRef as ce } from "react";
41
+ import { Typography as P, Button as vt, Paper as oe, styled as X, Box as A, IconButton as V, Drawer as xt, Container as Me, Divider as Te, CssBaseline as Ct, Snackbar as wt, Alert as bt, CircularProgress as He, LinearProgress as At, Autocomplete as St, TextField as Tt, FormHelperText as It } from "@mui/material";
42
42
  import Ot from "@mui/material/CssBaseline";
43
43
  import { styled as M, createTheme as Re, alpha as pe } from "@mui/material/styles";
44
44
  import We from "@mui/material/Drawer";
45
- import { AgError as Bt } from "@australiangreens/ag-error";
45
+ import { AgError as Dt } from "@australiangreens/ag-error";
46
46
  import { createHelper as re } from "souvlaki";
47
47
  import ze from "@mui/material/List";
48
48
  import Ie from "@mui/material/Button";
49
- import Dt from "@mui/material/Dialog";
50
- import $t from "@mui/material/DialogActions";
51
- import kt from "@mui/material/DialogContent";
49
+ import $t from "@mui/material/Dialog";
50
+ import kt from "@mui/material/DialogActions";
51
+ import Bt from "@mui/material/DialogContent";
52
52
  import Nt from "@mui/material/DialogTitle";
53
53
  import { ArrowForward as Ge, ArrowBack as Ue, ViewHeadline as Et } from "@mui/icons-material";
54
- import { atom as D, useSetAtom as Ft, useAtom as E, getDefaultStore as yt, Provider as Ve } from "jotai";
55
- import { useHydrateAtoms as Pt } from "jotai/utils";
54
+ import { atom as $, useSetAtom as Ft, useAtom as E, getDefaultStore as Pt, Provider as Ve } from "jotai";
55
+ import { useHydrateAtoms as Lt } from "jotai/utils";
56
56
  function Un({ text: e }) {
57
57
  const [t, n] = O(0);
58
58
  return /* @__PURE__ */ p(_, { children: [
59
- /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
- /* @__PURE__ */ o(y, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
59
+ /* @__PURE__ */ o(P, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
+ /* @__PURE__ */ o(P, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
61
61
  /* @__PURE__ */ o(
62
62
  vt,
63
63
  {
@@ -77,7 +77,7 @@ function Un({ text: e }) {
77
77
  ] })
78
78
  ] });
79
79
  }
80
- const Xe = 330, qe = 73, N = "Navbar", L = {
80
+ const Xe = 330, qe = 73, N = "Navbar", y = {
81
81
  root: `${N}-root`,
82
82
  menuButton: `${N}-menuButton`,
83
83
  hide: `${N}-hide`,
@@ -85,21 +85,21 @@ const Xe = 330, qe = 73, N = "Navbar", L = {
85
85
  userInfoHolder: `${N}-userInfoHolder`,
86
86
  settings: `${N}-settings`,
87
87
  pieChartIcon: `${N}-pieChartIcon`
88
- }, Lt = M("div", { name: "NavBar" })(({ theme: e }) => ({
89
- [`&.${L.root}`]: {
88
+ }, yt = M("div", { name: "NavBar" })(({ theme: e }) => ({
89
+ [`&.${y.root}`]: {
90
90
  display: "flex"
91
91
  },
92
- [`& .${L.menuButton}`]: {
92
+ [`& .${y.menuButton}`]: {
93
93
  marginRight: 36
94
94
  },
95
- [`& .${L.hide}`]: {
95
+ [`& .${y.hide}`]: {
96
96
  display: "none"
97
97
  },
98
- [`& .${L.content}`]: {
98
+ [`& .${y.content}`]: {
99
99
  flexGrow: 1,
100
100
  padding: e.spacing(3)
101
101
  },
102
- [`& .${L.userInfoHolder}`]: {
102
+ [`& .${y.userInfoHolder}`]: {
103
103
  height: "148px",
104
104
  marginTop: "64px",
105
105
  marginBottom: "16px"
@@ -129,21 +129,21 @@ const Xe = 330, qe = 73, N = "Navbar", L = {
129
129
  }), !t && {
130
130
  "& .MuiDrawer-paper": Mt()
131
131
  }));
132
- class he extends Bt {
132
+ class he extends Dt {
133
133
  }
134
134
  Se(he, "errorName", "ContextError");
135
- const Qe = Le(null), Rt = {}, Wt = {}, zt = ({
135
+ const Qe = ye(null), Rt = {}, Wt = {}, zt = ({
136
136
  overrideState: e = Rt,
137
137
  overrideActions: t = Wt,
138
138
  children: n
139
139
  }) => {
140
- const [{ open: r }, a] = O({ open: !0 }), l = te((s) => {
141
- a({ open: s });
140
+ const [{ open: r }, a] = O({ open: !0 }), s = te((l) => {
141
+ a({ open: l });
142
142
  }, []), c = te(() => {
143
- a((s) => x(i({}, s), { open: !s.open }));
143
+ a((l) => x(i({}, l), { open: !l.open }));
144
144
  }, []), u = i(i({
145
145
  open: r,
146
- setOpen: l,
146
+ setOpen: s,
147
147
  toggleOpen: c
148
148
  }, e), t);
149
149
  return /* @__PURE__ */ o(Qe.Provider, { value: u, children: n });
@@ -194,7 +194,7 @@ const Qe = Le(null), Rt = {}, Wt = {}, zt = ({
194
194
  // '&.Mui-selected.Mui-focusVisible:hover': {
195
195
  // },
196
196
  }
197
- })), Be = 7, qn = M(ze)(({ theme: e }) => ({
197
+ })), De = 7, qn = M(ze)(({ theme: e }) => ({
198
198
  backgroundColor: "#e8e8e8",
199
199
  color: "inherit",
200
200
  "& .MuiListItem-root": {
@@ -203,7 +203,7 @@ const Qe = Le(null), Rt = {}, Wt = {}, zt = ({
203
203
  "& .MuiListItemButton-root": {
204
204
  " .MuiListItemIcon-root": {
205
205
  color: "inherit",
206
- padding: `${Be}px`
206
+ padding: `${De}px`
207
207
  },
208
208
  // Focus state
209
209
  "&.Mui-focusVisible": {
@@ -214,7 +214,7 @@ const Qe = Le(null), Rt = {}, Wt = {}, zt = ({
214
214
  borderLeftStyle: "solid",
215
215
  borderLeftWidth: "7px",
216
216
  borderLeftColor: e.palette.primary.main,
217
- paddingLeft: `calc(${e.spacing(2)} - ${Be}px)`
217
+ paddingLeft: `calc(${e.spacing(2)} - ${De}px)`
218
218
  },
219
219
  // Hover state
220
220
  "&:hover": {
@@ -238,7 +238,7 @@ function jn({
238
238
  children: t
239
239
  }) {
240
240
  const { open: n } = Gt();
241
- return /* @__PURE__ */ p(Lt, { className: L.root, "data-testid": e, children: [
241
+ return /* @__PURE__ */ p(yt, { className: y.root, "data-testid": e, children: [
242
242
  /* @__PURE__ */ o(Ot, {}),
243
243
  /* @__PURE__ */ o(
244
244
  Ht,
@@ -258,13 +258,13 @@ const Vt = ({
258
258
  children: n,
259
259
  maxWidth: r,
260
260
  primaryButton: a,
261
- secondaryButton: l,
261
+ secondaryButton: s,
262
262
  onClose: c
263
263
  }) => {
264
264
  var d, v;
265
- const [u, s] = O(!1);
265
+ const [u, l] = O(!1);
266
266
  return /* @__PURE__ */ p(
267
- Dt,
267
+ $t,
268
268
  {
269
269
  open: e,
270
270
  onClose: () => {
@@ -274,26 +274,28 @@ const Vt = ({
274
274
  maxWidth: r != null ? r : "xs",
275
275
  children: [
276
276
  /* @__PURE__ */ o(Nt, { children: t }),
277
- /* @__PURE__ */ o(kt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
- /* @__PURE__ */ p($t, { children: [
277
+ /* @__PURE__ */ o(Bt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
+ /* @__PURE__ */ p(kt, { children: [
279
279
  /* @__PURE__ */ o(
280
280
  Ie,
281
281
  {
282
- onClick: (d = l == null ? void 0 : l.onClick) != null ? d : c,
283
- "data-testid": l == null ? void 0 : l.testId,
284
- disabled: (l == null ? void 0 : l.disabled) || u,
285
- children: (v = l == null ? void 0 : l.text) != null ? v : "Cancel"
282
+ onClick: (d = s == null ? void 0 : s.onClick) != null ? d : c,
283
+ "data-testid": s == null ? void 0 : s.testId,
284
+ disabled: (s == null ? void 0 : s.disabled) || u,
285
+ color: s == null ? void 0 : s.buttonColor,
286
+ children: (v = s == null ? void 0 : s.text) != null ? v : "Cancel"
286
287
  }
287
288
  ),
288
289
  a && /* @__PURE__ */ o(
289
290
  Ie,
290
291
  {
291
292
  onClick: () => K(void 0, null, function* () {
292
- var f;
293
- s(!0), yield (f = a.onClick) == null ? void 0 : f.call(a), s(!1);
293
+ var m;
294
+ l(!0), yield (m = a.onClick) == null ? void 0 : m.call(a), l(!1);
294
295
  }),
295
296
  "data-testid": a.testId,
296
297
  disabled: a.disabled || u,
298
+ color: a == null ? void 0 : a.buttonColor,
297
299
  children: a.text
298
300
  }
299
301
  )
@@ -384,7 +386,7 @@ function Qt({
384
386
  ]
385
387
  }
386
388
  ),
387
- /* @__PURE__ */ o(y, { className: b.titleText, variant: "h6", noWrap: !0, children: e }),
389
+ /* @__PURE__ */ o(P, { className: b.titleText, variant: "h6", noWrap: !0, children: e }),
388
390
  n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
389
391
  V,
390
392
  {
@@ -417,7 +419,7 @@ const Ye = 400, Yt = X(xt, {
417
419
  ),
418
420
  name: "SidePanelDrawer"
419
421
  })(
420
- ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: r, navBarWidthOpen: a, navBarWidthClosed: l }) => ({
422
+ ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: r, navBarWidthOpen: a, navBarWidthClosed: s }) => ({
421
423
  width: e,
422
424
  "& .MuiDrawer-paper": i(i({
423
425
  position: "absolute",
@@ -428,7 +430,7 @@ const Ye = 400, Yt = X(xt, {
428
430
  }, t && {
429
431
  opacity: "50%"
430
432
  }), n === "left" && i({
431
- marginLeft: `${l}px`
433
+ marginLeft: `${s}px`
432
434
  }, r && {
433
435
  marginLeft: `${a}px`
434
436
  }))
@@ -453,22 +455,22 @@ const Ye = 400, Yt = X(xt, {
453
455
  marginRight: t === "right" ? e.spacing(2) : 0
454
456
  }
455
457
  }));
456
- function De({
458
+ function $e({
457
459
  children: e,
458
460
  anchor: t = "left",
459
461
  open: n,
460
462
  onClose: r = () => {
461
463
  },
462
464
  titleText: a = "",
463
- width: l = Ye,
465
+ width: s = Ye,
464
466
  showCloseArrow: c = !0,
465
467
  debugOpacity: u = !1,
466
- headerBoxProps: s = {},
468
+ headerBoxProps: l = {},
467
469
  onOpened: d,
468
470
  onClosed: v,
469
- "data-testid": f,
471
+ "data-testid": m,
470
472
  navBarOpen: C = !1,
471
- navBarWidthOpen: m = 0,
473
+ navBarWidthOpen: f = 0,
472
474
  navBarWidthClosed: w = 0
473
475
  }) {
474
476
  return /* @__PURE__ */ p(
@@ -481,15 +483,15 @@ function De({
481
483
  variant: "persistent",
482
484
  anchor: t,
483
485
  open: n,
484
- width: l,
486
+ width: s,
485
487
  debugOpacity: u,
486
- "data-testid": f,
488
+ "data-testid": m,
487
489
  navBarOpen: C,
488
- navBarWidthOpen: m,
490
+ navBarWidthOpen: f,
489
491
  navBarWidthClosed: w,
490
492
  children: [
491
- /* @__PURE__ */ o(Jt, x(i({ anchor: t }, s), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
492
- /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a }),
493
+ /* @__PURE__ */ o(Jt, x(i({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
494
+ /* @__PURE__ */ o(P, { variant: "h6", color: "inherit", component: "div", children: a }),
493
495
  c && /* @__PURE__ */ p(V, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
494
496
  /* @__PURE__ */ o(Ue, { "data-testid": "arrowbackicon" }),
495
497
  " "
@@ -499,7 +501,7 @@ function De({
499
501
  /* @__PURE__ */ o(Ge, {}),
500
502
  " "
501
503
  ] }),
502
- /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a })
504
+ /* @__PURE__ */ o(P, { variant: "h6", color: "inherit", component: "div", children: a })
503
505
  ] }) })),
504
506
  e
505
507
  ]
@@ -554,15 +556,15 @@ function Qn({
554
556
  leftPanel: n,
555
557
  rightPanel: r,
556
558
  sidePanelsAreMutuallyExclusive: a = !0,
557
- debugOpacity: l = !1,
559
+ debugOpacity: s = !1,
558
560
  pageContainerProps: c,
559
561
  pageContentDataTestId: u,
560
- topBarDataTestId: s,
562
+ topBarDataTestId: l,
561
563
  navBarOpen: d,
562
564
  navBarWidthOpen: v,
563
- navBarWidthClosed: f
565
+ navBarWidthClosed: m
564
566
  }) {
565
- const [C, m] = O(ue), [w, S] = O(ge), [B, T] = O(ue), [$, H] = O(ge), R = n !== void 0, W = r !== void 0, {
567
+ const [C, f] = O(ue), [w, S] = O(ge), [D, T] = O(ue), [k, H] = O(ge), R = n !== void 0, W = r !== void 0, {
566
568
  titleText: I,
567
569
  content: q,
568
570
  flavour: j,
@@ -570,7 +572,7 @@ function Qn({
570
572
  onChangeOpen: G,
571
573
  width: g,
572
574
  arrowButtons: h,
573
- startOpen: P,
575
+ startOpen: L,
574
576
  onOpened: at,
575
577
  onClosed: st,
576
578
  dataTestId: lt
@@ -588,18 +590,18 @@ function Qn({
588
590
  dataTestId: gt
589
591
  } = r ? i(i({}, Z), r) : i({}, Z);
590
592
  ne(() => {
591
- P !== ue && (m(P), T(P));
592
- }, [P]), ne(() => {
593
+ L !== ue && (f(L), T(L));
594
+ }, [L]), ne(() => {
593
595
  Y !== ge && (S(Y), H(Y));
594
596
  }, [Y]);
595
- const se = z === void 0 ? C : z, le = ie === void 0 ? w : ie, xe = (k) => {
596
- z === void 0 && (m(k), a && W && (k ? (S(!1), H(w)) : S($))), G && G(k);
597
- }, Ce = (k) => {
598
- ie === void 0 && (S(k), a && R && (k ? (m(!1), T(C)) : m(B))), ve && ve(k);
597
+ const se = z === void 0 ? C : z, le = ie === void 0 ? w : ie, xe = (B) => {
598
+ z === void 0 && (f(B), a && W && (B ? (S(!1), H(w)) : S(k))), G && G(B);
599
+ }, Ce = (B) => {
600
+ ie === void 0 && (S(B), a && R && (B ? (f(!1), T(C)) : f(D))), ve && ve(B);
599
601
  };
600
602
  return /* @__PURE__ */ p(A, { children: [
601
603
  R && /* @__PURE__ */ o(
602
- De,
604
+ $e,
603
605
  {
604
606
  "data-testid": lt,
605
607
  anchor: "left",
@@ -607,18 +609,18 @@ function Qn({
607
609
  onClose: () => xe(!1),
608
610
  width: g,
609
611
  titleText: I,
610
- debugOpacity: l,
612
+ debugOpacity: s,
611
613
  showCloseArrow: h === "both" || h === "close",
612
614
  onOpened: at,
613
615
  onClosed: st,
614
616
  navBarOpen: d,
615
617
  navBarWidthOpen: v,
616
- navBarWidthClosed: f,
618
+ navBarWidthClosed: m,
617
619
  children: q
618
620
  }
619
621
  ),
620
622
  W && /* @__PURE__ */ o(
621
- De,
623
+ $e,
622
624
  {
623
625
  "data-testid": gt,
624
626
  anchor: "right",
@@ -626,13 +628,13 @@ function Qn({
626
628
  onClose: () => Ce(!1),
627
629
  width: ae,
628
630
  titleText: dt,
629
- debugOpacity: l,
631
+ debugOpacity: s,
630
632
  showCloseArrow: Q === "both" || Q === "close",
631
633
  onOpened: pt,
632
634
  onClosed: ut,
633
635
  navBarOpen: d,
634
636
  navBarWidthOpen: v,
635
- navBarWidthClosed: f,
637
+ navBarWidthClosed: m,
636
638
  children: ct
637
639
  }
638
640
  ),
@@ -640,7 +642,7 @@ function Qn({
640
642
  Qt,
641
643
  i(i({
642
644
  titleText: t,
643
- "data-testid": s
645
+ "data-testid": l
644
646
  }, R && j === "push" ? {
645
647
  leftPanel: {
646
648
  open: se,
@@ -675,7 +677,7 @@ function Qn({
675
677
  )
676
678
  ] });
677
679
  }
678
- const en = 64, tn = 64, nn = 256, fe = D(!0), Je = D(nn), Ke = D(tn), Ze = D(""), et = D(en), tt = D(void 0), on = "TopBar", rn = {
680
+ const en = 64, tn = 64, nn = 256, fe = $(!0), Je = $(nn), Ke = $(tn), Ze = $(""), et = $(en), tt = $(void 0), on = "TopBar", rn = {
679
681
  titleText: `${on}-titleText`
680
682
  };
681
683
  function an({ titleText: e = "", height: t, "data-testid": n }) {
@@ -697,8 +699,8 @@ function an({ titleText: e = "", height: t, "data-testid": n }) {
697
699
  height: t
698
700
  },
699
701
  children: [
700
- /* @__PURE__ */ o(V, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: () => r((l) => !l), children: /* @__PURE__ */ o(Et, { fontSize: "medium" }) }),
701
- /* @__PURE__ */ o(y, { className: rn.titleText, variant: "h6", children: e })
702
+ /* @__PURE__ */ o(V, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: () => r((s) => !s), children: /* @__PURE__ */ o(Et, { fontSize: "medium" }) }),
703
+ /* @__PURE__ */ o(P, { className: rn.titleText, variant: "h6", children: e })
702
704
  ]
703
705
  }
704
706
  ) });
@@ -741,13 +743,13 @@ const ee = "Navbar", U = {
741
743
  backgroundColor: (r = (n = e == null ? void 0 : e.navBar) == null ? void 0 : n.backgroundColor) != null ? r : "white"
742
744
  // Provide default so tests don't need to wrap theme provider
743
745
  };
744
- }, $e = (e, t, n) => i({
746
+ }, ke = (e, t, n) => i({
745
747
  width: t,
746
748
  transition: e.transitions.create("width", {
747
749
  easing: e.transitions.easing.sharp,
748
750
  duration: e.transitions.duration.enteringScreen
749
751
  })
750
- }, nt(e, n)), ke = (e, t, n) => i({
752
+ }, nt(e, n)), Be = (e, t, n) => i({
751
753
  width: t,
752
754
  transition: e.transitions.create("width", {
753
755
  easing: e.transitions.easing.sharp,
@@ -760,10 +762,10 @@ const ee = "Navbar", U = {
760
762
  flexShrink: 0,
761
763
  whiteSpace: "nowrap",
762
764
  boxSizing: "border-box"
763
- }, t && x(i({}, $e(e, n, a)), {
764
- "& .MuiDrawer-paper": $e(e, n, a)
765
- })), !t && x(i({}, ke(e, r, a)), {
766
- "& .MuiDrawer-paper": ke(e, r, a)
765
+ }, t && x(i({}, ke(e, n, a)), {
766
+ "& .MuiDrawer-paper": ke(e, n, a)
767
+ })), !t && x(i({}, Be(e, r, a)), {
768
+ "& .MuiDrawer-paper": Be(e, r, a)
767
769
  })));
768
770
  function dn({ links: e }) {
769
771
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
@@ -774,7 +776,7 @@ function cn({
774
776
  widthOpen: n,
775
777
  widthClosed: r,
776
778
  "data-testid": a,
777
- top: l,
779
+ top: s,
778
780
  middle: c,
779
781
  bottom: u
780
782
  }) {
@@ -788,8 +790,8 @@ function cn({
788
790
  widthClosed: r,
789
791
  offsetTop: t,
790
792
  children: /* @__PURE__ */ p(A, { component: "nav", sx: {}, children: [
791
- l && /* @__PURE__ */ p(A, { sx: { flexGrow: 1 }, children: [
792
- l,
793
+ s && /* @__PURE__ */ p(A, { sx: { flexGrow: 1 }, children: [
794
+ s,
793
795
  /* @__PURE__ */ o(Te, { variant: "middle" })
794
796
  ] }),
795
797
  Array.isArray(c) ? /* @__PURE__ */ o(dn, { links: c }) : c,
@@ -830,28 +832,28 @@ function Yn({
830
832
  initialNavBarOpen: n,
831
833
  pageContainerProps: r,
832
834
  pageContentDataTestId: a,
833
- topBarDataTestId: l,
835
+ topBarDataTestId: s,
834
836
  navBarDataTestId: c,
835
837
  navBarMiddle: u
836
838
  }) {
837
- const [s, d] = E(fe), [v] = E(Je), [f] = E(Ke), [C, m] = E(Ze), [w] = E(et), [S] = E(tt);
839
+ const [l, d] = E(fe), [v] = E(Je), [m] = E(Ke), [C, f] = E(Ze), [w] = E(et), [S] = E(tt);
838
840
  return ne(() => {
839
- t !== void 0 && m(t);
840
- }, [t, m]), ne(() => {
841
+ t !== void 0 && f(t);
842
+ }, [t, f]), ne(() => {
841
843
  n !== void 0 && d(n);
842
844
  }, [n, d]), /* @__PURE__ */ p(A, { children: [
843
845
  /* @__PURE__ */ o(Ct, {}),
844
- /* @__PURE__ */ o(an, { titleText: C, "data-testid": l, height: w }),
846
+ /* @__PURE__ */ o(an, { titleText: C, "data-testid": s, height: w }),
845
847
  /* @__PURE__ */ p(A, { sx: { display: "flex" }, children: [
846
848
  /* @__PURE__ */ o(
847
849
  cn,
848
850
  {
849
- open: s,
851
+ open: l,
850
852
  top: S,
851
853
  middle: u,
852
- bottom: s ? /* @__PURE__ */ o(A, { sx: { padding: 2 }, children: /* @__PURE__ */ o(oe, { sx: { padding: 2, textWrap: "initial" }, variant: "outlined", children: "Placeholder for standard user settings, domain selector etc. It should be at the very bottom, but WIP" }) }) : /* @__PURE__ */ o(A, { sx: { paddingTop: 2 }, children: /* @__PURE__ */ o(oe, { sx: { padding: 2, textWrap: "initial" }, variant: "outlined", children: "WIP" }) }),
854
+ bottom: l ? /* @__PURE__ */ o(A, { sx: { padding: 2 }, children: /* @__PURE__ */ o(oe, { sx: { padding: 2, textWrap: "initial" }, variant: "outlined", children: "Placeholder for standard user settings, domain selector etc. It should be at the very bottom, but WIP" }) }) : /* @__PURE__ */ o(A, { sx: { paddingTop: 2 }, children: /* @__PURE__ */ o(oe, { sx: { padding: 2, textWrap: "initial" }, variant: "outlined", children: "WIP" }) }),
853
855
  widthOpen: v,
854
- widthClosed: f,
856
+ widthClosed: m,
855
857
  offsetTop: w,
856
858
  "data-testid": c
857
859
  }
@@ -888,9 +890,9 @@ const un = {
888
890
  })(), mn = {
889
891
  borderBottomLeftRadius: "0px",
890
892
  borderBottomRightRadius: "0px"
891
- }, vn = {}, xn = {}, ot = Le(null);
892
- function Cn(l) {
893
- var c = l, {
893
+ }, vn = {}, xn = {}, ot = ye(null);
894
+ function Cn(s) {
895
+ var c = s, {
894
896
  overrideState: e = vn,
895
897
  overrideActions: t = xn,
896
898
  shouldClose: n = gn.shouldClose,
@@ -902,36 +904,36 @@ function Cn(l) {
902
904
  "children"
903
905
  ]);
904
906
  var G;
905
- const [{ open: u }, s] = O({ open: !1 }), d = ce([]), v = ce(Date.now()), f = ce(0), C = te((g) => {
906
- s({ open: g });
907
- }, []), m = te((g = {}) => {
908
- f.current += 1, d.current.length >= Ee && Date.now() - v.current >= Fe && (v.current = Date.now(), console.error(
909
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ee}) hit ${f.current} times in last ${Fe}ms)`
910
- ), f.current = 0);
907
+ const [{ open: u }, l] = O({ open: !1 }), d = ce([]), v = ce(Date.now()), m = ce(0), C = te((g) => {
908
+ l({ open: g });
909
+ }, []), f = te((g = {}) => {
910
+ m.current += 1, d.current.length >= Ee && Date.now() - v.current >= Fe && (v.current = Date.now(), console.error(
911
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Ee}) hit ${m.current} times in last ${Fe}ms)`
912
+ ), m.current = 0);
911
913
  const h = i(x(i({}, Ne), {
912
914
  key: fn()
913
915
  }), g);
914
- return d.current.push(h), d.current.length === 1 && s({ open: !0 }), h.key;
915
- }, []), w = (g = "", h = {}) => m(i({ message: g, severity: "success" }, h)), S = (g = "", h = {}) => m(i({ message: g, severity: "info" }, h)), B = (g = "", h = {}) => m(i({ message: g, severity: "warning" }, h)), T = (g = "", h = {}) => m(i({ message: g, severity: "error" }, h)), $ = (g) => {
916
- const h = d.current.findIndex((P) => P.key === g);
916
+ return d.current.push(h), d.current.length === 1 && l({ open: !0 }), h.key;
917
+ }, []), w = (g = "", h = {}) => f(i({ message: g, severity: "success" }, h)), S = (g = "", h = {}) => f(i({ message: g, severity: "info" }, h)), D = (g = "", h = {}) => f(i({ message: g, severity: "warning" }, h)), T = (g = "", h = {}) => f(i({ message: g, severity: "error" }, h)), k = (g) => {
918
+ const h = d.current.findIndex((L) => L.key === g);
917
919
  if (h !== -1)
918
- return h === 0 ? (s({ open: !1 }), d.current[0]) : d.current.splice(h, 1);
920
+ return h === 0 ? (l({ open: !1 }), d.current[0]) : d.current.splice(h, 1);
919
921
  }, H = (g, h) => {
920
- n(g, h) && s({ open: !1 });
922
+ n(g, h) && l({ open: !1 });
921
923
  }, R = () => {
922
924
  }, W = () => {
923
- d.current.shift(), d.current.length > 0 && s({ open: !0 });
925
+ d.current.shift(), d.current.length > 0 && l({ open: !0 });
924
926
  }, I = (G = d.current[0]) != null ? G : i({}, Ne), q = {};
925
927
  "autoHideDuration" in I && (q.autoHideDuration = I.autoHideDuration);
926
928
  const j = i(i({}, un), a), z = i(i({
927
929
  open: u,
928
930
  setOpen: C,
929
- enqueueNotification: m,
931
+ enqueueNotification: f,
930
932
  enqueueSuccessNotification: w,
931
933
  enqueueInfoNotification: S,
932
- enqueueWarningNotification: B,
934
+ enqueueWarningNotification: D,
933
935
  enqueueErrorNotification: T,
934
- removeNotification: $
936
+ removeNotification: k
935
937
  }, e), t);
936
938
  return /* @__PURE__ */ p(ot.Provider, { value: z, children: [
937
939
  r,
@@ -971,17 +973,17 @@ function wn() {
971
973
  }
972
974
  const Jn = re(
973
975
  (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Cn, x(i({}, e), { overrideState: t, overrideActions: n, children: r }))
974
- ), bn = yt(), Kn = ({
976
+ ), bn = Pt(), Kn = ({
975
977
  children: e,
976
978
  store: t
977
979
  }) => /* @__PURE__ */ o(Ve, { store: t != null ? t : bn, children: e }), rt = "domainCode";
978
- var Pe;
979
- const ye = D(
980
- JSON.parse((Pe = localStorage.getItem(rt)) != null ? Pe : '{"domainCode": ""}').domainCode
981
- ), it = D(
982
- (e) => e(ye),
980
+ var Le;
981
+ const Pe = $(
982
+ JSON.parse((Le = localStorage.getItem(rt)) != null ? Le : '{"domainCode": ""}').domainCode
983
+ ), it = $(
984
+ (e) => e(Pe),
983
985
  (e, t, n) => {
984
- t(ye, n), localStorage.setItem(rt, JSON.stringify({ domainCode: n }));
986
+ t(Pe, n), localStorage.setItem(rt, JSON.stringify({ domainCode: n }));
985
987
  }
986
988
  ), An = {
987
989
  act: "ACT",
@@ -1004,15 +1006,15 @@ const ye = D(
1004
1006
  onClose: n,
1005
1007
  domainOptions: r,
1006
1008
  applicationName: a,
1007
- handleLogout: l
1009
+ handleLogout: s
1008
1010
  }) => {
1009
- const [c, u] = E(it), [s, d] = O(c), { enqueueSuccessNotification: v } = wn(), f = r.length === 0, C = !!c && !r.includes(c) && !r.includes(s), m = !c || f || C, w = () => K(void 0, null, function* () {
1010
- s ? (u(s), v(`Set domain to ${s}`), n()) : u("");
1011
+ const [c, u] = E(it), [l, d] = O(c), { enqueueSuccessNotification: v } = wn(), m = r.length === 0, C = !!c && !r.includes(c) && !r.includes(l), f = !c || m || C, w = () => K(void 0, null, function* () {
1012
+ l ? (u(l), v(`Set domain to ${l}`), n()) : u("");
1011
1013
  }), S = () => K(void 0, null, function* () {
1012
- c && !f && !C ? (d(c), n()) : m && l();
1014
+ c && !m && !C ? (d(c), n()) : f && s();
1013
1015
  });
1014
- let B;
1015
- return f ? B = "Unable to retrieve your active organisations. Try logging in again." : C && (B = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1016
+ let D;
1017
+ return m ? D = "Unable to retrieve your active organisations. Try logging in again." : C && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1016
1018
  Vt,
1017
1019
  {
1018
1020
  isOpen: t,
@@ -1020,15 +1022,17 @@ const ye = D(
1020
1022
  primaryButton: {
1021
1023
  text: "Confirm",
1022
1024
  onClick: w,
1023
- disabled: !s || f || C
1025
+ disabled: !l || m || C,
1026
+ buttonColor: "primary"
1024
1027
  },
1025
1028
  secondaryButton: {
1026
- text: m ? "Logout" : "Cancel",
1029
+ text: f ? "Logout" : "Cancel",
1027
1030
  onClick: S
1028
1031
  },
1029
- onClose: n,
1032
+ onClose: f ? () => {
1033
+ } : n,
1030
1034
  children: [
1031
- /* @__PURE__ */ p(y, { marginBottom: 2, children: [
1035
+ /* @__PURE__ */ p(P, { marginBottom: 2, children: [
1032
1036
  "Select the default organisation that you want to use with the ",
1033
1037
  a,
1034
1038
  "."
@@ -1039,8 +1043,8 @@ const ye = D(
1039
1043
  loading: e,
1040
1044
  multiple: !1,
1041
1045
  disableClearable: !1,
1042
- value: s !== "" ? s : null,
1043
- onChange: (T, $) => d($ != null ? $ : ""),
1046
+ value: l !== "" ? l : null,
1047
+ onChange: (T, k) => d(k != null ? k : ""),
1044
1048
  getOptionLabel: Sn,
1045
1049
  options: [...r],
1046
1050
  renderInput: (T) => /* @__PURE__ */ o(
@@ -1058,7 +1062,7 @@ const ye = D(
1058
1062
  )
1059
1063
  }
1060
1064
  ),
1061
- B && /* @__PURE__ */ o(It, { error: !0, children: B })
1065
+ D && /* @__PURE__ */ o(It, { error: !0, children: D })
1062
1066
  ]
1063
1067
  }
1064
1068
  );
@@ -1215,7 +1219,7 @@ const ye = D(
1215
1219
  }, no = re(() => ({ children: e }) => /* @__PURE__ */ o(Ve, { children: e })), In = ({
1216
1220
  initialValues: e,
1217
1221
  children: t
1218
- }) => (Pt(e), /* @__PURE__ */ o(_, { children: t })), oo = re(
1222
+ }) => (Lt(e), /* @__PURE__ */ o(_, { children: t })), oo = re(
1219
1223
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1220
1224
  In,
1221
1225
  {
@@ -1251,7 +1255,7 @@ export {
1251
1255
  it as domainCodeAtom,
1252
1256
  eo as fed21Theme,
1253
1257
  to as internalAgSystemsTheme,
1254
- L as navBarClasses,
1258
+ y as navBarClasses,
1255
1259
  fe as navBarOpenAtom,
1256
1260
  tt as navBarTopAtom,
1257
1261
  Ke as navBarWidthClosedAtom,