@australiangreens/ag-internal-components 0.0.27 → 0.0.29

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.
Files changed (48) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/components/ExampleComponent/index.d.ts.map +1 -1
  4. package/dist/components/NavBar/NavBarContext.d.ts +1 -0
  5. package/dist/components/NavBar/NavBarContext.d.ts.map +1 -1
  6. package/dist/components/NavBar/NavBarLightStyledList.d.ts +2 -0
  7. package/dist/components/NavBar/NavBarLightStyledList.d.ts.map +1 -0
  8. package/dist/components/NavBar/Styling.d.ts.map +1 -1
  9. package/dist/components/NavBar/index.d.ts +1 -0
  10. package/dist/components/NavBar/index.d.ts.map +1 -1
  11. package/dist/esm/index.js +626 -354
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/layouts/AppLayout/AppLayoutContext.d.ts +32 -0
  14. package/dist/layouts/AppLayout/AppLayoutContext.d.ts.map +1 -0
  15. package/dist/layouts/AppLayout/NavBar/NavBarDarkStyledList.d.ts +2 -0
  16. package/dist/layouts/AppLayout/NavBar/NavBarDarkStyledList.d.ts.map +1 -0
  17. package/dist/layouts/AppLayout/NavBar/Styling.d.ts +19 -0
  18. package/dist/layouts/AppLayout/NavBar/Styling.d.ts.map +1 -0
  19. package/dist/layouts/AppLayout/NavBar/index.d.ts +20 -0
  20. package/dist/layouts/AppLayout/NavBar/index.d.ts.map +1 -0
  21. package/dist/layouts/AppLayout/PageContainer.d.ts +14 -0
  22. package/dist/layouts/AppLayout/PageContainer.d.ts.map +1 -0
  23. package/dist/layouts/AppLayout/TopBar.d.ts +19 -0
  24. package/dist/layouts/AppLayout/TopBar.d.ts.map +1 -0
  25. package/dist/layouts/AppLayout/appLayoutContextStateReducer.d.ts +14 -0
  26. package/dist/layouts/AppLayout/appLayoutContextStateReducer.d.ts.map +1 -0
  27. package/dist/layouts/AppLayout/defaults.d.ts +21 -0
  28. package/dist/layouts/AppLayout/defaults.d.ts.map +1 -0
  29. package/dist/layouts/AppLayout/index.d.ts +4 -0
  30. package/dist/layouts/AppLayout/index.d.ts.map +1 -0
  31. package/dist/layouts/AppLayout/types.d.ts +23 -0
  32. package/dist/layouts/AppLayout/types.d.ts.map +1 -0
  33. package/dist/layouts/PageLayout/PageContainer.d.ts.map +1 -1
  34. package/dist/layouts/PageLayout/SidePanel.d.ts +1 -1
  35. package/dist/layouts/PageLayout/SidePanel.d.ts.map +1 -1
  36. package/dist/layouts/PageLayout/TopBar.d.ts.map +1 -1
  37. package/dist/layouts/PageLayout/index.d.ts +15 -1
  38. package/dist/layouts/PageLayout/index.d.ts.map +1 -1
  39. package/dist/layouts/index.d.ts +2 -0
  40. package/dist/layouts/index.d.ts.map +1 -1
  41. package/dist/providers/AgTheme/index.d.ts.map +1 -1
  42. package/dist/providers/SaladBar/SaladBarContext.d.ts +1 -1
  43. package/dist/providers/SaladBar/SaladBarContext.d.ts.map +1 -1
  44. package/dist/providers/SaladBar/testWrappers.d.ts +2 -1
  45. package/dist/providers/SaladBar/testWrappers.d.ts.map +1 -1
  46. package/dist/providers/SaladBar/types.d.ts +1 -1
  47. package/dist/providers/SaladBar/types.d.ts.map +1 -1
  48. package/package.json +3 -2
package/dist/esm/index.js CHANGED
@@ -1,71 +1,60 @@
1
- var Gt = Object.defineProperty, Ut = Object.defineProperties;
2
- var qt = Object.getOwnPropertyDescriptors;
3
- var W = Object.getOwnPropertySymbols;
4
- var ct = Object.prototype.hasOwnProperty, dt = Object.prototype.propertyIsEnumerable;
5
- var J = (t, e, n) => e in t ? Gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, r = (t, e) => {
1
+ var te = Object.defineProperty, ee = Object.defineProperties;
2
+ var ne = Object.getOwnPropertyDescriptors;
3
+ var Y = Object.getOwnPropertySymbols;
4
+ var mt = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable;
5
+ var st = (t, e, n) => e in t ? te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, r = (t, e) => {
6
6
  for (var n in e || (e = {}))
7
- ct.call(e, n) && J(t, n, e[n]);
8
- if (W)
9
- for (var n of W(e))
10
- dt.call(e, n) && J(t, n, e[n]);
7
+ mt.call(e, n) && st(t, n, e[n]);
8
+ if (Y)
9
+ for (var n of Y(e))
10
+ Ct.call(e, n) && st(t, n, e[n]);
11
11
  return t;
12
- }, B = (t, e) => Ut(t, qt(e));
13
- var pt = (t, e) => {
12
+ }, v = (t, e) => ee(t, ne(e));
13
+ var Tt = (t, e) => {
14
14
  var n = {};
15
- for (var o in t)
16
- ct.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
17
- if (t != null && W)
18
- for (var o of W(t))
19
- e.indexOf(o) < 0 && dt.call(t, o) && (n[o] = t[o]);
15
+ for (var i in t)
16
+ mt.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
17
+ if (t != null && Y)
18
+ for (var i of Y(t))
19
+ e.indexOf(i) < 0 && Ct.call(t, i) && (n[i] = t[i]);
20
20
  return n;
21
21
  };
22
- var ut = (t, e, n) => (J(t, typeof e != "symbol" ? e + "" : e, n), n);
23
- import { jsxs as d, Fragment as U, jsx as i } from "react/jsx-runtime";
24
- import { useState as b, createContext as Bt, useCallback as nt, useContext as Ot, useEffect as gt, useRef as Y } from "react";
25
- import Xt from "@mui/material/Button";
26
- import Vt from "@mui/material/Paper";
27
- import D from "@mui/material/Typography";
28
- import jt from "@mui/material/CssBaseline";
29
- import { styled as rt, createTheme as Tt, alpha as Z, ThemeProvider as Qt } from "@mui/material/styles";
30
- import bt from "@mui/material/Drawer";
31
- import { AgError as Kt } from "@australiangreens/ag-error";
32
- import { createHelper as yt } from "souvlaki";
33
- import Jt from "@mui/material/List";
34
- import { styled as L, Box as It, IconButton as ft } from "@mui/material";
35
- import St from "@mui/icons-material/ArrowForward";
36
- import Ft from "@mui/icons-material/ArrowBack";
37
- import Yt from "@mui/material/Box";
38
- import ht from "@mui/material/IconButton";
39
- import Zt from "@mui/material/Container";
40
- import te from "@mui/material/Snackbar";
41
- import ee from "@mui/material/Alert";
42
- import ne from "@mui/material/LinearProgress";
43
- import re from "@mui/material/CircularProgress";
44
- function Ze({ text: t }) {
45
- const [e, n] = b(0);
46
- return /* @__PURE__ */ d(U, { children: [
47
- /* @__PURE__ */ i(D, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
48
- /* @__PURE__ */ i(D, { variant: "caption", display: "block", children: /* @__PURE__ */ i("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
49
- /* @__PURE__ */ i(
50
- Xt,
22
+ var Bt = (t, e, n) => (st(t, typeof e != "symbol" ? e + "" : e, n), n);
23
+ import { jsxs as c, Fragment as U, jsx as o } from "react/jsx-runtime";
24
+ import { useState as $, createContext as ut, useCallback as J, useContext as gt, useEffect as yt, useReducer as re, useMemo as oe, useRef as dt } from "react";
25
+ import { Typography as D, Button as ie, Paper as ae, styled as S, Box as T, IconButton as Z, Drawer as se, Container as At, Snackbar as de, Alert as le, CircularProgress as ce, LinearProgress as pe } from "@mui/material";
26
+ import Nt from "@mui/material/CssBaseline";
27
+ import { styled as L, createTheme as Et, alpha as lt, ThemeProvider as ue } from "@mui/material/styles";
28
+ import Pt from "@mui/material/Drawer";
29
+ import { AgError as ge } from "@australiangreens/ag-error";
30
+ import { createHelper as Ft } from "souvlaki";
31
+ import ht from "@mui/material/List";
32
+ import { ArrowForward as Dt, ArrowBack as Mt } from "@mui/icons-material";
33
+ function vn({ text: t }) {
34
+ const [e, n] = $(0);
35
+ return /* @__PURE__ */ c(U, { children: [
36
+ /* @__PURE__ */ o(D, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
37
+ /* @__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" }) }),
38
+ /* @__PURE__ */ o(
39
+ ie,
51
40
  {
52
41
  variant: "outlined",
53
- onClick: () => n((o) => o + 1),
42
+ onClick: () => n((i) => i + 1),
54
43
  "aria-label": "Increment",
55
44
  children: "Hello I am a button"
56
45
  }
57
46
  ),
58
- /* @__PURE__ */ d("p", { children: [
47
+ /* @__PURE__ */ c("p", { children: [
59
48
  "This is some text: ",
60
- /* @__PURE__ */ i("span", { children: t })
49
+ /* @__PURE__ */ o("span", { children: t })
61
50
  ] }),
62
- /* @__PURE__ */ d(Vt, { children: [
51
+ /* @__PURE__ */ c(ae, { children: [
63
52
  "This number will incremember when button pressed: ",
64
53
  e
65
54
  ] })
66
55
  ] });
67
56
  }
68
- const At = 330, Pt = 73, O = "Navbar", A = {
57
+ const _t = 330, Rt = 73, O = "Navbar", P = {
69
58
  root: `${O}-root`,
70
59
  menuButton: `${O}-menuButton`,
71
60
  hide: `${O}-hide`,
@@ -73,74 +62,78 @@ const At = 330, Pt = 73, O = "Navbar", A = {
73
62
  userInfoHolder: `${O}-userInfoHolder`,
74
63
  settings: `${O}-settings`,
75
64
  pieChartIcon: `${O}-pieChartIcon`
76
- }, oe = rt("div", { name: "NavBar" })(({ theme: t }) => ({
77
- [`&.${A.root}`]: {
65
+ }, he = L("div", { name: "NavBar" })(({ theme: t }) => ({
66
+ [`&.${P.root}`]: {
78
67
  display: "flex"
79
68
  },
80
- [`& .${A.menuButton}`]: {
69
+ [`& .${P.menuButton}`]: {
81
70
  marginRight: 36
82
71
  },
83
- [`& .${A.hide}`]: {
72
+ [`& .${P.hide}`]: {
84
73
  display: "none"
85
74
  },
86
- [`& .${A.content}`]: {
75
+ [`& .${P.content}`]: {
87
76
  flexGrow: 1,
88
77
  padding: t.spacing(3)
89
78
  },
90
- [`& .${A.userInfoHolder}`]: {
79
+ [`& .${P.userInfoHolder}`]: {
91
80
  height: "148px",
92
81
  marginTop: "64px",
93
82
  marginBottom: "16px"
94
83
  }
95
- })), kt = () => ({
84
+ })), Ht = () => ({
96
85
  position: "absolute",
97
86
  height: "100%",
98
87
  overflowX: "hidden",
99
88
  overflowY: "hidden",
100
89
  color: "white",
101
90
  backgroundColor: "black"
102
- }), ie = () => r({
103
- width: At
104
- }, kt()), ae = () => r({
105
- width: Pt
106
- }, kt()), se = rt(bt, {
91
+ // backgroundColor: '#e8e8e8',
92
+ }), fe = () => r({
93
+ width: _t
94
+ }, Ht()), ve = () => r({
95
+ width: Rt
96
+ }, Ht()), xe = L(Pt, {
107
97
  shouldForwardProp: (t) => t !== "open"
108
98
  })(({ theme: t, open: e }) => r(r({
109
- width: e ? At : Pt,
99
+ width: e ? _t : Rt,
110
100
  flexShrink: 0,
111
101
  whiteSpace: "nowrap",
112
102
  boxSizing: "border-box",
113
103
  zIndex: t.zIndex.drawer + 100
114
104
  }, e && {
115
- "& .MuiDrawer-paper": ie()
105
+ "& .MuiDrawer-paper": fe()
116
106
  }), !e && {
117
- "& .MuiDrawer-paper": ae()
107
+ "& .MuiDrawer-paper": ve()
118
108
  }));
119
- class ot extends Kt {
109
+ class tt extends ge {
120
110
  }
121
- ut(ot, "errorName", "ContextError");
122
- const Et = Bt(null), le = {}, ce = {}, de = ({
123
- overrideState: t = le,
124
- overrideActions: e = ce,
111
+ Bt(tt, "errorName", "ContextError");
112
+ const Wt = ut(null), we = {}, me = {}, Ce = ({
113
+ overrideState: t = we,
114
+ overrideActions: e = me,
125
115
  children: n
126
116
  }) => {
127
- const [{ open: o }, l] = b({ open: !0 }), g = nt((x) => {
128
- l({ open: x });
129
- }, []), f = r(r({
130
- open: o,
131
- setOpen: g
117
+ const [{ open: i }, a] = $({ open: !0 }), g = J((p) => {
118
+ a({ open: p });
119
+ }, []), h = J(() => {
120
+ a((p) => v(r({}, p), { open: !p.open }));
121
+ }, []), u = r(r({
122
+ open: i,
123
+ setOpen: g,
124
+ toggleOpen: h
132
125
  }, t), e);
133
- return /* @__PURE__ */ i(Et.Provider, { value: f, children: n });
134
- }, pe = () => {
135
- const t = Ot(Et);
126
+ return /* @__PURE__ */ o(Wt.Provider, { value: u, children: n });
127
+ }, Te = () => {
128
+ const t = gt(Wt);
136
129
  if (t === null)
137
- throw new ot("Error: Tried to useNavBar outside of a <NavBarProvider>");
130
+ throw new tt("Error: Tried to useNavBar outside of a <NavBarProvider>");
138
131
  return t;
139
- }, ue = (t = {}) => r({
132
+ }, Be = (t = {}) => r({
140
133
  open: !0
141
- }, t), tn = yt(
142
- (t = ue(), e = {}) => ({ children: n }) => /* @__PURE__ */ i(de, { overrideState: t, overrideActions: e, children: n })
143
- ), mt = 7, en = rt(Jt)(({ theme: t }) => ({
134
+ }, t), xn = Ft(
135
+ (t = Be(), e = {}) => ({ children: n }) => /* @__PURE__ */ o(Ce, { overrideState: t, overrideActions: e, children: n })
136
+ ), Ot = 7, wn = L(ht)(({ theme: t }) => ({
144
137
  backgroundColor: "black",
145
138
  color: "white",
146
139
  "& .MuiListItem-root": {
@@ -149,7 +142,7 @@ const Et = Bt(null), le = {}, ce = {}, de = ({
149
142
  "& .MuiListItemButton-root": {
150
143
  " .MuiListItemIcon-root": {
151
144
  color: "white",
152
- padding: `${mt}px`
145
+ padding: `${Ot}px`
153
146
  },
154
147
  // Focus state
155
148
  "&.Mui-focusVisible": {
@@ -160,7 +153,45 @@ const Et = Bt(null), le = {}, ce = {}, de = ({
160
153
  borderLeftStyle: "solid",
161
154
  borderLeftWidth: "7px",
162
155
  borderLeftColor: t.palette.primary.main,
163
- paddingLeft: `calc(${t.spacing(2)} - ${mt}px)`
156
+ paddingLeft: `calc(${t.spacing(2)} - ${Ot}px)`
157
+ },
158
+ // Hover state
159
+ "&:hover": {
160
+ backgroundColor: t.palette.primary.dark
161
+ },
162
+ // Focus+Selected state
163
+ "&.Mui-selected.Mui-focusVisible": {
164
+ backgroundColor: t.palette.grey[700]
165
+ },
166
+ // Hover+Selected state
167
+ "&.Mui-selected:hover": {
168
+ backgroundColor: t.palette.primary.dark
169
+ }
170
+ // Focus+Hover+Selected state doesn't need to be specified
171
+ // '&.Mui-selected.Mui-focusVisible:hover': {
172
+ // },
173
+ }
174
+ })), bt = 7, mn = L(ht)(({ theme: t }) => ({
175
+ backgroundColor: "#e8e8e8",
176
+ color: "inherit",
177
+ "& .MuiListItem-root": {
178
+ padding: "unset"
179
+ },
180
+ "& .MuiListItemButton-root": {
181
+ " .MuiListItemIcon-root": {
182
+ color: "inherit",
183
+ padding: `${bt}px`
184
+ },
185
+ // Focus state
186
+ "&.Mui-focusVisible": {
187
+ backgroundColor: t.palette.grey[700]
188
+ },
189
+ // Selected state
190
+ "&.Mui-selected": {
191
+ borderLeftStyle: "solid",
192
+ borderLeftWidth: "7px",
193
+ borderLeftColor: t.palette.primary.main,
194
+ paddingLeft: `calc(${t.spacing(2)} - ${bt}px)`
164
195
  },
165
196
  // Hover state
166
197
  "&:hover": {
@@ -179,15 +210,15 @@ const Et = Bt(null), le = {}, ce = {}, de = ({
179
210
  // },
180
211
  }
181
212
  }));
182
- function nn({
213
+ function Cn({
183
214
  "data-testid": t,
184
215
  children: e
185
216
  }) {
186
- const { open: n } = pe();
187
- return /* @__PURE__ */ d(oe, { className: A.root, "data-testid": t, children: [
188
- /* @__PURE__ */ i(jt, {}),
189
- /* @__PURE__ */ i(
190
- se,
217
+ const { open: n } = Te();
218
+ return /* @__PURE__ */ c(he, { className: P.root, "data-testid": t, children: [
219
+ /* @__PURE__ */ o(Nt, {}),
220
+ /* @__PURE__ */ o(
221
+ xe,
191
222
  {
192
223
  variant: "permanent",
193
224
  anchor: "left",
@@ -198,32 +229,32 @@ function nn({
198
229
  )
199
230
  ] });
200
231
  }
201
- const ge = 24, fe = 64, T = "TopBar", u = {
202
- topStripe: `${T}-topStripe`,
203
- titleBar: `${T}-titleBar`,
204
- titleSlider: `${T}-titleSlider`,
205
- titleText: `${T}-titleText`,
206
- leftPanelButton: `${T}-leftPanelButton`,
207
- rightPanelButton: `${T}-leftPanelButton`
208
- }, he = L("div", {
232
+ const ye = 24, Oe = 64, I = "TopBar", w = {
233
+ topStripe: `${I}-topStripe`,
234
+ titleBar: `${I}-titleBar`,
235
+ titleSlider: `${I}-titleSlider`,
236
+ titleText: `${I}-titleText`,
237
+ leftPanelButton: `${I}-leftPanelButton`,
238
+ rightPanelButton: `${I}-leftPanelButton`
239
+ }, be = S("div", {
209
240
  shouldForwardProp: (t) => !["leftPanel", "rightPanel"].includes(t),
210
- name: T
241
+ name: I
211
242
  })(({ theme: t, leftPanel: e, rightPanel: n }) => {
212
- var o, l;
243
+ var i, a;
213
244
  return {
214
245
  width: "100%",
215
- [`& .${u.topStripe}`]: {
246
+ [`& .${w.topStripe}`]: {
216
247
  width: "100%",
217
- height: `${ge}px`,
248
+ height: `${ye}px`,
218
249
  backgroundColor: t.palette.primary.main
219
250
  },
220
- [`& .${u.titleBar}`]: {
251
+ [`& .${w.titleBar}`]: {
221
252
  backgroundColor: t.palette.primary.light,
222
- height: `${fe}px`,
253
+ height: `${Oe}px`,
223
254
  padding: t.spacing(0, 3),
224
255
  width: "100%"
225
256
  },
226
- [`& .${u.titleSlider}`]: r(r({
257
+ [`& .${w.titleSlider}`]: r(r({
227
258
  height: "100%",
228
259
  display: "flex",
229
260
  alignItems: "center",
@@ -232,14 +263,14 @@ const ge = 24, fe = 64, T = "TopBar", u = {
232
263
  easing: t.transitions.easing.sharp,
233
264
  duration: t.transitions.duration.leavingScreen
234
265
  }),
235
- [`& .${u.leftPanelButton}`]: {
266
+ [`& .${w.leftPanelButton}`]: {
236
267
  marginRight: t.spacing(2),
237
268
  flexGrow: 0
238
269
  },
239
- [`& .${u.titleText}`]: {
270
+ [`& .${w.titleText}`]: {
240
271
  flexGrow: 1
241
272
  },
242
- [`& .${u.rightPanelButton}`]: {
273
+ [`& .${w.rightPanelButton}`]: {
243
274
  flexGrow: 0
244
275
  }
245
276
  }, (e == null ? void 0 : e.open) && {
@@ -247,29 +278,29 @@ const ge = 24, fe = 64, T = "TopBar", u = {
247
278
  easing: t.transitions.easing.easeOut,
248
279
  duration: t.transitions.duration.enteringScreen
249
280
  }),
250
- marginLeft: `${(o = e == null ? void 0 : e.width) != null ? o : 0}px`
281
+ marginLeft: `${(i = e == null ? void 0 : e.width) != null ? i : 0}px`
251
282
  }), (n == null ? void 0 : n.open) && {
252
283
  transition: t.transitions.create("margin", {
253
284
  easing: t.transitions.easing.easeOut,
254
285
  duration: t.transitions.duration.enteringScreen
255
286
  }),
256
- marginRight: `${(l = n == null ? void 0 : n.width) != null ? l : 0}px`
287
+ marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
257
288
  })
258
289
  };
259
290
  });
260
- function me({
291
+ function Ie({
261
292
  titleText: t = "",
262
293
  leftPanel: e,
263
294
  rightPanel: n,
264
- "data-testid": o
295
+ "data-testid": i
265
296
  }) {
266
- return /* @__PURE__ */ d(he, { leftPanel: e, rightPanel: n, "data-testid": o, children: [
267
- /* @__PURE__ */ i("div", { className: u.topStripe }),
268
- /* @__PURE__ */ i("div", { className: u.titleBar, children: /* @__PURE__ */ d(It, { className: u.titleSlider, children: [
269
- e !== void 0 && !e.open && e.showOpenArrow && /* @__PURE__ */ d(
270
- ft,
297
+ return /* @__PURE__ */ c(be, { leftPanel: e, rightPanel: n, "data-testid": i, children: [
298
+ /* @__PURE__ */ o("div", { className: w.topStripe }),
299
+ /* @__PURE__ */ o("div", { className: w.titleBar, children: /* @__PURE__ */ c(T, { className: w.titleSlider, children: [
300
+ e !== void 0 && !e.open && e.showOpenArrow && /* @__PURE__ */ c(
301
+ Z,
271
302
  {
272
- className: u.leftPanelButton,
303
+ className: w.leftPanelButton,
273
304
  color: "inherit",
274
305
  "aria-label": "Open left side panel",
275
306
  onClick: e == null ? void 0 : e.onOpen,
@@ -277,15 +308,15 @@ function me({
277
308
  size: "large",
278
309
  children: [
279
310
  " ",
280
- /* @__PURE__ */ i(St, {})
311
+ /* @__PURE__ */ o(Dt, {})
281
312
  ]
282
313
  }
283
314
  ),
284
- /* @__PURE__ */ i(D, { className: u.titleText, variant: "h6", noWrap: !0, children: t }),
285
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ d(
286
- ft,
315
+ /* @__PURE__ */ o(D, { className: w.titleText, variant: "h6", noWrap: !0, children: t }),
316
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ c(
317
+ Z,
287
318
  {
288
- className: u.rightPanelButton,
319
+ className: w.rightPanelButton,
289
320
  color: "inherit",
290
321
  "aria-label": "Open right side panel",
291
322
  onClick: n == null ? void 0 : n.onOpen,
@@ -293,14 +324,14 @@ function me({
293
324
  size: "large",
294
325
  children: [
295
326
  " ",
296
- /* @__PURE__ */ i(Ft, {})
327
+ /* @__PURE__ */ o(Mt, {})
297
328
  ]
298
329
  }
299
330
  )
300
331
  ] }) })
301
332
  ] });
302
333
  }
303
- const Nt = 400, ve = L(bt, {
334
+ const zt = 400, $e = S(se, {
304
335
  shouldForwardProp: (t) => (
305
336
  // Note we do want anchor to be forwarded to the Drawer component
306
337
  ![
@@ -314,7 +345,7 @@ const Nt = 400, ve = L(bt, {
314
345
  ),
315
346
  name: "SidePanelDrawer"
316
347
  })(
317
- ({ width: t, debugOpacity: e = !1, anchor: n, navBarOpen: o, navBarWidthOpen: l, navBarWidthClosed: g }) => ({
348
+ ({ width: t, debugOpacity: e = !1, anchor: n, navBarOpen: i, navBarWidthOpen: a, navBarWidthClosed: g }) => ({
318
349
  width: t,
319
350
  "& .MuiDrawer-paper": r(r({
320
351
  position: "absolute",
@@ -326,13 +357,13 @@ const Nt = 400, ve = L(bt, {
326
357
  opacity: "50%"
327
358
  }), n === "left" && r({
328
359
  marginLeft: `${g}px`
329
- }, o && {
330
- marginLeft: `${l}px`
360
+ }, i && {
361
+ marginLeft: `${a}px`
331
362
  }))
332
363
  })
333
- ), xe = L(Yt, {
364
+ ), Se = S(T, {
334
365
  shouldForwardProp: (t) => !["anchor"].includes(t)
335
- })(({ theme: t, anchor: e }) => B(r({
366
+ })(({ theme: t, anchor: e }) => v(r({
336
367
  display: "flex",
337
368
  alignItems: "center",
338
369
  padding: t.spacing(2)
@@ -350,64 +381,64 @@ const Nt = 400, ve = L(bt, {
350
381
  marginRight: e === "right" ? t.spacing(2) : 0
351
382
  }
352
383
  }));
353
- function vt({
384
+ function It({
354
385
  children: t,
355
386
  anchor: e = "left",
356
387
  open: n,
357
- onClose: o = () => {
388
+ onClose: i = () => {
358
389
  },
359
- titleText: l = "",
360
- width: g = Nt,
361
- showCloseArrow: f = !0,
362
- debugOpacity: x = !1,
363
- headerBoxProps: h = {},
364
- onOpened: c,
365
- onClosed: m,
366
- "data-testid": w,
367
- navBarOpen: y = !1,
368
- navBarWidthOpen: p = 0,
369
- navBarWidthClosed: I = 0
390
+ titleText: a = "",
391
+ width: g = zt,
392
+ showCloseArrow: h = !0,
393
+ debugOpacity: u = !1,
394
+ headerBoxProps: p = {},
395
+ onOpened: l,
396
+ onClosed: f,
397
+ "data-testid": C,
398
+ navBarOpen: k = !1,
399
+ navBarWidthOpen: x = 0,
400
+ navBarWidthClosed: A = 0
370
401
  }) {
371
- return /* @__PURE__ */ d(
372
- ve,
402
+ return /* @__PURE__ */ c(
403
+ $e,
373
404
  {
374
405
  SlideProps: {
375
- onEntered: () => c == null ? void 0 : c(),
376
- onExited: () => m == null ? void 0 : m()
406
+ onEntered: () => l == null ? void 0 : l(),
407
+ onExited: () => f == null ? void 0 : f()
377
408
  },
378
409
  variant: "persistent",
379
410
  anchor: e,
380
411
  open: n,
381
412
  width: g,
382
- debugOpacity: x,
383
- "data-testid": w,
384
- navBarOpen: y,
385
- navBarWidthOpen: p,
386
- navBarWidthClosed: I,
413
+ debugOpacity: u,
414
+ "data-testid": C,
415
+ navBarOpen: k,
416
+ navBarWidthOpen: x,
417
+ navBarWidthClosed: A,
387
418
  children: [
388
- /* @__PURE__ */ i(xe, B(r({ anchor: e }, h), { children: e === "left" ? /* @__PURE__ */ d(U, { children: [
389
- /* @__PURE__ */ i(D, { variant: "h6", color: "inherit", component: "div", children: l }),
390
- f && /* @__PURE__ */ d(ht, { onClick: o, size: "large", "aria-label": "Close left side panel", children: [
391
- /* @__PURE__ */ i(Ft, { "data-testid": "arrowbackicon" }),
419
+ /* @__PURE__ */ o(Se, v(r({ anchor: e }, p), { children: e === "left" ? /* @__PURE__ */ c(U, { children: [
420
+ /* @__PURE__ */ o(D, { variant: "h6", color: "inherit", component: "div", children: a }),
421
+ h && /* @__PURE__ */ c(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
422
+ /* @__PURE__ */ o(Mt, { "data-testid": "arrowbackicon" }),
392
423
  " "
393
424
  ] })
394
- ] }) : /* @__PURE__ */ d(U, { children: [
395
- f && /* @__PURE__ */ d(ht, { onClick: o, size: "large", "aria-label": "Close right side panel", children: [
396
- /* @__PURE__ */ i(St, {}),
425
+ ] }) : /* @__PURE__ */ c(U, { children: [
426
+ h && /* @__PURE__ */ c(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
427
+ /* @__PURE__ */ o(Dt, {}),
397
428
  " "
398
429
  ] }),
399
- /* @__PURE__ */ i(D, { variant: "h6", color: "inherit", component: "div", children: l })
430
+ /* @__PURE__ */ o(D, { variant: "h6", color: "inherit", component: "div", children: a })
400
431
  ] }) })),
401
432
  t
402
433
  ]
403
434
  }
404
435
  );
405
436
  }
406
- const we = L("div", {
437
+ const Le = S("div", {
407
438
  shouldForwardProp: (t) => !["leftPanel", "rightPanel"].includes(t),
408
439
  name: "PanelAwareMargins"
409
440
  })(({ theme: t, leftPanel: e, rightPanel: n }) => {
410
- var o, l;
441
+ var i, a;
411
442
  return r(r({
412
443
  transition: t.transitions.create("margin", {
413
444
  easing: t.transitions.easing.sharp,
@@ -418,161 +449,396 @@ const we = L("div", {
418
449
  easing: t.transitions.easing.easeOut,
419
450
  duration: t.transitions.duration.enteringScreen
420
451
  }),
421
- marginLeft: `${(o = e == null ? void 0 : e.width) != null ? o : 0}px`
452
+ marginLeft: `${(i = e == null ? void 0 : e.width) != null ? i : 0}px`
422
453
  }), (n == null ? void 0 : n.open) && {
423
454
  transition: t.transitions.create("margin", {
424
455
  easing: t.transitions.easing.easeOut,
425
456
  duration: t.transitions.duration.enteringScreen
426
457
  }),
427
- marginRight: `${(l = n == null ? void 0 : n.width) != null ? l : 0}px`
458
+ marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
428
459
  });
429
- }), Ce = L(Zt, {
460
+ }), ke = S(At, {
430
461
  name: "PageContainer"
431
462
  })(({ theme: t }) => ({
432
463
  // Horizontal padding comes from the Container's gutter
433
464
  paddingTop: t.spacing(3),
434
465
  paddingBottom: t.spacing(3)
435
- })), tt = !1, et = !1, G = {
466
+ })), ct = !1, pt = !1, K = {
436
467
  titleText: "",
437
468
  flavour: "push",
438
- width: Nt,
469
+ width: zt,
439
470
  arrowButtons: "both",
440
471
  startOpen: !1,
441
472
  open: void 0,
442
473
  onChangeOpen: void 0,
443
- content: /* @__PURE__ */ i(U, {}),
474
+ content: /* @__PURE__ */ o(U, {}),
444
475
  onOpened: void 0,
445
476
  onClosed: void 0,
446
477
  dataTestId: void 0
447
478
  };
448
- function rn({
479
+ function Tn({
449
480
  children: t,
450
481
  titleText: e = "",
451
482
  leftPanel: n,
452
- rightPanel: o,
453
- sidePanelsAreMutuallyExclusive: l = !0,
483
+ rightPanel: i,
484
+ sidePanelsAreMutuallyExclusive: a = !0,
454
485
  debugOpacity: g = !1,
455
- pageContainerProps: f,
456
- pageContentDataTestId: x,
457
- topBarDataTestId: h,
458
- navBarOpen: c,
459
- navBarWidthOpen: m,
460
- navBarWidthClosed: w
486
+ pageContainerProps: h,
487
+ pageContentDataTestId: u,
488
+ topBarDataTestId: p,
489
+ navBarOpen: l,
490
+ navBarWidthOpen: f,
491
+ navBarWidthClosed: C
461
492
  }) {
462
- const [y, p] = b(tt), [I, S] = b(et), [q, M] = b(tt), [X, P] = b(et), k = n !== void 0, E = o !== void 0, {
463
- titleText: v,
464
- content: R,
465
- flavour: _,
466
- open: N,
467
- onChangeOpen: $,
468
- width: a,
469
- arrowButtons: s,
470
- startOpen: F,
471
- onOpened: Dt,
472
- onClosed: Lt,
473
- dataTestId: Mt
474
- } = n ? r(r({}, G), n) : r({}, G), {
475
- titleText: Rt,
476
- content: _t,
477
- flavour: it,
478
- open: V,
479
- onChangeOpen: at,
480
- width: j,
481
- arrowButtons: H,
482
- startOpen: z,
483
- onOpened: Ht,
484
- onClosed: zt,
485
- dataTestId: Wt
486
- } = o ? r(r({}, G), o) : r({}, G);
487
- gt(() => {
488
- F !== tt && (p(F), M(F));
489
- }, [F]), gt(() => {
490
- z !== et && (S(z), P(z));
491
- }, [z]);
492
- const Q = N === void 0 ? y : N, K = V === void 0 ? I : V, st = (C) => {
493
- N === void 0 && (p(C), l && E && (C ? (S(!1), P(I)) : S(X))), $ && $(C);
494
- }, lt = (C) => {
495
- V === void 0 && (S(C), l && k && (C ? (p(!1), M(y)) : p(q))), at && at(C);
493
+ const [k, x] = $(ct), [A, N] = $(pt), [et, V] = $(ct), [nt, M] = $(pt), _ = n !== void 0, R = i !== void 0, {
494
+ titleText: m,
495
+ content: X,
496
+ flavour: q,
497
+ open: H,
498
+ onChangeOpen: W,
499
+ width: s,
500
+ arrowButtons: d,
501
+ startOpen: E,
502
+ onOpened: Xt,
503
+ onClosed: qt,
504
+ dataTestId: jt
505
+ } = n ? r(r({}, K), n) : r({}, K), {
506
+ titleText: Qt,
507
+ content: Yt,
508
+ flavour: ft,
509
+ open: rt,
510
+ onChangeOpen: vt,
511
+ width: ot,
512
+ arrowButtons: j,
513
+ startOpen: Q,
514
+ onOpened: Kt,
515
+ onClosed: Jt,
516
+ dataTestId: Zt
517
+ } = i ? r(r({}, K), i) : r({}, K);
518
+ yt(() => {
519
+ E !== ct && (x(E), V(E));
520
+ }, [E]), yt(() => {
521
+ Q !== pt && (N(Q), M(Q));
522
+ }, [Q]);
523
+ const it = H === void 0 ? k : H, at = rt === void 0 ? A : rt, xt = (y) => {
524
+ H === void 0 && (x(y), a && R && (y ? (N(!1), M(A)) : N(nt))), W && W(y);
525
+ }, wt = (y) => {
526
+ rt === void 0 && (N(y), a && _ && (y ? (x(!1), V(k)) : x(et))), vt && vt(y);
496
527
  };
497
- return /* @__PURE__ */ d(It, { children: [
498
- k && /* @__PURE__ */ i(
499
- vt,
528
+ return /* @__PURE__ */ c(T, { children: [
529
+ _ && /* @__PURE__ */ o(
530
+ It,
500
531
  {
501
- "data-testid": Mt,
532
+ "data-testid": jt,
502
533
  anchor: "left",
503
- open: Q,
504
- onClose: () => st(!1),
505
- width: a,
506
- titleText: v,
534
+ open: it,
535
+ onClose: () => xt(!1),
536
+ width: s,
537
+ titleText: m,
507
538
  debugOpacity: g,
508
- showCloseArrow: s === "both" || s === "close",
509
- onOpened: Dt,
510
- onClosed: Lt,
511
- navBarOpen: c,
512
- navBarWidthOpen: m,
513
- navBarWidthClosed: w,
514
- children: R
539
+ showCloseArrow: d === "both" || d === "close",
540
+ onOpened: Xt,
541
+ onClosed: qt,
542
+ navBarOpen: l,
543
+ navBarWidthOpen: f,
544
+ navBarWidthClosed: C,
545
+ children: X
515
546
  }
516
547
  ),
517
- E && /* @__PURE__ */ i(
518
- vt,
548
+ R && /* @__PURE__ */ o(
549
+ It,
519
550
  {
520
- "data-testid": Wt,
551
+ "data-testid": Zt,
521
552
  anchor: "right",
522
- open: K,
523
- onClose: () => lt(!1),
524
- width: j,
525
- titleText: Rt,
553
+ open: at,
554
+ onClose: () => wt(!1),
555
+ width: ot,
556
+ titleText: Qt,
526
557
  debugOpacity: g,
527
- showCloseArrow: H === "both" || H === "close",
528
- onOpened: Ht,
529
- onClosed: zt,
530
- navBarOpen: c,
531
- navBarWidthOpen: m,
532
- navBarWidthClosed: w,
533
- children: _t
558
+ showCloseArrow: j === "both" || j === "close",
559
+ onOpened: Kt,
560
+ onClosed: Jt,
561
+ navBarOpen: l,
562
+ navBarWidthOpen: f,
563
+ navBarWidthClosed: C,
564
+ children: Yt
534
565
  }
535
566
  ),
536
- /* @__PURE__ */ i(
537
- me,
567
+ /* @__PURE__ */ o(
568
+ Ie,
538
569
  r(r({
539
570
  titleText: e,
540
- "data-testid": h
541
- }, k && _ === "push" ? {
571
+ "data-testid": p
572
+ }, _ && q === "push" ? {
542
573
  leftPanel: {
543
- open: Q,
544
- width: a,
545
- onOpen: () => st(!0),
546
- showOpenArrow: s === "both" || s === "open"
574
+ open: it,
575
+ width: s,
576
+ onOpen: () => xt(!0),
577
+ showOpenArrow: d === "both" || d === "open"
547
578
  }
548
- } : {}), E && it === "push" ? {
579
+ } : {}), R && ft === "push" ? {
549
580
  rightPanel: {
550
- open: K,
551
- width: j,
552
- onOpen: () => lt(!0),
553
- showOpenArrow: H === "both" || H === "open"
581
+ open: at,
582
+ width: ot,
583
+ onOpen: () => wt(!0),
584
+ showOpenArrow: j === "both" || j === "open"
554
585
  }
555
586
  } : {})
556
587
  ),
557
- /* @__PURE__ */ i(
558
- we,
559
- B(r(r({}, _ === "push" ? {
588
+ /* @__PURE__ */ o(
589
+ Le,
590
+ v(r(r({}, q === "push" ? {
560
591
  leftPanel: {
561
- open: Q,
562
- width: a
592
+ open: it,
593
+ width: s
563
594
  }
564
- } : {}), it === "push" ? {
595
+ } : {}), ft === "push" ? {
565
596
  rightPanel: {
566
- open: K,
567
- width: j
597
+ open: at,
598
+ width: ot
568
599
  }
569
600
  } : {}), {
570
- children: /* @__PURE__ */ i(Ce, B(r({ "data-testid": x }, f), { children: t }))
601
+ children: /* @__PURE__ */ o(ke, v(r({ "data-testid": u }, h), { children: t }))
571
602
  })
572
603
  )
573
604
  ] });
574
605
  }
575
- const Be = Tt({
606
+ const G = {
607
+ content: /* @__PURE__ */ o(U, {}),
608
+ widthOpen: 330,
609
+ widthClosed: 73
610
+ }, Ae = 24, Ne = 64, z = "TopBar", B = {
611
+ topStripe: `${z}-topStripe`,
612
+ titleBar: `${z}-titleBar`,
613
+ titleSlider: `${z}-titleSlider`,
614
+ titleText: `${z}-titleText`
615
+ }, Ee = S("div", {
616
+ shouldForwardProp: (t) => !["leftPanel", "rightPanel"].includes(t),
617
+ name: z
618
+ })(({ theme: t }) => ({
619
+ width: "100%",
620
+ [`& .${B.topStripe}`]: {
621
+ width: "100%",
622
+ height: `${Ae}px`,
623
+ backgroundColor: t.palette.primary.main
624
+ },
625
+ [`& .${B.titleBar}`]: {
626
+ backgroundColor: t.palette.primary.light,
627
+ height: `${Ne}px`,
628
+ padding: t.spacing(0, 3),
629
+ width: "100%"
630
+ },
631
+ [`& .${B.titleSlider}`]: {
632
+ height: "100%",
633
+ display: "flex",
634
+ alignItems: "center",
635
+ color: "white",
636
+ transition: t.transitions.create("margin", {
637
+ easing: t.transitions.easing.sharp,
638
+ duration: t.transitions.duration.leavingScreen
639
+ }),
640
+ [`& .${B.titleText}`]: {
641
+ flexGrow: 1
642
+ }
643
+ }
644
+ }));
645
+ function Pe({ titleText: t = "", "data-testid": e }) {
646
+ return /* @__PURE__ */ c(Ee, { "data-testid": e, children: [
647
+ /* @__PURE__ */ o("div", { className: B.topStripe }),
648
+ /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ o(T, { className: B.titleSlider, children: /* @__PURE__ */ o(D, { className: B.titleText, variant: "h6", noWrap: !0, children: t }) }) })
649
+ ] });
650
+ }
651
+ const Fe = S(At, {
652
+ name: "PageContainer"
653
+ })(({ theme: t }) => ({
654
+ // Horizontal padding comes from the Container's gutter
655
+ paddingTop: t.spacing(3),
656
+ paddingBottom: t.spacing(3)
657
+ })), De = {
658
+ navBarOpen: !0,
659
+ titleText: "",
660
+ navBarWidthOpen: G.widthOpen,
661
+ navBarWidthClosed: G.widthClosed
662
+ };
663
+ function Me(t, e) {
664
+ switch (e.type) {
665
+ case "toggleNavBarOpen":
666
+ return v(r({}, t), {
667
+ navBarOpen: !t.navBarOpen
668
+ });
669
+ case "setNavBarOpen":
670
+ return v(r({}, t), {
671
+ navBarOpen: e.payload
672
+ });
673
+ case "setTitleText":
674
+ return v(r({}, t), {
675
+ titleText: e.payload
676
+ });
677
+ default:
678
+ throw new Error("Invalid action.type");
679
+ }
680
+ }
681
+ const Gt = ut(null), _e = {}, Re = {}, He = ({
682
+ overrideState: t = _e,
683
+ overrideActions: e = Re,
684
+ children: n
685
+ }) => {
686
+ const [{ titleText: i, navBarOpen: a, navBarWidthOpen: g, navBarWidthClosed: h }, u] = re(Me, De), p = oe(
687
+ () => ({
688
+ toggleNavBarOpen: () => u({ type: "toggleNavBarOpen" }),
689
+ setNavBarOpen: (f) => u({ type: "setNavBarOpen", payload: f }),
690
+ setTitleText: (f) => u({ type: "setTitleText", payload: f })
691
+ }),
692
+ []
693
+ ), l = r(r(r({
694
+ navBarOpen: a,
695
+ titleText: i,
696
+ navBarWidthOpen: g,
697
+ navBarWidthClosed: h
698
+ }, p), t), e);
699
+ return /* @__PURE__ */ o(Gt.Provider, { value: l, children: n });
700
+ }, We = () => {
701
+ const t = gt(Gt);
702
+ if (t === null)
703
+ throw new tt("Error: Tried to call useAppLayout() outside of a <AppLayoutProvider>");
704
+ return t;
705
+ }, b = "Navbar", F = {
706
+ root: `${b}-root`,
707
+ menuButton: `${b}-menuButton`,
708
+ hide: `${b}-hide`,
709
+ content: `${b}-content`,
710
+ userInfoHolder: `${b}-userInfoHolder`,
711
+ settings: `${b}-settings`,
712
+ pieChartIcon: `${b}-pieChartIcon`
713
+ }, ze = L("div", { name: "NavBar" })(({ theme: t }) => ({
714
+ [`&.${F.root}`]: {
715
+ display: "flex"
716
+ },
717
+ [`& .${F.menuButton}`]: {
718
+ marginRight: 36
719
+ },
720
+ [`& .${F.hide}`]: {
721
+ display: "none"
722
+ },
723
+ [`& .${F.content}`]: {
724
+ flexGrow: 1,
725
+ padding: t.spacing(3)
726
+ },
727
+ [`& .${F.userInfoHolder}`]: {
728
+ height: "148px",
729
+ marginTop: "64px",
730
+ marginBottom: "16px"
731
+ }
732
+ })), Ut = () => ({
733
+ position: "absolute",
734
+ height: "100%",
735
+ overflowX: "hidden",
736
+ overflowY: "hidden",
737
+ color: "white",
738
+ backgroundColor: "black"
739
+ }), Ge = (t) => r({
740
+ width: t
741
+ }, Ut()), Ue = (t) => r({
742
+ width: t
743
+ }, Ut()), Ve = L(Pt, {
744
+ shouldForwardProp: (t) => !["open", "widthOpen", "widthClosed"].includes(t)
745
+ })(({ theme: t, open: e, widthOpen: n, widthClosed: i }) => r(r({
746
+ width: e ? n : i,
747
+ flexShrink: 0,
748
+ whiteSpace: "nowrap",
749
+ boxSizing: "border-box",
750
+ zIndex: t.zIndex.drawer + 100
751
+ }, e && {
752
+ "& .MuiDrawer-paper": Ge(n)
753
+ }), !e && {
754
+ "& .MuiDrawer-paper": Ue(i)
755
+ })), $t = 7;
756
+ L(ht)(({ theme: t }) => ({
757
+ backgroundColor: "black",
758
+ color: "white",
759
+ "& .MuiListItem-root": {
760
+ padding: "unset"
761
+ },
762
+ "& .MuiListItemButton-root": {
763
+ " .MuiListItemIcon-root": {
764
+ color: "white",
765
+ padding: `${$t}px`
766
+ },
767
+ // Focus state
768
+ "&.Mui-focusVisible": {
769
+ backgroundColor: t.palette.grey[700]
770
+ },
771
+ // Selected state
772
+ "&.Mui-selected": {
773
+ borderLeftStyle: "solid",
774
+ borderLeftWidth: "7px",
775
+ borderLeftColor: t.palette.primary.main,
776
+ paddingLeft: `calc(${t.spacing(2)} - ${$t}px)`
777
+ },
778
+ // Hover state
779
+ "&:hover": {
780
+ backgroundColor: t.palette.primary.dark
781
+ },
782
+ // Focus+Selected state
783
+ "&.Mui-selected.Mui-focusVisible": {
784
+ backgroundColor: t.palette.grey[700]
785
+ },
786
+ // Hover+Selected state
787
+ "&.Mui-selected:hover": {
788
+ backgroundColor: t.palette.primary.dark
789
+ }
790
+ // Focus+Hover+Selected state doesn't need to be specified
791
+ // '&.Mui-selected.Mui-focusVisible:hover': {
792
+ // },
793
+ }
794
+ }));
795
+ function Xe({
796
+ open: t,
797
+ widthOpen: e,
798
+ widthClosed: n,
799
+ "data-testid": i,
800
+ children: a
801
+ }) {
802
+ return /* @__PURE__ */ c(ze, { className: F.root, "data-testid": i, children: [
803
+ /* @__PURE__ */ o(Nt, {}),
804
+ /* @__PURE__ */ o(
805
+ Ve,
806
+ {
807
+ variant: "permanent",
808
+ anchor: "left",
809
+ transitionDuration: null,
810
+ open: t,
811
+ widthOpen: e,
812
+ widthClosed: n,
813
+ children: a
814
+ }
815
+ )
816
+ ] });
817
+ }
818
+ function qe({
819
+ children: t,
820
+ navBar: e = G,
821
+ pageContainerProps: n,
822
+ pageContentDataTestId: i,
823
+ topBarDataTestId: a
824
+ }) {
825
+ const { navBarOpen: g, titleText: h } = We(), {
826
+ content: u,
827
+ widthOpen: p,
828
+ widthClosed: l
829
+ } = e ? r(r({}, G), e) : r({}, G);
830
+ return /* @__PURE__ */ o(T, { display: "flex", flexDirection: "column", height: "100vh", children: /* @__PURE__ */ c(T, { display: "flex", position: "relative", flexGrow: 1, overflow: "hidden", children: [
831
+ /* @__PURE__ */ o(Xe, { open: g, widthOpen: p, widthClosed: l, children: u }),
832
+ /* @__PURE__ */ o(T, { component: "main", id: "main-content", flexGrow: 1, overflow: "auto", tabIndex: -1, children: /* @__PURE__ */ c(T, { children: [
833
+ /* @__PURE__ */ o(Pe, { titleText: h, "data-testid": a }),
834
+ /* @__PURE__ */ o(Fe, v(r({ "data-testid": i }, n), { children: t }))
835
+ ] }) })
836
+ ] }) });
837
+ }
838
+ function Bn(t) {
839
+ return /* @__PURE__ */ o(He, { children: /* @__PURE__ */ o(qe, r({}, t)) });
840
+ }
841
+ const je = Et({
576
842
  palette: {
577
843
  primary: {
578
844
  main: "#007236",
@@ -626,18 +892,18 @@ const Be = Tt({
626
892
  styleOverrides: {
627
893
  root: ({ theme: t }) => ({
628
894
  "&.Mui-selected": {
629
- backgroundColor: Z(
895
+ backgroundColor: lt(
630
896
  t.palette.secondary.main,
631
897
  t.palette.action.selectedOpacity
632
898
  ),
633
899
  "&:hover": {
634
- backgroundColor: Z(
900
+ backgroundColor: lt(
635
901
  t.palette.secondary.main,
636
902
  t.palette.action.selectedOpacity
637
903
  )
638
904
  },
639
905
  "&.Mui-focusVisible": {
640
- backgroundColor: Z(
906
+ backgroundColor: lt(
641
907
  t.palette.secondary.main,
642
908
  t.palette.action.focusOpacity
643
909
  )
@@ -660,7 +926,7 @@ const Be = Tt({
660
926
  fontWeight: 700
661
927
  }
662
928
  }
663
- }), Oe = Tt({
929
+ }), Qe = Et({
664
930
  palette: {
665
931
  primary: {
666
932
  dark: "#00A651",
@@ -709,131 +975,137 @@ const Be = Tt({
709
975
  }
710
976
  }
711
977
  });
712
- function on({
978
+ function yn({
713
979
  name: t = "internal",
714
980
  children: e
715
981
  }) {
716
- return /* @__PURE__ */ i(Qt, { theme: t === "internal" ? Be : t === "fed21" ? Oe : void 0, children: e });
982
+ return /* @__PURE__ */ o(ue, { theme: t === "internal" ? je : t === "fed21" ? Qe : void 0, children: e });
717
983
  }
718
- const Te = {
984
+ const Ye = {
719
985
  autoHideDuration: 6e3,
720
986
  anchorOrigin: { vertical: "top", horizontal: "center" },
721
987
  // The default is false. If we prefer timer to continue when window loses
722
988
  // focus, change to true
723
989
  disableWindowBlurListener: !1
724
- }, be = {
990
+ }, Ke = {
725
991
  shouldClose: (t, e) => e !== "clickaway"
726
- }, xt = {
992
+ }, St = {
727
993
  message: "",
728
994
  severity: "info",
729
995
  variant: "standard",
730
996
  progressIndicator: void 0
731
997
  // Can use 'circular' or 'linear'
732
- }, wt = 100, Ct = 2e3, ye = 2e3, Ie = (() => {
998
+ }, Lt = 100, kt = 2e3, Je = 2e3, Ze = (() => {
733
999
  let t = 0;
734
1000
  return () => (t += 1, t);
735
- })(), Se = {
1001
+ })(), tn = {
736
1002
  borderBottomLeftRadius: "0px",
737
1003
  borderBottomRightRadius: "0px"
738
- }, Fe = {}, Ae = {}, $t = Bt(null);
739
- function Pe(g) {
740
- var f = g, {
741
- overrideState: t = Fe,
742
- overrideActions: e = Ae,
743
- shouldClose: n = be.shouldClose,
744
- children: o
745
- } = f, l = pt(f, [
1004
+ }, en = {}, nn = {}, Vt = ut(null);
1005
+ function rn(g) {
1006
+ var h = g, {
1007
+ overrideState: t = en,
1008
+ overrideActions: e = nn,
1009
+ shouldClose: n = Ke.shouldClose,
1010
+ children: i
1011
+ } = h, a = Tt(h, [
746
1012
  "overrideState",
747
1013
  "overrideActions",
748
1014
  "shouldClose",
749
1015
  "children"
750
1016
  ]);
751
- var $;
752
- const [{ open: x }, h] = b({ open: !1 }), c = Y([]), m = Y(Date.now()), w = Y(0), y = nt((a) => {
753
- h({ open: a });
754
- }, []), p = nt((a = {}) => {
755
- w.current += 1, c.current.length >= wt && Date.now() - m.current >= Ct && (m.current = Date.now(), console.error(
756
- `SaladBarProvider: MAX_QUEUE_LENGTH (${wt}) hit ${w.current} times in last ${Ct}ms)`
757
- ), w.current = 0);
758
- const s = r(B(r({}, xt), {
759
- key: Ie()
760
- }), a);
761
- return c.current.push(s), c.current.length === 1 && h({ open: !0 }), s.key;
762
- }, []), I = (a = "", s = {}) => p(r({ message: a, severity: "success" }, s)), S = (a = "", s = {}) => p(r({ message: a, severity: "info" }, s)), q = (a = "", s = {}) => p(r({ message: a, severity: "warning" }, s)), M = (a = "", s = {}) => p(r({ message: a, severity: "error" }, s)), X = (a) => {
763
- const s = c.current.findIndex((F) => F.key === a);
764
- if (s !== -1)
765
- return s === 0 ? (h({ open: !1 }), c.current[0]) : c.current.splice(s, 1);
766
- }, P = (a, s) => {
767
- n(a, s) && h({ open: !1 });
768
- }, k = () => {
769
- }, E = () => {
770
- c.current.shift(), c.current.length > 0 && h({ open: !0 });
771
- }, v = ($ = c.current[0]) != null ? $ : r({}, xt), R = {};
772
- "autoHideDuration" in v && (R.autoHideDuration = v.autoHideDuration);
773
- const _ = r(r({}, Te), l), N = r(r({
774
- open: x,
775
- setOpen: y,
776
- enqueueNotification: p,
777
- enqueueSuccessNotification: I,
778
- enqueueInfoNotification: S,
779
- enqueueWarningNotification: q,
780
- enqueueErrorNotification: M,
781
- removeNotification: X
1017
+ var W;
1018
+ const [{ open: u }, p] = $({ open: !1 }), l = dt([]), f = dt(Date.now()), C = dt(0), k = J((s) => {
1019
+ p({ open: s });
1020
+ }, []), x = J((s = {}) => {
1021
+ C.current += 1, l.current.length >= Lt && Date.now() - f.current >= kt && (f.current = Date.now(), console.error(
1022
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Lt}) hit ${C.current} times in last ${kt}ms)`
1023
+ ), C.current = 0);
1024
+ const d = r(v(r({}, St), {
1025
+ key: Ze()
1026
+ }), s);
1027
+ return l.current.push(d), l.current.length === 1 && p({ open: !0 }), d.key;
1028
+ }, []), A = (s = "", d = {}) => x(r({ message: s, severity: "success" }, d)), N = (s = "", d = {}) => x(r({ message: s, severity: "info" }, d)), et = (s = "", d = {}) => x(r({ message: s, severity: "warning" }, d)), V = (s = "", d = {}) => x(r({ message: s, severity: "error" }, d)), nt = (s) => {
1029
+ const d = l.current.findIndex((E) => E.key === s);
1030
+ if (d !== -1)
1031
+ return d === 0 ? (p({ open: !1 }), l.current[0]) : l.current.splice(d, 1);
1032
+ }, M = (s, d) => {
1033
+ n(s, d) && p({ open: !1 });
1034
+ }, _ = () => {
1035
+ }, R = () => {
1036
+ l.current.shift(), l.current.length > 0 && p({ open: !0 });
1037
+ }, m = (W = l.current[0]) != null ? W : r({}, St), X = {};
1038
+ "autoHideDuration" in m && (X.autoHideDuration = m.autoHideDuration);
1039
+ const q = r(r({}, Ye), a), H = r(r({
1040
+ open: u,
1041
+ setOpen: k,
1042
+ enqueueNotification: x,
1043
+ enqueueSuccessNotification: A,
1044
+ enqueueInfoNotification: N,
1045
+ enqueueWarningNotification: et,
1046
+ enqueueErrorNotification: V,
1047
+ removeNotification: nt
782
1048
  }, t), e);
783
- return /* @__PURE__ */ d($t.Provider, { value: N, children: [
784
- o,
785
- /* @__PURE__ */ i(
786
- te,
787
- B(r(r({}, _), R), {
788
- open: x,
789
- onClose: P,
1049
+ return /* @__PURE__ */ c(Vt.Provider, { value: H, children: [
1050
+ i,
1051
+ /* @__PURE__ */ o(
1052
+ de,
1053
+ v(r(r({}, q), X), {
1054
+ open: u,
1055
+ onClose: M,
790
1056
  TransitionProps: {
791
- onExited: E,
792
- onExit: k
1057
+ onExited: R,
1058
+ onExit: _
793
1059
  },
794
- sx: { zIndex: ye },
795
- children: /* @__PURE__ */ d("div", { children: [
796
- /* @__PURE__ */ i(
797
- ee,
1060
+ sx: { zIndex: Je },
1061
+ children: /* @__PURE__ */ c("div", { children: [
1062
+ /* @__PURE__ */ o(
1063
+ le,
798
1064
  {
799
- onClose: (a) => P(a, "closeAlert"),
800
- severity: v.severity,
1065
+ onClose: (s) => M(s, "closeAlert"),
1066
+ severity: m.severity,
801
1067
  variant: "filled",
802
- icon: v.progressIndicator === "circular" ? /* @__PURE__ */ i(re, { size: "1em" }) : void 0,
803
- style: v.progressIndicator === "linear" ? Se : void 0,
804
- children: v.message
1068
+ icon: m.progressIndicator === "circular" ? /* @__PURE__ */ o(ce, { size: "1em" }) : void 0,
1069
+ style: m.progressIndicator === "linear" ? tn : void 0,
1070
+ children: m.message
805
1071
  }
806
1072
  ),
807
- v.progressIndicator === "linear" && /* @__PURE__ */ i(ne, { color: "primary" })
1073
+ m.progressIndicator === "linear" && /* @__PURE__ */ o(pe, { color: "primary" })
808
1074
  ] })
809
1075
  })
810
1076
  )
811
1077
  ] });
812
1078
  }
813
- function an() {
814
- const t = Ot($t);
1079
+ function On() {
1080
+ const t = gt(Vt);
815
1081
  if (t === null)
816
- throw new ot("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1082
+ throw new tt("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
817
1083
  return t;
818
1084
  }
819
- const sn = yt(() => ({ children: t }) => /* @__PURE__ */ i(Pe, { children: t }));
1085
+ const bn = Ft(
1086
+ (t = { autoHideDuration: 1 }, e = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(rn, v(r({}, t), { overrideState: e, overrideActions: n, children: i }))
1087
+ );
820
1088
  export {
821
- on as AgThemeProvider,
822
- $t as Context,
823
- ot as ContextError,
824
- Ze as ExampleComponent,
825
- Pt as NAVBAR_WIDTH_CLOSED,
826
- At as NAVBAR_WIDTH_OPENED,
827
- nn as NavBar,
828
- en as NavBarDarkStyledList,
829
- de as NavBarProvider,
830
- rn as PageLayout,
831
- Pe as SaladBarProvider,
832
- ue as buildNavBarState,
833
- A as navBarClasses,
834
- pe as useNavBar,
835
- an as useSaladBar,
836
- tn as withNavBarProvider,
837
- sn as withSaladBarProvider
1089
+ yn as AgThemeProvider,
1090
+ Bn as AppLayout,
1091
+ He as AppLayoutProvider,
1092
+ Vt as Context,
1093
+ tt as ContextError,
1094
+ vn as ExampleComponent,
1095
+ Rt as NAVBAR_WIDTH_CLOSED,
1096
+ _t as NAVBAR_WIDTH_OPENED,
1097
+ Cn as NavBar,
1098
+ wn as NavBarDarkStyledList,
1099
+ mn as NavBarLightStyledList,
1100
+ Ce as NavBarProvider,
1101
+ Tn as PageLayout,
1102
+ rn as SaladBarProvider,
1103
+ Be as buildNavBarState,
1104
+ P as navBarClasses,
1105
+ We as useAppLayout,
1106
+ Te as useNavBar,
1107
+ On as useSaladBar,
1108
+ xn as withNavBarProvider,
1109
+ bn as withSaladBarProvider
838
1110
  };
839
1111
  //# sourceMappingURL=index.js.map