tycho-components 0.14.12 → 0.14.14
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,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from
|
|
3
|
-
import { useTranslation } from
|
|
4
|
-
import { IconButton } from
|
|
5
|
-
import VirtualKeyboard from
|
|
6
|
-
import { useCorpusUtils } from
|
|
7
|
-
export default function AppKeyboard({ buttonMode =
|
|
8
|
-
const { t } = useTranslation(
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { IconButton } from "tycho-storybook";
|
|
5
|
+
import VirtualKeyboard from "../VirtualKeyboard";
|
|
6
|
+
import { useCorpusUtils } from "../configs/useCorpusUtils";
|
|
7
|
+
export default function AppKeyboard({ buttonMode = "filled", keyboardLayout, }) {
|
|
8
|
+
const { t } = useTranslation("header");
|
|
9
9
|
const { getCorpus } = useCorpusUtils();
|
|
10
10
|
const [openKeyboard, setOpenKeyboard] = useState(false);
|
|
11
|
-
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => setOpenKeyboard(!openKeyboard), name: "keyboard", size: "medium", title: t(
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => setOpenKeyboard(!openKeyboard), name: "keyboard", size: "medium", title: t("tooltip.keyboard"), mode: buttonMode }), openKeyboard && (_jsx(VirtualKeyboard, { onClose: () => setOpenKeyboard(false), closeLabel: t("common:button.close"), defaultLayout: keyboardLayout || getCorpus().keyboardLayout || "english" }))] }));
|
|
12
12
|
}
|
|
@@ -58,12 +58,11 @@ export default function HeaderCorpora({ navigateCorpora, redirect, autoload, use
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
const handleCorpusClick = () => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
navigateCorpora?.(getCorpus().uid);
|
|
61
|
+
if (useOpenCorpora) {
|
|
62
|
+
setOpenCorpora(true);
|
|
64
63
|
}
|
|
65
64
|
else {
|
|
66
|
-
|
|
65
|
+
navigateCorpora?.(getCorpus().uid);
|
|
67
66
|
}
|
|
68
67
|
};
|
|
69
68
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tycho-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.14",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react-hook-form": "^7.45.2",
|
|
50
50
|
"react-i18next": "^13.0.2",
|
|
51
51
|
"react-router-dom": "^6.14.2",
|
|
52
|
-
"tycho-storybook": "0.5.
|
|
52
|
+
"tycho-storybook": "0.5.18",
|
|
53
53
|
"yup": "^1.2.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|