@genai-fi/base 4.3.4 → 4.3.6
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/assets/LangSelect.css +1 -1
- package/dist/assets/Privacy.css +1 -1
- package/dist/assets/SidePanel.css +1 -1
- package/dist/components/LangSelect/LangSelect.d.ts +3 -1
- package/dist/components/LangSelect/LangSelect.js +26 -23
- package/dist/components/Privacy/Privacy.d.ts +3 -1
- package/dist/components/Privacy/Privacy.js +50 -43
- package/dist/components/SidePanel/SidePanel.js +59 -59
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._lang_qnljl_1{display:flex;align-items:center;gap:.3rem;color:#666}._dark_qnljl_8,._dark_qnljl_8 div{color:#fff}._dark_qnljl_8 svg{color:#fff}._dark_qnljl_8 option{color:#000}._darkSelect_qnljl_24:before{border-bottom:1px solid rgba(255,255,255,.42)}._darkSelect_qnljl_24:hover:before{border-bottom:2px solid rgba(255,255,255,.42)!important}
|
package/dist/assets/Privacy.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._policy_10293_1{color:#fff;background:#444;position:fixed;align-items:center;gap:1rem;max-width:200px;display:flex;font-size:.7rem;box-sizing:border-box;box-shadow:2px 2px 4px #a4acbb;overflow:hidden}._bottomLeft_10293_15{bottom:0;left:0;border-top-right-radius:20px;padding-right:15px}._topRight_10293_22{top:0;right:0;border-bottom-left-radius:20px;padding-left:15px}._policy_10293_1 a,._policy_10293_1 a:visited{color:#fff}._versionBox_10293_37{font-size:6pt;height:40px;display:flex;align-items:center;justify-content:center;padding-left:5px;padding-right:8px;background:#444;box-sizing:border-box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._sidePanel_g53a4_1{background:#fff;display:flex;z-index:2;flex-shrink:0;position:relative;transition:opacity .3s ease-in;opacity:0}._sidePanelHorizontal_g53a4_14{flex-direction:column;width:100%}._sidePanel_g53a4_1._closed_g53a4_19{opacity:0;transition:width .3s cubic-bezier(.4,0,.2,1),height .3s cubic-bezier(.4,0,.2,1),opacity .3s ease-out}._sidePanel_g53a4_1._opening_g53a4_27{opacity:1;transition:width .3s cubic-bezier(.4,0,.2,1),height .3s cubic-bezier(.4,0,.2,1),opacity .3s ease-in}@media (prefers-reduced-motion: reduce){._sidePanel_g53a4_1,._sidePanel_g53a4_1._closed_g53a4_19,._sidePanel_g53a4_1._opening_g53a4_27{transition:none}}._sidePanel_g53a4_1._open_g53a4_27{opacity:1}._resizer_g53a4_47{background-color:transparent;box-sizing:border-box;position:absolute;opacity:1;touch-action:none;-webkit-user-select:none;user-select:none;z-index:2}._resizerHorizontal_g53a4_58{height:30px;width:100%;cursor:ns-resize;left:0;top:-8px;right:0}._resizerVertical_g53a4_67{width:30px;cursor:ew-resize;left:-8px;top:0;bottom:0}._noSelect_g53a4_75{-webkit-user-select:none;user-select:none}._resizerBar_g53a4_79{position:absolute;top:0;left:7px;width:2px;height:100%;background-color:#bbb;touch-action:none;-webkit-user-select:none;user-select:none}._resizerHorizontal_g53a4_58 ._resizerBar_g53a4_79{top:7px;left:0;width:100%;height:2px}._resizer_g53a4_47:hover ._resizerBar_g53a4_79{background-color:#75a4e288}._resizer_g53a4_47._resizing_g53a4_101 ._resizerBar_g53a4_79{background-color:#75a4e2}._resizerHandle_g53a4_105{position:absolute;top:50%;left:2px;width:10px;height:60px;transform:translateY(-50%);background-color:#fff;border-radius:3px;border:2px solid #bbb;box-shadow:0 0 4px #ccc;display:flex;align-items:center;justify-content:center;touch-action:none;-webkit-user-select:none;user-select:none}._resizerHorizontal_g53a4_58 ._resizerHandle_g53a4_105{top:2px;left:50%;width:60px;height:10px;transform:translate(-50%)}._resizerHandle_g53a4_105._minimised_g53a4_131{left:-15px;width:20px}._resizerHorizontal_g53a4_58 ._resizerHandle_g53a4_105._minimised_g53a4_131{top:-15px;height:20px;left:50%;width:60px;transform:translate(-50%)}._resizerHandle_g53a4_105:focus{outline:2px solid #75a4e2;outline-offset:2px}._resizerVertical_g53a4_67 ._resizerHandle_g53a4_105:before{content:"";display:block;width:4px;height:20px;background:radial-gradient(circle,#bbb 1.5px,transparent 1.5px) 0 2px,radial-gradient(circle,#bbb 1.5px,transparent 1.5px) 0 8px,radial-gradient(circle,#bbb 1.5px,transparent 1.5px) 0 14px;background-repeat:no-repeat;background-size:4px 4px}._resizerHorizontal_g53a4_58 ._resizerHandle_g53a4_105:before{content:"";display:block;width:20px;height:4px;background:radial-gradient(circle,#bbb 1.5px,transparent 1.5px) 2px 0,radial-gradient(circle,#bbb 1.5px,transparent 1.5px) 8px 0,radial-gradient(circle,#bbb 1.5px,transparent 1.5px) 14px 0;background-repeat:no-repeat;background-size:4px 4px}._resizer_g53a4_47:hover ._resizerHandle_g53a4_105,._resizer_g53a4_47._resizing_g53a4_101 ._resizerHandle_g53a4_105{border-color:#75a4e2}._expand_g53a4_183{position:absolute;top:2rem;right:0;height:40px;width:30px;background-color:#fff;border-radius:3px;border:2px solid #aaa;cursor:pointer;display:flex;align-items:center;justify-content:center}._content_g53a4_199{flex-grow:1;overflow:auto}._closeButton_g53a4_205{position:sticky;top:.5rem;margin-left:auto;width:min-content;z-index:100}
|
|
@@ -7,6 +7,8 @@ interface Props {
|
|
|
7
7
|
name: string;
|
|
8
8
|
label: string;
|
|
9
9
|
}[];
|
|
10
|
+
ns?: string;
|
|
11
|
+
dark?: boolean;
|
|
10
12
|
}
|
|
11
|
-
export default function LangSelect({ languages }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default function LangSelect({ languages, ns, dark }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { NativeSelect as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { c as
|
|
6
|
-
import '../../assets/LangSelect.css';const
|
|
7
|
-
lang:
|
|
8
|
-
|
|
1
|
+
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { NativeSelect as g } from "@mui/material";
|
|
3
|
+
import { useTranslation as i } from "react-i18next";
|
|
4
|
+
import { useCallback as d } from "react";
|
|
5
|
+
import { c as u } from "../../createSvgIcon-BM4dw4Lw.js";
|
|
6
|
+
import '../../assets/LangSelect.css';const h = "_lang_qnljl_1", p = "_dark_qnljl_8", S = "_darkSelect_qnljl_24", e = {
|
|
7
|
+
lang: h,
|
|
8
|
+
dark: p,
|
|
9
|
+
darkSelect: S
|
|
10
|
+
}, f = u(/* @__PURE__ */ n("path", {
|
|
9
11
|
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"),
|
|
12
|
+
}), "Language"), _ = [
|
|
11
13
|
{ name: "en", label: "English" },
|
|
12
14
|
{ name: "fi", label: "Suomi" }
|
|
13
15
|
];
|
|
14
|
-
function
|
|
15
|
-
const { t, i18n:
|
|
16
|
+
function b({ languages: t = _, ns: s = "common", dark: l = !1 }) {
|
|
17
|
+
const { t: o, i18n: c } = i(), r = d(
|
|
16
18
|
(a) => {
|
|
17
|
-
|
|
19
|
+
c.changeLanguage(a.target.value || "en");
|
|
18
20
|
},
|
|
19
|
-
[
|
|
21
|
+
[c]
|
|
20
22
|
);
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
23
|
+
return /* @__PURE__ */ m("div", { className: `${e.lang} ${l ? e.dark : ""}`, children: [
|
|
24
|
+
/* @__PURE__ */ n(
|
|
25
|
+
g,
|
|
24
26
|
{
|
|
25
|
-
value:
|
|
26
|
-
onChange:
|
|
27
|
+
value: c.language,
|
|
28
|
+
onChange: r,
|
|
27
29
|
variant: "outlined",
|
|
28
30
|
"data-testid": "select-lang",
|
|
29
|
-
inputProps: { "aria-label":
|
|
30
|
-
|
|
31
|
+
inputProps: { "aria-label": o("app.language", { ns: s }) },
|
|
32
|
+
className: `${e.select} ${l ? e.darkSelect : ""}`,
|
|
33
|
+
children: t.map((a) => /* @__PURE__ */ n(
|
|
31
34
|
"option",
|
|
32
35
|
{
|
|
33
36
|
value: a.name,
|
|
@@ -37,10 +40,10 @@ function M({ languages: c = p }) {
|
|
|
37
40
|
))
|
|
38
41
|
}
|
|
39
42
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ n(f, {})
|
|
41
44
|
] });
|
|
42
45
|
}
|
|
43
46
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
_ as LANGS,
|
|
48
|
+
b as default
|
|
46
49
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
position?: 'bottomLeft' | 'topRight';
|
|
3
4
|
tag: string;
|
|
4
5
|
appName: string;
|
|
6
|
+
style?: CSSProperties;
|
|
5
7
|
}
|
|
6
|
-
export default function Privacy({ tag, appName, position }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default function Privacy({ tag, appName, position, style: customStyle }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,57 +1,64 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as c } from "react-i18next";
|
|
3
|
-
import '../../assets/Privacy.css';const
|
|
4
|
-
policy:
|
|
5
|
-
bottomLeft:
|
|
6
|
-
topRight:
|
|
7
|
-
versionBox:
|
|
8
|
-
},
|
|
9
|
-
function
|
|
3
|
+
import '../../assets/Privacy.css';const n = "_policy_10293_1", h = "_bottomLeft_10293_15", g = "_topRight_10293_22", d = "_versionBox_10293_37", o = {
|
|
4
|
+
policy: n,
|
|
5
|
+
bottomLeft: h,
|
|
6
|
+
topRight: g,
|
|
7
|
+
versionBox: d
|
|
8
|
+
}, f = "data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%23fff'/%3e%3c/svg%3e";
|
|
9
|
+
function v({ tag: r, appName: a, position: e = "bottomLeft", style: s }) {
|
|
10
10
|
const { t: i } = c();
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
),
|
|
20
|
-
/* @__PURE__ */ t(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
"aria-hidden": !0,
|
|
24
|
-
className: o.versionBox,
|
|
25
|
-
children: /* @__PURE__ */ t(
|
|
11
|
+
return /* @__PURE__ */ l(
|
|
12
|
+
"section",
|
|
13
|
+
{
|
|
14
|
+
className: `${o.policy} ${o[e]}`,
|
|
15
|
+
style: s,
|
|
16
|
+
children: [
|
|
17
|
+
e === "topRight" && /* @__PURE__ */ t(
|
|
26
18
|
"a",
|
|
27
19
|
{
|
|
28
|
-
href:
|
|
20
|
+
href: "/about",
|
|
29
21
|
target: "_blank",
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
children: i("about.privacyTitle")
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ t(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
"aria-hidden": !0,
|
|
29
|
+
className: o.versionBox,
|
|
32
30
|
children: /* @__PURE__ */ t(
|
|
33
|
-
"
|
|
31
|
+
"a",
|
|
34
32
|
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
href: `https://github.com/knicos/genai-${a}/releases/tag/${r}`,
|
|
34
|
+
target: "_blank",
|
|
35
|
+
rel: "noreferrer",
|
|
36
|
+
"data-testid": "versionlink",
|
|
37
|
+
children: /* @__PURE__ */ t(
|
|
38
|
+
"img",
|
|
39
|
+
{
|
|
40
|
+
src: f,
|
|
41
|
+
width: 24,
|
|
42
|
+
height: 24,
|
|
43
|
+
alt: "Github source"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
39
46
|
}
|
|
40
47
|
)
|
|
41
48
|
}
|
|
49
|
+
),
|
|
50
|
+
e === "bottomLeft" && /* @__PURE__ */ t(
|
|
51
|
+
"a",
|
|
52
|
+
{
|
|
53
|
+
href: "/about",
|
|
54
|
+
target: "_blank",
|
|
55
|
+
children: i("about.privacyTitle")
|
|
56
|
+
}
|
|
42
57
|
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"a",
|
|
47
|
-
{
|
|
48
|
-
href: "/about",
|
|
49
|
-
target: "_blank",
|
|
50
|
-
children: i("about.privacyTitle")
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] });
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
54
61
|
}
|
|
55
62
|
export {
|
|
56
|
-
|
|
63
|
+
v as default
|
|
57
64
|
};
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as h, useRef as
|
|
3
|
-
import { C as
|
|
4
|
-
import { IconButton as
|
|
5
|
-
import '../../assets/SidePanel.css';const
|
|
6
|
-
sidePanel:
|
|
7
|
-
sidePanelHorizontal:
|
|
8
|
-
closed:
|
|
9
|
-
opening:
|
|
10
|
-
open:
|
|
11
|
-
resizer:
|
|
12
|
-
resizerHorizontal:
|
|
13
|
-
resizerVertical:
|
|
14
|
-
noSelect:
|
|
15
|
-
resizerBar:
|
|
16
|
-
resizing:
|
|
17
|
-
resizerHandle:
|
|
18
|
-
minimised:
|
|
1
|
+
import { jsxs as p, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useRef as w, useEffect as E } from "react";
|
|
3
|
+
import { C as T } from "../../Close-Cv_QwhIN.js";
|
|
4
|
+
import { IconButton as k } from "@mui/material";
|
|
5
|
+
import '../../assets/SidePanel.css';const V = "_sidePanel_g53a4_1", W = "_sidePanelHorizontal_g53a4_14", Z = "_closed_g53a4_19", C = "_opening_g53a4_27", K = "_open_g53a4_27", U = "_resizer_g53a4_47", X = "_resizerHorizontal_g53a4_58", j = "_resizerVertical_g53a4_67", F = "_noSelect_g53a4_75", O = "_resizerBar_g53a4_79", Y = "_resizing_g53a4_101", G = "_resizerHandle_g53a4_105", q = "_minimised_g53a4_131", J = "_content_g53a4_199", Q = "_closeButton_g53a4_205", t = {
|
|
6
|
+
sidePanel: V,
|
|
7
|
+
sidePanelHorizontal: W,
|
|
8
|
+
closed: Z,
|
|
9
|
+
opening: C,
|
|
10
|
+
open: K,
|
|
11
|
+
resizer: U,
|
|
12
|
+
resizerHorizontal: X,
|
|
13
|
+
resizerVertical: j,
|
|
14
|
+
noSelect: F,
|
|
15
|
+
resizerBar: O,
|
|
16
|
+
resizing: Y,
|
|
17
|
+
resizerHandle: G,
|
|
18
|
+
minimised: q,
|
|
19
19
|
content: J,
|
|
20
20
|
closeButton: Q
|
|
21
|
-
},
|
|
22
|
-
function re({ children:
|
|
23
|
-
const [
|
|
24
|
-
window.sessionStorage.getItem(c) ? Number(window.sessionStorage.getItem(c)) :
|
|
21
|
+
}, H = 30, b = 300, P = Math.max(b, Math.floor(window.innerWidth * 0.25)), c = "sidePanelWidth";
|
|
22
|
+
function re({ children: $, open: o, onClose: d, onOpen: y, closeLabel: A, position: i = "right" }) {
|
|
23
|
+
const [m, s] = h(o ? P : 0), S = w(null), [g, x] = h(!1), [v, R] = h(!1), [M, B] = h(!o), I = w(null), _ = w(null), l = w(
|
|
24
|
+
window.sessionStorage.getItem(c) ? Number(window.sessionStorage.getItem(c)) : P
|
|
25
25
|
), a = Math.max(
|
|
26
|
-
|
|
26
|
+
b,
|
|
27
27
|
Math.floor(i === "right" ? window.innerWidth * 0.9 : window.innerHeight * 0.9)
|
|
28
28
|
);
|
|
29
|
-
|
|
29
|
+
E(() => {
|
|
30
30
|
if (o)
|
|
31
|
-
|
|
31
|
+
R(!0), B(!1), _.current = document.activeElement ? document.activeElement : null;
|
|
32
32
|
else {
|
|
33
33
|
s(0);
|
|
34
34
|
const n = setTimeout(() => {
|
|
35
|
-
|
|
35
|
+
B(!0), _.current && document.contains(_.current) && _.current.focus();
|
|
36
36
|
}, 300);
|
|
37
37
|
return () => clearTimeout(n);
|
|
38
38
|
}
|
|
39
|
-
}, [o]),
|
|
40
|
-
if (
|
|
41
|
-
|
|
39
|
+
}, [o]), E(() => {
|
|
40
|
+
if (v) {
|
|
41
|
+
I.current && I.current.focus(), s(l.current || P);
|
|
42
42
|
const n = setTimeout(() => {
|
|
43
|
-
|
|
43
|
+
R(!1);
|
|
44
44
|
}, 300);
|
|
45
45
|
return () => clearTimeout(n);
|
|
46
46
|
}
|
|
47
|
-
}, [
|
|
48
|
-
if (
|
|
47
|
+
}, [v]), E(() => {
|
|
48
|
+
if (g) {
|
|
49
49
|
let n = function(e) {
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
f -
|
|
50
|
+
if (g && S.current) {
|
|
51
|
+
const N = S.current.getBoundingClientRect(), D = i === "right" ? N.right - e.clientX : N.bottom - e.clientY, f = Math.max(Math.min(D, a), H);
|
|
52
|
+
f - D > 10 ? s(0) : (l.current = f, s(f), window.sessionStorage.setItem(c, f.toString())), e.preventDefault();
|
|
53
53
|
}
|
|
54
54
|
}, r = function() {
|
|
55
|
-
|
|
55
|
+
x(!1);
|
|
56
56
|
};
|
|
57
57
|
return window.addEventListener("pointermove", n, { passive: !1 }), window.addEventListener("pointerup", r), document.body.classList.add(t.noSelect), () => {
|
|
58
58
|
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), document.body.classList.remove(t.noSelect);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}, [
|
|
62
|
-
const
|
|
61
|
+
}, [g, i, a]);
|
|
62
|
+
const z = m === 0 || M, L = /* @__PURE__ */ p(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
className: `${t.resizer} ${
|
|
65
|
+
className: `${t.resizer} ${g ? t.resizing : ""} ${i === "right" ? t.resizerVertical : t.resizerHorizontal}`,
|
|
66
66
|
onPointerDown: () => {
|
|
67
|
-
|
|
67
|
+
x(!0), y && y();
|
|
68
68
|
},
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
o && /* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ u("div", { className: t.resizerBar }),
|
|
71
|
+
o && /* @__PURE__ */ u(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
|
-
className: `${t.resizerHandle} ${
|
|
74
|
+
className: `${t.resizerHandle} ${z ? t.minimised : ""}`,
|
|
75
75
|
role: "separator",
|
|
76
76
|
"aria-orientation": i === "right" ? "vertical" : "horizontal",
|
|
77
77
|
"aria-label": "Resize sidebar",
|
|
78
78
|
tabIndex: 0,
|
|
79
|
-
"aria-valuenow":
|
|
79
|
+
"aria-valuenow": m,
|
|
80
80
|
"aria-valuemin": 0,
|
|
81
81
|
"aria-valuemax": a,
|
|
82
|
-
ref:
|
|
82
|
+
ref: I,
|
|
83
83
|
onKeyDown: (n) => {
|
|
84
84
|
i === "right" ? n.key === "ArrowRight" ? s((r) => {
|
|
85
85
|
const e = Math.min(a, Math.max(0, r - 50));
|
|
86
86
|
return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
|
|
87
87
|
}) : n.key === "ArrowLeft" && s((r) => {
|
|
88
|
-
const e = Math.max(
|
|
88
|
+
const e = Math.max(H, Math.min(a, r + 50));
|
|
89
89
|
return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
|
|
90
90
|
}) : n.key === "ArrowDown" ? s((r) => {
|
|
91
91
|
const e = Math.min(a, Math.max(0, r - 50));
|
|
92
92
|
return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
|
|
93
93
|
}) : n.key === "ArrowUp" && s((r) => {
|
|
94
|
-
const e = Math.max(
|
|
94
|
+
const e = Math.max(H, Math.min(a, r + 50));
|
|
95
95
|
return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -100,27 +100,27 @@ function re({ children: D, open: o, onClose: d, onOpen: q, closeLabel: $, positi
|
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ p(
|
|
104
104
|
"aside",
|
|
105
105
|
{
|
|
106
|
-
className: `${t.sidePanel} ${o ? t.open : t.closed} ${
|
|
107
|
-
style: i === "right" ? { width:
|
|
108
|
-
ref:
|
|
106
|
+
className: `${t.sidePanel} ${o ? t.open : t.closed} ${v ? t.opening : ""} ${i === "right" ? t.sidePanelVertical : t.sidePanelHorizontal}`,
|
|
107
|
+
style: i === "right" ? { width: z ? 0 : m, visibility: M ? "hidden" : void 0 } : { height: z ? 0 : m, visibility: M ? "hidden" : void 0 },
|
|
108
|
+
ref: S,
|
|
109
109
|
"aria-hidden": !o,
|
|
110
110
|
onKeyDownCapture: (n) => {
|
|
111
111
|
n.key === "Escape" && (n.stopPropagation(), d == null || d());
|
|
112
112
|
},
|
|
113
113
|
children: [
|
|
114
|
-
(i === "right" || i === "bottom") &&
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
d && /* @__PURE__ */
|
|
117
|
-
|
|
114
|
+
(i === "right" || i === "bottom") && L,
|
|
115
|
+
/* @__PURE__ */ p("div", { className: t.content, children: [
|
|
116
|
+
d && /* @__PURE__ */ u("div", { className: t.closeButton, children: /* @__PURE__ */ u(
|
|
117
|
+
k,
|
|
118
118
|
{
|
|
119
119
|
onClick: d,
|
|
120
120
|
"data-testid": "sidepanel-close-button",
|
|
121
|
-
"aria-label":
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
-
|
|
121
|
+
"aria-label": A ?? "Close side panel",
|
|
122
|
+
children: /* @__PURE__ */ u(
|
|
123
|
+
T,
|
|
124
124
|
{
|
|
125
125
|
fontSize: "medium",
|
|
126
126
|
htmlColor: "#444"
|
|
@@ -128,7 +128,7 @@ function re({ children: D, open: o, onClose: d, onOpen: q, closeLabel: $, positi
|
|
|
128
128
|
)
|
|
129
129
|
}
|
|
130
130
|
) }),
|
|
131
|
-
|
|
131
|
+
z || m < b ? null : $
|
|
132
132
|
] })
|
|
133
133
|
]
|
|
134
134
|
}
|