@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.
@@ -1 +1 @@
1
- ._lang_1mspu_3{display:flex;align-items:center;gap:.3rem;color:#aaa}
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}
@@ -1 +1 @@
1
- ._policy_12v8a_1{color:#444;background:#fff;position:fixed;align-items:center;gap:1rem;max-width:200px;display:flex;font-size:.7rem;box-sizing:border-box;box-shadow:0 0 6px #ddd;overflow:hidden}._bottomLeft_12v8a_15{bottom:0;left:0;border-top-right-radius:20px;padding-right:15px}._topRight_12v8a_22{top:0;right:0;border-bottom-left-radius:20px;padding-left:15px}._policy_12v8a_1 a,._policy_12v8a_1 a:visited{color:#444}._versionBox_12v8a_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}._bottomLeft_12v8a_15 ._versionBox_12v8a_37{border-top-right-radius:20px}._topRight_12v8a_22 ._versionBox_12v8a_37{border-bottom-left-radius:20px}
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 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-BM4dw4Lw.js";
6
- import '../../assets/LangSelect.css';const r = "_lang_1mspu_3", u = {
7
- lang: r
8
- }, h = i(/* @__PURE__ */ e("path", {
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"), p = [
12
+ }), "Language"), _ = [
11
13
  { name: "en", label: "English" },
12
14
  { name: "fi", label: "Suomi" }
13
15
  ];
14
- function M({ languages: c = p }) {
15
- const { t, i18n: n } = m(), l = g(
16
+ function b({ languages: t = _, ns: s = "common", dark: l = !1 }) {
17
+ const { t: o, i18n: c } = i(), r = d(
16
18
  (a) => {
17
- n.changeLanguage(a.target.value || "en");
19
+ c.changeLanguage(a.target.value || "en");
18
20
  },
19
- [n]
21
+ [c]
20
22
  );
21
- return /* @__PURE__ */ o("div", { className: u.lang, children: [
22
- /* @__PURE__ */ e(
23
- s,
23
+ return /* @__PURE__ */ m("div", { className: `${e.lang} ${l ? e.dark : ""}`, children: [
24
+ /* @__PURE__ */ n(
25
+ g,
24
26
  {
25
- value: n.language,
26
- onChange: l,
27
+ value: c.language,
28
+ onChange: r,
27
29
  variant: "outlined",
28
30
  "data-testid": "select-lang",
29
- inputProps: { "aria-label": t("app.language", { ns: "common" }) },
30
- children: c.map((a) => /* @__PURE__ */ e(
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__ */ e(h, {})
43
+ /* @__PURE__ */ n(f, {})
41
44
  ] });
42
45
  }
43
46
  export {
44
- p as LANGS,
45
- M as default
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 s, jsx as t } from "react/jsx-runtime";
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 l = "_policy_12v8a_1", n = "_bottomLeft_12v8a_15", h = "_topRight_12v8a_22", g = "_versionBox_12v8a_37", o = {
4
- policy: l,
5
- bottomLeft: n,
6
- topRight: h,
7
- versionBox: g
8
- }, d = "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 m({ tag: a, appName: r, position: e = "bottomLeft" }) {
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__ */ s("section", { className: `${o.policy} ${o[e]}`, children: [
12
- e === "topRight" && /* @__PURE__ */ t(
13
- "a",
14
- {
15
- href: "/about",
16
- target: "_blank",
17
- children: i("about.privacyTitle")
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: `https://github.com/knicos/genai-${r}/releases/tag/${a}`,
20
+ href: "/about",
29
21
  target: "_blank",
30
- rel: "noreferrer",
31
- "data-testid": "versionlink",
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
- "img",
31
+ "a",
34
32
  {
35
- src: d,
36
- width: 24,
37
- height: 24,
38
- alt: "Github source"
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
- e === "bottomLeft" && /* @__PURE__ */ t(
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
- m as default
63
+ v as default
57
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genai-fi/base",
3
- "version": "4.3.4",
3
+ "version": "4.3.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",