@genai-fi/base 4.3.4 → 4.3.5
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/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/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}
|
|
@@ -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
|
};
|