@genai-fi/base 4.3.2 → 4.3.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.
@@ -1 +1 @@
1
- ._helpButton_p1m35_1{position:absolute;z-index:10;left:-3rem;top:.5rem;color:#0a4bd6;background:#fff6;transition:opacity .3s ease-out;opacity:0}._helpButtonInplace_p1m35_12{color:#0a4bd6;margin-left:8px;transition:opacity .3s ease-out;opacity:.2}._helpButton_p1m35_1:hover{background:#fff}._container_p1m35_23{position:relative;border-radius:6px}._container_p1m35_23:hover ._helpButton_p1m35_1{opacity:1}._inplaceContainer_p1m35_32{display:flex;align-items:center}._inplaceContainer_p1m35_32:hover ._helpButtonInplace_p1m35_12{opacity:1}._active_p1m35_41{box-shadow:0 0 10px #0a4bd6}._helpButtonInside_p1m35_45{left:1rem}
1
+ ._helpButton_cw98j_1{position:absolute;z-index:10;color:#0a4bd6;background:#fff6;transition:opacity .3s ease-out;opacity:0}._helpButton_cw98j_1._left_cw98j_10{left:-3rem;top:.5rem}._helpButton_cw98j_1._right_cw98j_15{right:-3rem;top:.5rem}._helpButton_cw98j_1._top_cw98j_20{top:-3rem;right:.5rem}._helpButton_cw98j_1._bottom_cw98j_25{bottom:-3rem;right:.5rem}._helpButtonInplace_cw98j_30{color:#0a4bd6;margin-left:8px;transition:opacity .3s ease-out;opacity:.2}._helpButton_cw98j_1:hover{background:#fff}._container_cw98j_41{position:relative;border-radius:6px}._container_cw98j_41:hover ._helpButton_cw98j_1{opacity:1}._helpButton_cw98j_1:focus{opacity:1;background:#fff}._inplaceContainer_cw98j_55{display:flex;align-items:center}._inplaceContainer_cw98j_55:hover ._helpButtonInplace_cw98j_30{opacity:1}._helpButtonInplace_cw98j_30:focus{opacity:1;background:#fff}._active_cw98j_69{box-shadow:0 0 10px #0a4bd6}._helpButtonInside_cw98j_73{left:1rem}._closeButton_cw98j_77{margin-top:.5rem;align-self:flex-end;font-size:.75rem;padding:3px 8px}
@@ -1 +1 @@
1
- ._popper_35oif_1{display:flex;flex-direction:column;padding:1rem 1.5rem;border-radius:6px;box-shadow:2px 2px 4px #a4acbb;font-family:Andika,sans-serif;animation:_fadeIn_35oif_1 .3s ease-out;max-width:250px}._dark_35oif_12{background:#0a4bd6;color:#fff}._light_35oif_17{background:#fff;color:#444}._popper_35oif_1._bottom_35oif_22,._popper_35oif_1._top_35oif_27{margin-top:10px;margin-bottom:10px}._popper_35oif_1._right_35oif_32{margin-left:5px;margin-right:5px}._popper_35oif_1._left_35oif_37{margin-right:5px;margin-left:5px}@keyframes _fadeIn_35oif_1{0%{opacity:0}to{opacity:1}}._popper_35oif_1._right_35oif_32:before{content:"";position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #0a4bd6;left:0;top:calc(50% - 10px)}._popper_35oif_1._left_35oif_37:before{content:"";position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #0a4bd6;right:0;top:calc(50% - 10px)}._popper_35oif_1._bottom_35oif_22:before{content:"";position:absolute;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #0a4bd6;top:0;left:calc(50% - 8px)}._popper_35oif_1._top_35oif_27:before{content:"";position:absolute;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #0a4bd6;bottom:0;left:calc(50% - 8px)}._popper_35oif_1 h2{margin:0;font-size:1.2rem}._popper_35oif_1 p{margin:0;font-size:.9rem}
1
+ ._popper_19um0_1{position:relative;display:flex;flex-direction:column;padding:1rem 1.5rem;border-radius:6px;font-family:Andika,sans-serif;animation:_fadeIn_19um0_1 .3s ease-out;max-width:250px;--infopop-bg: #0a4bd6}._dark_19um0_13{--infopop-bg: #0a4bd6;background:var(--infopop-bg);color:#fff}._light_19um0_19{--infopop-bg: white;background:var(--infopop-bg);color:#444}._arrow_19um0_25{position:absolute;width:0;height:0;background:none;transform:rotate(45deg)}._root_19um0_34[data-popper-placement^=bottom] ._arrow_19um0_25{top:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #0a4bd6}._root_19um0_34[data-popper-placement^=top] ._arrow_19um0_25{bottom:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #0a4bd6}._root_19um0_34[data-popper-placement^=right] ._arrow_19um0_25{left:-10px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #0a4bd6}._root_19um0_34[data-popper-placement^=left] ._arrow_19um0_25{right:-10px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #0a4bd6}._popper_19um0_1._right_19um0_60:before{content:"";position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #0a4bd6;left:0;top:calc(50% - 10px)}._popper_19um0_1._left_19um0_72:before{content:"";position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #0a4bd6;right:0;top:calc(50% - 10px)}._popper_19um0_1._bottom_19um0_84:before{content:"";position:absolute;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #0a4bd6;top:0;left:calc(50% - 8px)}._popper_19um0_1._top_19um0_96:before{content:"";position:absolute;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #0a4bd6;bottom:0;left:calc(50% - 8px)}._popper_19um0_1 h2{margin:0;font-size:1.2rem}._popper_19um0_1 p{margin:0;font-size:.9rem}._root_19um0_34[data-popper-placement^=bottom] ._popper_19um0_1{margin-top:10px}._root_19um0_34[data-popper-placement^=top] ._popper_19um0_1{margin-bottom:10px}._root_19um0_34[data-popper-placement^=right] ._popper_19um0_1{margin-left:5px}._root_19um0_34[data-popper-placement^=left] ._popper_19um0_1{margin-right:5px}@keyframes _fadeIn_19um0_1{0%{opacity:0}to{opacity:1}}
@@ -5,8 +5,11 @@ interface Props extends PropsWithChildren {
5
5
  active?: boolean;
6
6
  style?: CSSProperties;
7
7
  placement?: 'top' | 'bottom' | 'left' | 'right';
8
+ buttonPlacement?: 'top' | 'bottom' | 'left' | 'right';
8
9
  inplace?: boolean;
9
10
  inside?: boolean;
11
+ keepOpen?: boolean;
12
+ closeLabel?: string;
10
13
  }
11
- export default function Help({ message, children, widget, style: customStyle, active, placement, inplace, inside, }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export default function Help({ message, children, widget, style: customStyle, active, placement, inplace, inside, keepOpen, closeLabel, buttonPlacement, }: Props): import("react/jsx-runtime").JSX.Element;
12
15
  export {};
@@ -1,69 +1,108 @@
1
- import { jsx as e, jsxs as I } from "react/jsx-runtime";
2
- import { IconButton as s } from "@mui/material";
3
- import f from "../InfoPop/InfoPop.js";
4
- import { c as v } from "../../createSvgIcon-BM4dw4Lw.js";
5
- import { useState as C } from "react";
6
- import '../../assets/Help.css';const p = v(/* @__PURE__ */ e("path", {
1
+ import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
+ import { IconButton as p } from "@mui/material";
3
+ import w from "../InfoPop/InfoPop.js";
4
+ import { c as g } from "../../createSvgIcon-BM4dw4Lw.js";
5
+ import { useState as S } from "react";
6
+ import { C as $ } from "../../Close-Cv_QwhIN.js";
7
+ import "../../state/webrtcState.js";
8
+ import "react-i18next";
9
+ import "../../hooks/peer.js";
10
+ import { Button as z } from "../Button/Button.js";
11
+ import "../../index-SOhdqzHq.js";
12
+ import "../../style/theme.js";
13
+ import "../../util/canvas.js";
14
+ import "../../FileSaver.min-DhePf63e.js";
15
+ import "../BusyButton/BusyButton.js";
16
+ import "../../browser-HW-wgeM2.js";
17
+ import "../WorkflowLayout/lines.js";
18
+ import "../WorkflowLayout/svgContext.js";
19
+ import "../WorkflowLayout/Widget.js";
20
+ import "../IconMenu/context.js";
21
+ import "@emotion/react";
22
+ import '../../assets/Help.css';const u = g(/* @__PURE__ */ o("path", {
7
23
  d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"
8
- }), "HelpOutline"), S = "_helpButton_p1m35_1", g = "_helpButtonInplace_p1m35_12", $ = "_container_p1m35_23", k = "_inplaceContainer_p1m35_32", x = "_active_p1m35_41", y = "_helpButtonInside_p1m35_45", t = {
9
- helpButton: S,
10
- helpButtonInplace: g,
11
- container: $,
24
+ }), "HelpOutline"), N = "_helpButton_cw98j_1", b = "_left_cw98j_10", x = "_right_cw98j_15", y = "_top_cw98j_20", E = "_bottom_cw98j_25", H = "_helpButtonInplace_cw98j_30", M = "_container_cw98j_41", k = "_inplaceContainer_cw98j_55", L = "_active_cw98j_69", T = "_helpButtonInside_cw98j_73", A = "_closeButton_cw98j_77", t = {
25
+ helpButton: N,
26
+ left: b,
27
+ right: x,
28
+ top: y,
29
+ bottom: E,
30
+ helpButtonInplace: H,
31
+ container: M,
12
32
  inplaceContainer: k,
13
- active: x,
14
- helpButtonInside: y
33
+ active: L,
34
+ helpButtonInside: T,
35
+ closeButton: A
15
36
  };
16
- function j({
17
- message: u,
37
+ function lt({
38
+ message: _,
18
39
  children: h,
19
- widget: m,
20
- style: _,
21
- active: d,
22
- placement: B,
40
+ widget: d,
41
+ style: f,
42
+ active: B,
43
+ placement: I,
23
44
  inplace: n,
24
- inside: o
45
+ inside: e,
46
+ keepOpen: c,
47
+ closeLabel: j,
48
+ buttonPlacement: C = "left"
25
49
  }) {
26
- const [c, l] = C(null), a = (i) => {
27
- l(n || o ? i.currentTarget : i.currentTarget.parentElement);
28
- }, r = () => {
29
- l(null);
50
+ const [l, r] = S(null), s = (a) => {
51
+ r(
52
+ (v) => v ? null : n || e ? a.currentTarget : a.currentTarget.parentElement
53
+ );
54
+ }, i = () => {
55
+ r(null);
30
56
  };
31
- return /* @__PURE__ */ I(
57
+ return /* @__PURE__ */ m(
32
58
  "div",
33
59
  {
34
- className: `${n ? t.inplaceContainer : t.container} ${c && !n && !o ? t.active : ""}`,
35
- "data-widget": m,
36
- "data-active": d ? "true" : "false",
37
- style: _,
60
+ className: `${n ? t.inplaceContainer : t.container} ${l && !n && !e ? t.active : ""}`,
61
+ "data-widget": d,
62
+ "data-active": B ? "true" : "false",
63
+ style: f,
38
64
  children: [
39
- !n && /* @__PURE__ */ e(
40
- s,
65
+ !n && /* @__PURE__ */ o(
66
+ p,
41
67
  {
42
- onClick: a,
43
- onMouseLeave: r,
44
- className: `${t.helpButton} ${o ? t.helpButtonInside : ""}`,
68
+ onClick: s,
69
+ onMouseLeave: c ? void 0 : i,
70
+ className: `${t.helpButton} ${e ? t.helpButtonInside : ""} ${t[C]}`,
45
71
  color: "inherit",
46
- children: /* @__PURE__ */ e(p, { fontSize: "medium" })
72
+ children: /* @__PURE__ */ o(u, { fontSize: "medium" })
47
73
  }
48
74
  ),
49
75
  h,
50
- n && /* @__PURE__ */ e(
51
- s,
76
+ n && /* @__PURE__ */ o(
77
+ p,
52
78
  {
53
- onClick: a,
54
- onMouseLeave: r,
79
+ onClick: s,
80
+ onMouseLeave: c ? void 0 : i,
55
81
  className: t.helpButtonInplace,
56
82
  color: "inherit",
57
- children: /* @__PURE__ */ e(p, { fontSize: "medium" })
83
+ children: /* @__PURE__ */ o(u, { fontSize: "medium" })
58
84
  }
59
85
  ),
60
- /* @__PURE__ */ e(
61
- f,
86
+ /* @__PURE__ */ m(
87
+ w,
62
88
  {
63
- anchorEl: c,
64
- open: !!c,
65
- placement: B,
66
- children: u
89
+ anchorEl: l,
90
+ open: !!l,
91
+ placement: I,
92
+ children: [
93
+ _,
94
+ c && /* @__PURE__ */ o(
95
+ z,
96
+ {
97
+ onClick: i,
98
+ className: t.closeButton,
99
+ color: "inherit",
100
+ startIcon: /* @__PURE__ */ o($, { fontSize: "small" }),
101
+ variant: "outlined",
102
+ children: j || "Close"
103
+ }
104
+ )
105
+ ]
67
106
  }
68
107
  )
69
108
  ]
@@ -71,5 +110,5 @@ function j({
71
110
  );
72
111
  }
73
112
  export {
74
- j as default
113
+ lt as default
75
114
  };
@@ -6,5 +6,5 @@ interface Props extends Omit<PopperProps, 'children'>, PropsWithChildren {
6
6
  offsetX?: number;
7
7
  delay?: number;
8
8
  }
9
- export default function InfoPop({ open, delay, children, offsetY, offsetX, ...props }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export default function InfoPop({ open, delay, children, offsetY, offsetX, modifiers: userModifiers, theme, ...props }: Props): import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -1,48 +1,75 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { Popper as u } from "@mui/material";
3
- import { useState as d, useRef as h, useEffect as g } from "react";
4
- import '../../assets/InfoPop.css';const I = "_popper_35oif_1", b = "_fadeIn_35oif_1", k = "_dark_35oif_12", x = "_light_35oif_17", O = "_bottom_35oif_22", $ = "_top_35oif_27", v = "_right_35oif_32", P = "_left_35oif_37", i = {
5
- popper: I,
6
- fadeIn: b,
7
- dark: k,
8
- light: x,
9
- bottom: O,
10
- top: $,
11
- right: v,
12
- left: P
1
+ import { jsx as f, jsxs as E } from "react/jsx-runtime";
2
+ import { Popper as N } from "@mui/material";
3
+ import { useState as d, useRef as O, useEffect as j, useMemo as v } from "react";
4
+ import '../../assets/InfoPop.css';const P = "_popper_19um0_1", R = "_fadeIn_19um0_1", T = "_dark_19um0_13", $ = "_light_19um0_19", z = "_arrow_19um0_25", A = "_root_19um0_34", S = "_right_19um0_60", q = "_left_19um0_72", B = "_bottom_19um0_84", C = "_top_19um0_96", e = {
5
+ popper: P,
6
+ fadeIn: R,
7
+ dark: T,
8
+ light: $,
9
+ arrow: z,
10
+ root: A,
11
+ right: S,
12
+ left: q,
13
+ bottom: B,
14
+ top: C
13
15
  };
14
- function z({ open: t, delay: o, children: m, offsetY: f = 0, offsetX: r = 0, ...e }) {
15
- const [p, s] = d(t), n = h(t);
16
- n.current = t, g(() => {
16
+ function H({
17
+ open: t,
18
+ delay: r,
19
+ children: h,
20
+ offsetY: s = 0,
21
+ offsetX: n = 0,
22
+ modifiers: c,
23
+ theme: w = "dark",
24
+ ...x
25
+ }) {
26
+ const [g, i] = d(t), p = O(t), [a, I] = d(null);
27
+ p.current = t, j(() => {
17
28
  if (t) {
18
- const _ = o ? setTimeout(() => {
19
- n.current && s(t);
20
- }, o) : void 0;
29
+ const o = r ? setTimeout(() => {
30
+ p.current && i(t);
31
+ }, r) : void 0;
21
32
  return () => {
22
- _ && clearTimeout(_);
33
+ o && clearTimeout(o);
23
34
  };
24
35
  } else
25
- s(!1);
26
- }, [t, o]);
27
- const a = e.placement || "bottom", l = r || f ? [
28
- {
36
+ i(!1);
37
+ }, [t, r]);
38
+ const k = v(() => {
39
+ const o = [...c ?? []], m = (b, u) => {
40
+ const l = o.findIndex((_) => (_ == null ? void 0 : _.name) === b);
41
+ l >= 0 ? o[l] = u : o.push(u);
42
+ };
43
+ return (n || s) && m("offset", {
29
44
  name: "offset",
30
- options: {
31
- offset: [r, f]
32
- }
33
- }
34
- ] : e.modifiers;
35
- return /* @__PURE__ */ c(
36
- u,
45
+ options: { offset: [n, s] }
46
+ }), a && m("arrow", {
47
+ name: "arrow",
48
+ options: { element: a, padding: 8 }
49
+ }), o;
50
+ }, [c, n, s, a]);
51
+ return /* @__PURE__ */ f(
52
+ N,
37
53
  {
38
- open: o ? p : t,
39
- ...e,
40
- modifiers: l,
54
+ open: r ? g : t,
55
+ ...x,
56
+ className: e.root,
57
+ modifiers: k,
41
58
  sx: { zIndex: 10 },
42
- children: /* @__PURE__ */ c("div", { className: `${i.popper} ${i[a]} ${i[e.theme || "dark"]}`, children: m })
59
+ children: /* @__PURE__ */ E("div", { className: `${e.popper} ${e[w]}`, children: [
60
+ /* @__PURE__ */ f(
61
+ "span",
62
+ {
63
+ ref: I,
64
+ className: e.arrow,
65
+ "data-popper-arrow": !0
66
+ }
67
+ ),
68
+ h
69
+ ] })
43
70
  }
44
71
  );
45
72
  }
46
73
  export {
47
- z as default
74
+ H as default
48
75
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genai-fi/base",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",