@australiangreens/ag-internal-components 0.0.32 → 0.0.34

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,110 +1,109 @@
1
- var nt = Object.defineProperty, rt = Object.defineProperties;
2
- var ot = Object.getOwnPropertyDescriptors;
3
- var q = Object.getOwnPropertySymbols;
4
- var we = Object.prototype.hasOwnProperty, Ce = Object.prototype.propertyIsEnumerable;
5
- var ie = (e, t, n) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r = (e, t) => {
1
+ var lt = Object.defineProperty, dt = Object.defineProperties;
2
+ var ct = Object.getOwnPropertyDescriptors;
3
+ var Y = Object.getOwnPropertySymbols;
4
+ var Ce = Object.prototype.hasOwnProperty, we = Object.prototype.propertyIsEnumerable;
5
+ var se = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, o = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- we.call(t, n) && ie(e, n, t[n]);
8
- if (q)
9
- for (var n of q(t))
10
- Ce.call(t, n) && ie(e, n, t[n]);
7
+ Ce.call(t, n) && se(e, n, t[n]);
8
+ if (Y)
9
+ for (var n of Y(t))
10
+ we.call(t, n) && se(e, n, t[n]);
11
11
  return e;
12
- }, v = (e, t) => rt(e, ot(t));
13
- var me = (e, t) => {
12
+ }, x = (e, t) => dt(e, ct(t));
13
+ var Te = (e, t) => {
14
14
  var n = {};
15
- for (var i in e)
16
- we.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
- if (e != null && q)
18
- for (var i of q(e))
19
- t.indexOf(i) < 0 && Ce.call(e, i) && (n[i] = e[i]);
15
+ for (var a in e)
16
+ Ce.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
17
+ if (e != null && Y)
18
+ for (var a of Y(e))
19
+ t.indexOf(a) < 0 && we.call(e, a) && (n[a] = e[a]);
20
20
  return n;
21
21
  };
22
- var Te = (e, t, n) => (ie(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var ae = (e, t, n) => new Promise((i, a) => {
24
- var l = (d) => {
22
+ var Be = (e, t, n) => (se(e, typeof t != "symbol" ? t + "" : t, n), n);
23
+ var Q = (e, t, n) => new Promise((a, i) => {
24
+ var d = (s) => {
25
25
  try {
26
- u(n.next(d));
27
- } catch (s) {
28
- a(s);
26
+ g(n.next(s));
27
+ } catch (l) {
28
+ i(l);
29
29
  }
30
- }, p = (d) => {
30
+ }, c = (s) => {
31
31
  try {
32
- u(n.throw(d));
33
- } catch (s) {
34
- a(s);
32
+ g(n.throw(s));
33
+ } catch (l) {
34
+ i(l);
35
35
  }
36
- }, u = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(l, p);
37
- u((n = n.apply(e, t)).next());
36
+ }, g = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(d, c);
37
+ g((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as c, Fragment as M, jsx as o } from "react/jsx-runtime";
40
- import { useState as B, createContext as ce, useCallback as Y, useContext as pe, useEffect as K, useReducer as it, useMemo as at, useRef as se } from "react";
41
- import { Typography as y, Button as st, Paper as ue, styled as F, Box as T, IconButton as W, Drawer as dt, Container as De, Divider as Oe, CssBaseline as lt, Snackbar as ct, Alert as pt, CircularProgress as Ee, LinearProgress as ut, Autocomplete as ht, TextField as gt } from "@mui/material";
42
- import ft from "@mui/material/CssBaseline";
43
- import { styled as D } from "@mui/material/styles";
44
- import Pe from "@mui/material/Drawer";
45
- import { AgError as vt } from "@australiangreens/ag-error";
46
- import { createHelper as ke } from "souvlaki";
47
- import _e from "@mui/material/List";
48
- import Be from "@mui/material/Button";
49
- import xt from "@mui/material/Dialog";
50
- import wt from "@mui/material/DialogActions";
51
- import Ct from "@mui/material/DialogContent";
52
- import mt from "@mui/material/DialogTitle";
53
- import { ArrowForward as Re, ArrowBack as He, ViewHeadline as Tt } from "@mui/icons-material";
54
- import { useAtom as Ot, useAtomValue as Bt, useSetAtom as bt } from "jotai";
55
- import { atomWithStorage as It, RESET as Nt } from "jotai/utils";
56
- function Hn({ text: e }) {
57
- const [t, n] = B(0);
58
- return /* @__PURE__ */ c(M, { 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" }) }),
61
- /* @__PURE__ */ o(
62
- st,
39
+ import { jsxs as u, Fragment as W, jsx as r } from "react/jsx-runtime";
40
+ import { useState as y, createContext as ue, useCallback as J, useContext as ge, useEffect as Z, useReducer as pt, useMemo as ut, useRef as le } from "react";
41
+ import { Typography as $, Button as gt, Paper as ee, styled as G, Box as B, IconButton as z, Drawer as ht, Container as Fe, Divider as be, CssBaseline as ft, Snackbar as vt, Alert as xt, CircularProgress as Pe, LinearProgress as mt, Autocomplete as Ct, TextField as wt, FormHelperText as Tt } from "@mui/material";
42
+ import Bt from "@mui/material/CssBaseline";
43
+ import { styled as L, createTheme as _e, alpha as de } from "@mui/material/styles";
44
+ import Me from "@mui/material/Drawer";
45
+ import { AgError as bt } from "@australiangreens/ag-error";
46
+ import { createHelper as He } from "souvlaki";
47
+ import Re from "@mui/material/List";
48
+ import Oe from "@mui/material/Button";
49
+ import Ot from "@mui/material/Dialog";
50
+ import yt from "@mui/material/DialogActions";
51
+ import At from "@mui/material/DialogContent";
52
+ import It from "@mui/material/DialogTitle";
53
+ import { ArrowForward as We, ArrowBack as ze, ViewHeadline as St } from "@mui/icons-material";
54
+ import { atom as Ge, useAtom as Dt, useAtomValue as Nt, useSetAtom as $t } from "jotai";
55
+ function Gn({ text: e }) {
56
+ const [t, n] = y(0);
57
+ return /* @__PURE__ */ u(W, { children: [
58
+ /* @__PURE__ */ r($, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
59
+ /* @__PURE__ */ r($, { variant: "caption", display: "block", children: /* @__PURE__ */ r("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
60
+ /* @__PURE__ */ r(
61
+ gt,
63
62
  {
64
63
  variant: "outlined",
65
- onClick: () => n((i) => i + 1),
64
+ onClick: () => n((a) => a + 1),
66
65
  "aria-label": "Increment",
67
66
  children: "Hello I am a button"
68
67
  }
69
68
  ),
70
- /* @__PURE__ */ c("p", { children: [
69
+ /* @__PURE__ */ u("p", { children: [
71
70
  "This is some text: ",
72
- /* @__PURE__ */ o("span", { children: e })
71
+ /* @__PURE__ */ r("span", { children: e })
73
72
  ] }),
74
- /* @__PURE__ */ c(ue, { children: [
73
+ /* @__PURE__ */ u(ee, { children: [
75
74
  "This number will incremember when button pressed: ",
76
75
  t
77
76
  ] })
78
77
  ] });
79
78
  }
80
- const Me = 330, We = 73, S = "Navbar", L = {
81
- root: `${S}-root`,
82
- menuButton: `${S}-menuButton`,
83
- hide: `${S}-hide`,
84
- content: `${S}-content`,
85
- userInfoHolder: `${S}-userInfoHolder`,
86
- settings: `${S}-settings`,
87
- pieChartIcon: `${S}-pieChartIcon`
88
- }, St = D("div", { name: "NavBar" })(({ theme: e }) => ({
89
- [`&.${L.root}`]: {
79
+ const Ue = 330, Ve = 73, D = "Navbar", E = {
80
+ root: `${D}-root`,
81
+ menuButton: `${D}-menuButton`,
82
+ hide: `${D}-hide`,
83
+ content: `${D}-content`,
84
+ userInfoHolder: `${D}-userInfoHolder`,
85
+ settings: `${D}-settings`,
86
+ pieChartIcon: `${D}-pieChartIcon`
87
+ }, kt = L("div", { name: "NavBar" })(({ theme: e }) => ({
88
+ [`&.${E.root}`]: {
90
89
  display: "flex"
91
90
  },
92
- [`& .${L.menuButton}`]: {
91
+ [`& .${E.menuButton}`]: {
93
92
  marginRight: 36
94
93
  },
95
- [`& .${L.hide}`]: {
94
+ [`& .${E.hide}`]: {
96
95
  display: "none"
97
96
  },
98
- [`& .${L.content}`]: {
97
+ [`& .${E.content}`]: {
99
98
  flexGrow: 1,
100
99
  padding: e.spacing(3)
101
100
  },
102
- [`& .${L.userInfoHolder}`]: {
101
+ [`& .${E.userInfoHolder}`]: {
103
102
  height: "148px",
104
103
  marginTop: "64px",
105
104
  marginBottom: "16px"
106
105
  }
107
- })), Fe = () => ({
106
+ })), Xe = () => ({
108
107
  position: "absolute",
109
108
  height: "100%",
110
109
  overflowX: "hidden",
@@ -112,51 +111,51 @@ const Me = 330, We = 73, S = "Navbar", L = {
112
111
  color: "white",
113
112
  backgroundColor: "black"
114
113
  // backgroundColor: '#e8e8e8',
115
- }), At = () => r({
116
- width: Me
117
- }, Fe()), $t = () => r({
118
- width: We
119
- }, Fe()), Lt = D(Pe, {
114
+ }), Et = () => o({
115
+ width: Ue
116
+ }, Xe()), Lt = () => o({
117
+ width: Ve
118
+ }, Xe()), Ft = L(Me, {
120
119
  shouldForwardProp: (e) => e !== "open"
121
- })(({ theme: e, open: t }) => r(r({
122
- width: t ? Me : We,
120
+ })(({ theme: e, open: t }) => o(o({
121
+ width: t ? Ue : Ve,
123
122
  flexShrink: 0,
124
123
  whiteSpace: "nowrap",
125
124
  boxSizing: "border-box",
126
125
  zIndex: e.zIndex.drawer + 100
127
126
  }, t && {
128
- "& .MuiDrawer-paper": At()
127
+ "& .MuiDrawer-paper": Et()
129
128
  }), !t && {
130
- "& .MuiDrawer-paper": $t()
129
+ "& .MuiDrawer-paper": Lt()
131
130
  }));
132
- class J extends vt {
131
+ class te extends bt {
133
132
  }
134
- Te(J, "errorName", "ContextError");
135
- const ze = ce(null), yt = {}, Dt = {}, Et = ({
136
- overrideState: e = yt,
137
- overrideActions: t = Dt,
133
+ Be(te, "errorName", "ContextError");
134
+ const qe = ue(null), Pt = {}, _t = {}, Mt = ({
135
+ overrideState: e = Pt,
136
+ overrideActions: t = _t,
138
137
  children: n
139
138
  }) => {
140
- const [{ open: i }, a] = B({ open: !0 }), l = Y((d) => {
141
- a({ open: d });
142
- }, []), p = Y(() => {
143
- a((d) => v(r({}, d), { open: !d.open }));
144
- }, []), u = r(r({
145
- open: i,
146
- setOpen: l,
147
- toggleOpen: p
139
+ const [{ open: a }, i] = y({ open: !0 }), d = J((s) => {
140
+ i({ open: s });
141
+ }, []), c = J(() => {
142
+ i((s) => x(o({}, s), { open: !s.open }));
143
+ }, []), g = o(o({
144
+ open: a,
145
+ setOpen: d,
146
+ toggleOpen: c
148
147
  }, e), t);
149
- return /* @__PURE__ */ o(ze.Provider, { value: u, children: n });
150
- }, Pt = () => {
151
- const e = pe(ze);
148
+ return /* @__PURE__ */ r(qe.Provider, { value: g, children: n });
149
+ }, Ht = () => {
150
+ const e = ge(qe);
152
151
  if (e === null)
153
- throw new J("Error: Tried to useNavBar outside of a <NavBarProvider>");
152
+ throw new te("Error: Tried to useNavBar outside of a <NavBarProvider>");
154
153
  return e;
155
- }, kt = (e = {}) => r({
154
+ }, Rt = (e = {}) => o({
156
155
  open: !0
157
- }, e), Mn = ke(
158
- (e = kt(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Et, { overrideState: e, overrideActions: t, children: n })
159
- ), be = 7, Wn = D(_e)(({ theme: e }) => ({
156
+ }, e), Un = He(
157
+ (e = Rt(), t = {}) => ({ children: n }) => /* @__PURE__ */ r(Mt, { overrideState: e, overrideActions: t, children: n })
158
+ ), ye = 7, Vn = L(Re)(({ theme: e }) => ({
160
159
  backgroundColor: "black",
161
160
  color: "white",
162
161
  "& .MuiListItem-root": {
@@ -165,7 +164,7 @@ const ze = ce(null), yt = {}, Dt = {}, Et = ({
165
164
  "& .MuiListItemButton-root": {
166
165
  " .MuiListItemIcon-root": {
167
166
  color: "white",
168
- padding: `${be}px`
167
+ padding: `${ye}px`
169
168
  },
170
169
  // Focus state
171
170
  "&.Mui-focusVisible": {
@@ -176,7 +175,7 @@ const ze = ce(null), yt = {}, Dt = {}, Et = ({
176
175
  borderLeftStyle: "solid",
177
176
  borderLeftWidth: "7px",
178
177
  borderLeftColor: e.palette.primary.main,
179
- paddingLeft: `calc(${e.spacing(2)} - ${be}px)`
178
+ paddingLeft: `calc(${e.spacing(2)} - ${ye}px)`
180
179
  },
181
180
  // Hover state
182
181
  "&:hover": {
@@ -194,7 +193,7 @@ const ze = ce(null), yt = {}, Dt = {}, Et = ({
194
193
  // '&.Mui-selected.Mui-focusVisible:hover': {
195
194
  // },
196
195
  }
197
- })), Ie = 7, Fn = D(_e)(({ theme: e }) => ({
196
+ })), Ae = 7, Xn = L(Re)(({ theme: e }) => ({
198
197
  backgroundColor: "#e8e8e8",
199
198
  color: "inherit",
200
199
  "& .MuiListItem-root": {
@@ -203,7 +202,7 @@ const ze = ce(null), yt = {}, Dt = {}, Et = ({
203
202
  "& .MuiListItemButton-root": {
204
203
  " .MuiListItemIcon-root": {
205
204
  color: "inherit",
206
- padding: `${Ie}px`
205
+ padding: `${Ae}px`
207
206
  },
208
207
  // Focus state
209
208
  "&.Mui-focusVisible": {
@@ -214,7 +213,7 @@ const ze = ce(null), yt = {}, Dt = {}, Et = ({
214
213
  borderLeftStyle: "solid",
215
214
  borderLeftWidth: "7px",
216
215
  borderLeftColor: e.palette.primary.main,
217
- paddingLeft: `calc(${e.spacing(2)} - ${Ie}px)`
216
+ paddingLeft: `calc(${e.spacing(2)} - ${Ae}px)`
218
217
  },
219
218
  // Hover state
220
219
  "&:hover": {
@@ -233,15 +232,15 @@ const ze = ce(null), yt = {}, Dt = {}, Et = ({
233
232
  // },
234
233
  }
235
234
  }));
236
- function zn({
235
+ function qn({
237
236
  "data-testid": e,
238
237
  children: t
239
238
  }) {
240
- const { open: n } = Pt();
241
- return /* @__PURE__ */ c(St, { className: L.root, "data-testid": e, children: [
242
- /* @__PURE__ */ o(ft, {}),
243
- /* @__PURE__ */ o(
244
- Lt,
239
+ const { open: n } = Ht();
240
+ return /* @__PURE__ */ u(kt, { className: E.root, "data-testid": e, children: [
241
+ /* @__PURE__ */ r(Bt, {}),
242
+ /* @__PURE__ */ r(
243
+ Ft,
245
244
  {
246
245
  variant: "permanent",
247
246
  anchor: "left",
@@ -252,81 +251,81 @@ function zn({
252
251
  )
253
252
  ] });
254
253
  }
255
- const _t = ({
254
+ const Wt = ({
256
255
  isOpen: e,
257
256
  dialogTitle: t,
258
257
  children: n,
259
- maxWidth: i,
260
- primaryButton: a,
261
- secondaryButton: l,
262
- onClose: p
258
+ maxWidth: a,
259
+ primaryButton: i,
260
+ secondaryButton: d,
261
+ onClose: c
263
262
  }) => {
264
- var s, x;
265
- const [u, d] = B(!1);
266
- return /* @__PURE__ */ c(
267
- xt,
263
+ var l, m;
264
+ const [g, s] = y(!1);
265
+ return /* @__PURE__ */ u(
266
+ Ot,
268
267
  {
269
268
  open: e,
270
269
  onClose: () => {
271
- u || p();
270
+ g || c();
272
271
  },
273
272
  fullWidth: !0,
274
- maxWidth: i != null ? i : "xs",
273
+ maxWidth: a != null ? a : "xs",
275
274
  children: [
276
- /* @__PURE__ */ o(mt, { children: t }),
277
- /* @__PURE__ */ o(Ct, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
- /* @__PURE__ */ c(wt, { children: [
279
- /* @__PURE__ */ o(
280
- Be,
275
+ /* @__PURE__ */ r(It, { children: t }),
276
+ /* @__PURE__ */ r(At, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
277
+ /* @__PURE__ */ u(yt, { children: [
278
+ /* @__PURE__ */ r(
279
+ Oe,
281
280
  {
282
- onClick: (s = l == null ? void 0 : l.onClick) != null ? s : p,
283
- "data-testid": l == null ? void 0 : l.testId,
284
- disabled: (l == null ? void 0 : l.disabled) || u,
285
- children: (x = l == null ? void 0 : l.text) != null ? x : "Cancel"
281
+ onClick: (l = d == null ? void 0 : d.onClick) != null ? l : c,
282
+ "data-testid": d == null ? void 0 : d.testId,
283
+ disabled: (d == null ? void 0 : d.disabled) || g,
284
+ children: (m = d == null ? void 0 : d.text) != null ? m : "Cancel"
286
285
  }
287
286
  ),
288
- a && /* @__PURE__ */ o(
289
- Be,
287
+ i && /* @__PURE__ */ r(
288
+ Oe,
290
289
  {
291
- onClick: () => ae(void 0, null, function* () {
292
- var w;
293
- d(!0), yield (w = a.onClick) == null ? void 0 : w.call(a), d(!1);
290
+ onClick: () => Q(void 0, null, function* () {
291
+ var h;
292
+ s(!0), yield (h = i.onClick) == null ? void 0 : h.call(i), s(!1);
294
293
  }),
295
- "data-testid": a.testId,
296
- disabled: a.disabled || u,
297
- children: a.text
294
+ "data-testid": i.testId,
295
+ disabled: i.disabled || g,
296
+ children: i.text
298
297
  }
299
298
  )
300
299
  ] })
301
300
  ]
302
301
  }
303
302
  );
304
- }, Rt = 24, Ht = 64, A = "TopBar", m = {
305
- topStripe: `${A}-topStripe`,
306
- titleBar: `${A}-titleBar`,
307
- titleSlider: `${A}-titleSlider`,
308
- titleText: `${A}-titleText`,
309
- leftPanelButton: `${A}-leftPanelButton`,
310
- rightPanelButton: `${A}-leftPanelButton`
311
- }, Mt = F("div", {
303
+ }, zt = 24, Gt = 64, N = "TopBar", T = {
304
+ topStripe: `${N}-topStripe`,
305
+ titleBar: `${N}-titleBar`,
306
+ titleSlider: `${N}-titleSlider`,
307
+ titleText: `${N}-titleText`,
308
+ leftPanelButton: `${N}-leftPanelButton`,
309
+ rightPanelButton: `${N}-leftPanelButton`
310
+ }, Ut = G("div", {
312
311
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
313
- name: A
312
+ name: N
314
313
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
315
- var i, a;
314
+ var a, i;
316
315
  return {
317
316
  width: "100%",
318
- [`& .${m.topStripe}`]: {
317
+ [`& .${T.topStripe}`]: {
319
318
  width: "100%",
320
- height: `${Rt}px`,
319
+ height: `${zt}px`,
321
320
  backgroundColor: e.palette.primary.main
322
321
  },
323
- [`& .${m.titleBar}`]: {
322
+ [`& .${T.titleBar}`]: {
324
323
  backgroundColor: e.palette.primary.light,
325
- height: `${Ht}px`,
324
+ height: `${Gt}px`,
326
325
  padding: e.spacing(0, 3),
327
326
  width: "100%"
328
327
  },
329
- [`& .${m.titleSlider}`]: r(r({
328
+ [`& .${T.titleSlider}`]: o(o({
330
329
  height: "100%",
331
330
  display: "flex",
332
331
  alignItems: "center",
@@ -335,14 +334,14 @@ const _t = ({
335
334
  easing: e.transitions.easing.sharp,
336
335
  duration: e.transitions.duration.leavingScreen
337
336
  }),
338
- [`& .${m.leftPanelButton}`]: {
337
+ [`& .${T.leftPanelButton}`]: {
339
338
  marginRight: e.spacing(2),
340
339
  flexGrow: 0
341
340
  },
342
- [`& .${m.titleText}`]: {
341
+ [`& .${T.titleText}`]: {
343
342
  flexGrow: 1
344
343
  },
345
- [`& .${m.rightPanelButton}`]: {
344
+ [`& .${T.rightPanelButton}`]: {
346
345
  flexGrow: 0
347
346
  }
348
347
  }, (t == null ? void 0 : t.open) && {
@@ -350,29 +349,29 @@ const _t = ({
350
349
  easing: e.transitions.easing.easeOut,
351
350
  duration: e.transitions.duration.enteringScreen
352
351
  }),
353
- marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
352
+ marginLeft: `${(a = t == null ? void 0 : t.width) != null ? a : 0}px`
354
353
  }), (n == null ? void 0 : n.open) && {
355
354
  transition: e.transitions.create("margin", {
356
355
  easing: e.transitions.easing.easeOut,
357
356
  duration: e.transitions.duration.enteringScreen
358
357
  }),
359
- marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
358
+ marginRight: `${(i = n == null ? void 0 : n.width) != null ? i : 0}px`
360
359
  })
361
360
  };
362
361
  });
363
- function Wt({
362
+ function Vt({
364
363
  titleText: e = "",
365
364
  leftPanel: t,
366
365
  rightPanel: n,
367
- "data-testid": i
366
+ "data-testid": a
368
367
  }) {
369
- return /* @__PURE__ */ c(Mt, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
370
- /* @__PURE__ */ o("div", { className: m.topStripe }),
371
- /* @__PURE__ */ o("div", { className: m.titleBar, children: /* @__PURE__ */ c(T, { className: m.titleSlider, children: [
372
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ c(
373
- W,
368
+ return /* @__PURE__ */ u(Ut, { leftPanel: t, rightPanel: n, "data-testid": a, children: [
369
+ /* @__PURE__ */ r("div", { className: T.topStripe }),
370
+ /* @__PURE__ */ r("div", { className: T.titleBar, children: /* @__PURE__ */ u(B, { className: T.titleSlider, children: [
371
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
372
+ z,
374
373
  {
375
- className: m.leftPanelButton,
374
+ className: T.leftPanelButton,
376
375
  color: "inherit",
377
376
  "aria-label": "Open left side panel",
378
377
  onClick: t == null ? void 0 : t.onOpen,
@@ -380,15 +379,15 @@ function Wt({
380
379
  size: "large",
381
380
  children: [
382
381
  " ",
383
- /* @__PURE__ */ o(Re, {})
382
+ /* @__PURE__ */ r(We, {})
384
383
  ]
385
384
  }
386
385
  ),
387
- /* @__PURE__ */ o(y, { className: m.titleText, variant: "h6", noWrap: !0, children: e }),
388
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ c(
389
- W,
386
+ /* @__PURE__ */ r($, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
387
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
388
+ z,
390
389
  {
391
- className: m.rightPanelButton,
390
+ className: T.rightPanelButton,
392
391
  color: "inherit",
393
392
  "aria-label": "Open right side panel",
394
393
  onClick: n == null ? void 0 : n.onOpen,
@@ -396,14 +395,14 @@ function Wt({
396
395
  size: "large",
397
396
  children: [
398
397
  " ",
399
- /* @__PURE__ */ o(He, {})
398
+ /* @__PURE__ */ r(ze, {})
400
399
  ]
401
400
  }
402
401
  )
403
402
  ] }) })
404
403
  ] });
405
404
  }
406
- const Ge = 400, Ft = F(dt, {
405
+ const Ye = 400, Xt = G(ht, {
407
406
  shouldForwardProp: (e) => (
408
407
  // Note we do want anchor to be forwarded to the Drawer component
409
408
  ![
@@ -417,9 +416,9 @@ const Ge = 400, Ft = F(dt, {
417
416
  ),
418
417
  name: "SidePanelDrawer"
419
418
  })(
420
- ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: a, navBarWidthClosed: l }) => ({
419
+ ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: a, navBarWidthOpen: i, navBarWidthClosed: d }) => ({
421
420
  width: e,
422
- "& .MuiDrawer-paper": r(r({
421
+ "& .MuiDrawer-paper": o(o({
423
422
  position: "absolute",
424
423
  width: e,
425
424
  boxSizing: "border-box",
@@ -427,15 +426,15 @@ const Ge = 400, Ft = F(dt, {
427
426
  boxShadow: "0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"
428
427
  }, t && {
429
428
  opacity: "50%"
430
- }), n === "left" && r({
431
- marginLeft: `${l}px`
432
- }, i && {
433
- marginLeft: `${a}px`
429
+ }), n === "left" && o({
430
+ marginLeft: `${d}px`
431
+ }, a && {
432
+ marginLeft: `${i}px`
434
433
  }))
435
434
  })
436
- ), zt = F(T, {
435
+ ), qt = G(B, {
437
436
  shouldForwardProp: (e) => !["anchor"].includes(e)
438
- })(({ theme: e, anchor: t }) => v(r({
437
+ })(({ theme: e, anchor: t }) => x(o({
439
438
  display: "flex",
440
439
  alignItems: "center",
441
440
  padding: e.spacing(2)
@@ -453,65 +452,65 @@ const Ge = 400, Ft = F(dt, {
453
452
  marginRight: t === "right" ? e.spacing(2) : 0
454
453
  }
455
454
  }));
456
- function Ne({
455
+ function Ie({
457
456
  children: e,
458
457
  anchor: t = "left",
459
458
  open: n,
460
- onClose: i = () => {
459
+ onClose: a = () => {
461
460
  },
462
- titleText: a = "",
463
- width: l = Ge,
464
- showCloseArrow: p = !0,
465
- debugOpacity: u = !1,
466
- headerBoxProps: d = {},
467
- onOpened: s,
468
- onClosed: x,
469
- "data-testid": w,
470
- navBarOpen: h = !1,
461
+ titleText: i = "",
462
+ width: d = Ye,
463
+ showCloseArrow: c = !0,
464
+ debugOpacity: g = !1,
465
+ headerBoxProps: s = {},
466
+ onOpened: l,
467
+ onClosed: m,
468
+ "data-testid": h,
469
+ navBarOpen: p = !1,
471
470
  navBarWidthOpen: C = 0,
472
471
  navBarWidthClosed: b = 0
473
472
  }) {
474
- return /* @__PURE__ */ c(
475
- Ft,
473
+ return /* @__PURE__ */ u(
474
+ Xt,
476
475
  {
477
476
  SlideProps: {
478
- onEntered: () => s == null ? void 0 : s(),
479
- onExited: () => x == null ? void 0 : x()
477
+ onEntered: () => l == null ? void 0 : l(),
478
+ onExited: () => m == null ? void 0 : m()
480
479
  },
481
480
  variant: "persistent",
482
481
  anchor: t,
483
482
  open: n,
484
- width: l,
485
- debugOpacity: u,
486
- "data-testid": w,
487
- navBarOpen: h,
483
+ width: d,
484
+ debugOpacity: g,
485
+ "data-testid": h,
486
+ navBarOpen: p,
488
487
  navBarWidthOpen: C,
489
488
  navBarWidthClosed: b,
490
489
  children: [
491
- /* @__PURE__ */ o(zt, v(r({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ c(M, { children: [
492
- /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a }),
493
- p && /* @__PURE__ */ c(W, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
494
- /* @__PURE__ */ o(He, { "data-testid": "arrowbackicon" }),
490
+ /* @__PURE__ */ r(qt, x(o({ anchor: t }, s), { children: t === "left" ? /* @__PURE__ */ u(W, { children: [
491
+ /* @__PURE__ */ r($, { variant: "h6", color: "inherit", component: "div", children: i }),
492
+ c && /* @__PURE__ */ u(z, { onClick: a, size: "large", "aria-label": "Close left side panel", children: [
493
+ /* @__PURE__ */ r(ze, { "data-testid": "arrowbackicon" }),
495
494
  " "
496
495
  ] })
497
- ] }) : /* @__PURE__ */ c(M, { children: [
498
- p && /* @__PURE__ */ c(W, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
499
- /* @__PURE__ */ o(Re, {}),
496
+ ] }) : /* @__PURE__ */ u(W, { children: [
497
+ c && /* @__PURE__ */ u(z, { onClick: a, size: "large", "aria-label": "Close right side panel", children: [
498
+ /* @__PURE__ */ r(We, {}),
500
499
  " "
501
500
  ] }),
502
- /* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a })
501
+ /* @__PURE__ */ r($, { variant: "h6", color: "inherit", component: "div", children: i })
503
502
  ] }) })),
504
503
  e
505
504
  ]
506
505
  }
507
506
  );
508
507
  }
509
- const Gt = F("div", {
508
+ const Yt = G("div", {
510
509
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
511
510
  name: "PanelAwareMargins"
512
511
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
513
- var i, a;
514
- return r(r({
512
+ var a, i;
513
+ return o(o({
515
514
  transition: e.transitions.create("margin", {
516
515
  easing: e.transitions.easing.sharp,
517
516
  duration: e.transitions.duration.leavingScreen
@@ -521,239 +520,239 @@ const Gt = F("div", {
521
520
  easing: e.transitions.easing.easeOut,
522
521
  duration: e.transitions.duration.enteringScreen
523
522
  }),
524
- marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
523
+ marginLeft: `${(a = t == null ? void 0 : t.width) != null ? a : 0}px`
525
524
  }), (n == null ? void 0 : n.open) && {
526
525
  transition: e.transitions.create("margin", {
527
526
  easing: e.transitions.easing.easeOut,
528
527
  duration: e.transitions.duration.enteringScreen
529
528
  }),
530
- marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
529
+ marginRight: `${(i = n == null ? void 0 : n.width) != null ? i : 0}px`
531
530
  });
532
- }), Ut = F(De, {
531
+ }), Qt = G(Fe, {
533
532
  name: "PageContainer"
534
533
  })(({ theme: e }) => ({
535
534
  // Horizontal padding comes from the Container's gutter
536
535
  paddingTop: e.spacing(3),
537
536
  paddingBottom: e.spacing(3)
538
- })), de = !1, le = !1, Q = {
537
+ })), ce = !1, pe = !1, j = {
539
538
  titleText: "",
540
539
  flavour: "push",
541
- width: Ge,
540
+ width: Ye,
542
541
  arrowButtons: "both",
543
542
  startOpen: !1,
544
543
  open: void 0,
545
544
  onChangeOpen: void 0,
546
- content: /* @__PURE__ */ o(M, {}),
545
+ content: /* @__PURE__ */ r(W, {}),
547
546
  onOpened: void 0,
548
547
  onClosed: void 0,
549
548
  dataTestId: void 0
550
549
  };
551
- function Gn({
550
+ function Yn({
552
551
  children: e,
553
552
  titleText: t = "",
554
553
  leftPanel: n,
555
- rightPanel: i,
556
- sidePanelsAreMutuallyExclusive: a = !0,
557
- debugOpacity: l = !1,
558
- pageContainerProps: p,
559
- pageContentDataTestId: u,
560
- topBarDataTestId: d,
561
- navBarOpen: s,
562
- navBarWidthOpen: x,
563
- navBarWidthClosed: w
554
+ rightPanel: a,
555
+ sidePanelsAreMutuallyExclusive: i = !0,
556
+ debugOpacity: d = !1,
557
+ pageContainerProps: c,
558
+ pageContentDataTestId: g,
559
+ topBarDataTestId: s,
560
+ navBarOpen: l,
561
+ navBarWidthOpen: m,
562
+ navBarWidthClosed: h
564
563
  }) {
565
- const [h, C] = B(de), [b, I] = B(le), [Z, z] = B(de), [ee, E] = B(le), P = n !== void 0, k = i !== void 0, {
564
+ const [p, C] = y(ce), [b, w] = y(pe), [A, I] = y(ce), [ne, F] = y(pe), P = n !== void 0, _ = a !== void 0, {
566
565
  titleText: O,
567
- content: G,
568
- flavour: U,
569
- open: _,
570
- onChangeOpen: R,
571
- width: g,
572
- arrowButtons: f,
573
- startOpen: $,
574
- onOpened: Qe,
575
- onClosed: je,
576
- dataTestId: Ye
577
- } = n ? r(r({}, Q), n) : r({}, Q), {
578
- titleText: Ke,
579
- content: Je,
580
- flavour: ge,
581
- open: te,
582
- onChangeOpen: fe,
583
- width: ne,
584
- arrowButtons: V,
585
- startOpen: X,
586
- onOpened: Ze,
587
- onClosed: et,
588
- dataTestId: tt
589
- } = i ? r(r({}, Q), i) : r({}, Q);
590
- K(() => {
591
- $ !== de && (C($), z($));
592
- }, [$]), K(() => {
593
- X !== le && (I(X), E(X));
594
- }, [X]);
595
- const re = _ === void 0 ? h : _, oe = te === void 0 ? b : te, ve = (N) => {
596
- _ === void 0 && (C(N), a && k && (N ? (I(!1), E(b)) : I(ee))), R && R(N);
597
- }, xe = (N) => {
598
- te === void 0 && (I(N), a && P && (N ? (C(!1), z(h)) : C(Z))), fe && fe(N);
566
+ content: U,
567
+ flavour: V,
568
+ open: M,
569
+ onChangeOpen: H,
570
+ width: f,
571
+ arrowButtons: v,
572
+ startOpen: k,
573
+ onOpened: et,
574
+ onClosed: tt,
575
+ dataTestId: nt
576
+ } = n ? o(o({}, j), n) : o({}, j), {
577
+ titleText: ot,
578
+ content: rt,
579
+ flavour: fe,
580
+ open: oe,
581
+ onChangeOpen: ve,
582
+ width: re,
583
+ arrowButtons: X,
584
+ startOpen: q,
585
+ onOpened: at,
586
+ onClosed: it,
587
+ dataTestId: st
588
+ } = a ? o(o({}, j), a) : o({}, j);
589
+ Z(() => {
590
+ k !== ce && (C(k), I(k));
591
+ }, [k]), Z(() => {
592
+ q !== pe && (w(q), F(q));
593
+ }, [q]);
594
+ const ae = M === void 0 ? p : M, ie = oe === void 0 ? b : oe, xe = (S) => {
595
+ M === void 0 && (C(S), i && _ && (S ? (w(!1), F(b)) : w(ne))), H && H(S);
596
+ }, me = (S) => {
597
+ oe === void 0 && (w(S), i && P && (S ? (C(!1), I(p)) : C(A))), ve && ve(S);
599
598
  };
600
- return /* @__PURE__ */ c(T, { children: [
601
- P && /* @__PURE__ */ o(
602
- Ne,
599
+ return /* @__PURE__ */ u(B, { children: [
600
+ P && /* @__PURE__ */ r(
601
+ Ie,
603
602
  {
604
- "data-testid": Ye,
603
+ "data-testid": nt,
605
604
  anchor: "left",
606
- open: re,
607
- onClose: () => ve(!1),
608
- width: g,
605
+ open: ae,
606
+ onClose: () => xe(!1),
607
+ width: f,
609
608
  titleText: O,
610
- debugOpacity: l,
611
- showCloseArrow: f === "both" || f === "close",
612
- onOpened: Qe,
613
- onClosed: je,
614
- navBarOpen: s,
615
- navBarWidthOpen: x,
616
- navBarWidthClosed: w,
617
- children: G
609
+ debugOpacity: d,
610
+ showCloseArrow: v === "both" || v === "close",
611
+ onOpened: et,
612
+ onClosed: tt,
613
+ navBarOpen: l,
614
+ navBarWidthOpen: m,
615
+ navBarWidthClosed: h,
616
+ children: U
618
617
  }
619
618
  ),
620
- k && /* @__PURE__ */ o(
621
- Ne,
619
+ _ && /* @__PURE__ */ r(
620
+ Ie,
622
621
  {
623
- "data-testid": tt,
622
+ "data-testid": st,
624
623
  anchor: "right",
625
- open: oe,
626
- onClose: () => xe(!1),
627
- width: ne,
628
- titleText: Ke,
629
- debugOpacity: l,
630
- showCloseArrow: V === "both" || V === "close",
631
- onOpened: Ze,
632
- onClosed: et,
633
- navBarOpen: s,
634
- navBarWidthOpen: x,
635
- navBarWidthClosed: w,
636
- children: Je
624
+ open: ie,
625
+ onClose: () => me(!1),
626
+ width: re,
627
+ titleText: ot,
628
+ debugOpacity: d,
629
+ showCloseArrow: X === "both" || X === "close",
630
+ onOpened: at,
631
+ onClosed: it,
632
+ navBarOpen: l,
633
+ navBarWidthOpen: m,
634
+ navBarWidthClosed: h,
635
+ children: rt
637
636
  }
638
637
  ),
639
- /* @__PURE__ */ o(
640
- Wt,
641
- r(r({
638
+ /* @__PURE__ */ r(
639
+ Vt,
640
+ o(o({
642
641
  titleText: t,
643
- "data-testid": d
644
- }, P && U === "push" ? {
642
+ "data-testid": s
643
+ }, P && V === "push" ? {
645
644
  leftPanel: {
646
- open: re,
647
- width: g,
648
- onOpen: () => ve(!0),
649
- showOpenArrow: f === "both" || f === "open"
645
+ open: ae,
646
+ width: f,
647
+ onOpen: () => xe(!0),
648
+ showOpenArrow: v === "both" || v === "open"
650
649
  }
651
- } : {}), k && ge === "push" ? {
650
+ } : {}), _ && fe === "push" ? {
652
651
  rightPanel: {
653
- open: oe,
654
- width: ne,
655
- onOpen: () => xe(!0),
656
- showOpenArrow: V === "both" || V === "open"
652
+ open: ie,
653
+ width: re,
654
+ onOpen: () => me(!0),
655
+ showOpenArrow: X === "both" || X === "open"
657
656
  }
658
657
  } : {})
659
658
  ),
660
- /* @__PURE__ */ o(
661
- Gt,
662
- v(r(r({}, U === "push" ? {
659
+ /* @__PURE__ */ r(
660
+ Yt,
661
+ x(o(o({}, V === "push" ? {
663
662
  leftPanel: {
664
- open: re,
665
- width: g
663
+ open: ae,
664
+ width: f
666
665
  }
667
- } : {}), ge === "push" ? {
666
+ } : {}), fe === "push" ? {
668
667
  rightPanel: {
669
- open: oe,
670
- width: ne
668
+ open: ie,
669
+ width: re
671
670
  }
672
671
  } : {}), {
673
- children: /* @__PURE__ */ o(Ut, v(r({ "data-testid": u }, p), { children: e }))
672
+ children: /* @__PURE__ */ r(Qt, x(o({ "data-testid": g }, c), { children: e }))
674
673
  })
675
674
  )
676
675
  ] });
677
676
  }
678
- const Vt = 64, Xt = 64, qt = 256, Qt = {
677
+ const jt = 64, Kt = 64, Jt = 256, Zt = {
679
678
  navBarOpen: !0,
680
679
  titleText: "",
681
- navBarWidthOpen: qt,
682
- navBarWidthClosed: Xt,
683
- topBarHeight: Vt,
680
+ navBarWidthOpen: Jt,
681
+ navBarWidthClosed: Kt,
682
+ topBarHeight: jt,
684
683
  navBarTop: void 0
685
684
  };
686
- function jt(e, t) {
685
+ function en(e, t) {
687
686
  switch (t.type) {
688
687
  case "toggleNavBarOpen":
689
- return v(r({}, e), {
688
+ return x(o({}, e), {
690
689
  navBarOpen: !e.navBarOpen
691
690
  });
692
691
  case "setNavBarOpen":
693
- return v(r({}, e), {
692
+ return x(o({}, e), {
694
693
  navBarOpen: t.payload
695
694
  });
696
695
  case "setTitleText":
697
- return v(r({}, e), {
696
+ return x(o({}, e), {
698
697
  titleText: t.payload
699
698
  });
700
699
  case "setNavBarWidthOpen":
701
- return v(r({}, e), {
700
+ return x(o({}, e), {
702
701
  navBarWidthOpen: t.payload
703
702
  });
704
703
  case "setTopBarHeight":
705
- return v(r({}, e), {
704
+ return x(o({}, e), {
706
705
  topBarHeight: t.payload
707
706
  });
708
707
  case "setNavBarTop":
709
- return v(r({}, e), {
708
+ return x(o({}, e), {
710
709
  navBarTop: t.payload
711
710
  });
712
711
  default:
713
712
  throw new Error("Invalid action.type");
714
713
  }
715
714
  }
716
- const Ue = ce(null), Yt = {}, Kt = {}, Jt = ({
717
- overrideState: e = Yt,
718
- overrideActions: t = Kt,
715
+ const Qe = ue(null), tn = {}, nn = {}, on = ({
716
+ overrideState: e = tn,
717
+ overrideActions: t = nn,
719
718
  children: n
720
719
  }) => {
721
720
  const [
722
- { titleText: i, topBarHeight: a, navBarOpen: l, navBarWidthOpen: p, navBarWidthClosed: u, navBarTop: d },
723
- s
724
- ] = it(jt, Qt), x = at(
721
+ { titleText: a, topBarHeight: i, navBarOpen: d, navBarWidthOpen: c, navBarWidthClosed: g, navBarTop: s },
722
+ l
723
+ ] = pt(en, Zt), m = ut(
725
724
  () => ({
726
- toggleNavBarOpen: () => s({ type: "toggleNavBarOpen" }),
727
- setNavBarOpen: (h) => s({ type: "setNavBarOpen", payload: h }),
728
- setNavBarWidthOpen: (h) => s({ type: "setNavBarWidthOpen", payload: h }),
729
- setNavBarWidthClosed: (h) => s({ type: "setNavBarWidthClosed", payload: h }),
730
- setTitleText: (h) => s({ type: "setTitleText", payload: h }),
731
- setTopBarHeight: (h) => s({ type: "setTopBarHeight", payload: h }),
732
- setNavBarTop: (h) => s({ type: "setNavBarTop", payload: h }),
733
- clearNavBarTop: () => s({ type: "setNavBarTop", payload: void 0 })
725
+ toggleNavBarOpen: () => l({ type: "toggleNavBarOpen" }),
726
+ setNavBarOpen: (p) => l({ type: "setNavBarOpen", payload: p }),
727
+ setNavBarWidthOpen: (p) => l({ type: "setNavBarWidthOpen", payload: p }),
728
+ setNavBarWidthClosed: (p) => l({ type: "setNavBarWidthClosed", payload: p }),
729
+ setTitleText: (p) => l({ type: "setTitleText", payload: p }),
730
+ setTopBarHeight: (p) => l({ type: "setTopBarHeight", payload: p }),
731
+ setNavBarTop: (p) => l({ type: "setNavBarTop", payload: p }),
732
+ clearNavBarTop: () => l({ type: "setNavBarTop", payload: void 0 })
734
733
  }),
735
734
  []
736
- ), w = r(r(r({
737
- navBarOpen: l,
738
- navBarWidthOpen: p,
739
- navBarWidthClosed: u,
740
- titleText: i,
741
- topBarHeight: a,
742
- navBarTop: d
743
- }, x), e), t);
744
- return /* @__PURE__ */ o(Ue.Provider, { value: w, children: n });
745
- }, Ve = () => {
746
- const e = pe(Ue);
735
+ ), h = o(o(o({
736
+ navBarOpen: d,
737
+ navBarWidthOpen: c,
738
+ navBarWidthClosed: g,
739
+ titleText: a,
740
+ topBarHeight: i,
741
+ navBarTop: s
742
+ }, m), e), t);
743
+ return /* @__PURE__ */ r(Qe.Provider, { value: h, children: n });
744
+ }, je = () => {
745
+ const e = ge(Qe);
747
746
  if (e === null)
748
- throw new J("Error: Tried to call useAppLayout() outside of a <AppLayoutProvider>");
747
+ throw new te("Error: Tried to call useAppLayout() outside of a <AppLayoutProvider>");
749
748
  return e;
750
- }, Zt = "TopBar", en = {
751
- titleText: `${Zt}-titleText`
749
+ }, rn = "TopBar", an = {
750
+ titleText: `${rn}-titleText`
752
751
  };
753
- function tn({ titleText: e = "", height: t, "data-testid": n }) {
754
- const { toggleNavBarOpen: i } = Ve();
755
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ c(
756
- ue,
752
+ function sn({ titleText: e = "", height: t, "data-testid": n }) {
753
+ const { toggleNavBarOpen: a } = je();
754
+ return /* @__PURE__ */ r("header", { "data-testid": n, children: /* @__PURE__ */ u(
755
+ ee,
757
756
  {
758
757
  square: !0,
759
758
  elevation: 0,
@@ -769,31 +768,31 @@ function tn({ titleText: e = "", height: t, "data-testid": n }) {
769
768
  height: t
770
769
  },
771
770
  children: [
772
- /* @__PURE__ */ o(W, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: i, children: /* @__PURE__ */ o(Tt, { fontSize: "medium" }) }),
773
- /* @__PURE__ */ o(y, { className: en.titleText, variant: "h6", children: e })
771
+ /* @__PURE__ */ r(z, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: a, children: /* @__PURE__ */ r(St, { fontSize: "medium" }) }),
772
+ /* @__PURE__ */ r($, { className: an.titleText, variant: "h6", children: e })
774
773
  ]
775
774
  }
776
775
  ) });
777
776
  }
778
- const j = "Navbar", H = {
779
- root: `${j}-root`,
780
- menuButton: `${j}-menuButton`,
781
- hide: `${j}-hide`,
782
- content: `${j}-content`
777
+ const K = "Navbar", R = {
778
+ root: `${K}-root`,
779
+ menuButton: `${K}-menuButton`,
780
+ hide: `${K}-hide`,
781
+ content: `${K}-content`
783
782
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
784
783
  // settings: `${PREFIX}-settings`,
785
784
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
786
- }, nn = D("div", { name: "NavBar" })(({ theme: e }) => ({
787
- [`&.${H.root}`]: {
785
+ }, ln = L("div", { name: "NavBar" })(({ theme: e }) => ({
786
+ [`&.${R.root}`]: {
788
787
  display: "flex"
789
788
  },
790
- [`& .${H.menuButton}`]: {
789
+ [`& .${R.menuButton}`]: {
791
790
  marginRight: 36
792
791
  },
793
- [`& .${H.hide}`]: {
792
+ [`& .${R.hide}`]: {
794
793
  display: "none"
795
794
  },
796
- [`& .${H.content}`]: {
795
+ [`& .${R.content}`]: {
797
796
  flexGrow: 1,
798
797
  padding: e.spacing(3)
799
798
  }
@@ -802,80 +801,80 @@ const j = "Navbar", H = {
802
801
  // marginTop: '64px',
803
802
  // marginBottom: '16px',
804
803
  // },
805
- })), Xe = (e, t) => {
806
- var n, i;
804
+ })), Ke = (e, t) => {
805
+ var n, a;
807
806
  return {
808
807
  height: `calc(100vh - ${t})`,
809
808
  top: t,
810
809
  overflowX: "hidden",
811
810
  overflowY: "hidden",
812
811
  color: "inherit",
813
- backgroundColor: (i = (n = e == null ? void 0 : e.navBar) == null ? void 0 : n.backgroundColor) != null ? i : "white"
812
+ backgroundColor: (a = (n = e == null ? void 0 : e.navBar) == null ? void 0 : n.backgroundColor) != null ? a : "white"
814
813
  // Provide default so tests don't need to wrap theme provider
815
814
  };
816
- }, Se = (e, t, n) => r({
815
+ }, Se = (e, t, n) => o({
817
816
  width: t,
818
817
  transition: e.transitions.create("width", {
819
818
  easing: e.transitions.easing.sharp,
820
819
  duration: e.transitions.duration.enteringScreen
821
820
  })
822
- }, Xe(e, n)), Ae = (e, t, n) => r({
821
+ }, Ke(e, n)), De = (e, t, n) => o({
823
822
  width: t,
824
823
  transition: e.transitions.create("width", {
825
824
  easing: e.transitions.easing.sharp,
826
825
  duration: e.transitions.duration.leavingScreen
827
826
  }),
828
827
  overflowX: "hidden"
829
- }, Xe(e, n)), rn = D(Pe, {
828
+ }, Ke(e, n)), dn = L(Me, {
830
829
  shouldForwardProp: (e) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(e)
831
- })(({ theme: e, open: t, widthOpen: n, widthClosed: i, offsetTop: a }) => r(r({
830
+ })(({ theme: e, open: t, widthOpen: n, widthClosed: a, offsetTop: i }) => o(o({
832
831
  flexShrink: 0,
833
832
  whiteSpace: "nowrap",
834
833
  boxSizing: "border-box"
835
- }, t && v(r({}, Se(e, n, a)), {
836
- "& .MuiDrawer-paper": Se(e, n, a)
837
- })), !t && v(r({}, Ae(e, i, a)), {
838
- "& .MuiDrawer-paper": Ae(e, i, a)
834
+ }, t && x(o({}, Se(e, n, i)), {
835
+ "& .MuiDrawer-paper": Se(e, n, i)
836
+ })), !t && x(o({}, De(e, a, i)), {
837
+ "& .MuiDrawer-paper": De(e, a, i)
839
838
  })));
840
- function on({ links: e }) {
841
- return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
839
+ function cn({ links: e }) {
840
+ return /* @__PURE__ */ r("div", { children: "LinksMenu not implemented yet" });
842
841
  }
843
- function an({
842
+ function pn({
844
843
  open: e,
845
844
  offsetTop: t = 0,
846
845
  widthOpen: n,
847
- widthClosed: i,
848
- "data-testid": a,
849
- top: l,
850
- middle: p,
851
- bottom: u
846
+ widthClosed: a,
847
+ "data-testid": i,
848
+ top: d,
849
+ middle: c,
850
+ bottom: g
852
851
  }) {
853
- return /* @__PURE__ */ o(nn, { className: H.root, "data-testid": a, children: /* @__PURE__ */ o(
854
- rn,
852
+ return /* @__PURE__ */ r(ln, { className: R.root, "data-testid": i, children: /* @__PURE__ */ r(
853
+ dn,
855
854
  {
856
855
  variant: "permanent",
857
856
  anchor: "left",
858
857
  open: e,
859
858
  widthOpen: n,
860
- widthClosed: i,
859
+ widthClosed: a,
861
860
  offsetTop: t,
862
- children: /* @__PURE__ */ c(T, { component: "nav", sx: {}, children: [
863
- l && /* @__PURE__ */ c(T, { sx: { flexGrow: 1 }, children: [
864
- l,
865
- /* @__PURE__ */ o(Oe, { variant: "middle" })
861
+ children: /* @__PURE__ */ u(B, { component: "nav", sx: {}, children: [
862
+ d && /* @__PURE__ */ u(B, { sx: { flexGrow: 1 }, children: [
863
+ d,
864
+ /* @__PURE__ */ r(be, { variant: "middle" })
866
865
  ] }),
867
- Array.isArray(p) ? /* @__PURE__ */ o(on, { links: p }) : p,
868
- u && /* @__PURE__ */ c(T, { sx: {}, children: [
869
- /* @__PURE__ */ o(Oe, { variant: "middle" }),
870
- u
866
+ Array.isArray(c) ? /* @__PURE__ */ r(cn, { links: c }) : c,
867
+ g && /* @__PURE__ */ u(B, { sx: {}, children: [
868
+ /* @__PURE__ */ r(be, { variant: "middle" }),
869
+ g
871
870
  ] })
872
871
  ] })
873
872
  }
874
873
  ) });
875
874
  }
876
- function sn({ children: e, topBarHeight: t }) {
877
- return /* @__PURE__ */ o(
878
- T,
875
+ function un({ children: e, topBarHeight: t }) {
876
+ return /* @__PURE__ */ r(
877
+ B,
879
878
  {
880
879
  sx: {
881
880
  overflow: "auto",
@@ -884,8 +883,8 @@ function sn({ children: e, topBarHeight: t }) {
884
883
  // scrollbarGutter: 'stable both-edges',
885
884
  flexGrow: 1
886
885
  },
887
- children: /* @__PURE__ */ o(
888
- De,
886
+ children: /* @__PURE__ */ r(
887
+ Fe,
889
888
  {
890
889
  component: "main",
891
890
  id: "main-content",
@@ -896,169 +895,178 @@ function sn({ children: e, topBarHeight: t }) {
896
895
  }
897
896
  );
898
897
  }
899
- function dn({
898
+ function gn({
900
899
  children: e,
901
900
  initialTitleText: t,
902
901
  initialNavBarOpen: n,
903
- pageContainerProps: i,
904
- pageContentDataTestId: a,
905
- topBarDataTestId: l,
906
- navBarDataTestId: p,
907
- navBarMiddle: u
902
+ pageContainerProps: a,
903
+ pageContentDataTestId: i,
904
+ topBarDataTestId: d,
905
+ navBarDataTestId: c,
906
+ navBarMiddle: g
908
907
  }) {
909
908
  const {
910
- navBarOpen: d,
911
- setNavBarOpen: s,
912
- titleText: x,
913
- setTitleText: w,
914
- topBarHeight: h,
909
+ navBarOpen: s,
910
+ setNavBarOpen: l,
911
+ titleText: m,
912
+ setTitleText: h,
913
+ topBarHeight: p,
915
914
  navBarWidthOpen: C,
916
915
  navBarWidthClosed: b,
917
- navBarTop: I
918
- } = Ve();
919
- return K(() => {
920
- t !== void 0 && w(t);
921
- }, [t, w]), K(() => {
922
- console.log(n), n !== void 0 && s(n);
923
- }, [n, s]), /* @__PURE__ */ c(T, { children: [
924
- /* @__PURE__ */ o(lt, {}),
925
- /* @__PURE__ */ o(tn, { titleText: x, "data-testid": l, height: h }),
926
- /* @__PURE__ */ c(T, { sx: { display: "flex" }, children: [
927
- /* @__PURE__ */ o(
928
- an,
916
+ navBarTop: w
917
+ } = je();
918
+ return Z(() => {
919
+ t !== void 0 && h(t);
920
+ }, [t, h]), Z(() => {
921
+ console.log(n), n !== void 0 && l(n);
922
+ }, [n, l]), /* @__PURE__ */ u(B, { children: [
923
+ /* @__PURE__ */ r(ft, {}),
924
+ /* @__PURE__ */ r(sn, { titleText: m, "data-testid": d, height: p }),
925
+ /* @__PURE__ */ u(B, { sx: { display: "flex" }, children: [
926
+ /* @__PURE__ */ r(
927
+ pn,
929
928
  {
930
- open: d,
931
- top: I,
932
- middle: u,
933
- bottom: /* @__PURE__ */ o(T, { sx: { padding: 2 }, children: /* @__PURE__ */ o(ue, { 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" }) }),
929
+ open: s,
930
+ top: w,
931
+ middle: g,
932
+ bottom: s ? /* @__PURE__ */ r(B, { sx: { padding: 2 }, children: /* @__PURE__ */ r(ee, { 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__ */ r(B, { sx: { paddingTop: 2 }, children: /* @__PURE__ */ r(ee, { sx: { padding: 2, textWrap: "initial" }, variant: "outlined", children: "WIP" }) }),
934
933
  widthOpen: C,
935
934
  widthClosed: b,
936
- offsetTop: h,
937
- "data-testid": p
935
+ offsetTop: p,
936
+ "data-testid": c
938
937
  }
939
938
  ),
940
- /* @__PURE__ */ o(
941
- sn,
942
- v(r({
943
- "data-testid": a,
944
- topBarHeight: h
945
- }, i), {
939
+ /* @__PURE__ */ r(
940
+ un,
941
+ x(o({
942
+ "data-testid": i,
943
+ topBarHeight: p
944
+ }, a), {
946
945
  children: e
947
946
  })
948
947
  )
949
948
  ] })
950
949
  ] });
951
950
  }
952
- function Un(e) {
953
- return /* @__PURE__ */ o(Jt, { children: /* @__PURE__ */ o(dn, r({}, e)) });
951
+ function Qn(e) {
952
+ return /* @__PURE__ */ r(on, { children: /* @__PURE__ */ r(gn, o({}, e)) });
954
953
  }
955
- const ln = {
954
+ const hn = {
956
955
  autoHideDuration: 6e3,
957
956
  anchorOrigin: { vertical: "top", horizontal: "center" },
958
957
  // The default is false. If we prefer timer to continue when window loses
959
958
  // focus, change to true
960
959
  disableWindowBlurListener: !1
961
- }, cn = {
960
+ }, fn = {
962
961
  shouldClose: (e, t) => t !== "clickaway"
963
- }, $e = {
962
+ }, Ne = {
964
963
  message: "",
965
964
  severity: "info",
966
965
  variant: "standard",
967
966
  progressIndicator: void 0
968
967
  // Can use 'circular' or 'linear'
969
- }, Le = 100, ye = 2e3, pn = 2e3, un = (() => {
968
+ }, $e = 100, ke = 2e3, vn = 2e3, xn = (() => {
970
969
  let e = 0;
971
970
  return () => (e += 1, e);
972
- })(), hn = {
971
+ })(), mn = {
973
972
  borderBottomLeftRadius: "0px",
974
973
  borderBottomRightRadius: "0px"
975
- }, gn = {}, fn = {}, qe = ce(null);
976
- function vn(l) {
977
- var p = l, {
978
- overrideState: e = gn,
979
- overrideActions: t = fn,
980
- shouldClose: n = cn.shouldClose,
981
- children: i
982
- } = p, a = me(p, [
974
+ }, Cn = {}, wn = {}, Je = ue(null);
975
+ function Tn(d) {
976
+ var c = d, {
977
+ overrideState: e = Cn,
978
+ overrideActions: t = wn,
979
+ shouldClose: n = fn.shouldClose,
980
+ children: a
981
+ } = c, i = Te(c, [
983
982
  "overrideState",
984
983
  "overrideActions",
985
984
  "shouldClose",
986
985
  "children"
987
986
  ]);
988
- var R;
989
- const [{ open: u }, d] = B({ open: !1 }), s = se([]), x = se(Date.now()), w = se(0), h = Y((g) => {
990
- d({ open: g });
991
- }, []), C = Y((g = {}) => {
992
- w.current += 1, s.current.length >= Le && Date.now() - x.current >= ye && (x.current = Date.now(), console.error(
993
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Le}) hit ${w.current} times in last ${ye}ms)`
994
- ), w.current = 0);
995
- const f = r(v(r({}, $e), {
996
- key: un()
997
- }), g);
998
- return s.current.push(f), s.current.length === 1 && d({ open: !0 }), f.key;
999
- }, []), b = (g = "", f = {}) => C(r({ message: g, severity: "success" }, f)), I = (g = "", f = {}) => C(r({ message: g, severity: "info" }, f)), Z = (g = "", f = {}) => C(r({ message: g, severity: "warning" }, f)), z = (g = "", f = {}) => C(r({ message: g, severity: "error" }, f)), ee = (g) => {
1000
- const f = s.current.findIndex(($) => $.key === g);
1001
- if (f !== -1)
1002
- return f === 0 ? (d({ open: !1 }), s.current[0]) : s.current.splice(f, 1);
1003
- }, E = (g, f) => {
1004
- n(g, f) && d({ open: !1 });
987
+ var H;
988
+ const [{ open: g }, s] = y({ open: !1 }), l = le([]), m = le(Date.now()), h = le(0), p = J((f) => {
989
+ s({ open: f });
990
+ }, []), C = J((f = {}) => {
991
+ h.current += 1, l.current.length >= $e && Date.now() - m.current >= ke && (m.current = Date.now(), console.error(
992
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${$e}) hit ${h.current} times in last ${ke}ms)`
993
+ ), h.current = 0);
994
+ const v = o(x(o({}, Ne), {
995
+ key: xn()
996
+ }), f);
997
+ return l.current.push(v), l.current.length === 1 && s({ open: !0 }), v.key;
998
+ }, []), b = (f = "", v = {}) => C(o({ message: f, severity: "success" }, v)), w = (f = "", v = {}) => C(o({ message: f, severity: "info" }, v)), A = (f = "", v = {}) => C(o({ message: f, severity: "warning" }, v)), I = (f = "", v = {}) => C(o({ message: f, severity: "error" }, v)), ne = (f) => {
999
+ const v = l.current.findIndex((k) => k.key === f);
1000
+ if (v !== -1)
1001
+ return v === 0 ? (s({ open: !1 }), l.current[0]) : l.current.splice(v, 1);
1002
+ }, F = (f, v) => {
1003
+ n(f, v) && s({ open: !1 });
1005
1004
  }, P = () => {
1006
- }, k = () => {
1007
- s.current.shift(), s.current.length > 0 && d({ open: !0 });
1008
- }, O = (R = s.current[0]) != null ? R : r({}, $e), G = {};
1009
- "autoHideDuration" in O && (G.autoHideDuration = O.autoHideDuration);
1010
- const U = r(r({}, ln), a), _ = r(r({
1011
- open: u,
1012
- setOpen: h,
1005
+ }, _ = () => {
1006
+ l.current.shift(), l.current.length > 0 && s({ open: !0 });
1007
+ }, O = (H = l.current[0]) != null ? H : o({}, Ne), U = {};
1008
+ "autoHideDuration" in O && (U.autoHideDuration = O.autoHideDuration);
1009
+ const V = o(o({}, hn), i), M = o(o({
1010
+ open: g,
1011
+ setOpen: p,
1013
1012
  enqueueNotification: C,
1014
1013
  enqueueSuccessNotification: b,
1015
- enqueueInfoNotification: I,
1016
- enqueueWarningNotification: Z,
1017
- enqueueErrorNotification: z,
1018
- removeNotification: ee
1014
+ enqueueInfoNotification: w,
1015
+ enqueueWarningNotification: A,
1016
+ enqueueErrorNotification: I,
1017
+ removeNotification: ne
1019
1018
  }, e), t);
1020
- return /* @__PURE__ */ c(qe.Provider, { value: _, children: [
1021
- i,
1022
- /* @__PURE__ */ o(
1023
- ct,
1024
- v(r(r({}, U), G), {
1025
- open: u,
1026
- onClose: E,
1019
+ return /* @__PURE__ */ u(Je.Provider, { value: M, children: [
1020
+ a,
1021
+ /* @__PURE__ */ r(
1022
+ vt,
1023
+ x(o(o({}, V), U), {
1024
+ open: g,
1025
+ onClose: F,
1027
1026
  TransitionProps: {
1028
- onExited: k,
1027
+ onExited: _,
1029
1028
  onExit: P
1030
1029
  },
1031
- sx: { zIndex: pn },
1032
- children: /* @__PURE__ */ c("div", { children: [
1033
- /* @__PURE__ */ o(
1034
- pt,
1030
+ sx: { zIndex: vn },
1031
+ children: /* @__PURE__ */ u("div", { children: [
1032
+ /* @__PURE__ */ r(
1033
+ xt,
1035
1034
  {
1036
- onClose: (g) => E(g, "closeAlert"),
1035
+ onClose: (f) => F(f, "closeAlert"),
1037
1036
  severity: O.severity,
1038
1037
  variant: "filled",
1039
- icon: O.progressIndicator === "circular" ? /* @__PURE__ */ o(Ee, { size: "1em" }) : void 0,
1040
- style: O.progressIndicator === "linear" ? hn : void 0,
1038
+ icon: O.progressIndicator === "circular" ? /* @__PURE__ */ r(Pe, { size: "1em" }) : void 0,
1039
+ style: O.progressIndicator === "linear" ? mn : void 0,
1041
1040
  children: O.message
1042
1041
  }
1043
1042
  ),
1044
- O.progressIndicator === "linear" && /* @__PURE__ */ o(ut, { color: "primary" })
1043
+ O.progressIndicator === "linear" && /* @__PURE__ */ r(mt, { color: "primary" })
1045
1044
  ] })
1046
1045
  })
1047
1046
  )
1048
1047
  ] });
1049
1048
  }
1050
- function Vn() {
1051
- const e = pe(qe);
1049
+ function Bn() {
1050
+ const e = ge(Je);
1052
1051
  if (e === null)
1053
- throw new J("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1052
+ throw new te("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1054
1053
  return e;
1055
1054
  }
1056
- const Xn = ke(
1057
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(vn, v(r({}, e), { overrideState: t, overrideActions: n, children: i }))
1058
- ), he = It("domainCode", "ag"), xn = () => {
1059
- const [e, t] = Ot(he);
1060
- return [e, t, () => t(Nt)];
1061
- }, qn = () => Bt(he), Qn = () => bt(he), wn = {
1055
+ const jn = He(
1056
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: a }) => /* @__PURE__ */ r(Tn, x(o({}, e), { overrideState: t, overrideActions: n, children: a }))
1057
+ ), Ze = "domainCode";
1058
+ var Le;
1059
+ const Ee = Ge(
1060
+ (Le = localStorage.getItem(Ze)) != null ? Le : ""
1061
+ ), he = Ge(
1062
+ (e) => e(Ee),
1063
+ (e, t, n) => {
1064
+ t(Ee, n), localStorage.setItem(Ze, n);
1065
+ }
1066
+ ), bn = () => {
1067
+ const [e, t] = Dt(he);
1068
+ return [e, t, () => t("")];
1069
+ }, Kn = () => Nt(he), Jn = () => $t(he), On = {
1062
1070
  act: "ACT",
1063
1071
  nsw: "NSW",
1064
1072
  nt: "NT",
@@ -1070,84 +1078,243 @@ const Xn = ke(
1070
1078
  ag: "AG",
1071
1079
  fedmps: "Fedmps",
1072
1080
  "": ""
1073
- }, Cn = (e) => {
1081
+ }, yn = (e) => {
1074
1082
  var t;
1075
- return e === null ? "N/A" : (t = wn[e]) != null ? t : "";
1076
- }, jn = ({
1083
+ return e === null ? "N/A" : (t = On[e]) != null ? t : "";
1084
+ }, Zn = ({
1077
1085
  isLoading: e,
1078
1086
  isOpen: t,
1079
1087
  onClose: n,
1080
- domainOptions: i
1088
+ domainOptions: a,
1089
+ applicationName: i,
1090
+ handleLogout: d
1081
1091
  }) => {
1082
- const [a, l] = xn(), [p, u] = B(a);
1083
- return /* @__PURE__ */ c(
1084
- _t,
1092
+ const [c, g] = bn(), [s, l] = y(c), { enqueueSuccessNotification: m } = Bn(), h = a.length === 0, p = !!c && !a.includes(c) && !!s && !a.includes(s), C = () => Q(void 0, null, function* () {
1093
+ s ? (g(s), m(`Set domain to ${s}`), n()) : g("");
1094
+ }), b = () => Q(void 0, null, function* () {
1095
+ c && !h && !p ? (l(c), n()) : (!c || h || p) && d();
1096
+ });
1097
+ let w;
1098
+ return h ? w = "Unable to retrieve your active organisations. Try logging in again." : p && (w = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
1099
+ Wt,
1085
1100
  {
1086
1101
  isOpen: t,
1087
1102
  dialogTitle: "Select an organisation",
1088
1103
  primaryButton: {
1089
1104
  text: "Confirm",
1090
- onClick: () => ae(void 0, null, function* () {
1091
- l(p), n();
1092
- })
1105
+ onClick: C,
1106
+ disabled: !s || h || p
1107
+ },
1108
+ secondaryButton: {
1109
+ text: !s || h || p ? "Logout" : "Cancel",
1110
+ onClick: b
1093
1111
  },
1094
1112
  onClose: n,
1095
1113
  children: [
1096
- /* @__PURE__ */ o("p", { children: "Select the default organisation that you want to use with the List Manager." }),
1097
- /* @__PURE__ */ o(
1098
- ht,
1114
+ /* @__PURE__ */ u($, { marginBottom: 2, children: [
1115
+ "Select the default organisation that you want to use with the ",
1116
+ i,
1117
+ "."
1118
+ ] }),
1119
+ /* @__PURE__ */ r(
1120
+ Ct,
1099
1121
  {
1100
1122
  loading: e,
1101
1123
  multiple: !1,
1102
1124
  disableClearable: !1,
1103
- value: p,
1104
- onChange: (d, s) => u(s != null ? s : ""),
1105
- getOptionLabel: Cn,
1106
- options: i,
1107
- renderInput: (d) => /* @__PURE__ */ o(
1108
- gt,
1109
- v(r({}, d), {
1125
+ value: s,
1126
+ onChange: (A, I) => l(I != null ? I : ""),
1127
+ getOptionLabel: yn,
1128
+ options: a,
1129
+ renderInput: (A) => /* @__PURE__ */ r(
1130
+ wt,
1131
+ x(o({}, A), {
1110
1132
  variant: "filled",
1111
1133
  label: "Select organisation",
1112
- InputProps: v(r({}, d.InputProps), {
1113
- endAdornment: /* @__PURE__ */ c(M, { children: [
1114
- e ? /* @__PURE__ */ o(Ee, { color: "inherit", size: 20 }) : null,
1115
- d.InputProps.endAdornment
1134
+ InputProps: x(o({}, A.InputProps), {
1135
+ endAdornment: /* @__PURE__ */ u(W, { children: [
1136
+ e ? /* @__PURE__ */ r(Pe, { color: "inherit", size: 20 }) : null,
1137
+ A.InputProps.endAdornment
1116
1138
  ] })
1117
1139
  })
1118
1140
  })
1119
1141
  )
1120
1142
  }
1121
- )
1143
+ ),
1144
+ w && /* @__PURE__ */ r(Tt, { error: !0, children: w })
1122
1145
  ]
1123
1146
  }
1124
1147
  );
1125
- };
1148
+ }, eo = _e({
1149
+ palette: {
1150
+ primary: {
1151
+ dark: "#00A651",
1152
+ light: "#A3D39C",
1153
+ main: "#007236",
1154
+ contrastText: "#FFF"
1155
+ },
1156
+ warning: {
1157
+ main: "#F5871F",
1158
+ light: "#FCC589",
1159
+ dark: "#A2590A",
1160
+ contrastText: "#FFF"
1161
+ },
1162
+ secondary: {
1163
+ main: "#662D91",
1164
+ light: "#BD8CBF",
1165
+ dark: "#440E62",
1166
+ contrastText: "#FFF"
1167
+ },
1168
+ error: {
1169
+ main: "#D43C95",
1170
+ light: "#8F2064",
1171
+ dark: "#F9CDE0",
1172
+ contrastText: "#FFF"
1173
+ },
1174
+ info: {
1175
+ main: "#00A88D",
1176
+ light: "#ADDCCF",
1177
+ dark: "#005243",
1178
+ contrastText: "#FFF"
1179
+ },
1180
+ success: {
1181
+ main: "#00A651",
1182
+ light: "#A3D39C",
1183
+ dark: "#007236",
1184
+ contrastText: "#FFF"
1185
+ }
1186
+ },
1187
+ typography: {
1188
+ // I couldn't think of what to call this. It is an attempt to match
1189
+ // https://www.figma.com/file/atonRPl2YD9A1NCntbDtKR/List-Filter-and-Product-Concept?node-id=1187%3A43730
1190
+ // but not sure if line height should be changed
1191
+ explainer: {
1192
+ fontSize: "14px",
1193
+ marginBlockStart: "1em"
1194
+ }
1195
+ },
1196
+ navBar: {
1197
+ backgroundColor: "#E8E8E8"
1198
+ }
1199
+ }), to = _e({
1200
+ palette: {
1201
+ primary: {
1202
+ main: "#007236",
1203
+ dark: "#005221",
1204
+ light: "#00A04E",
1205
+ contrastText: "#FFFFFF"
1206
+ },
1207
+ secondary: {
1208
+ main: "#662D91",
1209
+ dark: "#440E62",
1210
+ light: "#93268F",
1211
+ contrastText: "#FFFFFF"
1212
+ },
1213
+ error: {
1214
+ main: "#D32F2F",
1215
+ dark: "#C62828",
1216
+ light: "#EF5350"
1217
+ },
1218
+ info: {
1219
+ main: "#0288D1",
1220
+ dark: "#01579B",
1221
+ light: "#03A9F4"
1222
+ },
1223
+ success: {
1224
+ main: "#0288D1",
1225
+ dark: "#01579B",
1226
+ light: "#03A9F4"
1227
+ }
1228
+ },
1229
+ components: {
1230
+ MuiTextField: {
1231
+ defaultProps: { color: "secondary" }
1232
+ },
1233
+ MuiToggleButtonGroup: {
1234
+ defaultProps: { color: "secondary" }
1235
+ },
1236
+ MuiCheckbox: {
1237
+ defaultProps: { color: "secondary" }
1238
+ },
1239
+ MuiSelect: {
1240
+ defaultProps: { color: "secondary" }
1241
+ },
1242
+ MuiSwitch: {
1243
+ defaultProps: { color: "secondary" }
1244
+ },
1245
+ MuiFormControl: {
1246
+ defaultProps: { color: "secondary" }
1247
+ },
1248
+ MuiMenuItem: {
1249
+ // Setting defaultProps for color on MenuItem does not work, so update manually
1250
+ styleOverrides: {
1251
+ root: ({ theme: e }) => ({
1252
+ "&.Mui-selected": {
1253
+ backgroundColor: de(
1254
+ e.palette.secondary.main,
1255
+ e.palette.action.selectedOpacity
1256
+ ),
1257
+ "&:hover": {
1258
+ backgroundColor: de(
1259
+ e.palette.secondary.main,
1260
+ e.palette.action.selectedOpacity
1261
+ )
1262
+ },
1263
+ "&.Mui-focusVisible": {
1264
+ backgroundColor: de(
1265
+ e.palette.secondary.main,
1266
+ e.palette.action.focusOpacity
1267
+ )
1268
+ }
1269
+ }
1270
+ })
1271
+ }
1272
+ }
1273
+ },
1274
+ typography: {
1275
+ // I couldn't think of what to call this. It is an attempt to match
1276
+ // https://www.figma.com/file/atonRPl2YD9A1NCntbDtKR/List-Filter-and-Product-Concept?node-id=1187%3A43730
1277
+ // but not sure if line height should be changed
1278
+ explainer: {
1279
+ fontSize: "14px",
1280
+ marginBlockStart: "1em"
1281
+ },
1282
+ h3: {
1283
+ fontSize: "1rem",
1284
+ fontWeight: 700
1285
+ }
1286
+ },
1287
+ navBar: {
1288
+ backgroundColor: "#E8E8E8"
1289
+ }
1290
+ });
1126
1291
  export {
1127
- _t as AgDialog,
1128
- Un as AppLayout,
1129
- Jt as AppLayoutProvider,
1130
- qe as Context,
1131
- J as ContextError,
1132
- jn as DomainCodeDialog,
1133
- Hn as ExampleComponent,
1134
- We as NAVBAR_WIDTH_CLOSED,
1135
- Me as NAVBAR_WIDTH_OPENED,
1136
- zn as NavBar,
1137
- Wn as NavBarDarkStyledList,
1138
- Fn as NavBarLightStyledList,
1139
- Et as NavBarProvider,
1140
- Gn as PageLayout,
1141
- vn as SaladBarProvider,
1142
- kt as buildNavBarState,
1143
- L as navBarClasses,
1144
- Ve as useAppLayout,
1145
- xn as useDomainCode,
1146
- qn as useDomainCodeValue,
1147
- Pt as useNavBar,
1148
- Vn as useSaladBar,
1149
- Qn as useSetDomainCode,
1150
- Mn as withNavBarProvider,
1151
- Xn as withSaladBarProvider
1292
+ Wt as AgDialog,
1293
+ Qn as AppLayout,
1294
+ on as AppLayoutProvider,
1295
+ Je as Context,
1296
+ te as ContextError,
1297
+ Zn as DomainCodeDialog,
1298
+ Gn as ExampleComponent,
1299
+ Ve as NAVBAR_WIDTH_CLOSED,
1300
+ Ue as NAVBAR_WIDTH_OPENED,
1301
+ qn as NavBar,
1302
+ Vn as NavBarDarkStyledList,
1303
+ Xn as NavBarLightStyledList,
1304
+ Mt as NavBarProvider,
1305
+ Yn as PageLayout,
1306
+ Tn as SaladBarProvider,
1307
+ Rt as buildNavBarState,
1308
+ eo as fed21Theme,
1309
+ to as internalAgSystemsTheme,
1310
+ E as navBarClasses,
1311
+ je as useAppLayout,
1312
+ bn as useDomainCode,
1313
+ Kn as useDomainCodeValue,
1314
+ Ht as useNavBar,
1315
+ Bn as useSaladBar,
1316
+ Jn as useSetDomainCode,
1317
+ Un as withNavBarProvider,
1318
+ jn as withSaladBarProvider
1152
1319
  };
1153
1320
  //# sourceMappingURL=index.js.map