@contractspec/lib.accessibility 1.56.1 → 1.58.0
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/AccessibilityPanel.d.ts +3 -10
- package/dist/AccessibilityPanel.d.ts.map +1 -1
- package/dist/AccessibilityPanel.js +356 -168
- package/dist/AccessibilityProvider.d.ts +5 -13
- package/dist/AccessibilityProvider.d.ts.map +1 -1
- package/dist/AccessibilityProvider.js +170 -17
- package/dist/browser/AccessibilityPanel.js +362 -0
- package/dist/browser/AccessibilityProvider.js +173 -0
- package/dist/{styles-C5GUMPoX.css → browser/index.css} +10 -24
- package/dist/browser/index.js +427 -0
- package/dist/browser/next-route-announcer.js +23 -0
- package/dist/browser/preferences.js +132 -0
- package/dist/index.css +60 -0
- package/dist/index.d.ts +12 -11
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +423 -8
- package/dist/nativewind-env.d.js +1 -0
- package/dist/next-route-announcer.d.ts +1 -6
- package/dist/next-route-announcer.d.ts.map +1 -1
- package/dist/next-route-announcer.js +21 -21
- package/dist/preferences.d.ts +26 -32
- package/dist/preferences.d.ts.map +1 -1
- package/dist/preferences.js +120 -107
- package/package.json +56 -25
- package/dist/AccessibilityPanel.js.map +0 -1
- package/dist/AccessibilityProvider.js.map +0 -1
- package/dist/nativewind-env.d.ts +0 -1
- package/dist/next-route-announcer.js.map +0 -1
- package/dist/preferences.js.map +0 -1
- package/dist/styles-C5GUMPoX.css.map +0 -1
- /package/dist/{styles.js → browser/nativewind-env.d.js} +0 -0
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function AccessibilityPanel({
|
|
5
|
-
className
|
|
6
|
-
}: {
|
|
7
|
-
className?: string;
|
|
8
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { AccessibilityPanel };
|
|
1
|
+
export declare function AccessibilityPanel({ className }: {
|
|
2
|
+
className?: string;
|
|
3
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
4
|
//# sourceMappingURL=AccessibilityPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessibilityPanel.d.ts","
|
|
1
|
+
{"version":3,"file":"AccessibilityPanel.d.ts","sourceRoot":"","sources":["../src/AccessibilityPanel.tsx"],"names":[],"mappings":"AA6BA,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CA2IvE"}
|
|
@@ -1,175 +1,363 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { useA11YPreferences } from "./preferences.js";
|
|
1
|
+
// @bun
|
|
2
|
+
// src/preferences.tsx
|
|
4
3
|
import React from "react";
|
|
5
|
-
import {
|
|
4
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
5
|
+
"use client";
|
|
6
|
+
var DEFAULT_PREFERENCES = {
|
|
7
|
+
textSize: "m",
|
|
8
|
+
textSpacing: "normal",
|
|
9
|
+
lineHeight: "normal",
|
|
10
|
+
underlineLinks: false,
|
|
11
|
+
focusRing: "normal",
|
|
12
|
+
reduceMotion: "system",
|
|
13
|
+
highContrast: false,
|
|
14
|
+
dyslexiaFont: false
|
|
15
|
+
};
|
|
16
|
+
var STORAGE_KEY = "a11y:preferences:v1";
|
|
17
|
+
function getStoredPreferences() {
|
|
18
|
+
try {
|
|
19
|
+
const raw = typeof window !== "undefined" ? window.localStorage.getItem(STORAGE_KEY) : null;
|
|
20
|
+
if (!raw)
|
|
21
|
+
return null;
|
|
22
|
+
const parsed = JSON.parse(raw);
|
|
23
|
+
return { ...DEFAULT_PREFERENCES, ...parsed };
|
|
24
|
+
} catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function savePreferences(prefs) {
|
|
29
|
+
try {
|
|
30
|
+
if (typeof window !== "undefined") {
|
|
31
|
+
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(prefs));
|
|
32
|
+
}
|
|
33
|
+
} catch {}
|
|
34
|
+
}
|
|
35
|
+
function applyCssVariables(prefs) {
|
|
36
|
+
if (typeof document === "undefined")
|
|
37
|
+
return;
|
|
38
|
+
const root = document.documentElement;
|
|
39
|
+
const body = document.body;
|
|
40
|
+
const sizeMap = {
|
|
41
|
+
s: "0.95",
|
|
42
|
+
m: "1",
|
|
43
|
+
l: "1.1",
|
|
44
|
+
xl: "1.25"
|
|
45
|
+
};
|
|
46
|
+
root.style.setProperty("--a11y-text-scale", sizeMap[prefs.textSize]);
|
|
47
|
+
const targetMin = prefs.textSize === "l" || prefs.textSize === "xl" ? "44px" : "0px";
|
|
48
|
+
root.style.setProperty("--a11y-target-min", targetMin);
|
|
49
|
+
root.style.setProperty("--a11y-letter-spacing", prefs.textSpacing === "increased" ? "0.12em" : "normal");
|
|
50
|
+
root.style.setProperty("--a11y-word-spacing", prefs.textSpacing === "increased" ? "0.16em" : "normal");
|
|
51
|
+
root.style.setProperty("--a11y-line-height", prefs.lineHeight === "increased" ? "1.6" : "1.5");
|
|
52
|
+
root.style.setProperty("--a11y-underline-links", prefs.underlineLinks ? "underline" : "revert");
|
|
53
|
+
root.style.setProperty("--a11y-focus-ring-width", prefs.focusRing === "thick" ? "4px" : "2px");
|
|
54
|
+
root.style.setProperty("--a11y-reduce-motion", prefs.reduceMotion);
|
|
55
|
+
root.style.setProperty("--a11y-contrast-mode", prefs.highContrast ? "high" : "normal");
|
|
56
|
+
if (prefs.highContrast) {
|
|
57
|
+
root.setAttribute("data-contrast", "high");
|
|
58
|
+
} else {
|
|
59
|
+
root.removeAttribute("data-contrast");
|
|
60
|
+
}
|
|
61
|
+
root.style.setProperty("--a11y-font-family-alt-enabled", prefs.dyslexiaFont ? "1" : "0");
|
|
62
|
+
if (body) {
|
|
63
|
+
if (prefs.textSpacing === "increased") {
|
|
64
|
+
body.style.letterSpacing = "0.12em";
|
|
65
|
+
body.style.wordSpacing = "0.16em";
|
|
66
|
+
} else {
|
|
67
|
+
body.style.letterSpacing = "";
|
|
68
|
+
body.style.wordSpacing = "";
|
|
69
|
+
}
|
|
70
|
+
body.style.lineHeight = prefs.lineHeight === "increased" ? "1.6" : "";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
var PreferencesContext = React.createContext(null);
|
|
74
|
+
function useA11YPreferences() {
|
|
75
|
+
const ctx = React.useContext(PreferencesContext);
|
|
76
|
+
if (!ctx)
|
|
77
|
+
throw new Error("useA11YPreferences must be used within A11YPreferencesProvider");
|
|
78
|
+
return ctx;
|
|
79
|
+
}
|
|
80
|
+
function A11YPreferencesProvider({
|
|
81
|
+
children
|
|
82
|
+
}) {
|
|
83
|
+
const [preferences, setPreferencesState] = React.useState(DEFAULT_PREFERENCES);
|
|
84
|
+
const [hydrated, setHydrated] = React.useState(false);
|
|
85
|
+
React.useEffect(() => {
|
|
86
|
+
const stored = getStoredPreferences();
|
|
87
|
+
const next = stored ?? DEFAULT_PREFERENCES;
|
|
88
|
+
setPreferencesState(next);
|
|
89
|
+
setHydrated(true);
|
|
90
|
+
applyCssVariables(next);
|
|
91
|
+
}, []);
|
|
92
|
+
const setPreferences = React.useCallback((updater) => {
|
|
93
|
+
setPreferencesState((prev) => {
|
|
94
|
+
const next = typeof updater === "function" ? updater(prev) : { ...prev, ...updater };
|
|
95
|
+
savePreferences(next);
|
|
96
|
+
applyCssVariables(next);
|
|
97
|
+
try {
|
|
98
|
+
if (typeof window !== "undefined") {
|
|
99
|
+
const changed = {};
|
|
100
|
+
for (const key of Object.keys(next)) {
|
|
101
|
+
if (next[key] !== prev[key]) {
|
|
102
|
+
changed[key] = next[key];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
window.dispatchEvent(new CustomEvent("a11y:pref_changed", {
|
|
106
|
+
detail: {
|
|
107
|
+
previous: prev,
|
|
108
|
+
current: next,
|
|
109
|
+
changed
|
|
110
|
+
}
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
} catch {}
|
|
114
|
+
return next;
|
|
115
|
+
});
|
|
116
|
+
}, []);
|
|
117
|
+
const value = React.useMemo(() => ({ preferences, setPreferences }), [preferences, setPreferences]);
|
|
118
|
+
return /* @__PURE__ */ jsxDEV(PreferencesContext, {
|
|
119
|
+
value,
|
|
120
|
+
children: [
|
|
121
|
+
children,
|
|
122
|
+
!hydrated ? null : null
|
|
123
|
+
]
|
|
124
|
+
}, undefined, true, undefined, this);
|
|
125
|
+
}
|
|
126
|
+
function a11yRootClassName() {
|
|
127
|
+
return "a11y-root";
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/AccessibilityPanel.tsx
|
|
131
|
+
import {
|
|
132
|
+
Dialog,
|
|
133
|
+
DialogClose,
|
|
134
|
+
DialogContent,
|
|
135
|
+
DialogOverlay,
|
|
136
|
+
DialogPortal,
|
|
137
|
+
DialogTitle,
|
|
138
|
+
DialogTrigger
|
|
139
|
+
} from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
6
140
|
import { Button } from "@contractspec/lib.design-system";
|
|
7
141
|
import { Switch } from "@contractspec/lib.ui-kit-web/ui/switch";
|
|
8
142
|
import { Label } from "@contractspec/lib.ui-kit-web/ui/label";
|
|
9
|
-
import {
|
|
10
|
-
|
|
143
|
+
import {
|
|
144
|
+
Select,
|
|
145
|
+
SelectContent,
|
|
146
|
+
SelectItem,
|
|
147
|
+
SelectTrigger,
|
|
148
|
+
SelectValue
|
|
149
|
+
} from "@contractspec/lib.ui-kit-web/ui/select";
|
|
11
150
|
import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
12
|
-
|
|
13
|
-
|
|
151
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
152
|
+
"use client";
|
|
14
153
|
function AccessibilityPanel({ className }) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
154
|
+
const { preferences, setPreferences } = useA11YPreferences();
|
|
155
|
+
return /* @__PURE__ */ jsxDEV2(Dialog, {
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsxDEV2(DialogTrigger, {
|
|
158
|
+
asChild: true,
|
|
159
|
+
children: /* @__PURE__ */ jsxDEV2(Button, {
|
|
160
|
+
variant: "outline",
|
|
161
|
+
"aria-haspopup": "dialog",
|
|
162
|
+
children: "Accessibility"
|
|
163
|
+
}, undefined, false, undefined, this)
|
|
164
|
+
}, undefined, false, undefined, this),
|
|
165
|
+
/* @__PURE__ */ jsxDEV2(DialogPortal, {
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ jsxDEV2(DialogOverlay, {
|
|
168
|
+
className: "fixed inset-0 z-50 bg-black/40"
|
|
169
|
+
}, undefined, false, undefined, this),
|
|
170
|
+
/* @__PURE__ */ jsxDEV2(DialogContent, {
|
|
171
|
+
className: cn("bg-background focus-visible:ring-ring max-w-md p-6 shadow-lg outline-hidden focus-visible:ring-2", className),
|
|
172
|
+
"aria-describedby": "a11y-panel-desc",
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ jsxDEV2(DialogTitle, {
|
|
175
|
+
className: "text-lg font-semibold",
|
|
176
|
+
children: "Accessibility settings"
|
|
177
|
+
}, undefined, false, undefined, this),
|
|
178
|
+
/* @__PURE__ */ jsxDEV2("p", {
|
|
179
|
+
id: "a11y-panel-desc",
|
|
180
|
+
className: "text-muted-foreground text-sm",
|
|
181
|
+
children: "Adjust text size, spacing, focus and motion to suit your needs."
|
|
182
|
+
}, undefined, false, undefined, this),
|
|
183
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
184
|
+
className: "mt-6 space-y-6",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
187
|
+
className: "space-y-2",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
190
|
+
children: "Text size"
|
|
191
|
+
}, undefined, false, undefined, this),
|
|
192
|
+
/* @__PURE__ */ jsxDEV2(Select, {
|
|
193
|
+
value: preferences.textSize,
|
|
194
|
+
onValueChange: (v) => setPreferences({ textSize: v }),
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ jsxDEV2(SelectTrigger, {
|
|
197
|
+
"aria-label": "Text size",
|
|
198
|
+
children: /* @__PURE__ */ jsxDEV2(SelectValue, {}, undefined, false, undefined, this)
|
|
199
|
+
}, undefined, false, undefined, this),
|
|
200
|
+
/* @__PURE__ */ jsxDEV2(SelectContent, {
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
203
|
+
value: "s",
|
|
204
|
+
children: "Small"
|
|
205
|
+
}, undefined, false, undefined, this),
|
|
206
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
207
|
+
value: "m",
|
|
208
|
+
children: "Medium"
|
|
209
|
+
}, undefined, false, undefined, this),
|
|
210
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
211
|
+
value: "l",
|
|
212
|
+
children: "Large"
|
|
213
|
+
}, undefined, false, undefined, this),
|
|
214
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
215
|
+
value: "xl",
|
|
216
|
+
children: "Extra Large"
|
|
217
|
+
}, undefined, false, undefined, this)
|
|
218
|
+
]
|
|
219
|
+
}, undefined, true, undefined, this)
|
|
220
|
+
]
|
|
221
|
+
}, undefined, true, undefined, this)
|
|
222
|
+
]
|
|
223
|
+
}, undefined, true, undefined, this),
|
|
224
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
225
|
+
className: "flex items-center justify-between",
|
|
226
|
+
children: [
|
|
227
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
228
|
+
htmlFor: "text-spacing",
|
|
229
|
+
children: "Increase text spacing (WCAG 1.4.12)"
|
|
230
|
+
}, undefined, false, undefined, this),
|
|
231
|
+
/* @__PURE__ */ jsxDEV2(Switch, {
|
|
232
|
+
id: "text-spacing",
|
|
233
|
+
checked: preferences.textSpacing === "increased",
|
|
234
|
+
onCheckedChange: (c) => setPreferences({ textSpacing: c ? "increased" : "normal" })
|
|
235
|
+
}, undefined, false, undefined, this)
|
|
236
|
+
]
|
|
237
|
+
}, undefined, true, undefined, this),
|
|
238
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
239
|
+
className: "flex items-center justify-between",
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
242
|
+
htmlFor: "line-height",
|
|
243
|
+
children: "Increase line height"
|
|
244
|
+
}, undefined, false, undefined, this),
|
|
245
|
+
/* @__PURE__ */ jsxDEV2(Switch, {
|
|
246
|
+
id: "line-height",
|
|
247
|
+
checked: preferences.lineHeight === "increased",
|
|
248
|
+
onCheckedChange: (c) => setPreferences({ lineHeight: c ? "increased" : "normal" })
|
|
249
|
+
}, undefined, false, undefined, this)
|
|
250
|
+
]
|
|
251
|
+
}, undefined, true, undefined, this),
|
|
252
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
253
|
+
className: "flex items-center justify-between",
|
|
254
|
+
children: [
|
|
255
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
256
|
+
htmlFor: "underline-links",
|
|
257
|
+
children: "Always underline links"
|
|
258
|
+
}, undefined, false, undefined, this),
|
|
259
|
+
/* @__PURE__ */ jsxDEV2(Switch, {
|
|
260
|
+
id: "underline-links",
|
|
261
|
+
checked: preferences.underlineLinks,
|
|
262
|
+
onCheckedChange: (c) => setPreferences({ underlineLinks: c })
|
|
263
|
+
}, undefined, false, undefined, this)
|
|
264
|
+
]
|
|
265
|
+
}, undefined, true, undefined, this),
|
|
266
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
267
|
+
className: "flex items-center justify-between",
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
270
|
+
htmlFor: "focus-ring",
|
|
271
|
+
children: "Thick focus ring"
|
|
272
|
+
}, undefined, false, undefined, this),
|
|
273
|
+
/* @__PURE__ */ jsxDEV2(Switch, {
|
|
274
|
+
id: "focus-ring",
|
|
275
|
+
checked: preferences.focusRing === "thick",
|
|
276
|
+
onCheckedChange: (c) => setPreferences({ focusRing: c ? "thick" : "normal" })
|
|
277
|
+
}, undefined, false, undefined, this)
|
|
278
|
+
]
|
|
279
|
+
}, undefined, true, undefined, this),
|
|
280
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
281
|
+
className: "space-y-2",
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
284
|
+
children: "Motion"
|
|
285
|
+
}, undefined, false, undefined, this),
|
|
286
|
+
/* @__PURE__ */ jsxDEV2(Select, {
|
|
287
|
+
value: preferences.reduceMotion,
|
|
288
|
+
onValueChange: (v) => setPreferences({ reduceMotion: v }),
|
|
289
|
+
children: [
|
|
290
|
+
/* @__PURE__ */ jsxDEV2(SelectTrigger, {
|
|
291
|
+
"aria-label": "Motion preferences",
|
|
292
|
+
children: /* @__PURE__ */ jsxDEV2(SelectValue, {}, undefined, false, undefined, this)
|
|
293
|
+
}, undefined, false, undefined, this),
|
|
294
|
+
/* @__PURE__ */ jsxDEV2(SelectContent, {
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
297
|
+
value: "system",
|
|
298
|
+
children: "Follow system"
|
|
299
|
+
}, undefined, false, undefined, this),
|
|
300
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
301
|
+
value: "reduce",
|
|
302
|
+
children: "Reduce motion"
|
|
303
|
+
}, undefined, false, undefined, this),
|
|
304
|
+
/* @__PURE__ */ jsxDEV2(SelectItem, {
|
|
305
|
+
value: "no-preference",
|
|
306
|
+
children: "Allow motion"
|
|
307
|
+
}, undefined, false, undefined, this)
|
|
308
|
+
]
|
|
309
|
+
}, undefined, true, undefined, this)
|
|
310
|
+
]
|
|
311
|
+
}, undefined, true, undefined, this)
|
|
312
|
+
]
|
|
313
|
+
}, undefined, true, undefined, this),
|
|
314
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
315
|
+
className: "flex items-center justify-between",
|
|
316
|
+
children: [
|
|
317
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
318
|
+
htmlFor: "contrast",
|
|
319
|
+
children: "High contrast"
|
|
320
|
+
}, undefined, false, undefined, this),
|
|
321
|
+
/* @__PURE__ */ jsxDEV2(Switch, {
|
|
322
|
+
id: "contrast",
|
|
323
|
+
checked: preferences.highContrast,
|
|
324
|
+
onCheckedChange: (c) => setPreferences({ highContrast: c })
|
|
325
|
+
}, undefined, false, undefined, this)
|
|
326
|
+
]
|
|
327
|
+
}, undefined, true, undefined, this),
|
|
328
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
329
|
+
className: "flex items-center justify-between",
|
|
330
|
+
children: [
|
|
331
|
+
/* @__PURE__ */ jsxDEV2(Label, {
|
|
332
|
+
htmlFor: "dyslexia-font",
|
|
333
|
+
children: "Dyslexia-friendly font"
|
|
334
|
+
}, undefined, false, undefined, this),
|
|
335
|
+
/* @__PURE__ */ jsxDEV2(Switch, {
|
|
336
|
+
id: "dyslexia-font",
|
|
337
|
+
checked: preferences.dyslexiaFont,
|
|
338
|
+
onCheckedChange: (c) => setPreferences({ dyslexiaFont: c })
|
|
339
|
+
}, undefined, false, undefined, this)
|
|
340
|
+
]
|
|
341
|
+
}, undefined, true, undefined, this)
|
|
342
|
+
]
|
|
343
|
+
}, undefined, true, undefined, this),
|
|
344
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
345
|
+
className: "mt-8 flex justify-end gap-2",
|
|
346
|
+
children: /* @__PURE__ */ jsxDEV2(DialogClose, {
|
|
347
|
+
asChild: true,
|
|
348
|
+
children: /* @__PURE__ */ jsxDEV2(Button, {
|
|
349
|
+
variant: "secondary",
|
|
350
|
+
children: "Close"
|
|
351
|
+
}, undefined, false, undefined, this)
|
|
352
|
+
}, undefined, false, undefined, this)
|
|
353
|
+
}, undefined, false, undefined, this)
|
|
354
|
+
]
|
|
355
|
+
}, undefined, true, undefined, this)
|
|
356
|
+
]
|
|
357
|
+
}, undefined, true, undefined, this)
|
|
358
|
+
]
|
|
359
|
+
}, undefined, true, undefined, this);
|
|
171
360
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
//# sourceMappingURL=AccessibilityPanel.js.map
|
|
361
|
+
export {
|
|
362
|
+
AccessibilityPanel
|
|
363
|
+
};
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import * as React
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
children,
|
|
7
|
-
skipTargetId
|
|
8
|
-
}: {
|
|
9
|
-
children: React$1.ReactNode;
|
|
10
|
-
skipTargetId?: string;
|
|
11
|
-
}): react_jsx_runtime1.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { AccessibilityProvider };
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function AccessibilityProvider({ children, skipTargetId, }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
skipTargetId?: string;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
6
|
//# sourceMappingURL=AccessibilityProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessibilityProvider.d.ts","
|
|
1
|
+
{"version":3,"file":"AccessibilityProvider.d.ts","sourceRoot":"","sources":["../src/AccessibilityProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,YAAqB,GACtB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,2CAUA"}
|