@gsa-tts/graymatter-ui 0.3.13 → 0.3.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.
- package/package.json +3 -3
- package/src/layouts/BaseLayout.astro +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gsa-tts/graymatter-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"typescript": "5.7.3",
|
|
56
56
|
"vite": "^6.3.5",
|
|
57
57
|
"vitest": "^3.0.7",
|
|
58
|
-
"@gsa-tts/graymatter-typescript-config": "0.0.2",
|
|
59
58
|
"@gsa-tts/graymatter-eslint": "0.0.2",
|
|
60
|
-
"@gsa-tts/graymatter-vitest-config": "0.0.1"
|
|
59
|
+
"@gsa-tts/graymatter-vitest-config": "0.0.1",
|
|
60
|
+
"@gsa-tts/graymatter-typescript-config": "0.0.2"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@fontsource-variable/archivo": "^5.2.6",
|
|
@@ -18,3 +18,20 @@ const { title, description, openGraphImage, gtmID } = Astro.props;
|
|
|
18
18
|
<slot />
|
|
19
19
|
</body>
|
|
20
20
|
</html>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
// Enhanced mobile focus handling - centralized for all layouts
|
|
24
|
+
if (typeof window !== 'undefined') {
|
|
25
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
26
|
+
if (e.key === 'Tab') {
|
|
27
|
+
document.body.classList.add('keyboard-user');
|
|
28
|
+
document.body.classList.remove('touch-user');
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
33
|
+
|
|
34
|
+
// Initial state - assume touch user until Tab is pressed
|
|
35
|
+
document.body.classList.add('touch-user');
|
|
36
|
+
}
|
|
37
|
+
</script>
|