@genai-fi/base 4.0.1 → 4.0.3

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 (27) hide show
  1. package/dist/{Button-CGKw9sMz.js → Button-BeUmwrlS.js} +91 -91
  2. package/dist/{CircularProgress-C6sMwjDC.js → CircularProgress-DgKnRiq7.js} +2 -2
  3. package/dist/DefaultPropsProvider-BurgXZzw.js +533 -0
  4. package/dist/{DialogQR-wJru73YO.js → DialogQR-C2SNQ9Uf.js} +1 -1
  5. package/dist/{FlashWifi-CYp0UP0B.js → FlashWifi-DkGhdWqj.js} +1 -1
  6. package/dist/{Portal-BqkDy0Wc.js → Portal-CcDjyHU0.js} +183 -178
  7. package/dist/components/AlertPara/AlertPara.js +1 -1
  8. package/dist/components/Application/Application.js +774 -892
  9. package/dist/components/BusyButton/BusyButton.js +1 -1
  10. package/dist/components/Button/Button.js +2 -2
  11. package/dist/components/ConnectionStatus/ConnectionStatus.js +2 -2
  12. package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
  13. package/dist/components/LangSelect/LangSelect.js +1 -1
  14. package/dist/components/Motd/Motd.js +1 -1
  15. package/dist/components/PieScore/PieScore.js +5 -5
  16. package/dist/components/QRCode/DialogQR.js +1 -1
  17. package/dist/components/QRCode/QRCode.js +1 -1
  18. package/dist/components/Webcam/Webcam.js +54 -54
  19. package/dist/components/WorkflowLayout/Widget.js +794 -784
  20. package/dist/{createSvgIcon-DmrVEdN7.js → createSvgIcon-DQhMxTx4.js} +2 -2
  21. package/dist/createTheme-DV959X3d.js +2974 -0
  22. package/dist/hooks/peer.js +1 -1
  23. package/dist/services/peer2peer/Peer2Peer.js +1 -1
  24. package/dist/style/theme.js +1 -1
  25. package/package.json +13 -13
  26. package/dist/DefaultPropsProvider-D2IJ8Qbs.js +0 -524
  27. package/dist/createTheme-a85zdZWm.js +0 -2899
@@ -1,38 +1,38 @@
1
- import * as b from "react";
2
- import { g as A, a as r, b as y, P as t } from "./createTheme-a85zdZWm.js";
3
- import { g as q, r as J, u as K, s as x, c as R, a as Q, b as X, m as Y } from "./DefaultPropsProvider-D2IJ8Qbs.js";
4
- import { u as Z, B as oo, c as to, C as ao } from "./CircularProgress-C6sMwjDC.js";
1
+ import * as y from "react";
2
+ import { g as H, a as r, P as t } from "./createTheme-DV959X3d.js";
3
+ import { g as A, r as q, u as J, s as b, c as R, a as K, b as Q, m as X } from "./DefaultPropsProvider-BurgXZzw.js";
4
+ import { u as Y, B as Z, c as oo, C as to } from "./CircularProgress-DgKnRiq7.js";
5
5
  import { jsxs as no, jsx as d } from "react/jsx-runtime";
6
- function io(o) {
7
- return A("MuiButton", o);
6
+ function ao(o) {
7
+ return H("MuiButton", o);
8
8
  }
9
- const p = q("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge", "loading", "loadingWrapper", "loadingIconPlaceholder", "loadingIndicator", "loadingPositionCenter", "loadingPositionStart", "loadingPositionEnd"]), W = /* @__PURE__ */ b.createContext({});
9
+ const p = A("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge", "loading", "loadingWrapper", "loadingIconPlaceholder", "loadingIndicator", "loadingPositionCenter", "loadingPositionStart", "loadingPositionEnd"]), W = /* @__PURE__ */ y.createContext({});
10
10
  process.env.NODE_ENV !== "production" && (W.displayName = "ButtonGroupContext");
11
- const T = /* @__PURE__ */ b.createContext(void 0);
12
- process.env.NODE_ENV !== "production" && (T.displayName = "ButtonGroupButtonContext");
13
- const ro = (o) => {
11
+ const O = /* @__PURE__ */ y.createContext(void 0);
12
+ process.env.NODE_ENV !== "production" && (O.displayName = "ButtonGroupButtonContext");
13
+ const io = (o) => {
14
14
  const {
15
- color: a,
16
- disableElevation: n,
15
+ color: n,
16
+ disableElevation: a,
17
17
  fullWidth: i,
18
18
  size: c,
19
19
  variant: u,
20
20
  loading: g,
21
- loadingPosition: z,
21
+ loadingPosition: S,
22
22
  classes: f
23
- } = o, S = {
24
- root: ["root", g && "loading", u, `${u}${r(a)}`, `size${r(c)}`, `${u}Size${r(c)}`, `color${r(a)}`, n && "disableElevation", i && "fullWidth", g && `loadingPosition${r(z)}`],
23
+ } = o, x = {
24
+ root: ["root", g && "loading", u, `${u}${r(n)}`, `size${r(c)}`, `${u}Size${r(c)}`, `color${r(n)}`, a && "disableElevation", i && "fullWidth", g && `loadingPosition${r(S)}`],
25
25
  startIcon: ["icon", "startIcon", `iconSize${r(c)}`],
26
26
  endIcon: ["icon", "endIcon", `iconSize${r(c)}`],
27
27
  loadingIndicator: ["loadingIndicator"],
28
28
  loadingWrapper: ["loadingWrapper"]
29
- }, I = Q(S, io, f);
29
+ }, z = K(x, ao, f);
30
30
  return {
31
31
  ...f,
32
32
  // forward the focused, disabled, etc. classes to the ButtonBase
33
- ...I
33
+ ...z
34
34
  };
35
- }, L = [{
35
+ }, T = [{
36
36
  props: {
37
37
  size: "small"
38
38
  },
@@ -59,20 +59,20 @@ const ro = (o) => {
59
59
  fontSize: 22
60
60
  }
61
61
  }
62
- }], eo = x(oo, {
63
- shouldForwardProp: (o) => X(o) || o === "classes",
62
+ }], ro = b(Z, {
63
+ shouldForwardProp: (o) => Q(o) || o === "classes",
64
64
  name: "MuiButton",
65
65
  slot: "Root",
66
- overridesResolver: (o, a) => {
66
+ overridesResolver: (o, n) => {
67
67
  const {
68
- ownerState: n
68
+ ownerState: a
69
69
  } = o;
70
- return [a.root, a[n.variant], a[`${n.variant}${r(n.color)}`], a[`size${r(n.size)}`], a[`${n.variant}Size${r(n.size)}`], n.color === "inherit" && a.colorInherit, n.disableElevation && a.disableElevation, n.fullWidth && a.fullWidth, n.loading && a.loading];
70
+ return [n.root, n[a.variant], n[`${a.variant}${r(a.color)}`], n[`size${r(a.size)}`], n[`${a.variant}Size${r(a.size)}`], a.color === "inherit" && n.colorInherit, a.disableElevation && n.disableElevation, a.fullWidth && n.fullWidth, a.loading && n.loading];
71
71
  }
72
- })(Y(({
72
+ })(X(({
73
73
  theme: o
74
74
  }) => {
75
- const a = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], n = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
75
+ const n = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
76
76
  return {
77
77
  ...o.typography.button,
78
78
  minWidth: 64,
@@ -138,22 +138,22 @@ const ro = (o) => {
138
138
  color: "var(--variant-textColor)",
139
139
  backgroundColor: "var(--variant-textBg)"
140
140
  }
141
- }, ...Object.entries(o.palette).filter(to()).map(([i]) => ({
141
+ }, ...Object.entries(o.palette).filter(oo()).map(([i]) => ({
142
142
  props: {
143
143
  color: i
144
144
  },
145
145
  style: {
146
146
  "--variant-textColor": (o.vars || o).palette[i].main,
147
147
  "--variant-outlinedColor": (o.vars || o).palette[i].main,
148
- "--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[i].mainChannel} / 0.5)` : y(o.palette[i].main, 0.5),
148
+ "--variant-outlinedBorder": o.alpha((o.vars || o).palette[i].main, 0.5),
149
149
  "--variant-containedColor": (o.vars || o).palette[i].contrastText,
150
150
  "--variant-containedBg": (o.vars || o).palette[i].main,
151
151
  "@media (hover: hover)": {
152
152
  "&:hover": {
153
153
  "--variant-containedBg": (o.vars || o).palette[i].dark,
154
- "--variant-textBg": o.vars ? `rgba(${o.vars.palette[i].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette[i].main, o.palette.action.hoverOpacity),
154
+ "--variant-textBg": o.alpha((o.vars || o).palette[i].main, (o.vars || o).palette.action.hoverOpacity),
155
155
  "--variant-outlinedBorder": (o.vars || o).palette[i].main,
156
- "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[i].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette[i].main, o.palette.action.hoverOpacity)
156
+ "--variant-outlinedBg": o.alpha((o.vars || o).palette[i].main, (o.vars || o).palette.action.hoverOpacity)
157
157
  }
158
158
  }
159
159
  }
@@ -164,12 +164,12 @@ const ro = (o) => {
164
164
  style: {
165
165
  color: "inherit",
166
166
  borderColor: "currentColor",
167
- "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : a,
167
+ "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : n,
168
168
  "@media (hover: hover)": {
169
169
  "&:hover": {
170
- "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : n,
171
- "--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette.text.primary, o.palette.action.hoverOpacity),
172
- "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette.text.primary, o.palette.action.hoverOpacity)
170
+ "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : a,
171
+ "--variant-textBg": o.alpha((o.vars || o).palette.text.primary, (o.vars || o).palette.action.hoverOpacity),
172
+ "--variant-outlinedBg": o.alpha((o.vars || o).palette.text.primary, (o.vars || o).palette.action.hoverOpacity)
173
173
  }
174
174
  }
175
175
  }
@@ -267,14 +267,14 @@ const ro = (o) => {
267
267
  }
268
268
  }]
269
269
  };
270
- })), so = x("span", {
270
+ })), eo = b("span", {
271
271
  name: "MuiButton",
272
272
  slot: "StartIcon",
273
- overridesResolver: (o, a) => {
273
+ overridesResolver: (o, n) => {
274
274
  const {
275
- ownerState: n
275
+ ownerState: a
276
276
  } = o;
277
- return [a.startIcon, n.loading && a.startIconLoadingStart, a[`iconSize${r(n.size)}`]];
277
+ return [n.startIcon, a.loading && n.startIconLoadingStart, n[`iconSize${r(a.size)}`]];
278
278
  }
279
279
  })(({
280
280
  theme: o
@@ -309,15 +309,15 @@ const ro = (o) => {
309
309
  style: {
310
310
  marginRight: -8
311
311
  }
312
- }, ...L]
313
- })), lo = x("span", {
312
+ }, ...T]
313
+ })), so = b("span", {
314
314
  name: "MuiButton",
315
315
  slot: "EndIcon",
316
- overridesResolver: (o, a) => {
316
+ overridesResolver: (o, n) => {
317
317
  const {
318
- ownerState: n
318
+ ownerState: a
319
319
  } = o;
320
- return [a.endIcon, n.loading && a.endIconLoadingEnd, a[`iconSize${r(n.size)}`]];
320
+ return [n.endIcon, a.loading && n.endIconLoadingEnd, n[`iconSize${r(a.size)}`]];
321
321
  }
322
322
  })(({
323
323
  theme: o
@@ -352,8 +352,8 @@ const ro = (o) => {
352
352
  style: {
353
353
  marginLeft: -8
354
354
  }
355
- }, ...L]
356
- })), po = x("span", {
355
+ }, ...T]
356
+ })), lo = b("span", {
357
357
  name: "MuiButton",
358
358
  slot: "LoadingIndicator"
359
359
  })(({
@@ -443,99 +443,99 @@ const ro = (o) => {
443
443
  right: -10
444
444
  }
445
445
  }]
446
- })), E = x("span", {
446
+ })), E = b("span", {
447
447
  name: "MuiButton",
448
448
  slot: "LoadingIconPlaceholder"
449
449
  })({
450
450
  display: "inline-block",
451
451
  width: "1em",
452
452
  height: "1em"
453
- }), co = /* @__PURE__ */ b.forwardRef(function(a, n) {
454
- const i = b.useContext(W), c = b.useContext(T), u = J(i, a), g = K({
453
+ }), po = /* @__PURE__ */ y.forwardRef(function(n, a) {
454
+ const i = y.useContext(W), c = y.useContext(O), u = q(i, n), g = J({
455
455
  props: u,
456
456
  name: "MuiButton"
457
457
  }), {
458
- children: z,
458
+ children: S,
459
459
  color: f = "primary",
460
- component: S = "button",
461
- className: I,
462
- disabled: C = !1,
463
- disableElevation: M = !1,
460
+ component: x = "button",
461
+ className: z,
462
+ disabled: I = !1,
463
+ disableElevation: L = !1,
464
464
  disableFocusRipple: B = !1,
465
- endIcon: P,
466
- focusVisibleClassName: k,
467
- fullWidth: V = !1,
468
- id: h,
465
+ endIcon: C,
466
+ focusVisibleClassName: M,
467
+ fullWidth: k = !1,
468
+ id: P,
469
469
  loading: s = null,
470
- loadingIndicator: j,
470
+ loadingIndicator: V,
471
471
  loadingPosition: v = "center",
472
- size: D = "medium",
473
- startIcon: m,
474
- type: w,
475
- variant: F = "text",
476
- ...G
477
- } = g, $ = Z(h), O = j ?? /* @__PURE__ */ d(ao, {
478
- "aria-labelledby": $,
472
+ size: j = "medium",
473
+ startIcon: w,
474
+ type: h,
475
+ variant: D = "text",
476
+ ...F
477
+ } = g, m = Y(P), $ = V ?? /* @__PURE__ */ d(to, {
478
+ "aria-labelledby": m,
479
479
  color: "inherit",
480
480
  size: 16
481
481
  }), l = {
482
482
  ...g,
483
483
  color: f,
484
- component: S,
485
- disabled: C,
486
- disableElevation: M,
484
+ component: x,
485
+ disabled: I,
486
+ disableElevation: L,
487
487
  disableFocusRipple: B,
488
- fullWidth: V,
488
+ fullWidth: k,
489
489
  loading: s,
490
- loadingIndicator: O,
490
+ loadingIndicator: $,
491
491
  loadingPosition: v,
492
- size: D,
493
- type: w,
494
- variant: F
495
- }, e = ro(l), U = (m || s && v === "start") && /* @__PURE__ */ d(so, {
492
+ size: j,
493
+ type: h,
494
+ variant: D
495
+ }, e = io(l), G = (w || s && v === "start") && /* @__PURE__ */ d(eo, {
496
496
  className: e.startIcon,
497
497
  ownerState: l,
498
- children: m || /* @__PURE__ */ d(E, {
498
+ children: w || /* @__PURE__ */ d(E, {
499
499
  className: e.loadingIconPlaceholder,
500
500
  ownerState: l
501
501
  })
502
- }), _ = (P || s && v === "end") && /* @__PURE__ */ d(lo, {
502
+ }), U = (C || s && v === "end") && /* @__PURE__ */ d(so, {
503
503
  className: e.endIcon,
504
504
  ownerState: l,
505
- children: P || /* @__PURE__ */ d(E, {
505
+ children: C || /* @__PURE__ */ d(E, {
506
506
  className: e.loadingIconPlaceholder,
507
507
  ownerState: l
508
508
  })
509
- }), H = c || "", N = typeof s == "boolean" ? (
509
+ }), _ = c || "", N = typeof s == "boolean" ? (
510
510
  // use plain HTML span to minimize the runtime overhead
511
511
  /* @__PURE__ */ d("span", {
512
512
  className: e.loadingWrapper,
513
513
  style: {
514
514
  display: "contents"
515
515
  },
516
- children: s && /* @__PURE__ */ d(po, {
516
+ children: s && /* @__PURE__ */ d(lo, {
517
517
  className: e.loadingIndicator,
518
518
  ownerState: l,
519
- children: O
519
+ children: $
520
520
  })
521
521
  })
522
522
  ) : null;
523
- return /* @__PURE__ */ no(eo, {
523
+ return /* @__PURE__ */ no(ro, {
524
524
  ownerState: l,
525
- className: R(i.className, e.root, I, H),
526
- component: S,
527
- disabled: C || s,
525
+ className: R(i.className, e.root, z, _),
526
+ component: x,
527
+ disabled: I || s,
528
528
  focusRipple: !B,
529
- focusVisibleClassName: R(e.focusVisible, k),
530
- ref: n,
531
- type: w,
532
- id: s ? $ : h,
533
- ...G,
529
+ focusVisibleClassName: R(e.focusVisible, M),
530
+ ref: a,
531
+ type: h,
532
+ id: s ? m : P,
533
+ ...F,
534
534
  classes: e,
535
- children: [U, v !== "end" && N, z, v === "end" && N, _]
535
+ children: [G, v !== "end" && N, S, v === "end" && N, U]
536
536
  });
537
537
  });
538
- process.env.NODE_ENV !== "production" && (co.propTypes = {
538
+ process.env.NODE_ENV !== "production" && (po.propTypes = {
539
539
  // ┌────────────────────────────── Warning ──────────────────────────────┐
540
540
  // │ These PropTypes are generated from the TypeScript type definitions. │
541
541
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -652,5 +652,5 @@ process.env.NODE_ENV !== "production" && (co.propTypes = {
652
652
  variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
653
653
  });
654
654
  export {
655
- co as B
655
+ po as B
656
656
  };
@@ -3,8 +3,8 @@ var qe = (e, t, n) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var W = (e, t, n) => qe(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as c from "react";
5
5
  import H, { isValidElement as Q, cloneElement as ee, Children as We } from "react";
6
- import { P as r, g as Te, a as ne } from "./createTheme-a85zdZWm.js";
7
- import { c as E, g as ce, u as pe, s as z, a as Ce, m as Ee } from "./DefaultPropsProvider-D2IJ8Qbs.js";
6
+ import { P as r, g as Te, a as ne } from "./createTheme-DV959X3d.js";
7
+ import { c as E, g as ce, u as pe, s as z, a as Ce, m as Ee } from "./DefaultPropsProvider-BurgXZzw.js";
8
8
  import { jsx as D, jsxs as He } from "react/jsx-runtime";
9
9
  import { keyframes as G, css as xe } from "@emotion/react";
10
10
  const Ge = typeof window < "u" ? c.useLayoutEffect : c.useEffect;