@australiangreens/ag-internal-components 0.0.31 → 0.0.33

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