@australiangreens/ag-internal-components 0.0.37 → 0.0.39

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
@@ -1,15 +1,15 @@
1
- var gt = Object.defineProperty, ht = Object.defineProperties;
2
- var ft = Object.getOwnPropertyDescriptors;
1
+ var ht = Object.defineProperty, ft = Object.defineProperties;
2
+ var mt = Object.getOwnPropertyDescriptors;
3
3
  var J = Object.getOwnPropertySymbols;
4
4
  var we = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
5
- var de = (e, t, n) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
5
+ var de = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
7
  we.call(t, n) && de(e, n, t[n]);
8
8
  if (J)
9
9
  for (var n of J(t))
10
10
  be.call(t, n) && de(e, n, t[n]);
11
11
  return e;
12
- }, x = (e, t) => ht(e, ft(t));
12
+ }, x = (e, t) => ft(e, mt(t));
13
13
  var Ae = (e, t) => {
14
14
  var n = {};
15
15
  for (var r in e)
@@ -38,28 +38,28 @@ var K = (e, t, n) => new Promise((r, a) => {
38
38
  });
39
39
  import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
40
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 mt, Paper as oe, styled as X, Box as A, IconButton as V, Drawer as vt, Container as Me, Divider as Te, CssBaseline as xt, Snackbar as Ct, Alert as wt, CircularProgress as He, LinearProgress as bt, Autocomplete as At, TextField as St, FormHelperText as Tt } from "@mui/material";
42
- import It from "@mui/material/CssBaseline";
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";
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 Ot } from "@australiangreens/ag-error";
45
+ import { AgError as Bt } 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 Bt from "@mui/material/Dialog";
50
- import Dt from "@mui/material/DialogActions";
51
- import $t from "@mui/material/DialogContent";
52
- import kt from "@mui/material/DialogTitle";
53
- import { ArrowForward as Ge, ArrowBack as Ue, ViewHeadline as Nt } from "@mui/icons-material";
54
- import { atom as D, useSetAtom as Et, useAtom as E, Provider as Ft } from "jotai";
55
- import { useHydrateAtoms as yt } from "jotai/utils";
56
- function zn({ text: e }) {
49
+ import Dt from "@mui/material/Dialog";
50
+ import $t from "@mui/material/DialogActions";
51
+ import kt from "@mui/material/DialogContent";
52
+ import Nt from "@mui/material/DialogTitle";
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, createStore as yt, Provider as Ve } from "jotai";
55
+ import { useHydrateAtoms as Pt } from "jotai/utils";
56
+ function Un({ text: e }) {
57
57
  const [t, n] = O(0);
58
58
  return /* @__PURE__ */ p(_, { children: [
59
59
  /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
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" }) }),
61
61
  /* @__PURE__ */ o(
62
- mt,
62
+ vt,
63
63
  {
64
64
  variant: "outlined",
65
65
  onClick: () => n((r) => r + 1),
@@ -77,7 +77,7 @@ function zn({ text: e }) {
77
77
  ] })
78
78
  ] });
79
79
  }
80
- const Ve = 330, Xe = 73, N = "Navbar", L = {
80
+ const Xe = 330, qe = 73, N = "Navbar", L = {
81
81
  root: `${N}-root`,
82
82
  menuButton: `${N}-menuButton`,
83
83
  hide: `${N}-hide`,
@@ -85,7 +85,7 @@ const Ve = 330, Xe = 73, N = "Navbar", L = {
85
85
  userInfoHolder: `${N}-userInfoHolder`,
86
86
  settings: `${N}-settings`,
87
87
  pieChartIcon: `${N}-pieChartIcon`
88
- }, Pt = M("div", { name: "NavBar" })(({ theme: e }) => ({
88
+ }, Lt = M("div", { name: "NavBar" })(({ theme: e }) => ({
89
89
  [`&.${L.root}`]: {
90
90
  display: "flex"
91
91
  },
@@ -104,7 +104,7 @@ const Ve = 330, Xe = 73, N = "Navbar", L = {
104
104
  marginTop: "64px",
105
105
  marginBottom: "16px"
106
106
  }
107
- })), qe = () => ({
107
+ })), je = () => ({
108
108
  position: "absolute",
109
109
  height: "100%",
110
110
  overflowX: "hidden",
@@ -112,29 +112,29 @@ const Ve = 330, Xe = 73, N = "Navbar", L = {
112
112
  color: "white",
113
113
  backgroundColor: "black"
114
114
  // backgroundColor: '#e8e8e8',
115
- }), Lt = () => i({
116
- width: Ve
117
- }, qe()), _t = () => i({
115
+ }), _t = () => i({
118
116
  width: Xe
119
- }, qe()), Mt = M(We, {
117
+ }, je()), Mt = () => i({
118
+ width: qe
119
+ }, je()), Ht = M(We, {
120
120
  shouldForwardProp: (e) => e !== "open"
121
121
  })(({ theme: e, open: t }) => i(i({
122
- width: t ? Ve : Xe,
122
+ width: t ? Xe : qe,
123
123
  flexShrink: 0,
124
124
  whiteSpace: "nowrap",
125
125
  boxSizing: "border-box",
126
126
  zIndex: e.zIndex.drawer + 100
127
127
  }, t && {
128
- "& .MuiDrawer-paper": Lt()
129
- }), !t && {
130
128
  "& .MuiDrawer-paper": _t()
129
+ }), !t && {
130
+ "& .MuiDrawer-paper": Mt()
131
131
  }));
132
- class he extends Ot {
132
+ class he extends Bt {
133
133
  }
134
134
  Se(he, "errorName", "ContextError");
135
- const je = Le(null), Ht = {}, Rt = {}, Wt = ({
136
- overrideState: e = Ht,
137
- overrideActions: t = Rt,
135
+ const Qe = Le(null), Rt = {}, Wt = {}, zt = ({
136
+ overrideState: e = Rt,
137
+ overrideActions: t = Wt,
138
138
  children: n
139
139
  }) => {
140
140
  const [{ open: r }, a] = O({ open: !0 }), l = te((s) => {
@@ -146,17 +146,17 @@ const je = Le(null), Ht = {}, Rt = {}, Wt = ({
146
146
  setOpen: l,
147
147
  toggleOpen: c
148
148
  }, e), t);
149
- return /* @__PURE__ */ o(je.Provider, { value: u, children: n });
150
- }, zt = () => {
151
- const e = _e(je);
149
+ return /* @__PURE__ */ o(Qe.Provider, { value: u, children: n });
150
+ }, Gt = () => {
151
+ const e = _e(Qe);
152
152
  if (e === null)
153
153
  throw new he("Error: Tried to useNavBar outside of a <NavBarProvider>");
154
154
  return e;
155
- }, Gt = (e = {}) => i({
155
+ }, Ut = (e = {}) => i({
156
156
  open: !0
157
- }, e), Gn = re(
158
- (e = Gt(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Wt, { overrideState: e, overrideActions: t, children: n })
159
- ), Oe = 7, Un = M(ze)(({ theme: e }) => ({
157
+ }, e), Vn = re(
158
+ (e = Ut(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(zt, { overrideState: e, overrideActions: t, children: n })
159
+ ), Oe = 7, Xn = M(ze)(({ theme: e }) => ({
160
160
  backgroundColor: "black",
161
161
  color: "white",
162
162
  "& .MuiListItem-root": {
@@ -194,7 +194,7 @@ const je = Le(null), Ht = {}, Rt = {}, Wt = ({
194
194
  // '&.Mui-selected.Mui-focusVisible:hover': {
195
195
  // },
196
196
  }
197
- })), Be = 7, Vn = M(ze)(({ theme: e }) => ({
197
+ })), Be = 7, qn = M(ze)(({ theme: e }) => ({
198
198
  backgroundColor: "#e8e8e8",
199
199
  color: "inherit",
200
200
  "& .MuiListItem-root": {
@@ -233,15 +233,15 @@ const je = Le(null), Ht = {}, Rt = {}, Wt = ({
233
233
  // },
234
234
  }
235
235
  }));
236
- function Xn({
236
+ function jn({
237
237
  "data-testid": e,
238
238
  children: t
239
239
  }) {
240
- const { open: n } = zt();
241
- return /* @__PURE__ */ p(Pt, { className: L.root, "data-testid": e, children: [
242
- /* @__PURE__ */ o(It, {}),
240
+ const { open: n } = Gt();
241
+ return /* @__PURE__ */ p(Lt, { className: L.root, "data-testid": e, children: [
242
+ /* @__PURE__ */ o(Ot, {}),
243
243
  /* @__PURE__ */ o(
244
- Mt,
244
+ Ht,
245
245
  {
246
246
  variant: "permanent",
247
247
  anchor: "left",
@@ -252,7 +252,7 @@ function Xn({
252
252
  )
253
253
  ] });
254
254
  }
255
- const Ut = ({
255
+ const Vt = ({
256
256
  isOpen: e,
257
257
  dialogTitle: t,
258
258
  children: n,
@@ -264,7 +264,7 @@ const Ut = ({
264
264
  var d, v;
265
265
  const [u, s] = O(!1);
266
266
  return /* @__PURE__ */ p(
267
- Bt,
267
+ Dt,
268
268
  {
269
269
  open: e,
270
270
  onClose: () => {
@@ -273,9 +273,9 @@ const Ut = ({
273
273
  fullWidth: !0,
274
274
  maxWidth: r != null ? r : "xs",
275
275
  children: [
276
- /* @__PURE__ */ o(kt, { children: t }),
277
- /* @__PURE__ */ o($t, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
- /* @__PURE__ */ p(Dt, { children: [
276
+ /* @__PURE__ */ o(Nt, { children: t }),
277
+ /* @__PURE__ */ o(kt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
+ /* @__PURE__ */ p($t, { children: [
279
279
  /* @__PURE__ */ o(
280
280
  Ie,
281
281
  {
@@ -301,14 +301,14 @@ const Ut = ({
301
301
  ]
302
302
  }
303
303
  );
304
- }, Vt = 24, Xt = 64, F = "TopBar", b = {
304
+ }, Xt = 24, qt = 64, F = "TopBar", b = {
305
305
  topStripe: `${F}-topStripe`,
306
306
  titleBar: `${F}-titleBar`,
307
307
  titleSlider: `${F}-titleSlider`,
308
308
  titleText: `${F}-titleText`,
309
309
  leftPanelButton: `${F}-leftPanelButton`,
310
310
  rightPanelButton: `${F}-leftPanelButton`
311
- }, qt = X("div", {
311
+ }, jt = X("div", {
312
312
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
313
313
  name: F
314
314
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -317,12 +317,12 @@ const Ut = ({
317
317
  width: "100%",
318
318
  [`& .${b.topStripe}`]: {
319
319
  width: "100%",
320
- height: `${Vt}px`,
320
+ height: `${Xt}px`,
321
321
  backgroundColor: e.palette.primary.main
322
322
  },
323
323
  [`& .${b.titleBar}`]: {
324
324
  backgroundColor: e.palette.primary.light,
325
- height: `${Xt}px`,
325
+ height: `${qt}px`,
326
326
  padding: e.spacing(0, 3),
327
327
  width: "100%"
328
328
  },
@@ -360,13 +360,13 @@ const Ut = ({
360
360
  })
361
361
  };
362
362
  });
363
- function jt({
363
+ function Qt({
364
364
  titleText: e = "",
365
365
  leftPanel: t,
366
366
  rightPanel: n,
367
367
  "data-testid": r
368
368
  }) {
369
- return /* @__PURE__ */ p(qt, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
369
+ return /* @__PURE__ */ p(jt, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
370
370
  /* @__PURE__ */ o("div", { className: b.topStripe }),
371
371
  /* @__PURE__ */ o("div", { className: b.titleBar, children: /* @__PURE__ */ p(A, { className: b.titleSlider, children: [
372
372
  t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
@@ -403,7 +403,7 @@ function jt({
403
403
  ] }) })
404
404
  ] });
405
405
  }
406
- const Qe = 400, Qt = X(vt, {
406
+ const Ye = 400, Yt = X(xt, {
407
407
  shouldForwardProp: (e) => (
408
408
  // Note we do want anchor to be forwarded to the Drawer component
409
409
  ![
@@ -433,7 +433,7 @@ const Qe = 400, Qt = X(vt, {
433
433
  marginLeft: `${a}px`
434
434
  }))
435
435
  })
436
- ), Yt = X(A, {
436
+ ), Jt = X(A, {
437
437
  shouldForwardProp: (e) => !["anchor"].includes(e)
438
438
  })(({ theme: e, anchor: t }) => x(i({
439
439
  display: "flex",
@@ -460,7 +460,7 @@ function De({
460
460
  onClose: r = () => {
461
461
  },
462
462
  titleText: a = "",
463
- width: l = Qe,
463
+ width: l = Ye,
464
464
  showCloseArrow: c = !0,
465
465
  debugOpacity: u = !1,
466
466
  headerBoxProps: s = {},
@@ -472,7 +472,7 @@ function De({
472
472
  navBarWidthClosed: w = 0
473
473
  }) {
474
474
  return /* @__PURE__ */ p(
475
- Qt,
475
+ Yt,
476
476
  {
477
477
  SlideProps: {
478
478
  onEntered: () => d == null ? void 0 : d(),
@@ -488,7 +488,7 @@ function De({
488
488
  navBarWidthOpen: m,
489
489
  navBarWidthClosed: w,
490
490
  children: [
491
- /* @__PURE__ */ o(Yt, x(i({ anchor: t }, s), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
491
+ /* @__PURE__ */ o(Jt, x(i({ anchor: t }, s), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
492
492
  /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a }),
493
493
  c && /* @__PURE__ */ p(V, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
494
494
  /* @__PURE__ */ o(Ue, { "data-testid": "arrowbackicon" }),
@@ -506,7 +506,7 @@ function De({
506
506
  }
507
507
  );
508
508
  }
509
- const Jt = X("div", {
509
+ const Kt = X("div", {
510
510
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
511
511
  name: "PanelAwareMargins"
512
512
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -529,7 +529,7 @@ const Jt = X("div", {
529
529
  }),
530
530
  marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
531
531
  });
532
- }), Kt = X(Me, {
532
+ }), Zt = X(Me, {
533
533
  name: "PageContainer"
534
534
  })(({ theme: e }) => ({
535
535
  // Horizontal padding comes from the Container's gutter
@@ -538,7 +538,7 @@ const Jt = X("div", {
538
538
  })), ue = !1, ge = !1, Z = {
539
539
  titleText: "",
540
540
  flavour: "push",
541
- width: Qe,
541
+ width: Ye,
542
542
  arrowButtons: "both",
543
543
  startOpen: !1,
544
544
  open: void 0,
@@ -548,7 +548,7 @@ const Jt = X("div", {
548
548
  onClosed: void 0,
549
549
  dataTestId: void 0
550
550
  };
551
- function qn({
551
+ function Qn({
552
552
  children: e,
553
553
  titleText: t = "",
554
554
  leftPanel: n,
@@ -571,21 +571,21 @@ function qn({
571
571
  width: g,
572
572
  arrowButtons: h,
573
573
  startOpen: P,
574
- onOpened: it,
575
- onClosed: at,
576
- dataTestId: st
574
+ onOpened: at,
575
+ onClosed: st,
576
+ dataTestId: lt
577
577
  } = n ? i(i({}, Z), n) : i({}, Z), {
578
- titleText: lt,
579
- content: dt,
578
+ titleText: dt,
579
+ content: ct,
580
580
  flavour: me,
581
581
  open: ie,
582
582
  onChangeOpen: ve,
583
583
  width: ae,
584
584
  arrowButtons: Q,
585
585
  startOpen: Y,
586
- onOpened: ct,
587
- onClosed: pt,
588
- dataTestId: ut
586
+ onOpened: pt,
587
+ onClosed: ut,
588
+ dataTestId: gt
589
589
  } = r ? i(i({}, Z), r) : i({}, Z);
590
590
  ne(() => {
591
591
  P !== ue && (m(P), T(P));
@@ -601,7 +601,7 @@ function qn({
601
601
  R && /* @__PURE__ */ o(
602
602
  De,
603
603
  {
604
- "data-testid": st,
604
+ "data-testid": lt,
605
605
  anchor: "left",
606
606
  open: se,
607
607
  onClose: () => xe(!1),
@@ -609,8 +609,8 @@ function qn({
609
609
  titleText: I,
610
610
  debugOpacity: l,
611
611
  showCloseArrow: h === "both" || h === "close",
612
- onOpened: it,
613
- onClosed: at,
612
+ onOpened: at,
613
+ onClosed: st,
614
614
  navBarOpen: d,
615
615
  navBarWidthOpen: v,
616
616
  navBarWidthClosed: f,
@@ -620,24 +620,24 @@ function qn({
620
620
  W && /* @__PURE__ */ o(
621
621
  De,
622
622
  {
623
- "data-testid": ut,
623
+ "data-testid": gt,
624
624
  anchor: "right",
625
625
  open: le,
626
626
  onClose: () => Ce(!1),
627
627
  width: ae,
628
- titleText: lt,
628
+ titleText: dt,
629
629
  debugOpacity: l,
630
630
  showCloseArrow: Q === "both" || Q === "close",
631
- onOpened: ct,
632
- onClosed: pt,
631
+ onOpened: pt,
632
+ onClosed: ut,
633
633
  navBarOpen: d,
634
634
  navBarWidthOpen: v,
635
635
  navBarWidthClosed: f,
636
- children: dt
636
+ children: ct
637
637
  }
638
638
  ),
639
639
  /* @__PURE__ */ o(
640
- jt,
640
+ Qt,
641
641
  i(i({
642
642
  titleText: t,
643
643
  "data-testid": s
@@ -658,7 +658,7 @@ function qn({
658
658
  } : {})
659
659
  ),
660
660
  /* @__PURE__ */ o(
661
- Jt,
661
+ Kt,
662
662
  x(i(i({}, j === "push" ? {
663
663
  leftPanel: {
664
664
  open: se,
@@ -670,16 +670,16 @@ function qn({
670
670
  width: ae
671
671
  }
672
672
  } : {}), {
673
- children: /* @__PURE__ */ o(Kt, x(i({ "data-testid": u }, c), { children: e }))
673
+ children: /* @__PURE__ */ o(Zt, x(i({ "data-testid": u }, c), { children: e }))
674
674
  })
675
675
  )
676
676
  ] });
677
677
  }
678
- const Zt = 64, en = 64, tn = 256, fe = D(!0), Ye = D(tn), Je = D(en), Ke = D(""), Ze = D(Zt), et = D(void 0), nn = "TopBar", on = {
679
- titleText: `${nn}-titleText`
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 = {
679
+ titleText: `${on}-titleText`
680
680
  };
681
- function rn({ titleText: e = "", height: t, "data-testid": n }) {
682
- const r = Et(fe);
681
+ function an({ titleText: e = "", height: t, "data-testid": n }) {
682
+ const r = Ft(fe);
683
683
  return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
684
684
  oe,
685
685
  {
@@ -697,8 +697,8 @@ function rn({ titleText: e = "", height: t, "data-testid": n }) {
697
697
  height: t
698
698
  },
699
699
  children: [
700
- /* @__PURE__ */ o(V, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: () => r((l) => !l), children: /* @__PURE__ */ o(Nt, { fontSize: "medium" }) }),
701
- /* @__PURE__ */ o(y, { className: on.titleText, variant: "h6", children: e })
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
702
  ]
703
703
  }
704
704
  ) });
@@ -711,7 +711,7 @@ const ee = "Navbar", U = {
711
711
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
712
712
  // settings: `${PREFIX}-settings`,
713
713
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
714
- }, an = M("div", { name: "NavBar" })(({ theme: e }) => ({
714
+ }, sn = M("div", { name: "NavBar" })(({ theme: e }) => ({
715
715
  [`&.${U.root}`]: {
716
716
  display: "flex"
717
717
  },
@@ -730,7 +730,7 @@ const ee = "Navbar", U = {
730
730
  // marginTop: '64px',
731
731
  // marginBottom: '16px',
732
732
  // },
733
- })), tt = (e, t) => {
733
+ })), nt = (e, t) => {
734
734
  var n, r;
735
735
  return {
736
736
  height: `calc(100vh - ${t})`,
@@ -747,14 +747,14 @@ const ee = "Navbar", U = {
747
747
  easing: e.transitions.easing.sharp,
748
748
  duration: e.transitions.duration.enteringScreen
749
749
  })
750
- }, tt(e, n)), ke = (e, t, n) => i({
750
+ }, nt(e, n)), ke = (e, t, n) => i({
751
751
  width: t,
752
752
  transition: e.transitions.create("width", {
753
753
  easing: e.transitions.easing.sharp,
754
754
  duration: e.transitions.duration.leavingScreen
755
755
  }),
756
756
  overflowX: "hidden"
757
- }, tt(e, n)), sn = M(We, {
757
+ }, nt(e, n)), ln = M(We, {
758
758
  shouldForwardProp: (e) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(e)
759
759
  })(({ theme: e, open: t, widthOpen: n, widthClosed: r, offsetTop: a }) => i(i({
760
760
  flexShrink: 0,
@@ -765,10 +765,10 @@ const ee = "Navbar", U = {
765
765
  })), !t && x(i({}, ke(e, r, a)), {
766
766
  "& .MuiDrawer-paper": ke(e, r, a)
767
767
  })));
768
- function ln({ links: e }) {
768
+ function dn({ links: e }) {
769
769
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
770
770
  }
771
- function dn({
771
+ function cn({
772
772
  open: e,
773
773
  offsetTop: t = 0,
774
774
  widthOpen: n,
@@ -778,8 +778,8 @@ function dn({
778
778
  middle: c,
779
779
  bottom: u
780
780
  }) {
781
- return /* @__PURE__ */ o(an, { className: U.root, "data-testid": a, children: /* @__PURE__ */ o(
782
- sn,
781
+ return /* @__PURE__ */ o(sn, { className: U.root, "data-testid": a, children: /* @__PURE__ */ o(
782
+ ln,
783
783
  {
784
784
  variant: "permanent",
785
785
  anchor: "left",
@@ -792,7 +792,7 @@ function dn({
792
792
  l,
793
793
  /* @__PURE__ */ o(Te, { variant: "middle" })
794
794
  ] }),
795
- Array.isArray(c) ? /* @__PURE__ */ o(ln, { links: c }) : c,
795
+ Array.isArray(c) ? /* @__PURE__ */ o(dn, { links: c }) : c,
796
796
  u && /* @__PURE__ */ p(A, { sx: {}, children: [
797
797
  /* @__PURE__ */ o(Te, { variant: "middle" }),
798
798
  u
@@ -801,7 +801,7 @@ function dn({
801
801
  }
802
802
  ) });
803
803
  }
804
- function cn({ children: e, topBarHeight: t }) {
804
+ function pn({ children: e, topBarHeight: t }) {
805
805
  return /* @__PURE__ */ o(
806
806
  A,
807
807
  {
@@ -824,7 +824,7 @@ function cn({ children: e, topBarHeight: t }) {
824
824
  }
825
825
  );
826
826
  }
827
- function jn({
827
+ function Yn({
828
828
  children: e,
829
829
  initialTitleText: t,
830
830
  initialNavBarOpen: n,
@@ -834,17 +834,17 @@ function jn({
834
834
  navBarDataTestId: c,
835
835
  navBarMiddle: u
836
836
  }) {
837
- const [s, d] = E(fe), [v] = E(Ye), [f] = E(Je), [C, m] = E(Ke), [w] = E(Ze), [S] = E(et);
837
+ const [s, d] = E(fe), [v] = E(Je), [f] = E(Ke), [C, m] = E(Ze), [w] = E(et), [S] = E(tt);
838
838
  return ne(() => {
839
839
  t !== void 0 && m(t);
840
840
  }, [t, m]), ne(() => {
841
841
  n !== void 0 && d(n);
842
842
  }, [n, d]), /* @__PURE__ */ p(A, { children: [
843
- /* @__PURE__ */ o(xt, {}),
844
- /* @__PURE__ */ o(rn, { titleText: C, "data-testid": l, height: w }),
843
+ /* @__PURE__ */ o(Ct, {}),
844
+ /* @__PURE__ */ o(an, { titleText: C, "data-testid": l, height: w }),
845
845
  /* @__PURE__ */ p(A, { sx: { display: "flex" }, children: [
846
846
  /* @__PURE__ */ o(
847
- dn,
847
+ cn,
848
848
  {
849
849
  open: s,
850
850
  top: S,
@@ -857,7 +857,7 @@ function jn({
857
857
  }
858
858
  ),
859
859
  /* @__PURE__ */ o(
860
- cn,
860
+ pn,
861
861
  x(i({
862
862
  "data-testid": a,
863
863
  topBarHeight: w
@@ -868,13 +868,13 @@ function jn({
868
868
  ] })
869
869
  ] });
870
870
  }
871
- const pn = {
871
+ const un = {
872
872
  autoHideDuration: 6e3,
873
873
  anchorOrigin: { vertical: "top", horizontal: "center" },
874
874
  // The default is false. If we prefer timer to continue when window loses
875
875
  // focus, change to true
876
876
  disableWindowBlurListener: !1
877
- }, un = {
877
+ }, gn = {
878
878
  shouldClose: (e, t) => t !== "clickaway"
879
879
  }, Ne = {
880
880
  message: "",
@@ -882,18 +882,18 @@ const pn = {
882
882
  variant: "standard",
883
883
  progressIndicator: void 0
884
884
  // Can use 'circular' or 'linear'
885
- }, Ee = 100, Fe = 2e3, gn = 2e3, hn = (() => {
885
+ }, Ee = 100, Fe = 2e3, hn = 2e3, fn = (() => {
886
886
  let e = 0;
887
887
  return () => (e += 1, e);
888
- })(), fn = {
888
+ })(), mn = {
889
889
  borderBottomLeftRadius: "0px",
890
890
  borderBottomRightRadius: "0px"
891
- }, mn = {}, vn = {}, nt = Le(null);
892
- function xn(l) {
891
+ }, vn = {}, xn = {}, ot = Le(null);
892
+ function Cn(l) {
893
893
  var c = l, {
894
- overrideState: e = mn,
895
- overrideActions: t = vn,
896
- shouldClose: n = un.shouldClose,
894
+ overrideState: e = vn,
895
+ overrideActions: t = xn,
896
+ shouldClose: n = gn.shouldClose,
897
897
  children: r
898
898
  } = c, a = Ae(c, [
899
899
  "overrideState",
@@ -909,7 +909,7 @@ function xn(l) {
909
909
  `SaladBarProvider: MAX_QUEUE_LENGTH (${Ee}) hit ${f.current} times in last ${Fe}ms)`
910
910
  ), f.current = 0);
911
911
  const h = i(x(i({}, Ne), {
912
- key: hn()
912
+ key: fn()
913
913
  }), g);
914
914
  return d.current.push(h), d.current.length === 1 && s({ open: !0 }), h.key;
915
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) => {
@@ -923,7 +923,7 @@ function xn(l) {
923
923
  d.current.shift(), d.current.length > 0 && s({ open: !0 });
924
924
  }, I = (G = d.current[0]) != null ? G : i({}, Ne), q = {};
925
925
  "autoHideDuration" in I && (q.autoHideDuration = I.autoHideDuration);
926
- const j = i(i({}, pn), a), z = i(i({
926
+ const j = i(i({}, un), a), z = i(i({
927
927
  open: u,
928
928
  setOpen: C,
929
929
  enqueueNotification: m,
@@ -933,10 +933,10 @@ function xn(l) {
933
933
  enqueueErrorNotification: T,
934
934
  removeNotification: $
935
935
  }, e), t);
936
- return /* @__PURE__ */ p(nt.Provider, { value: z, children: [
936
+ return /* @__PURE__ */ p(ot.Provider, { value: z, children: [
937
937
  r,
938
938
  /* @__PURE__ */ o(
939
- Ct,
939
+ wt,
940
940
  x(i(i({}, j), q), {
941
941
  open: u,
942
942
  onClose: H,
@@ -944,43 +944,46 @@ function xn(l) {
944
944
  onExited: W,
945
945
  onExit: R
946
946
  },
947
- sx: { zIndex: gn },
947
+ sx: { zIndex: hn },
948
948
  children: /* @__PURE__ */ p("div", { children: [
949
949
  /* @__PURE__ */ o(
950
- wt,
950
+ bt,
951
951
  {
952
952
  onClose: (g) => H(g, "closeAlert"),
953
953
  severity: I.severity,
954
954
  variant: "filled",
955
955
  icon: I.progressIndicator === "circular" ? /* @__PURE__ */ o(He, { size: "1em" }) : void 0,
956
- style: I.progressIndicator === "linear" ? fn : void 0,
956
+ style: I.progressIndicator === "linear" ? mn : void 0,
957
957
  children: I.message
958
958
  }
959
959
  ),
960
- I.progressIndicator === "linear" && /* @__PURE__ */ o(bt, { color: "primary" })
960
+ I.progressIndicator === "linear" && /* @__PURE__ */ o(At, { color: "primary" })
961
961
  ] })
962
962
  })
963
963
  )
964
964
  ] });
965
965
  }
966
- function Cn() {
967
- const e = _e(nt);
966
+ function wn() {
967
+ const e = _e(ot);
968
968
  if (e === null)
969
969
  throw new he("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
970
970
  return e;
971
971
  }
972
- const Qn = re(
973
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(xn, x(i({}, e), { overrideState: t, overrideActions: n, children: r }))
974
- ), ot = "domainCode";
972
+ const Jn = re(
973
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Cn, x(i({}, e), { overrideState: t, overrideActions: n, children: r }))
974
+ ), bn = yt(), Kn = ({
975
+ children: e,
976
+ store: t
977
+ }) => /* @__PURE__ */ o(Ve, { store: t != null ? t : bn, children: e }), rt = "domainCode";
975
978
  var Pe;
976
979
  const ye = D(
977
- JSON.parse((Pe = localStorage.getItem(ot)) != null ? Pe : "{}").domainCode
978
- ), rt = D(
980
+ JSON.parse((Pe = localStorage.getItem(rt)) != null ? Pe : "{}").domainCode
981
+ ), it = D(
979
982
  (e) => e(ye),
980
983
  (e, t, n) => {
981
- t(ye, n), localStorage.setItem(ot, JSON.stringify({ domainCode: n }));
984
+ t(ye, n), localStorage.setItem(rt, JSON.stringify({ domainCode: n }));
982
985
  }
983
- ), wn = {
986
+ ), An = {
984
987
  act: "ACT",
985
988
  nsw: "NSW",
986
989
  nt: "NT",
@@ -992,10 +995,10 @@ const ye = D(
992
995
  ag: "AG",
993
996
  fedmps: "Fedmps",
994
997
  "": ""
995
- }, bn = (e) => {
998
+ }, Sn = (e) => {
996
999
  var t;
997
- return e === null ? "N/A" : (t = wn[e]) != null ? t : "";
998
- }, Yn = ({
1000
+ return e === null ? "N/A" : (t = An[e]) != null ? t : "";
1001
+ }, Zn = ({
999
1002
  isLoading: e,
1000
1003
  isOpen: t,
1001
1004
  onClose: n,
@@ -1003,14 +1006,14 @@ const ye = D(
1003
1006
  applicationName: a,
1004
1007
  handleLogout: l
1005
1008
  }) => {
1006
- const [c, u] = E(rt), [s, d] = O(c), { enqueueSuccessNotification: v } = Cn(), f = r.length === 0, C = !!c && !r.includes(c) && !r.includes(s), m = !c || f || C, w = () => K(void 0, null, function* () {
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* () {
1007
1010
  s ? (u(s), v(`Set domain to ${s}`), n()) : u("");
1008
1011
  }), S = () => K(void 0, null, function* () {
1009
1012
  c && !f && !C ? (d(c), n()) : m && l();
1010
1013
  });
1011
1014
  let B;
1012
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(
1013
- Ut,
1016
+ Vt,
1014
1017
  {
1015
1018
  isOpen: t,
1016
1019
  dialogTitle: "Select an organisation",
@@ -1031,17 +1034,17 @@ const ye = D(
1031
1034
  "."
1032
1035
  ] }),
1033
1036
  /* @__PURE__ */ o(
1034
- At,
1037
+ St,
1035
1038
  {
1036
1039
  loading: e,
1037
1040
  multiple: !1,
1038
1041
  disableClearable: !1,
1039
1042
  value: s != null ? s : null,
1040
1043
  onChange: (T, $) => d($ != null ? $ : ""),
1041
- getOptionLabel: bn,
1044
+ getOptionLabel: Sn,
1042
1045
  options: [...r],
1043
1046
  renderInput: (T) => /* @__PURE__ */ o(
1044
- St,
1047
+ Tt,
1045
1048
  x(i({}, T), {
1046
1049
  variant: "filled",
1047
1050
  label: "Select organisation",
@@ -1055,11 +1058,11 @@ const ye = D(
1055
1058
  )
1056
1059
  }
1057
1060
  ),
1058
- B && /* @__PURE__ */ o(Tt, { error: !0, children: B })
1061
+ B && /* @__PURE__ */ o(It, { error: !0, children: B })
1059
1062
  ]
1060
1063
  }
1061
1064
  );
1062
- }, Jn = Re({
1065
+ }, eo = Re({
1063
1066
  palette: {
1064
1067
  primary: {
1065
1068
  dark: "#00A651",
@@ -1110,7 +1113,7 @@ const ye = D(
1110
1113
  navBar: {
1111
1114
  backgroundColor: "#E8E8E8"
1112
1115
  }
1113
- }), Kn = Re({
1116
+ }), to = Re({
1114
1117
  palette: {
1115
1118
  primary: {
1116
1119
  main: "#007236",
@@ -1201,24 +1204,24 @@ const ye = D(
1201
1204
  navBar: {
1202
1205
  backgroundColor: "#E8E8E8"
1203
1206
  }
1204
- }), An = {
1205
- domainCode: rt,
1207
+ }), Tn = {
1208
+ domainCode: it,
1206
1209
  navBarOpen: fe,
1207
- navBarWidthOpen: Ye,
1208
- navBarWidthClosed: Je,
1209
- titleText: Ke,
1210
- topBarHeight: Ze,
1211
- navBarTop: et
1212
- }, Zn = re(() => ({ children: e }) => /* @__PURE__ */ o(Ft, { children: e })), Sn = ({
1210
+ navBarWidthOpen: Je,
1211
+ navBarWidthClosed: Ke,
1212
+ titleText: Ze,
1213
+ topBarHeight: et,
1214
+ navBarTop: tt
1215
+ }, no = re(() => ({ children: e }) => /* @__PURE__ */ o(Ve, { children: e })), In = ({
1213
1216
  initialValues: e,
1214
1217
  children: t
1215
- }) => (yt(e), /* @__PURE__ */ o(_, { children: t })), eo = re(
1218
+ }) => (Pt(e), /* @__PURE__ */ o(_, { children: t })), oo = re(
1216
1219
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1217
- Sn,
1220
+ In,
1218
1221
  {
1219
1222
  initialValues: Object.entries(e).map(
1220
1223
  ([n, r]) => [
1221
- An[n],
1224
+ Tn[n],
1222
1225
  r
1223
1226
  ]
1224
1227
  ),
@@ -1227,37 +1230,39 @@ const ye = D(
1227
1230
  )
1228
1231
  );
1229
1232
  export {
1230
- Ut as AgDialog,
1231
- jn as AppLayout,
1232
- nt as Context,
1233
+ Vt as AgDialog,
1234
+ Yn as AppLayout,
1235
+ Kn as AtomProvider,
1236
+ ot as Context,
1233
1237
  he as ContextError,
1234
- Yn as DomainCodeDialog,
1235
- zn as ExampleComponent,
1236
- Sn as HydrateAtoms,
1237
- Xe as NAVBAR_WIDTH_CLOSED,
1238
- Ve as NAVBAR_WIDTH_OPENED,
1239
- Xn as NavBar,
1240
- Un as NavBarDarkStyledList,
1241
- Vn as NavBarLightStyledList,
1242
- Wt as NavBarProvider,
1243
- qn as PageLayout,
1244
- xn as SaladBarProvider,
1245
- Gt as buildNavBarState,
1246
- rt as domainCodeAtom,
1247
- Jn as fed21Theme,
1248
- Kn as internalAgSystemsTheme,
1238
+ Zn as DomainCodeDialog,
1239
+ Un as ExampleComponent,
1240
+ In as HydrateAtoms,
1241
+ qe as NAVBAR_WIDTH_CLOSED,
1242
+ Xe as NAVBAR_WIDTH_OPENED,
1243
+ jn as NavBar,
1244
+ Xn as NavBarDarkStyledList,
1245
+ qn as NavBarLightStyledList,
1246
+ zt as NavBarProvider,
1247
+ Qn as PageLayout,
1248
+ Cn as SaladBarProvider,
1249
+ Ut as buildNavBarState,
1250
+ bn as defaultStore,
1251
+ it as domainCodeAtom,
1252
+ eo as fed21Theme,
1253
+ to as internalAgSystemsTheme,
1249
1254
  L as navBarClasses,
1250
1255
  fe as navBarOpenAtom,
1251
- et as navBarTopAtom,
1252
- Je as navBarWidthClosedAtom,
1253
- Ye as navBarWidthOpenAtom,
1254
- Ke as titleTextAtom,
1255
- Ze as topBarHeightAtom,
1256
- zt as useNavBar,
1257
- Cn as useSaladBar,
1258
- Zn as withAtomProvider,
1259
- Gn as withNavBarProvider,
1260
- eo as withOverrideDefaults,
1261
- Qn as withSaladBarProvider
1256
+ tt as navBarTopAtom,
1257
+ Ke as navBarWidthClosedAtom,
1258
+ Je as navBarWidthOpenAtom,
1259
+ Ze as titleTextAtom,
1260
+ et as topBarHeightAtom,
1261
+ Gt as useNavBar,
1262
+ wn as useSaladBar,
1263
+ no as withAtomProvider,
1264
+ Vn as withNavBarProvider,
1265
+ oo as withOverrideDefaults,
1266
+ Jn as withSaladBarProvider
1262
1267
  };
1263
1268
  //# sourceMappingURL=index.js.map