@australiangreens/ag-internal-components 0.0.93 → 0.0.95

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
@@ -38,7 +38,7 @@ var N = (e, t, n) => new Promise((i, r) => {
38
38
  });
39
39
  import { jsxs as h, Fragment as L, jsx as o } from "react/jsx-runtime";
40
40
  import { useState as B, createContext as Ye, useCallback as oe, useContext as Ke, useEffect as ie, createElement as xe, useRef as ge } from "react";
41
- import { Typography as E, Button as re, Paper as Je, Box as $, Drawer as we, styled as Ae, IconButton as Y, Container as Ze, useTheme as se, useMediaQuery as _t, Collapse as Mt, Avatar as Pe, Fade as Rt, Skeleton as Ne, Toolbar as Ht, Divider as Le, CssBaseline as Wt, Dialog as je, LinearProgress as et, DialogTitle as tt, DialogContent as nt, DialogActions as ot, Autocomplete as Se, TextField as be, CircularProgress as ke, Chip as zt, Tooltip as Ut, Stack as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
41
+ import { Typography as E, Button as re, Paper as Je, Box as $, Drawer as we, styled as Ae, IconButton as Y, Container as Ze, useTheme as se, useMediaQuery as _t, Collapse as Mt, Avatar as Pe, Fade as Rt, Skeleton as Ne, Toolbar as Ht, Divider as Le, CssBaseline as Wt, Dialog as je, LinearProgress as et, DialogTitle as tt, DialogContent as nt, DialogActions as ot, Autocomplete as be, TextField as Se, CircularProgress as ke, Chip as zt, Tooltip as Ut, Stack as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
42
42
  import Qt from "@mui/material/CssBaseline";
43
43
  import { styled as R, createTheme as it, alpha as fe } from "@mui/material/styles";
44
44
  import { AgError as Yt } from "@australiangreens/ag-error";
@@ -132,9 +132,9 @@ const pt = 330, ht = 73, U = "Navbar", q = {
132
132
  }), !t && {
133
133
  "& .MuiDrawer-paper": un()
134
134
  }));
135
- class De extends Yt {
135
+ class ye extends Yt {
136
136
  }
137
- Fe(De, "errorName", "ContextError");
137
+ Fe(ye, "errorName", "ContextError");
138
138
  const ft = Ye(null), hn = {}, gn = {}, fn = ({
139
139
  overrideState: e = hn,
140
140
  overrideActions: t = gn,
@@ -153,7 +153,7 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
153
153
  }, mn = () => {
154
154
  const e = Ke(ft);
155
155
  if (e === null)
156
- throw new De("Error: Tried to useNavBar outside of a <NavBarProvider>");
156
+ throw new ye("Error: Tried to useNavBar outside of a <NavBarProvider>");
157
157
  return e;
158
158
  }, Cn = (e = {}) => a({
159
159
  open: !0
@@ -357,7 +357,7 @@ function An({
357
357
  ] }) })
358
358
  ] });
359
359
  }
360
- const mt = 400, Sn = Ae(we, {
360
+ const mt = 400, bn = Ae(we, {
361
361
  shouldForwardProp: (e) => (
362
362
  // Note we do want anchor to be forwarded to the Drawer component
363
363
  ![
@@ -387,7 +387,7 @@ const mt = 400, Sn = Ae(we, {
387
387
  marginLeft: `${r}px`
388
388
  }))
389
389
  })
390
- ), bn = Ae($, {
390
+ ), Sn = Ae($, {
391
391
  shouldForwardProp: (e) => !["anchor"].includes(e)
392
392
  })(({ theme: e, anchor: t }) => k(a({
393
393
  display: "flex",
@@ -423,10 +423,10 @@ function He({
423
423
  "data-testid": x,
424
424
  navBarOpen: A = !1,
425
425
  navBarWidthOpen: g = 0,
426
- navBarWidthClosed: y = 0
426
+ navBarWidthClosed: D = 0
427
427
  }) {
428
428
  return /* @__PURE__ */ h(
429
- Sn,
429
+ bn,
430
430
  {
431
431
  SlideProps: {
432
432
  onEntered: () => u == null ? void 0 : u(),
@@ -440,9 +440,9 @@ function He({
440
440
  "data-testid": x,
441
441
  navBarOpen: A,
442
442
  navBarWidthOpen: g,
443
- navBarWidthClosed: y,
443
+ navBarWidthClosed: D,
444
444
  children: [
445
- /* @__PURE__ */ o(bn, k(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ h(L, { children: [
445
+ /* @__PURE__ */ o(Sn, k(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ h(L, { children: [
446
446
  /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: r }),
447
447
  c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
448
448
  /* @__PURE__ */ o(st, { "data-testid": "arrowbackicon" }),
@@ -483,7 +483,7 @@ const kn = R($, {
483
483
  }),
484
484
  marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
485
485
  });
486
- }), Dn = R(Ze, {
486
+ }), yn = R(Ze, {
487
487
  name: "PageContainer"
488
488
  })(({ theme: e }) => ({
489
489
  // Horizontal padding comes from the Container's gutter
@@ -517,7 +517,7 @@ function Fo({
517
517
  navBarWidthOpen: w,
518
518
  navBarWidthClosed: x
519
519
  }) {
520
- const [A, g] = B(me), [y, S] = B(Ce), [D, I] = B(me), [O, F] = B(Ce), P = n !== void 0, b = i !== void 0, {
520
+ const [A, g] = B(me), [D, b] = B(Ce), [y, I] = B(me), [O, F] = B(Ce), P = n !== void 0, S = i !== void 0, {
521
521
  titleText: v,
522
522
  content: H,
523
523
  flavour: W,
@@ -532,7 +532,7 @@ function Fo({
532
532
  } = n ? a(a({}, te), n) : a({}, te), {
533
533
  titleText: Ot,
534
534
  content: Tt,
535
- flavour: ye,
535
+ flavour: De,
536
536
  open: ce,
537
537
  onChangeOpen: $e,
538
538
  width: de,
@@ -545,12 +545,12 @@ function Fo({
545
545
  ie(() => {
546
546
  M !== me && (g(M), I(M));
547
547
  }, [M]), ie(() => {
548
- j !== Ce && (S(j), F(j));
548
+ j !== Ce && (b(j), F(j));
549
549
  }, [j]);
550
- const ue = p === void 0 ? A : p, pe = ce === void 0 ? y : ce, Ie = (z) => {
551
- p === void 0 && (g(z), r && b && (z ? (S(!1), F(y)) : S(O))), f && f(z);
550
+ const ue = p === void 0 ? A : p, pe = ce === void 0 ? D : ce, Ie = (z) => {
551
+ p === void 0 && (g(z), r && S && (z ? (b(!1), F(D)) : b(O))), f && f(z);
552
552
  }, Oe = (z) => {
553
- ce === void 0 && (S(z), r && P && (z ? (g(!1), I(A)) : g(D))), $e && $e(z);
553
+ ce === void 0 && (b(z), r && P && (z ? (g(!1), I(A)) : g(y))), $e && $e(z);
554
554
  };
555
555
  return /* @__PURE__ */ h($, { children: [
556
556
  P && /* @__PURE__ */ o(
@@ -572,7 +572,7 @@ function Fo({
572
572
  children: H
573
573
  }
574
574
  ),
575
- b && /* @__PURE__ */ o(
575
+ S && /* @__PURE__ */ o(
576
576
  He,
577
577
  {
578
578
  "data-testid": Ft,
@@ -603,7 +603,7 @@ function Fo({
603
603
  onOpen: () => Ie(!0),
604
604
  showOpenArrow: C === "both" || C === "open"
605
605
  }
606
- } : {}), b && ye === "push" ? {
606
+ } : {}), S && De === "push" ? {
607
607
  rightPanel: {
608
608
  open: pe,
609
609
  width: de,
@@ -619,13 +619,13 @@ function Fo({
619
619
  open: ue,
620
620
  width: m
621
621
  }
622
- } : {}), ye === "push" ? {
622
+ } : {}), De === "push" ? {
623
623
  rightPanel: {
624
624
  open: pe,
625
625
  width: de
626
626
  }
627
627
  } : {}), {
628
- children: /* @__PURE__ */ o(Dn, k(a({ "data-testid": d }, c), { children: e }))
628
+ children: /* @__PURE__ */ o(yn, k(a({ "data-testid": d }, c), { children: e }))
629
629
  })
630
630
  )
631
631
  ] });
@@ -633,7 +633,7 @@ function Fo({
633
633
  const Ct = () => {
634
634
  const e = se();
635
635
  return _t(e.breakpoints.down("sm"));
636
- }, yn = 64, $n = 72, In = 256, K = _(!0), xt = _(In), vt = _($n), ve = _(""), On = _(void 0), wt = _(yn), At = _(void 0);
636
+ }, Dn = 64, $n = 72, In = 256, K = _(!0), xt = _(In), vt = _($n), ve = _(""), On = _(void 0), wt = _(Dn), At = _(void 0);
637
637
  function Tn({ links: e }) {
638
638
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
639
639
  }
@@ -679,7 +679,7 @@ const ne = "Navbar", Q = {
679
679
  }
680
680
  }, e)
681
681
  );
682
- }, St = (e) => {
682
+ }, bt = (e) => {
683
683
  var t, n;
684
684
  return {
685
685
  overflowX: "hidden",
@@ -690,10 +690,10 @@ const ne = "Navbar", Q = {
690
690
  }, We = (e, t) => a({
691
691
  width: t,
692
692
  transition: ae(e, "width", "entering")
693
- }, St(e)), ze = (e, t) => a({
693
+ }, bt(e)), ze = (e, t) => a({
694
694
  width: t,
695
695
  transition: ae(e, "width", "leaving")
696
- }, St(e)), Fn = R(we, {
696
+ }, bt(e)), Fn = R(we, {
697
697
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
698
698
  })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
699
699
  flexShrink: 0,
@@ -719,7 +719,8 @@ function Pn(e) {
719
719
  const Ue = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Nn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
720
720
  function Ln({ user: e, domainCode: t, open: n }) {
721
721
  const i = se();
722
- return /* @__PURE__ */ h(
722
+ let r;
723
+ return e ? e.given_name && e.family_name ? r = `${e.given_name} ${e.family_name}` : e.name ? r = e.name : r = "" : r = "", /* @__PURE__ */ h(
723
724
  $,
724
725
  {
725
726
  sx: {
@@ -738,22 +739,22 @@ function Ln({ user: e, domainCode: t, open: n }) {
738
739
  transition: n ? ae(i, ["width", "height"], "entering") : ae(i, ["width", "height"], "leaving"),
739
740
  aspectRatio: 1
740
741
  },
741
- children: e != null && e.name ? /* @__PURE__ */ o(
742
+ children: r ? /* @__PURE__ */ o(
742
743
  Pe,
743
744
  {
744
745
  src: e == null ? void 0 : e.picture,
745
746
  sx: {
746
747
  width: "100%",
747
748
  height: "100%",
748
- bgcolor: Ue[Math.abs(Pn(e.name)) % Ue.length]
749
+ bgcolor: Ue[Math.abs(Pn(r)) % Ue.length]
749
750
  },
750
- children: Nn(e.name)
751
+ children: Nn(r)
751
752
  }
752
753
  ) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
753
754
  }
754
755
  ),
755
756
  /* @__PURE__ */ o(En, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Rt, { in: n, children: /* @__PURE__ */ h($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
756
- e != null && e.name ? /* @__PURE__ */ o(E, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
757
+ r ? /* @__PURE__ */ o(E, { children: r }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
757
758
  t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
758
759
  ] }) }) })
759
760
  ]
@@ -868,7 +869,7 @@ function Wn({
868
869
  children: /* @__PURE__ */ o(Jt, { fontSize: "medium" })
869
870
  }
870
871
  ),
871
- /* @__PURE__ */ o(E, { className: Hn.titleText, variant: "h1", children: e }),
872
+ /* @__PURE__ */ o(E, { className: Hn.titleText, variant: "h6", component: "h1", children: e }),
872
873
  i
873
874
  ]
874
875
  }
@@ -891,16 +892,16 @@ function Po({
891
892
  [K, n != null ? n : !0],
892
893
  [ve, t != null ? t : ""]
893
894
  ]);
894
- const x = _e(K), [A] = V(xt), [g] = V(vt), y = _e(ve), [S] = V(wt), [D] = V(On), [I] = V(At);
895
+ const x = _e(K), [A] = V(xt), [g] = V(vt), D = _e(ve), [b] = V(wt), [y] = V(On), [I] = V(At);
895
896
  return /* @__PURE__ */ h($, { children: [
896
897
  /* @__PURE__ */ o(Wt, {}),
897
898
  /* @__PURE__ */ o(
898
899
  Wn,
899
900
  {
900
- titleText: y,
901
+ titleText: D,
901
902
  "data-testid": s,
902
- height: S,
903
- middle: D
903
+ height: b,
904
+ middle: y
904
905
  }
905
906
  ),
906
907
  /* @__PURE__ */ h($, { sx: { display: "flex" }, children: [
@@ -915,7 +916,7 @@ function Po({
915
916
  domainCode: w,
916
917
  widthOpen: A,
917
918
  widthClosed: g,
918
- offsetTop: S,
919
+ offsetTop: b,
919
920
  "data-testid": c
920
921
  }
921
922
  ),
@@ -923,7 +924,7 @@ function Po({
923
924
  Mn,
924
925
  k(a({
925
926
  "data-testid": r,
926
- topBarHeight: S
927
+ topBarHeight: b
927
928
  }, i), {
928
929
  children: e
929
930
  })
@@ -931,7 +932,7 @@ function Po({
931
932
  ] })
932
933
  ] });
933
934
  }
934
- const bt = ({
935
+ const St = ({
935
936
  isOpen: e,
936
937
  dialogTitle: t,
937
938
  children: n,
@@ -944,14 +945,14 @@ const bt = ({
944
945
  disableCloseOnBackdropOrEscape: u = !1,
945
946
  isLoading: w = !1
946
947
  }) => {
947
- var g, y;
948
+ var g, D;
948
949
  const [x, A] = B(!1);
949
950
  return /* @__PURE__ */ h(
950
951
  je,
951
952
  {
952
953
  open: e,
953
- onClose: (S, D) => N(void 0, null, function* () {
954
- u && (D === "backdropClick" || D === "escapeKeyDown") || x || (s != null && s.onClick ? yield s.onClick() : c());
954
+ onClose: (b, y) => N(void 0, null, function* () {
955
+ u && (y === "backdropClick" || y === "escapeKeyDown") || x || (s != null && s.onClick ? yield s.onClick() : c());
955
956
  }),
956
957
  fullWidth: !0,
957
958
  maxWidth: i != null ? i : "xs",
@@ -969,15 +970,15 @@ const bt = ({
969
970
  "data-testid": s == null ? void 0 : s.testId,
970
971
  disabled: (s == null ? void 0 : s.disabled) || x,
971
972
  color: s == null ? void 0 : s.buttonColor,
972
- children: (y = s == null ? void 0 : s.text) != null ? y : "Cancel"
973
+ children: (D = s == null ? void 0 : s.text) != null ? D : "Cancel"
973
974
  }
974
975
  ),
975
976
  r && /* @__PURE__ */ o(
976
977
  re,
977
978
  {
978
979
  onClick: () => N(void 0, null, function* () {
979
- var S;
980
- A(!0), yield (S = r.onClick) == null ? void 0 : S.call(r), A(!1);
980
+ var b;
981
+ A(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), A(!1);
981
982
  }),
982
983
  "data-testid": r.testId,
983
984
  disabled: r.disabled || x,
@@ -1017,13 +1018,13 @@ function No({
1017
1018
  loadingText: x = "Loading...",
1018
1019
  noOptionsText: A = "No options",
1019
1020
  popupIcon: g = /* @__PURE__ */ o(jt, {}),
1020
- error: y = !1,
1021
- helperText: S = "",
1022
- preLoadedOptions: D = void 0,
1021
+ error: D = !1,
1022
+ helperText: b = "",
1023
+ preLoadedOptions: y = void 0,
1023
1024
  disablePortal: I = !1,
1024
1025
  disableIconFlip: O = !1
1025
1026
  }) {
1026
- const [F, P] = B(""), b = (p, f) => {
1027
+ const [F, P] = B(""), S = (p, f) => {
1027
1028
  const m = s.filter((C) => C.id !== f);
1028
1029
  n(m, "delete", p);
1029
1030
  }, { data: v, isLoading: H } = kt({
@@ -1031,11 +1032,11 @@ function No({
1031
1032
  label: r,
1032
1033
  lookup: e,
1033
1034
  minLength: i,
1034
- preLoadedOptions: D
1035
+ preLoadedOptions: y
1035
1036
  }), W = F.length >= i;
1036
1037
  return /* @__PURE__ */ h("div", { "data-testid": c, children: [
1037
1038
  /* @__PURE__ */ o(
1038
- Se,
1039
+ be,
1039
1040
  {
1040
1041
  sx: a(a({}, d), O ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1041
1042
  "data-testid": c ? `${c}:Autocomplete` : void 0,
@@ -1055,13 +1056,13 @@ function No({
1055
1056
  loadingText: x,
1056
1057
  popupIcon: g,
1057
1058
  renderInput: (p) => /* @__PURE__ */ o(
1058
- be,
1059
+ Se,
1059
1060
  k(a({}, p), {
1060
1061
  label: r,
1061
1062
  fullWidth: !0,
1062
1063
  variant: w,
1063
- error: y,
1064
- helperText: S,
1064
+ error: D,
1065
+ helperText: b,
1065
1066
  InputProps: k(a({}, p.InputProps), {
1066
1067
  endAdornment: /* @__PURE__ */ h(L, { children: [
1067
1068
  H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
@@ -1139,7 +1140,7 @@ function No({
1139
1140
  }
1140
1141
  ),
1141
1142
  "data-testid": c ? `${c}:Chip(${p.id.toString()})` : void 0,
1142
- onDelete: (f) => b(f, p.id),
1143
+ onDelete: (f) => S(f, p.id),
1143
1144
  deleteIcon: /* @__PURE__ */ o(
1144
1145
  Zt,
1145
1146
  {
@@ -1167,50 +1168,50 @@ const Lo = ({
1167
1168
  preLoadedOptions: x,
1168
1169
  helperText: A = "",
1169
1170
  disabled: g,
1170
- popupIcon: y,
1171
- disableIconFlip: S
1171
+ popupIcon: D,
1172
+ disableIconFlip: b
1172
1173
  }) => {
1173
- const [D, I] = B(""), { data: O, isLoading: F } = kt({
1174
- inputValue: D,
1174
+ const [y, I] = B(""), { data: O, isLoading: F } = kt({
1175
+ inputValue: y,
1175
1176
  label: n,
1176
1177
  lookup: e,
1177
1178
  minLength: u != null ? u : 0,
1178
1179
  preLoadedOptions: x
1179
- }), P = D.length >= u;
1180
+ }), P = y.length >= u;
1180
1181
  return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Gt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1181
- Se,
1182
+ be,
1182
1183
  {
1183
- sx: a(a({}, r), S ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1184
+ sx: a(a({}, r), b ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1184
1185
  "data-testid": d ? `${d}:Autocomplete` : void 0,
1185
1186
  loading: P ? F : !1,
1186
1187
  options: O != null ? O : [],
1187
- onChange: (b, v) => {
1188
- t(b, v);
1188
+ onChange: (S, v) => {
1189
+ t(S, v);
1189
1190
  },
1190
1191
  disablePortal: w,
1191
- filterOptions: (b) => b,
1192
+ filterOptions: (S) => S,
1192
1193
  value: i,
1193
1194
  noOptionsText: P ? l : "Start typing to search",
1194
- getOptionLabel: (b) => b.label,
1195
- popupIcon: y,
1196
- renderInput: (b) => /* @__PURE__ */ o(
1197
- be,
1195
+ getOptionLabel: (S) => S.label,
1196
+ popupIcon: D,
1197
+ renderInput: (S) => /* @__PURE__ */ o(
1198
+ Se,
1198
1199
  k(a({
1199
1200
  "data-testid": d ? `${d}:Autocomplete:TextField` : void 0
1200
- }, b), {
1201
+ }, S), {
1201
1202
  variant: c,
1202
1203
  label: n,
1203
1204
  color: s,
1204
1205
  helperText: A
1205
1206
  })
1206
1207
  ),
1207
- isOptionEqualToValue: (b, v) => b.id === v.id,
1208
- onInputChange: (b, v) => {
1208
+ isOptionEqualToValue: (S, v) => S.id === v.id,
1209
+ onInputChange: (S, v) => {
1209
1210
  I(v);
1210
1211
  },
1211
- renderOption: (b, v) => /* @__PURE__ */ xe(
1212
+ renderOption: (S, v) => /* @__PURE__ */ xe(
1212
1213
  "li",
1213
- k(a({}, b), {
1214
+ k(a({}, S), {
1214
1215
  key: v.id,
1215
1216
  "data-testid": d ? `${d}:Autocomplete:option(${v.id.toString()})` : void 0
1216
1217
  }),
@@ -1250,7 +1251,7 @@ const Lo = ({
1250
1251
  }
1251
1252
  }))();
1252
1253
  }, [s, r, n]), /* @__PURE__ */ o(
1253
- bt,
1254
+ St,
1254
1255
  {
1255
1256
  isOpen: e,
1256
1257
  primaryButton: {
@@ -1334,7 +1335,7 @@ const Xn = {
1334
1335
  })(), Jn = {
1335
1336
  borderBottomLeftRadius: "0px",
1336
1337
  borderBottomRightRadius: "0px"
1337
- }, Zn = {}, jn = {}, Dt = Ye(null);
1338
+ }, Zn = {}, jn = {}, yt = Ye(null);
1338
1339
  function eo(s) {
1339
1340
  var c = s, {
1340
1341
  overrideState: e = Zn,
@@ -1358,14 +1359,14 @@ function eo(s) {
1358
1359
  key: Kn()
1359
1360
  }), m);
1360
1361
  return u.current.push(C), u.current.length === 1 && l({ open: !0 }), C.key;
1361
- }, []), y = (m = "", C = {}) => g(a({ message: m, severity: "success" }, C)), S = (m = "", C = {}) => g(a({ message: m, severity: "info" }, C)), D = (m = "", C = {}) => g(a({ message: m, severity: "warning" }, C)), I = (m = "", C = {}) => g(a({ message: m, severity: "error" }, C)), O = (m) => {
1362
+ }, []), D = (m = "", C = {}) => g(a({ message: m, severity: "success" }, C)), b = (m = "", C = {}) => g(a({ message: m, severity: "info" }, C)), y = (m = "", C = {}) => g(a({ message: m, severity: "warning" }, C)), I = (m = "", C = {}) => g(a({ message: m, severity: "error" }, C)), O = (m) => {
1362
1363
  const C = u.current.findIndex((M) => M.key === m);
1363
1364
  if (C !== -1)
1364
1365
  return C === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(C, 1);
1365
1366
  }, F = (m, C) => {
1366
1367
  n(m, C) && l({ open: !1 });
1367
1368
  }, P = () => {
1368
- }, b = () => {
1369
+ }, S = () => {
1369
1370
  u.current.shift(), u.current.length > 0 && l({ open: !0 });
1370
1371
  }, v = (f = u.current[0]) != null ? f : a({}, Ge), H = {};
1371
1372
  "autoHideDuration" in v && (H.autoHideDuration = v.autoHideDuration);
@@ -1373,13 +1374,13 @@ function eo(s) {
1373
1374
  open: d,
1374
1375
  setOpen: A,
1375
1376
  enqueueNotification: g,
1376
- enqueueSuccessNotification: y,
1377
- enqueueInfoNotification: S,
1378
- enqueueWarningNotification: D,
1377
+ enqueueSuccessNotification: D,
1378
+ enqueueInfoNotification: b,
1379
+ enqueueWarningNotification: y,
1379
1380
  enqueueErrorNotification: I,
1380
1381
  removeNotification: O
1381
1382
  }, e), t);
1382
- return /* @__PURE__ */ h(Dt.Provider, { value: p, children: [
1383
+ return /* @__PURE__ */ h(yt.Provider, { value: p, children: [
1383
1384
  i,
1384
1385
  /* @__PURE__ */ o(
1385
1386
  Vt,
@@ -1387,7 +1388,7 @@ function eo(s) {
1387
1388
  open: d,
1388
1389
  onClose: F,
1389
1390
  TransitionProps: {
1390
- onExited: b,
1391
+ onExited: S,
1391
1392
  onExit: P
1392
1393
  },
1393
1394
  sx: { zIndex: Yn },
@@ -1410,9 +1411,9 @@ function eo(s) {
1410
1411
  ] });
1411
1412
  }
1412
1413
  function to() {
1413
- const e = Ke(Dt);
1414
+ const e = Ke(yt);
1414
1415
  if (e === null)
1415
- throw new De("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1416
+ throw new ye("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1416
1417
  return e;
1417
1418
  }
1418
1419
  const Ro = X(
@@ -1420,14 +1421,14 @@ const Ro = X(
1420
1421
  ), no = en(), Ho = ({
1421
1422
  children: e,
1422
1423
  store: t
1423
- }) => /* @__PURE__ */ o(ct, { store: t != null ? t : no, children: e }), yt = "domainCode";
1424
+ }) => /* @__PURE__ */ o(ct, { store: t != null ? t : no, children: e }), Dt = "domainCode";
1424
1425
  var Qe;
1425
1426
  const Xe = _(
1426
- JSON.parse((Qe = localStorage.getItem(yt)) != null ? Qe : '{"domainCode": ""}').domainCode
1427
+ JSON.parse((Qe = localStorage.getItem(Dt)) != null ? Qe : '{"domainCode": ""}').domainCode
1427
1428
  ), $t = _(
1428
1429
  (e) => e(Xe),
1429
1430
  (e, t, n) => {
1430
- t(Xe, n), localStorage.setItem(yt, JSON.stringify({ domainCode: n }));
1431
+ t(Xe, n), localStorage.setItem(Dt, JSON.stringify({ domainCode: n }));
1431
1432
  }
1432
1433
  ), oo = {
1433
1434
  act: "ACT",
@@ -1452,26 +1453,26 @@ const Xe = _(
1452
1453
  applicationName: r,
1453
1454
  handleLogout: s
1454
1455
  }) => {
1455
- const [c, d] = V($t), [l, u] = B(c), { enqueueSuccessNotification: w } = to(), x = i.length === 0, A = !!c && !i.includes(c) && !i.includes(l), g = !c || x || A, y = () => N(void 0, null, function* () {
1456
+ const [c, d] = V($t), [l, u] = B(c), { enqueueSuccessNotification: w } = to(), x = i.length === 0, A = !!c && !i.includes(c) && !i.includes(l), g = !c || x || A, D = () => N(void 0, null, function* () {
1456
1457
  l ? (d(l), w(`Set domain to ${l}`), n()) : d("");
1457
- }), S = () => N(void 0, null, function* () {
1458
+ }), b = () => N(void 0, null, function* () {
1458
1459
  c && !x && !A ? (u(c), n()) : g && s();
1459
1460
  });
1460
- let D;
1461
- return x ? D = "Unable to retrieve your active organisations. Try logging in again." : A && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ h(
1462
- bt,
1461
+ let y;
1462
+ return x ? y = "Unable to retrieve your active organisations. Try logging in again." : A && (y = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ h(
1463
+ St,
1463
1464
  {
1464
1465
  isOpen: t,
1465
1466
  dialogTitle: "Select an organisation",
1466
1467
  primaryButton: {
1467
1468
  text: "Confirm",
1468
- onClick: y,
1469
+ onClick: D,
1469
1470
  disabled: !l || x || A,
1470
1471
  buttonColor: "primary"
1471
1472
  },
1472
1473
  secondaryButton: {
1473
1474
  text: g ? "Logout" : "Cancel",
1474
- onClick: S
1475
+ onClick: b
1475
1476
  },
1476
1477
  onClose: g ? () => {
1477
1478
  } : n,
@@ -1482,7 +1483,7 @@ const Xe = _(
1482
1483
  "."
1483
1484
  ] }),
1484
1485
  /* @__PURE__ */ o(
1485
- Se,
1486
+ be,
1486
1487
  {
1487
1488
  loading: e,
1488
1489
  multiple: !1,
@@ -1492,7 +1493,7 @@ const Xe = _(
1492
1493
  getOptionLabel: io,
1493
1494
  options: [...i],
1494
1495
  renderInput: (I) => /* @__PURE__ */ o(
1495
- be,
1496
+ Se,
1496
1497
  k(a({}, I), {
1497
1498
  variant: "filled",
1498
1499
  label: "Select organisation",
@@ -1506,7 +1507,7 @@ const Xe = _(
1506
1507
  )
1507
1508
  }
1508
1509
  ),
1509
- D && /* @__PURE__ */ o(Xt, { error: !0, children: D })
1510
+ y && /* @__PURE__ */ o(Xt, { error: !0, children: y })
1510
1511
  ]
1511
1512
  }
1512
1513
  );
@@ -1637,11 +1638,12 @@ const Xe = _(
1637
1638
  }
1638
1639
  },
1639
1640
  typography: {
1640
- h1: {
1641
- fontSize: "1.5rem",
1642
- fontWeight: 400,
1643
- lineHeight: "1.334",
1644
- letterSpacing: "0em"
1641
+ h4: {
1642
+ fontSize: "1.88rem",
1643
+ fontWeight: 500
1644
+ },
1645
+ h5: {
1646
+ fontWeight: 500
1645
1647
  },
1646
1648
  // I couldn't think of what to call this. It is an attempt to match
1647
1649
  // https://www.figma.com/file/atonRPl2YD9A1NCntbDtKR/List-Filter-and-Product-Concept?node-id=1187%3A43730
@@ -1649,10 +1651,6 @@ const Xe = _(
1649
1651
  explainer: {
1650
1652
  fontSize: "14px",
1651
1653
  marginBlockStart: "1em"
1652
- },
1653
- h3: {
1654
- fontSize: "1rem",
1655
- fontWeight: 700
1656
1654
  }
1657
1655
  },
1658
1656
  navBar: {
@@ -1687,12 +1685,12 @@ const Xe = _(
1687
1685
  return /* @__PURE__ */ o(an, { client: t, children: e });
1688
1686
  });
1689
1687
  export {
1690
- bt as AgDialog,
1688
+ St as AgDialog,
1691
1689
  Po as AppLayout,
1692
1690
  Ho as AtomProvider,
1693
1691
  Mo as AuthGuard,
1694
- Dt as Context,
1695
- De as ContextError,
1692
+ yt as Context,
1693
+ ye as ContextError,
1696
1694
  Wo as DomainCodeDialog,
1697
1695
  $o as ExampleComponent,
1698
1696
  No as FetchAutocomplete,