@genai-fi/base 3.0.2 → 4.0.0

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 (82) hide show
  1. package/dist/Button-CGKw9sMz.js +656 -0
  2. package/dist/CircularProgress-C6sMwjDC.js +1275 -0
  3. package/dist/{DefaultPropsProvider-C0Ib4Mye.js → DefaultPropsProvider-D2IJ8Qbs.js} +5 -1
  4. package/dist/{DialogQR-DVWhImXI.js → DialogQR-CyZcX7ul.js} +9 -5
  5. package/dist/{FlashWifi-CaAOKd3g.js → FlashWifi-CYp0UP0B.js} +1 -1
  6. package/dist/Portal-BqkDy0Wc.js +613 -0
  7. package/dist/SvgLayer-CA0elY7q.js +36 -0
  8. package/dist/assets/IconButtonDot.css +1 -0
  9. package/dist/assets/LangSelect.css +1 -0
  10. package/dist/assets/Loading.css +1 -0
  11. package/dist/assets/PercentageBar.css +1 -0
  12. package/dist/assets/PieScore.css +1 -0
  13. package/dist/assets/SvgLayer.css +1 -0
  14. package/dist/assets/Widget.css +1 -0
  15. package/dist/assets/style.css +1 -1
  16. package/dist/assets/style2.css +1 -0
  17. package/dist/colours.module.css +4 -0
  18. package/dist/components/AlertPara/AlertPara.js +1 -1
  19. package/dist/components/Application/Application.d.ts +10 -0
  20. package/dist/components/Application/Application.js +1610 -0
  21. package/dist/components/BusyButton/BusyButton.js +7 -6
  22. package/dist/components/Button/Button.js +12 -4
  23. package/dist/components/ConnectionStatus/ConnectionStatus.d.ts +1 -5
  24. package/dist/components/ConnectionStatus/ConnectionStatus.js +48 -47
  25. package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
  26. package/dist/components/ContentLoader/ContentError.js +1 -1
  27. package/dist/components/ContentLoader/ContentLoader.js +5 -1
  28. package/dist/components/ContentLoader/ContentProgress.js +1 -1
  29. package/dist/components/IconButtonDot/IconButtonDot.d.ts +7 -0
  30. package/dist/components/IconButtonDot/IconButtonDot.js +22 -0
  31. package/dist/components/IconMenu/IconMenu.d.ts +12 -0
  32. package/dist/components/IconMenu/IconMenu.js +26 -0
  33. package/dist/components/IconMenu/IconMenuInline.d.ts +6 -0
  34. package/dist/components/IconMenu/IconMenuInline.js +12 -0
  35. package/dist/components/IconMenu/Item.d.ts +9 -0
  36. package/dist/components/IconMenu/Item.js +34 -0
  37. package/dist/components/IconMenu/Spacer.d.ts +1 -0
  38. package/dist/components/IconMenu/Spacer.js +11 -0
  39. package/dist/components/IconMenu/context.d.ts +1 -0
  40. package/dist/components/IconMenu/context.js +5 -0
  41. package/dist/components/IconMenu/index.d.ts +4 -0
  42. package/dist/components/IconMenu/index.js +10 -0
  43. package/dist/components/LangSelect/LangSelect.d.ts +12 -0
  44. package/dist/components/LangSelect/LangSelect.js +46 -0
  45. package/dist/components/Loading/Loading.d.ts +7 -0
  46. package/dist/components/Loading/Loading.js +15 -0
  47. package/dist/components/Motd/Motd.js +1 -1
  48. package/dist/components/PercentageBar/PercentageBar.d.ts +7 -0
  49. package/dist/components/PercentageBar/PercentageBar.js +37 -0
  50. package/dist/components/PieScore/PieScore.d.ts +6 -0
  51. package/dist/components/PieScore/PieScore.js +10676 -0
  52. package/dist/components/QRCode/DialogQR.js +8 -4
  53. package/dist/components/QRCode/QRCode.js +1 -1
  54. package/dist/components/Webcam/Webcam.js +3 -3
  55. package/dist/components/WorkflowLayout/Layout.d.ts +7 -0
  56. package/dist/components/WorkflowLayout/Layout.js +43 -0
  57. package/dist/components/WorkflowLayout/SvgLayer.d.ts +14 -0
  58. package/dist/components/WorkflowLayout/SvgLayer.js +5 -0
  59. package/dist/components/WorkflowLayout/Widget.d.ts +18 -0
  60. package/dist/components/WorkflowLayout/Widget.js +7413 -0
  61. package/dist/components/WorkflowLayout/index.d.ts +3 -0
  62. package/dist/components/WorkflowLayout/index.js +6 -0
  63. package/dist/components/WorkflowLayout/lines.d.ts +17 -0
  64. package/dist/components/WorkflowLayout/lines.js +37 -0
  65. package/dist/{createSvgIcon-BfF8yuCp.js → createSvgIcon-DmrVEdN7.js} +2 -2
  66. package/dist/{createTheme-BIcG8YPQ.js → createTheme-a85zdZWm.js} +4 -0
  67. package/dist/hooks/peer.d.ts +25 -2
  68. package/dist/hooks/peer.js +196 -54
  69. package/dist/main.d.ts +6 -0
  70. package/dist/main.js +53 -33
  71. package/dist/react-D_xU5dL6.js +112 -0
  72. package/dist/state/webrtcState.js +5 -4
  73. package/dist/style/theme.js +1 -1
  74. package/dist/style.module-BAnhZ_KJ.js +9 -0
  75. package/dist/style.module-BDpZJv9y.js +26 -0
  76. package/dist/util/Observer.d.ts +7 -0
  77. package/dist/util/Observer.js +9 -0
  78. package/dist/{webrtcState-D0nJpE9Z.js → vanilla-BJxibF1U.js} +83 -85
  79. package/package.json +8 -2
  80. package/dist/Button-DQwRVw4a.js +0 -1918
  81. package/dist/react-D-b-Xrzv.js +0 -98
  82. package/dist/style.module-DSFm2eLD.js +0 -9
@@ -1,9 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as a } from "react";
3
- import { B as n, C as s } from "../../Button-DQwRVw4a.js";
4
- const m = a(function({ busy: r, ...t }, i) {
2
+ import { forwardRef as n } from "react";
3
+ import { Button as a } from "../Button/Button.js";
4
+ import { C as e } from "../../CircularProgress-C6sMwjDC.js";
5
+ const f = n(function({ busy: r, ...t }, i) {
5
6
  return /* @__PURE__ */ o(
6
- n,
7
+ a,
7
8
  {
8
9
  ref: i,
9
10
  ...t,
@@ -15,11 +16,11 @@ const m = a(function({ busy: r, ...t }, i) {
15
16
  height: "20px !important"
16
17
  }
17
18
  },
18
- startIcon: r ? /* @__PURE__ */ o(s, {}) : t.startIcon,
19
+ startIcon: r ? /* @__PURE__ */ o(e, {}) : t.startIcon,
19
20
  children: t.children
20
21
  }
21
22
  );
22
23
  });
23
24
  export {
24
- m as default
25
+ f as default
25
26
  };
@@ -1,6 +1,14 @@
1
- import "../../DefaultPropsProvider-C0Ib4Mye.js";
2
- import { B as a, L as B } from "../../Button-DQwRVw4a.js";
1
+ import { s as t } from "../../DefaultPropsProvider-D2IJ8Qbs.js";
2
+ import { B as o } from "../../Button-CGKw9sMz.js";
3
+ const e = t(o)({
4
+ textTransform: "none"
5
+ }), s = t(o)({
6
+ textTransform: "none",
7
+ fontWeight: "bold",
8
+ fontSize: "1.2rem",
9
+ borderRadius: "10px"
10
+ });
3
11
  export {
4
- a as Button,
5
- B as LargeButton
12
+ e as Button,
13
+ s as LargeButton
6
14
  };
@@ -1,12 +1,8 @@
1
- import { PeerEvent } from '../../services/peer2peer/types';
2
- import { default as Peer2Peer } from '../../services/peer2peer/Peer2Peer';
3
1
  interface Props {
4
2
  api: string;
5
3
  appName: string;
6
- ready?: boolean;
7
- peer?: Peer2Peer<PeerEvent>;
8
4
  visibility?: number;
9
5
  noCheck?: boolean;
10
6
  }
11
- export default function ConnectionStatus({ api, appName, ready, peer, visibility, noCheck }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export default function ConnectionStatus({ api, appName, visibility, noCheck }: Props): import("react/jsx-runtime").JSX.Element;
12
8
  export {};
@@ -1,82 +1,83 @@
1
- import { jsx as o, Fragment as W, jsxs as p } from "react/jsx-runtime";
2
- import { i as q, w as y } from "../../webrtcState-D0nJpE9Z.js";
3
- import { useRef as F, useState as g, useEffect as s } from "react";
4
- import { getRTConfig as R } from "./ice.js";
5
- import { W as z, F as E } from "../../FlashWifi-CaAOKd3g.js";
6
- import { useTranslation as P } from "react-i18next";
7
- import { c as w } from "../../createSvgIcon-BfF8yuCp.js";
8
- import { checkP2P as x } from "./check.js";
9
- import { u as I } from "../../react-D-b-Xrzv.js";
10
- import '../../assets/ConnectionStatus.css';const A = "_containerConnecting_1p4sr_15 _container_1p4sr_3", U = "_containerSuccess_1p4sr_20 _container_1p4sr_3", b = "_containerMedium_1p4sr_25 _container_1p4sr_3", j = "_containerBad_1p4sr_30 _container_1p4sr_3", k = "_message_1p4sr_35", r = {
1
+ import { jsx as r, Fragment as I, jsxs as L } from "react/jsx-runtime";
2
+ import { iceConfig as W, webrtcActive as q } from "../../state/webrtcState.js";
3
+ import { useRef as F, useState as g, useEffect as o } from "react";
4
+ import { getRTConfig as P } from "./ice.js";
5
+ import { W as R, F as z } from "../../FlashWifi-CYp0UP0B.js";
6
+ import { useTranslation as E } from "react-i18next";
7
+ import { c as b } from "../../createSvgIcon-DmrVEdN7.js";
8
+ import { checkP2P as j } from "./check.js";
9
+ import { usePeerObject as x } from "../../hooks/peer.js";
10
+ import { a as T } from "../../react-D_xU5dL6.js";
11
+ import '../../assets/ConnectionStatus.css';const A = "_containerConnecting_1p4sr_15 _container_1p4sr_3", U = "_containerSuccess_1p4sr_20 _container_1p4sr_3", k = "_containerMedium_1p4sr_25 _container_1p4sr_3", w = "_containerBad_1p4sr_30 _container_1p4sr_3", D = "_message_1p4sr_35", a = {
11
12
  containerConnecting: A,
12
13
  containerSuccess: U,
13
- containerMedium: b,
14
- containerBad: j,
15
- message: k
16
- }, D = w(/* @__PURE__ */ o("path", {
14
+ containerMedium: k,
15
+ containerBad: w,
16
+ message: D
17
+ }, O = b(/* @__PURE__ */ r("path", {
17
18
  d: "M24 8.98C20.93 5.9 16.69 4 12 4S3.07 5.9 0 8.98L12 21v-9h8.99zM19.59 14l-2.09 2.09L15.41 14 14 15.41l2.09 2.09L14 19.59 15.41 21l2.09-2.08L19.59 21 21 19.59l-2.08-2.09L21 15.41z"
18
19
  }), "SignalWifiBad"), $ = 6e4;
19
- function Y({ api: f, appName: S, ready: c, peer: t, visibility: v, noCheck: C }) {
20
- const { t: h } = P(), [u, M] = I(q), [T, l] = I(y), m = F(), [i, d] = g("connecting"), [e, _] = g(0), [, L] = g(!1), [a, B] = g(!1);
21
- return s(() => {
22
- if (t)
23
- return t.on("status", d), t.on("quality", _), d(t.status), _(t.quality), () => {
24
- t.off("status", d), t.off("quality", _);
20
+ function ee({ api: f, appName: h, visibility: S, noCheck: v }) {
21
+ const { t: p } = E(), e = x(), [u, y] = T(W), [C, l] = T(q), m = F(), [n, d] = g("connecting"), [s, _] = g(0), [, B] = g(!1), [c, M] = g(!1), i = n === "ready";
22
+ return o(() => {
23
+ if (e)
24
+ return e.on("status", d), e.on("quality", _), d(e.status), _(e.quality), () => {
25
+ e.off("status", d), e.off("quality", _);
25
26
  };
26
27
  _(0), d("connecting");
27
- }, [t]), s(() => {
28
- u || R(f, S, (n) => {
29
- M(n);
28
+ }, [e]), o(() => {
29
+ u || P(f, h, (t) => {
30
+ y(t);
30
31
  });
31
- }, [u, M, f, S]), s(() => {
32
- if (i !== "ready") {
33
- const n = setTimeout(() => {
34
- B(!0);
32
+ }, [u, y, f, h]), o(() => {
33
+ if (n !== "ready") {
34
+ const t = setTimeout(() => {
35
+ M(!0);
35
36
  }, $);
36
37
  return () => {
37
- clearTimeout(n);
38
+ clearTimeout(t);
38
39
  };
39
40
  } else
40
- B(!1);
41
- }, [i]), s(() => {
42
- u && T === "unset" && (navigator != null && navigator.mediaDevices ? navigator.mediaDevices.getUserMedia({ video: !0 }).then((n) => {
43
- m.current = n, l("full");
41
+ M(!1);
42
+ }, [n]), o(() => {
43
+ u && C === "unset" && (navigator != null && navigator.mediaDevices ? navigator.mediaDevices.getUserMedia({ video: !0 }).then((t) => {
44
+ m.current = t, l("full");
44
45
  }).catch(() => {
45
46
  l("relay");
46
47
  }) : l("relay"));
47
- }, [u, T, l]), s(() => {
48
- c && m.current && (m.current.getTracks().forEach(function(n) {
49
- n.stop();
48
+ }, [u, C, l]), o(() => {
49
+ i && m.current && (m.current.getTracks().forEach(function(t) {
50
+ t.stop();
50
51
  }), m.current = void 0);
51
- }, [c, i]), s(() => {
52
- c && t && !C && t.code && x(f, t.code).then((n) => {
53
- L(n);
52
+ }, [i, n]), o(() => {
53
+ i && e && !v && e.code && j(f, e.code).then((t) => {
54
+ B(t);
54
55
  });
55
- }, [c, t, f, C]), /* @__PURE__ */ o(W, { children: (v === void 0 || e <= v) && /* @__PURE__ */ p(
56
+ }, [i, e, f, v]), /* @__PURE__ */ r(I, { children: (S === void 0 || s <= S) && /* @__PURE__ */ L(
56
57
  "div",
57
58
  {
58
- className: i === "connecting" && !a ? r.containerConnecting : e === 3 ? r.containerSuccess : e === 2 ? r.containerMedium : r.containerBad,
59
+ className: n === "connecting" && !c ? a.containerConnecting : s === 3 ? a.containerSuccess : s === 2 ? a.containerMedium : a.containerBad,
59
60
  children: [
60
- !a && e > 0 && /* @__PURE__ */ o(
61
- z,
61
+ !c && s > 0 && /* @__PURE__ */ r(
62
+ R,
62
63
  {
63
64
  fontSize: "large",
64
65
  color: "inherit"
65
66
  }
66
67
  ),
67
- !a && e <= 0 && /* @__PURE__ */ o(E, {}),
68
- a && /* @__PURE__ */ o(
69
- D,
68
+ !c && s <= 0 && /* @__PURE__ */ r(z, {}),
69
+ c && /* @__PURE__ */ r(
70
+ O,
70
71
  {
71
72
  fontSize: "large",
72
73
  color: "inherit"
73
74
  }
74
75
  ),
75
- /* @__PURE__ */ o("div", { className: r.message, children: h(c ? `loader.messages.quality${e}` : a ? "loader.messages.failed" : `loader.messages.${i}`) })
76
+ /* @__PURE__ */ r("div", { className: a.message, children: p(i ? `loader.messages.quality${s}` : c ? "loader.messages.failed" : `loader.messages.${n}`) })
76
77
  ]
77
78
  }
78
79
  ) });
79
80
  }
80
81
  export {
81
- Y as default
82
+ ee as default
82
83
  };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { F as p } from "../../FlashWifi-CaAOKd3g.js";
3
+ import { F as p } from "../../FlashWifi-CYp0UP0B.js";
4
4
  export {
5
5
  p as default
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { Dialog as l, DialogTitle as a, DialogContent as i } from "@mui/material";
3
3
  import { useTranslation as s } from "react-i18next";
4
- import { s as t } from "../../style.module-DSFm2eLD.js";
4
+ import { s as t } from "../../style.module-BAnhZ_KJ.js";
5
5
  function f({ error: o }) {
6
6
  const { t: r } = s();
7
7
  return /* @__PURE__ */ n(
@@ -19,7 +19,11 @@ function B({ content: r, onLoaded: l, onLoad: d }) {
19
19
  );
20
20
  }), Promise.all(c).then((o) => {
21
21
  e("loading"), g(void 0);
22
- const a = o.map((t) => y(t).then((i) => d(i)));
22
+ const a = o.map(
23
+ (t) => y(t).then((i) => {
24
+ d(i);
25
+ })
26
+ );
23
27
  Promise.all(a).then(() => {
24
28
  e("done"), l && l();
25
29
  }).catch((t) => {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { Dialog as a, DialogTitle as l, DialogContent as d, LinearProgress as s } from "@mui/material";
3
3
  import { useTranslation as m } from "react-i18next";
4
- import { s as r } from "../../style.module-DSFm2eLD.js";
4
+ import { s as r } from "../../style.module-BAnhZ_KJ.js";
5
5
  function p({ status: o, progress: e }) {
6
6
  const { t: n } = m();
7
7
  return /* @__PURE__ */ i(
@@ -0,0 +1,7 @@
1
+ import { IconButtonProps } from '@mui/material';
2
+ interface Props extends IconButtonProps {
3
+ count: number;
4
+ position?: 'left' | 'right';
5
+ }
6
+ export default function IconButtonDot({ count, position, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,22 @@
1
+ import { jsxs as _, jsx as n } from "react/jsx-runtime";
2
+ import { IconButton as d } from "@mui/material";
3
+ import '../../assets/IconButtonDot.css';const r = "_button_16k34_3", c = "_dot_16k34_7", l = "_leftDot_16k34_22 _dot_16k34_7", o = {
4
+ button: r,
5
+ dot: c,
6
+ leftDot: l
7
+ };
8
+ function f({ count: t, position: s = "right", ...e }) {
9
+ return /* @__PURE__ */ _("div", { className: o.button, children: [
10
+ /* @__PURE__ */ n(
11
+ d,
12
+ {
13
+ ...e,
14
+ "data-count": t
15
+ }
16
+ ),
17
+ t > 0 && /* @__PURE__ */ n("div", { className: s === "right" ? o.dot : o.leftDot, children: t })
18
+ ] });
19
+ }
20
+ export {
21
+ f as default
22
+ };
@@ -0,0 +1,12 @@
1
+ import { PropsWithChildren } from 'react';
2
+ interface Props extends PropsWithChildren {
3
+ placement?: 'free' | 'left' | 'right' | 'top' | 'bottom';
4
+ label?: JSX.Element;
5
+ anchor?: HTMLElement;
6
+ selected?: boolean;
7
+ title?: string;
8
+ x?: number;
9
+ y?: number;
10
+ }
11
+ export default function IconMenu({ placement, x, y, label, children, selected, title }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,26 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { s as r } from "../../style.module-BDpZJv9y.js";
3
+ import { IconMenuContext as d } from "./context.js";
4
+ function v({ placement: o = "free", x: s = 0, y: t = 0, label: l, children: i, selected: a, title: f }) {
5
+ return /* @__PURE__ */ e(
6
+ "nav",
7
+ {
8
+ className: r[o],
9
+ "aria-label": f,
10
+ style: o === "free" ? { left: `${s}px`, top: `${t}px`, transform: "translateX(-50%)" } : void 0,
11
+ children: /* @__PURE__ */ n(d.Provider, { value: o, children: [
12
+ /* @__PURE__ */ e(
13
+ "div",
14
+ {
15
+ className: `${o === "top" || o === "bottom" || o === "free" ? r.logoColumn : r.logoRow} ${a ? r.selected : ""}`,
16
+ children: l
17
+ }
18
+ ),
19
+ i
20
+ ] })
21
+ }
22
+ );
23
+ }
24
+ export {
25
+ v as default
26
+ };
@@ -0,0 +1,6 @@
1
+ import { PropsWithChildren } from 'react';
2
+ interface Props extends PropsWithChildren {
3
+ label?: JSX.Element;
4
+ }
5
+ export default function IconMenuInline({ label, children }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { IconMenuContext as s } from "./context.js";
3
+ import { s as e } from "../../style.module-BDpZJv9y.js";
4
+ function a({ label: o, children: r }) {
5
+ return /* @__PURE__ */ i("div", { className: e.inlineBar, children: [
6
+ o && /* @__PURE__ */ n("div", { className: e.logoColumn, children: o }),
7
+ /* @__PURE__ */ n(s.Provider, { value: "top", children: r })
8
+ ] });
9
+ }
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,9 @@
1
+ import { PropsWithChildren } from 'react';
2
+ interface Props extends PropsWithChildren {
3
+ tooltip: string;
4
+ hideTip?: boolean;
5
+ selected?: boolean;
6
+ fullWidth?: boolean;
7
+ }
8
+ export default function IconMenuItem({ fullWidth, tooltip, children, hideTip, selected }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Tooltip as l } from "@mui/material";
3
+ import { useContext as p } from "react";
4
+ import { IconMenuContext as a } from "./context.js";
5
+ import { s as i } from "../../style.module-BDpZJv9y.js";
6
+ function I({ fullWidth: e, tooltip: s, children: m, hideTip: n, selected: r }) {
7
+ const t = p(a);
8
+ return n ? /* @__PURE__ */ o(
9
+ "div",
10
+ {
11
+ style: { width: e ? "100%" : void 0 },
12
+ className: r ? i.selectedItem : void 0,
13
+ children: m
14
+ }
15
+ ) : /* @__PURE__ */ o(
16
+ l,
17
+ {
18
+ title: s,
19
+ arrow: !0,
20
+ placement: t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top",
21
+ children: /* @__PURE__ */ o(
22
+ "div",
23
+ {
24
+ style: { width: e ? "100%" : void 0 },
25
+ className: r ? i.selectedItem : void 0,
26
+ children: m
27
+ }
28
+ )
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ I as default
34
+ };
@@ -0,0 +1 @@
1
+ export default function Spacer(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useContext as r } from "react";
3
+ import { s as t } from "../../style.module-BDpZJv9y.js";
4
+ import { IconMenuContext as m } from "./context.js";
5
+ function c() {
6
+ const e = r(m);
7
+ return /* @__PURE__ */ o("div", { className: e === "left" || e === "right" ? t.menuSpacerRow : t.menuSpacerColumn });
8
+ }
9
+ export {
10
+ c as default
11
+ };
@@ -0,0 +1 @@
1
+ export declare const IconMenuContext: import('react').Context<string>;
@@ -0,0 +1,5 @@
1
+ import { createContext as t } from "react";
2
+ const o = t("left");
3
+ export {
4
+ o as IconMenuContext
5
+ };
@@ -0,0 +1,4 @@
1
+ export { default as Spacer } from './Spacer';
2
+ export { default as IconMenu } from './IconMenu';
3
+ export { default as IconMenuInline } from './IconMenuInline';
4
+ export { default as IconMenuItem } from './Item';
@@ -0,0 +1,10 @@
1
+ import { default as a } from "./Spacer.js";
2
+ import { default as t } from "./IconMenu.js";
3
+ import { default as n } from "./IconMenuInline.js";
4
+ import { default as l } from "./Item.js";
5
+ export {
6
+ t as IconMenu,
7
+ n as IconMenuInline,
8
+ l as IconMenuItem,
9
+ a as Spacer
10
+ };
@@ -0,0 +1,12 @@
1
+ export declare const LANGS: {
2
+ name: string;
3
+ label: string;
4
+ }[];
5
+ interface Props {
6
+ languages?: {
7
+ name: string;
8
+ label: string;
9
+ }[];
10
+ }
11
+ export default function LangSelect({ languages }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,46 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { NativeSelect as s } from "@mui/material";
3
+ import { useTranslation as m } from "react-i18next";
4
+ import { useCallback as g } from "react";
5
+ import { c as i } from "../../createSvgIcon-DmrVEdN7.js";
6
+ import '../../assets/LangSelect.css';const r = "_lang_1mspu_3", u = {
7
+ lang: r
8
+ }, h = i(/* @__PURE__ */ e("path", {
9
+ d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"
10
+ }), "Language"), p = [
11
+ { name: "en", label: "English" },
12
+ { name: "fi", label: "Suomi" }
13
+ ];
14
+ function M({ languages: c = p }) {
15
+ const { t, i18n: n } = m(), l = g(
16
+ (a) => {
17
+ n.changeLanguage(a.target.value || "en");
18
+ },
19
+ [n]
20
+ );
21
+ return /* @__PURE__ */ o("div", { className: u.lang, children: [
22
+ /* @__PURE__ */ e(
23
+ s,
24
+ {
25
+ value: n.language,
26
+ onChange: l,
27
+ variant: "outlined",
28
+ "data-testid": "select-lang",
29
+ inputProps: { "aria-label": t("app.language", { ns: "common" }) },
30
+ children: c.map((a) => /* @__PURE__ */ e(
31
+ "option",
32
+ {
33
+ value: a.name,
34
+ children: a.label
35
+ },
36
+ a.name
37
+ ))
38
+ }
39
+ ),
40
+ /* @__PURE__ */ e(h, {})
41
+ ] });
42
+ }
43
+ export {
44
+ p as LANGS,
45
+ M as default
46
+ };
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ interface Props extends PropsWithChildren {
3
+ loading: boolean;
4
+ message?: string;
5
+ }
6
+ export default function Loading({ loading, children, message }: Props): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | null | undefined;
7
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import a from "../Spinner/Spinner.js";
3
+ import s from "../AlertPara/AlertPara.js";
4
+ import '../../assets/Loading.css';const c = "_container_1rls9_3", e = {
5
+ container: c
6
+ };
7
+ function f({ loading: i, children: o, message: n }) {
8
+ return i ? /* @__PURE__ */ t("div", { className: e.container, children: [
9
+ /* @__PURE__ */ r(a, {}),
10
+ n && /* @__PURE__ */ r("div", { className: e.message, children: /* @__PURE__ */ r(s, { severity: "info", children: n }) })
11
+ ] }) : o;
12
+ }
13
+ export {
14
+ f as default
15
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
2
  import { useState as l, useEffect as d, useMemo as m } from "react";
3
- import { c as _ } from "../../createSvgIcon-BfF8yuCp.js";
3
+ import { c as _ } from "../../createSvgIcon-DmrVEdN7.js";
4
4
  import { IconButton as a } from "@mui/material";
5
5
  import '../../assets/Motd.css';const g = "#e04f66", h = "#fd9d32", b = "#e8f0fe", j = "_motd_1rn2j_3", v = "_info_1rn2j_15 _motd_1rn2j_3", w = "_warn_1rn2j_21 _motd_1rn2j_3", C = "_error_1rn2j_26 _motd_1rn2j_3", M = {
6
6
  bgColourful3: g,
@@ -0,0 +1,7 @@
1
+ export type Colours = 'purple' | 'green' | 'blue' | 'red' | 'orange';
2
+ interface Props {
3
+ colour: Colours;
4
+ value: number;
5
+ }
6
+ export default function PercentageBar({ colour, value }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,37 @@
1
+ import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
+ import '../../assets/PercentageBar.css';const _ = "_outer_1pzwa_1", n = "_orange_1pzwa_8", l = "_progress_1pzwa_11", p = "_purple_1pzwa_15", c = "_blue_1pzwa_22", u = "_green_1pzwa_29", d = "_red_1pzwa_36", g = "_label_1pzwa_53", e = {
3
+ outer: _,
4
+ orange: n,
5
+ progress: l,
6
+ purple: p,
7
+ blue: c,
8
+ green: u,
9
+ red: d,
10
+ label: g
11
+ };
12
+ function i({ colour: s, value: t }) {
13
+ const r = Math.round(t);
14
+ return /* @__PURE__ */ a("div", { className: `${e.outer} ${e[s]}`, children: [
15
+ /* @__PURE__ */ o(
16
+ "div",
17
+ {
18
+ className: `${e.progress} ${e[s]}`,
19
+ style: { width: `${r}%` }
20
+ }
21
+ ),
22
+ /* @__PURE__ */ a(
23
+ "div",
24
+ {
25
+ className: e.label,
26
+ style: { width: `${r}%` },
27
+ children: [
28
+ r,
29
+ "%"
30
+ ]
31
+ }
32
+ )
33
+ ] });
34
+ }
35
+ export {
36
+ i as default
37
+ };
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ value: number;
3
+ color?: 'primary' | 'grey';
4
+ }
5
+ export default function PieScore({ value, color }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};