accessibility-plugin-react 2.6.0 → 2.7.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/README.md +21 -21
- package/dist/index.d.mts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +471 -218
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +458 -211
- package/dist/index.mjs.map +1 -1
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +1 -1
- package/docs/CONTRAST.md +73 -0
- package/docs/FEATURES.md +21 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27,8 +27,12 @@ __export(index_exports, {
|
|
|
27
27
|
AccessibilityList: () => AccessibilityList,
|
|
28
28
|
AccessibilityPlugin: () => AccessibilityPlugin,
|
|
29
29
|
BigCursorController: () => BigCursorController,
|
|
30
|
+
CONTRAST_MODES: () => CONTRAST_MODES,
|
|
31
|
+
CONTRAST_PALETTES: () => CONTRAST_PALETTES,
|
|
32
|
+
CONTRAST_PROTECTED_SELECTOR: () => CONTRAST_PROTECTED_SELECTOR,
|
|
30
33
|
ChoiceControl: () => ChoiceControl,
|
|
31
34
|
ContrastController: () => ContrastController,
|
|
35
|
+
ContrastModeController: () => ContrastModeController,
|
|
32
36
|
DEFAULT_PREFERENCES: () => DEFAULT_PREFERENCES,
|
|
33
37
|
DYSLEXIA_FONT_STACK: () => DYSLEXIA_FONT_STACK,
|
|
34
38
|
EmptyState: () => EmptyState,
|
|
@@ -68,6 +72,8 @@ __export(index_exports, {
|
|
|
68
72
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
69
73
|
enLocale: () => enLocale,
|
|
70
74
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
75
|
+
isForcedColorsActive: () => isForcedColorsActive,
|
|
76
|
+
isProtectedFromContrast: () => isProtectedFromContrast,
|
|
71
77
|
isProtectedFromFontFamily: () => isProtectedFromFontFamily,
|
|
72
78
|
isProtectedFromTextAlign: () => isProtectedFromTextAlign,
|
|
73
79
|
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
@@ -323,6 +329,14 @@ var FONT_FAMILY_PRESETS = [
|
|
|
323
329
|
"legible",
|
|
324
330
|
"dyslexia-option"
|
|
325
331
|
];
|
|
332
|
+
var CONTRAST_MODES = [
|
|
333
|
+
"off",
|
|
334
|
+
"original",
|
|
335
|
+
"light",
|
|
336
|
+
"dark",
|
|
337
|
+
"high",
|
|
338
|
+
"invert"
|
|
339
|
+
];
|
|
326
340
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
327
341
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
328
342
|
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
@@ -353,12 +367,23 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
353
367
|
1,
|
|
354
368
|
2,
|
|
355
369
|
3,
|
|
370
|
+
"off",
|
|
371
|
+
"original",
|
|
372
|
+
"light",
|
|
373
|
+
"dark",
|
|
374
|
+
"high",
|
|
375
|
+
"invert",
|
|
356
376
|
"reduced",
|
|
357
377
|
"yellow-on-black",
|
|
358
378
|
"white-on-black",
|
|
359
|
-
"blue-on-yellow"
|
|
379
|
+
"blue-on-yellow",
|
|
380
|
+
"black-on-white"
|
|
360
381
|
)
|
|
361
382
|
},
|
|
383
|
+
contrastMode: {
|
|
384
|
+
defaultValue: "off",
|
|
385
|
+
validate: oneOf("off", "original", "light", "dark", "high", "invert")
|
|
386
|
+
},
|
|
362
387
|
saturation: { defaultValue: 0, validate: oneOf(0, 1, 2) },
|
|
363
388
|
textAlign: {
|
|
364
389
|
defaultValue: "default",
|
|
@@ -416,22 +441,146 @@ var import_react3 = require("react");
|
|
|
416
441
|
var EXCLUDED = "[data-arap-ui], [data-arap-ui] *, script, style, link, meta, noscript, template";
|
|
417
442
|
var MAX_HOST_ELEMENTS = 4e3;
|
|
418
443
|
var cursor = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M4 2v32l9-9 7 13 6-3-7-12h14z' fill='black' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto`;
|
|
444
|
+
function isForcedColorsActive() {
|
|
445
|
+
if (typeof window === "undefined" || !window.matchMedia) return false;
|
|
446
|
+
try {
|
|
447
|
+
return window.matchMedia("(forced-colors: active)").matches;
|
|
448
|
+
} catch {
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
function subscribeForcedColors(callback) {
|
|
453
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
454
|
+
};
|
|
455
|
+
try {
|
|
456
|
+
const mql = window.matchMedia("(forced-colors: active)");
|
|
457
|
+
mql.addEventListener("change", callback);
|
|
458
|
+
return () => mql.removeEventListener("change", callback);
|
|
459
|
+
} catch {
|
|
460
|
+
return () => {
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
var CONTRAST_PALETTES = {
|
|
465
|
+
light: {
|
|
466
|
+
text: "#0f172a",
|
|
467
|
+
background: "#ffffff",
|
|
468
|
+
border: "#94a3b8",
|
|
469
|
+
link: "#0284c7"
|
|
470
|
+
},
|
|
471
|
+
dark: {
|
|
472
|
+
text: "#f8fafc",
|
|
473
|
+
background: "#0f172a",
|
|
474
|
+
border: "#475569",
|
|
475
|
+
link: "#38bdf8"
|
|
476
|
+
},
|
|
477
|
+
high: {
|
|
478
|
+
text: "#ffffff",
|
|
479
|
+
background: "#000000",
|
|
480
|
+
border: "#ffffff",
|
|
481
|
+
link: "#93c5fd"
|
|
482
|
+
},
|
|
483
|
+
"yellow-on-black": {
|
|
484
|
+
text: "#ffff00",
|
|
485
|
+
background: "#000000",
|
|
486
|
+
border: "#ffff00",
|
|
487
|
+
link: "#00ffff"
|
|
488
|
+
},
|
|
489
|
+
"white-on-black": {
|
|
490
|
+
text: "#ffffff",
|
|
491
|
+
background: "#000000",
|
|
492
|
+
border: "#ffffff",
|
|
493
|
+
link: "#ffff00"
|
|
494
|
+
},
|
|
495
|
+
"blue-on-yellow": {
|
|
496
|
+
text: "#005a9c",
|
|
497
|
+
background: "#ffd740",
|
|
498
|
+
border: "#005a9c",
|
|
499
|
+
link: "#002b49"
|
|
500
|
+
},
|
|
501
|
+
"black-on-white": {
|
|
502
|
+
text: "#000000",
|
|
503
|
+
background: "#ffffff",
|
|
504
|
+
border: "#000000",
|
|
505
|
+
link: "#0000ee"
|
|
506
|
+
}
|
|
507
|
+
};
|
|
419
508
|
var palette = {
|
|
420
509
|
"yellow-on-black": ["#ffff00", "#000000"],
|
|
421
510
|
"white-on-black": ["#ffffff", "#000000"],
|
|
422
511
|
"blue-on-yellow": ["#005a9c", "#ffd740"],
|
|
423
|
-
"black-on-white": ["#000000", "#ffffff"]
|
|
512
|
+
"black-on-white": ["#000000", "#ffffff"],
|
|
513
|
+
light: ["#0f172a", "#ffffff"],
|
|
514
|
+
dark: ["#f8fafc", "#0f172a"],
|
|
515
|
+
high: ["#ffffff", "#000000"]
|
|
424
516
|
};
|
|
425
517
|
function composeFilter(values) {
|
|
518
|
+
if (isForcedColorsActive()) return "";
|
|
426
519
|
const contrast = values.contrast === "reduced" ? 0.5 : [1, 1.25, 1.5, 2][Number(values.contrast)] ?? 1;
|
|
520
|
+
const isInvert = Boolean(values.invertColors) || values.contrast === "invert" || values.contrastMode === "invert";
|
|
427
521
|
return [
|
|
428
522
|
contrast !== 1 && `contrast(${contrast})`,
|
|
429
523
|
values.saturation === 1 && "saturate(0.2)",
|
|
430
524
|
values.saturation === 2 && "saturate(2)",
|
|
431
|
-
|
|
525
|
+
isInvert && "invert(1)",
|
|
432
526
|
values.grayscale && "grayscale(1)"
|
|
433
527
|
].filter(Boolean).join(" ");
|
|
434
528
|
}
|
|
529
|
+
var CONTRAST_PROTECTED_SELECTOR = [
|
|
530
|
+
"img",
|
|
531
|
+
"picture",
|
|
532
|
+
"picture *",
|
|
533
|
+
"video",
|
|
534
|
+
"canvas",
|
|
535
|
+
"svg",
|
|
536
|
+
"svg *",
|
|
537
|
+
"[role='img']",
|
|
538
|
+
"[role='img'] *",
|
|
539
|
+
"[role='graphics-document']",
|
|
540
|
+
"[role='graphics-document'] *",
|
|
541
|
+
"[role='graphics-symbol']",
|
|
542
|
+
"[role='graphics-symbol'] *",
|
|
543
|
+
"[data-icon]",
|
|
544
|
+
"[data-icon] *",
|
|
545
|
+
'i[class*="icon"]',
|
|
546
|
+
'span[class*="icon"]',
|
|
547
|
+
'i[class*="fa-"]',
|
|
548
|
+
'span[class*="fa-"]',
|
|
549
|
+
'i[class*="material-symbols"]',
|
|
550
|
+
'span[class*="material-symbols"]',
|
|
551
|
+
'i[class*="lucide"]',
|
|
552
|
+
'span[class*="lucide"]',
|
|
553
|
+
'[aria-invalid="true"]',
|
|
554
|
+
'[aria-invalid="true"] *',
|
|
555
|
+
":invalid",
|
|
556
|
+
".is-invalid",
|
|
557
|
+
".invalid-feedback",
|
|
558
|
+
":disabled",
|
|
559
|
+
"[aria-disabled='true']",
|
|
560
|
+
"[disabled]",
|
|
561
|
+
"[data-arap-ignore]",
|
|
562
|
+
"[data-arap-ignore] *",
|
|
563
|
+
"[data-arap-exempt]",
|
|
564
|
+
"[data-arap-exempt] *",
|
|
565
|
+
"[data-arap-ui]",
|
|
566
|
+
"[data-arap-ui] *",
|
|
567
|
+
".arap-root",
|
|
568
|
+
".arap-root *"
|
|
569
|
+
].join(", ");
|
|
570
|
+
function isProtectedFromContrast(element) {
|
|
571
|
+
try {
|
|
572
|
+
if (element.matches(EXCLUDED)) return true;
|
|
573
|
+
if (element.matches(CONTRAST_PROTECTED_SELECTOR)) return true;
|
|
574
|
+
if (element.closest(
|
|
575
|
+
"svg, [role='img'], [data-icon], [aria-invalid='true'], :disabled, [aria-disabled='true'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
576
|
+
)) {
|
|
577
|
+
return true;
|
|
578
|
+
}
|
|
579
|
+
} catch {
|
|
580
|
+
return false;
|
|
581
|
+
}
|
|
582
|
+
return false;
|
|
583
|
+
}
|
|
435
584
|
var TEXT_SCALE_PROTECTED_SELECTOR = [
|
|
436
585
|
"input",
|
|
437
586
|
"textarea",
|
|
@@ -901,6 +1050,38 @@ function applyPage(values) {
|
|
|
901
1050
|
set(el, "font-family", targetStack);
|
|
902
1051
|
}
|
|
903
1052
|
}
|
|
1053
|
+
const isInvert = Boolean(values.invertColors) || values.contrast === "invert" || values.contrastMode === "invert";
|
|
1054
|
+
if (isInvert && !isForcedColorsActive()) {
|
|
1055
|
+
const mediaElements = Array.from(
|
|
1056
|
+
document.body.querySelectorAll(
|
|
1057
|
+
"img, video, canvas, picture, [role='img']"
|
|
1058
|
+
)
|
|
1059
|
+
).filter((el) => !el.closest("[data-arap-ui]"));
|
|
1060
|
+
for (const mediaEl of mediaElements) {
|
|
1061
|
+
set(mediaEl, "filter", "invert(1)");
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
const activeContrastKey = values.contrastMode && values.contrastMode !== "off" && values.contrastMode !== "original" ? String(values.contrastMode) : values.contrast !== void 0 && values.contrast !== 0 && values.contrast !== "0" && values.contrast !== "off" && values.contrast !== "original" ? String(values.contrast) : null;
|
|
1065
|
+
const activePalette = activeContrastKey && !isForcedColorsActive() ? CONTRAST_PALETTES[activeContrastKey] : null;
|
|
1066
|
+
if (activePalette) {
|
|
1067
|
+
for (const el of elements) {
|
|
1068
|
+
if (isProtectedFromContrast(el)) continue;
|
|
1069
|
+
set(el, "color", activePalette.text);
|
|
1070
|
+
if (el.matches("a[href]") && activePalette.link) {
|
|
1071
|
+
set(el, "color", activePalette.link);
|
|
1072
|
+
}
|
|
1073
|
+
if (el.matches(
|
|
1074
|
+
"main, section, article, div, p, h1, h2, h3, h4, h5, h6, ul, ol, li, table, thead, tbody, tr, th, td, button, input, select, textarea, form, blockquote, header, footer, aside, nav"
|
|
1075
|
+
)) {
|
|
1076
|
+
set(el, "background-color", activePalette.background);
|
|
1077
|
+
}
|
|
1078
|
+
if (activePalette.border && el.matches(
|
|
1079
|
+
"button, input, select, textarea, [role='button'], fieldset, hr, table, th, td"
|
|
1080
|
+
)) {
|
|
1081
|
+
set(el, "border-color", activePalette.border);
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
904
1085
|
for (const el of elements) {
|
|
905
1086
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
906
1087
|
if (values.hideImages) {
|
|
@@ -912,7 +1093,7 @@ function applyPage(values) {
|
|
|
912
1093
|
))
|
|
913
1094
|
set(el, "visibility", "hidden");
|
|
914
1095
|
const colors = palette[String(values.contrast)];
|
|
915
|
-
if (colors) {
|
|
1096
|
+
if (colors && !activePalette && !isForcedColorsActive()) {
|
|
916
1097
|
set(el, "color", colors[0]);
|
|
917
1098
|
set(el, "background-color", colors[1]);
|
|
918
1099
|
}
|
|
@@ -2096,6 +2277,10 @@ var drawings = {
|
|
|
2096
2277
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2097
2278
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2098
2279
|
] }),
|
|
2280
|
+
contrastMode: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2281
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2282
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2283
|
+
] }),
|
|
2099
2284
|
saturation: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2100
2285
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3c-2 4-7 8-7 12a7 7 0 0 0 14 0c0-4-5-8-7-12Z" }),
|
|
2101
2286
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 15a4 4 0 0 0 4 4" })
|
|
@@ -2673,11 +2858,16 @@ function ParagraphSpacingController({
|
|
|
2673
2858
|
}
|
|
2674
2859
|
|
|
2675
2860
|
// src/features/ContrastController.tsx
|
|
2861
|
+
var import_react11 = require("react");
|
|
2676
2862
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2677
2863
|
var FEATURE_KEY7 = "contrast";
|
|
2678
2864
|
var DEFAULT_VALUE7 = 0;
|
|
2679
2865
|
var LEVELS = [
|
|
2680
2866
|
{ label: "Off", value: 0 },
|
|
2867
|
+
{ label: "Light", value: "light" },
|
|
2868
|
+
{ label: "Dark", value: "dark" },
|
|
2869
|
+
{ label: "High Contrast", value: "high" },
|
|
2870
|
+
{ label: "Invert", value: "invert" },
|
|
2681
2871
|
{ label: "Reduced", value: "reduced" },
|
|
2682
2872
|
{ label: "Low", value: 1 },
|
|
2683
2873
|
{ label: "High", value: 2 },
|
|
@@ -2691,32 +2881,89 @@ function ContrastController() {
|
|
|
2691
2881
|
FEATURE_KEY7,
|
|
2692
2882
|
DEFAULT_VALUE7
|
|
2693
2883
|
);
|
|
2884
|
+
const forcedColors = (0, import_react11.useSyncExternalStore)(
|
|
2885
|
+
subscribeForcedColors,
|
|
2886
|
+
isForcedColorsActive,
|
|
2887
|
+
() => false
|
|
2888
|
+
);
|
|
2694
2889
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
2695
2890
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "arap-label", children: [
|
|
2696
2891
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
2697
2892
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Contrast" })
|
|
2698
2893
|
] }),
|
|
2699
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) =>
|
|
2700
|
-
"
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) => {
|
|
2895
|
+
const isActive = value === level.value || level.value === 0 && (value === "off" || value === "original");
|
|
2896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2897
|
+
"button",
|
|
2898
|
+
{
|
|
2899
|
+
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
2900
|
+
onClick: () => setValue(level.value),
|
|
2901
|
+
"aria-pressed": isActive,
|
|
2902
|
+
type: "button",
|
|
2903
|
+
children: [
|
|
2904
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2905
|
+
level.label
|
|
2906
|
+
]
|
|
2907
|
+
},
|
|
2908
|
+
String(level.value)
|
|
2909
|
+
);
|
|
2910
|
+
}) }),
|
|
2911
|
+
forcedColors && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
|
|
2713
2912
|
] });
|
|
2714
2913
|
}
|
|
2715
2914
|
|
|
2716
|
-
// src/features/
|
|
2915
|
+
// src/features/ContrastModeController.tsx
|
|
2916
|
+
var import_react12 = require("react");
|
|
2717
2917
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2718
|
-
var FEATURE_KEY8 = "
|
|
2719
|
-
var DEFAULT_VALUE8 =
|
|
2918
|
+
var FEATURE_KEY8 = "contrastMode";
|
|
2919
|
+
var DEFAULT_VALUE8 = "off";
|
|
2920
|
+
var OPTIONS = [
|
|
2921
|
+
{ label: "Original", value: "off" },
|
|
2922
|
+
{ label: "Light", value: "light" },
|
|
2923
|
+
{ label: "Dark", value: "dark" },
|
|
2924
|
+
{ label: "High", value: "high" },
|
|
2925
|
+
{ label: "Invert", value: "invert" }
|
|
2926
|
+
];
|
|
2927
|
+
function ContrastModeController() {
|
|
2928
|
+
const { value, setValue } = useAccessibility(
|
|
2929
|
+
FEATURE_KEY8,
|
|
2930
|
+
DEFAULT_VALUE8
|
|
2931
|
+
);
|
|
2932
|
+
const forcedColors = (0, import_react12.useSyncExternalStore)(
|
|
2933
|
+
subscribeForcedColors,
|
|
2934
|
+
isForcedColorsActive,
|
|
2935
|
+
() => false
|
|
2936
|
+
);
|
|
2937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast Mode", children: [
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "arap-label", children: [
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Contrast Mode" })
|
|
2941
|
+
] }),
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-segmented", children: OPTIONS.map((option) => {
|
|
2943
|
+
const isActive = value === option.value || option.value === "off" && (value === "original" || !value);
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2945
|
+
"button",
|
|
2946
|
+
{
|
|
2947
|
+
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
2948
|
+
onClick: () => setValue(option.value),
|
|
2949
|
+
"aria-pressed": isActive,
|
|
2950
|
+
type: "button",
|
|
2951
|
+
children: [
|
|
2952
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2953
|
+
option.label
|
|
2954
|
+
]
|
|
2955
|
+
},
|
|
2956
|
+
option.value
|
|
2957
|
+
);
|
|
2958
|
+
}) }),
|
|
2959
|
+
forcedColors && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
|
|
2960
|
+
] });
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
// src/features/SaturationController.tsx
|
|
2964
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2965
|
+
var FEATURE_KEY9 = "saturation";
|
|
2966
|
+
var DEFAULT_VALUE9 = 0;
|
|
2720
2967
|
var LEVELS2 = [
|
|
2721
2968
|
{ label: "Off", value: 0 },
|
|
2722
2969
|
{ label: "Low", value: 1 },
|
|
@@ -2724,15 +2971,15 @@ var LEVELS2 = [
|
|
|
2724
2971
|
];
|
|
2725
2972
|
function SaturationController() {
|
|
2726
2973
|
const { value, setValue } = useAccessibility(
|
|
2727
|
-
|
|
2728
|
-
|
|
2974
|
+
FEATURE_KEY9,
|
|
2975
|
+
DEFAULT_VALUE9
|
|
2729
2976
|
);
|
|
2730
|
-
return /* @__PURE__ */ (0,
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
2732
|
-
/* @__PURE__ */ (0,
|
|
2733
|
-
/* @__PURE__ */ (0,
|
|
2977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "arap-label", children: [
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
2980
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Saturation" })
|
|
2734
2981
|
] }),
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2736
2983
|
"button",
|
|
2737
2984
|
{
|
|
2738
2985
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -2740,7 +2987,7 @@ function SaturationController() {
|
|
|
2740
2987
|
"aria-pressed": value === level.value,
|
|
2741
2988
|
type: "button",
|
|
2742
2989
|
children: [
|
|
2743
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
2990
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2744
2991
|
level.label
|
|
2745
2992
|
]
|
|
2746
2993
|
},
|
|
@@ -2750,20 +2997,20 @@ function SaturationController() {
|
|
|
2750
2997
|
}
|
|
2751
2998
|
|
|
2752
2999
|
// src/features/InvertColorsController.tsx
|
|
2753
|
-
var
|
|
2754
|
-
var
|
|
2755
|
-
var
|
|
3000
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3001
|
+
var FEATURE_KEY10 = "invertColors";
|
|
3002
|
+
var DEFAULT_VALUE10 = false;
|
|
2756
3003
|
function InvertColorsController() {
|
|
2757
3004
|
const { value, setValue } = useAccessibility(
|
|
2758
|
-
|
|
2759
|
-
|
|
3005
|
+
FEATURE_KEY10,
|
|
3006
|
+
DEFAULT_VALUE10
|
|
2760
3007
|
);
|
|
2761
|
-
return /* @__PURE__ */ (0,
|
|
2762
|
-
/* @__PURE__ */ (0,
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2764
|
-
/* @__PURE__ */ (0,
|
|
3008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
3009
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
3010
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
3011
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Invert Colors" })
|
|
2765
3012
|
] }),
|
|
2766
|
-
/* @__PURE__ */ (0,
|
|
3013
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2767
3014
|
"button",
|
|
2768
3015
|
{
|
|
2769
3016
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2771,27 +3018,27 @@ function InvertColorsController() {
|
|
|
2771
3018
|
"aria-label": "Invert Colors",
|
|
2772
3019
|
"aria-pressed": value,
|
|
2773
3020
|
type: "button",
|
|
2774
|
-
children: /* @__PURE__ */ (0,
|
|
3021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2775
3022
|
}
|
|
2776
3023
|
)
|
|
2777
3024
|
] });
|
|
2778
3025
|
}
|
|
2779
3026
|
|
|
2780
3027
|
// src/features/GrayscaleController.tsx
|
|
2781
|
-
var
|
|
2782
|
-
var
|
|
2783
|
-
var
|
|
3028
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3029
|
+
var FEATURE_KEY11 = "grayscale";
|
|
3030
|
+
var DEFAULT_VALUE11 = false;
|
|
2784
3031
|
function GrayscaleController() {
|
|
2785
3032
|
const { value, setValue } = useAccessibility(
|
|
2786
|
-
|
|
2787
|
-
|
|
3033
|
+
FEATURE_KEY11,
|
|
3034
|
+
DEFAULT_VALUE11
|
|
2788
3035
|
);
|
|
2789
|
-
return /* @__PURE__ */ (0,
|
|
2790
|
-
/* @__PURE__ */ (0,
|
|
2791
|
-
/* @__PURE__ */ (0,
|
|
2792
|
-
/* @__PURE__ */ (0,
|
|
3036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
3037
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "arap-label", children: [
|
|
3038
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Grayscale" })
|
|
2793
3040
|
] }),
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
3041
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2795
3042
|
"button",
|
|
2796
3043
|
{
|
|
2797
3044
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2799,27 +3046,27 @@ function GrayscaleController() {
|
|
|
2799
3046
|
"aria-label": "Grayscale",
|
|
2800
3047
|
"aria-pressed": value,
|
|
2801
3048
|
type: "button",
|
|
2802
|
-
children: /* @__PURE__ */ (0,
|
|
3049
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2803
3050
|
}
|
|
2804
3051
|
)
|
|
2805
3052
|
] });
|
|
2806
3053
|
}
|
|
2807
3054
|
|
|
2808
3055
|
// src/features/LinkHighlightController.tsx
|
|
2809
|
-
var
|
|
2810
|
-
var
|
|
2811
|
-
var
|
|
3056
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3057
|
+
var FEATURE_KEY12 = "linkHighlight";
|
|
3058
|
+
var DEFAULT_VALUE12 = false;
|
|
2812
3059
|
function LinkHighlightController() {
|
|
2813
3060
|
const { value, setValue } = useAccessibility(
|
|
2814
|
-
|
|
2815
|
-
|
|
3061
|
+
FEATURE_KEY12,
|
|
3062
|
+
DEFAULT_VALUE12
|
|
2816
3063
|
);
|
|
2817
|
-
return /* @__PURE__ */ (0,
|
|
2818
|
-
/* @__PURE__ */ (0,
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
3064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "arap-label", children: [
|
|
3066
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
3067
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Link Highlight" })
|
|
2821
3068
|
] }),
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2823
3070
|
"button",
|
|
2824
3071
|
{
|
|
2825
3072
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2827,10 +3074,10 @@ function LinkHighlightController() {
|
|
|
2827
3074
|
"aria-label": "Link Highlight",
|
|
2828
3075
|
"aria-pressed": !!value,
|
|
2829
3076
|
type: "button",
|
|
2830
|
-
children: /* @__PURE__ */ (0,
|
|
3077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2831
3078
|
}
|
|
2832
3079
|
),
|
|
2833
|
-
/* @__PURE__ */ (0,
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2834
3081
|
"button",
|
|
2835
3082
|
{
|
|
2836
3083
|
type: "button",
|
|
@@ -2838,7 +3085,7 @@ function LinkHighlightController() {
|
|
|
2838
3085
|
"aria-pressed": value === mode,
|
|
2839
3086
|
onClick: () => setValue(mode),
|
|
2840
3087
|
children: [
|
|
2841
|
-
value === mode && /* @__PURE__ */ (0,
|
|
3088
|
+
value === mode && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2842
3089
|
mode.split("-").join(" ")
|
|
2843
3090
|
]
|
|
2844
3091
|
},
|
|
@@ -2848,21 +3095,21 @@ function LinkHighlightController() {
|
|
|
2848
3095
|
}
|
|
2849
3096
|
|
|
2850
3097
|
// src/features/TextAlignController.tsx
|
|
2851
|
-
var
|
|
2852
|
-
var
|
|
2853
|
-
var
|
|
2854
|
-
var
|
|
3098
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3099
|
+
var FEATURE_KEY13 = "textAlign";
|
|
3100
|
+
var DEFAULT_VALUE13 = "default";
|
|
3101
|
+
var OPTIONS2 = ["default", "left", "center", "right", "justify"];
|
|
2855
3102
|
function TextAlignController() {
|
|
2856
3103
|
const { value, setValue } = useAccessibility(
|
|
2857
|
-
|
|
2858
|
-
|
|
3104
|
+
FEATURE_KEY13,
|
|
3105
|
+
DEFAULT_VALUE13
|
|
2859
3106
|
);
|
|
2860
|
-
return /* @__PURE__ */ (0,
|
|
2861
|
-
/* @__PURE__ */ (0,
|
|
2862
|
-
/* @__PURE__ */ (0,
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
3107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
3108
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Text Alignment" })
|
|
2864
3111
|
] }),
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "arap-segmented", children: OPTIONS2.map((option) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2866
3113
|
"button",
|
|
2867
3114
|
{
|
|
2868
3115
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -2871,13 +3118,13 @@ function TextAlignController() {
|
|
|
2871
3118
|
type: "button",
|
|
2872
3119
|
style: { textTransform: "capitalize" },
|
|
2873
3120
|
children: [
|
|
2874
|
-
value === option && /* @__PURE__ */ (0,
|
|
3121
|
+
value === option && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2875
3122
|
option
|
|
2876
3123
|
]
|
|
2877
3124
|
},
|
|
2878
3125
|
option
|
|
2879
3126
|
)) }),
|
|
2880
|
-
value === "justify" && /* @__PURE__ */ (0,
|
|
3127
|
+
value === "justify" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2881
3128
|
"div",
|
|
2882
3129
|
{
|
|
2883
3130
|
className: "arap-notice arap-notice-warning",
|
|
@@ -2890,27 +3137,27 @@ function TextAlignController() {
|
|
|
2890
3137
|
}
|
|
2891
3138
|
|
|
2892
3139
|
// src/features/FontFamilyController.tsx
|
|
2893
|
-
var
|
|
2894
|
-
var
|
|
2895
|
-
var
|
|
2896
|
-
var
|
|
3140
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3141
|
+
var FEATURE_KEY14 = "fontFamily";
|
|
3142
|
+
var DEFAULT_VALUE14 = "default";
|
|
3143
|
+
var OPTIONS3 = [
|
|
2897
3144
|
{ label: "Default", value: "default" },
|
|
2898
3145
|
{ label: "Legible", value: "legible" },
|
|
2899
3146
|
{ label: "Dyslexia", value: "dyslexia-option" }
|
|
2900
3147
|
];
|
|
2901
3148
|
function FontFamilyController() {
|
|
2902
3149
|
const { value, setValue } = useAccessibility(
|
|
2903
|
-
|
|
2904
|
-
|
|
3150
|
+
FEATURE_KEY14,
|
|
3151
|
+
DEFAULT_VALUE14
|
|
2905
3152
|
);
|
|
2906
|
-
return /* @__PURE__ */ (0,
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2908
|
-
/* @__PURE__ */ (0,
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
3153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
3155
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
3156
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Font Family" })
|
|
2910
3157
|
] }),
|
|
2911
|
-
/* @__PURE__ */ (0,
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "arap-segmented", children: OPTIONS3.map((option) => {
|
|
2912
3159
|
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
2913
|
-
return /* @__PURE__ */ (0,
|
|
3160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2914
3161
|
"button",
|
|
2915
3162
|
{
|
|
2916
3163
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -2918,7 +3165,7 @@ function FontFamilyController() {
|
|
|
2918
3165
|
"aria-pressed": isActive,
|
|
2919
3166
|
type: "button",
|
|
2920
3167
|
children: [
|
|
2921
|
-
isActive && /* @__PURE__ */ (0,
|
|
3168
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2922
3169
|
option.label
|
|
2923
3170
|
]
|
|
2924
3171
|
},
|
|
@@ -2929,53 +3176,25 @@ function FontFamilyController() {
|
|
|
2929
3176
|
}
|
|
2930
3177
|
|
|
2931
3178
|
// src/features/HideImagesController.tsx
|
|
2932
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2933
|
-
var FEATURE_KEY14 = "hideImages";
|
|
2934
|
-
var DEFAULT_VALUE14 = false;
|
|
2935
|
-
function HideImagesController() {
|
|
2936
|
-
const { value, setValue } = useAccessibility(
|
|
2937
|
-
FEATURE_KEY14,
|
|
2938
|
-
DEFAULT_VALUE14
|
|
2939
|
-
);
|
|
2940
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2941
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
2942
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2943
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Hide Images" })
|
|
2944
|
-
] }),
|
|
2945
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2946
|
-
"button",
|
|
2947
|
-
{
|
|
2948
|
-
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2949
|
-
onClick: () => setValue(!value),
|
|
2950
|
-
"aria-label": "Hide Images",
|
|
2951
|
-
"aria-pressed": value,
|
|
2952
|
-
type: "button",
|
|
2953
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2954
|
-
}
|
|
2955
|
-
)
|
|
2956
|
-
] });
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
|
-
// src/features/HideVideosController.tsx
|
|
2960
3179
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2961
|
-
var FEATURE_KEY15 = "
|
|
3180
|
+
var FEATURE_KEY15 = "hideImages";
|
|
2962
3181
|
var DEFAULT_VALUE15 = false;
|
|
2963
|
-
function
|
|
3182
|
+
function HideImagesController() {
|
|
2964
3183
|
const { value, setValue } = useAccessibility(
|
|
2965
3184
|
FEATURE_KEY15,
|
|
2966
3185
|
DEFAULT_VALUE15
|
|
2967
3186
|
);
|
|
2968
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide
|
|
3187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2969
3188
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
2970
3189
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2971
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Hide
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Hide Images" })
|
|
2972
3191
|
] }),
|
|
2973
3192
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2974
3193
|
"button",
|
|
2975
3194
|
{
|
|
2976
3195
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2977
3196
|
onClick: () => setValue(!value),
|
|
2978
|
-
"aria-label": "Hide
|
|
3197
|
+
"aria-label": "Hide Images",
|
|
2979
3198
|
"aria-pressed": value,
|
|
2980
3199
|
type: "button",
|
|
2981
3200
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2984,26 +3203,26 @@ function HideVideosController() {
|
|
|
2984
3203
|
] });
|
|
2985
3204
|
}
|
|
2986
3205
|
|
|
2987
|
-
// src/features/
|
|
3206
|
+
// src/features/HideVideosController.tsx
|
|
2988
3207
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2989
|
-
var FEATURE_KEY16 = "
|
|
3208
|
+
var FEATURE_KEY16 = "hideVideos";
|
|
2990
3209
|
var DEFAULT_VALUE16 = false;
|
|
2991
|
-
function
|
|
3210
|
+
function HideVideosController() {
|
|
2992
3211
|
const { value, setValue } = useAccessibility(
|
|
2993
3212
|
FEATURE_KEY16,
|
|
2994
3213
|
DEFAULT_VALUE16
|
|
2995
3214
|
);
|
|
2996
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2997
3216
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
2998
3217
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
2999
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "
|
|
3218
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Hide Videos" })
|
|
3000
3219
|
] }),
|
|
3001
3220
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3002
3221
|
"button",
|
|
3003
3222
|
{
|
|
3004
3223
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3005
3224
|
onClick: () => setValue(!value),
|
|
3006
|
-
"aria-label": "
|
|
3225
|
+
"aria-label": "Hide Videos",
|
|
3007
3226
|
"aria-pressed": value,
|
|
3008
3227
|
type: "button",
|
|
3009
3228
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -3012,26 +3231,26 @@ function BigCursorController() {
|
|
|
3012
3231
|
] });
|
|
3013
3232
|
}
|
|
3014
3233
|
|
|
3015
|
-
// src/features/
|
|
3234
|
+
// src/features/BigCursorController.tsx
|
|
3016
3235
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3017
|
-
var FEATURE_KEY17 = "
|
|
3236
|
+
var FEATURE_KEY17 = "bigCursor";
|
|
3018
3237
|
var DEFAULT_VALUE17 = false;
|
|
3019
|
-
function
|
|
3238
|
+
function BigCursorController() {
|
|
3020
3239
|
const { value, setValue } = useAccessibility(
|
|
3021
3240
|
FEATURE_KEY17,
|
|
3022
3241
|
DEFAULT_VALUE17
|
|
3023
3242
|
);
|
|
3024
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
3243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3025
3244
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "arap-label", children: [
|
|
3026
3245
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3027
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Big Cursor" })
|
|
3028
3247
|
] }),
|
|
3029
3248
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3030
3249
|
"button",
|
|
3031
3250
|
{
|
|
3032
3251
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3033
3252
|
onClick: () => setValue(!value),
|
|
3034
|
-
"aria-label": "
|
|
3253
|
+
"aria-label": "Big Cursor",
|
|
3035
3254
|
"aria-pressed": value,
|
|
3036
3255
|
type: "button",
|
|
3037
3256
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -3040,26 +3259,26 @@ function ReadingMaskController() {
|
|
|
3040
3259
|
] });
|
|
3041
3260
|
}
|
|
3042
3261
|
|
|
3043
|
-
// src/features/
|
|
3262
|
+
// src/features/ReadingMaskController.tsx
|
|
3044
3263
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3045
|
-
var FEATURE_KEY18 = "
|
|
3264
|
+
var FEATURE_KEY18 = "readingMask";
|
|
3046
3265
|
var DEFAULT_VALUE18 = false;
|
|
3047
|
-
function
|
|
3266
|
+
function ReadingMaskController() {
|
|
3048
3267
|
const { value, setValue } = useAccessibility(
|
|
3049
3268
|
FEATURE_KEY18,
|
|
3050
3269
|
DEFAULT_VALUE18
|
|
3051
3270
|
);
|
|
3052
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
3053
3272
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3054
3273
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3055
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Reading
|
|
3274
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Reading Mask" })
|
|
3056
3275
|
] }),
|
|
3057
3276
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3058
3277
|
"button",
|
|
3059
3278
|
{
|
|
3060
3279
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3061
3280
|
onClick: () => setValue(!value),
|
|
3062
|
-
"aria-label": "Reading
|
|
3281
|
+
"aria-label": "Reading Mask",
|
|
3063
3282
|
"aria-pressed": value,
|
|
3064
3283
|
type: "button",
|
|
3065
3284
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -3068,29 +3287,57 @@ function ReadingGuideController() {
|
|
|
3068
3287
|
] });
|
|
3069
3288
|
}
|
|
3070
3289
|
|
|
3290
|
+
// src/features/ReadingGuideController.tsx
|
|
3291
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3292
|
+
var FEATURE_KEY19 = "readingGuide";
|
|
3293
|
+
var DEFAULT_VALUE19 = false;
|
|
3294
|
+
function ReadingGuideController() {
|
|
3295
|
+
const { value, setValue } = useAccessibility(
|
|
3296
|
+
FEATURE_KEY19,
|
|
3297
|
+
DEFAULT_VALUE19
|
|
3298
|
+
);
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "arap-label", children: [
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Reading Guide" })
|
|
3303
|
+
] }),
|
|
3304
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3305
|
+
"button",
|
|
3306
|
+
{
|
|
3307
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3308
|
+
onClick: () => setValue(!value),
|
|
3309
|
+
"aria-label": "Reading Guide",
|
|
3310
|
+
"aria-pressed": value,
|
|
3311
|
+
type: "button",
|
|
3312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3313
|
+
}
|
|
3314
|
+
)
|
|
3315
|
+
] });
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3071
3318
|
// src/features/ResetController.tsx
|
|
3072
3319
|
var import_react_dom2 = require("react-dom");
|
|
3073
|
-
var
|
|
3074
|
-
var
|
|
3320
|
+
var import_react13 = require("react");
|
|
3321
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3075
3322
|
function ResetController() {
|
|
3076
|
-
const ctx = (0,
|
|
3323
|
+
const ctx = (0, import_react13.useContext)(AccessibilityContext);
|
|
3077
3324
|
if (!ctx) {
|
|
3078
3325
|
throw new Error(
|
|
3079
3326
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3080
3327
|
);
|
|
3081
3328
|
}
|
|
3082
|
-
const actionHost = (0,
|
|
3329
|
+
const actionHost = (0, import_react13.useContext)(PanelActionsContext);
|
|
3083
3330
|
const { resetAll } = ctx;
|
|
3084
3331
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3085
|
-
const button = /* @__PURE__ */ (0,
|
|
3086
|
-
/* @__PURE__ */ (0,
|
|
3332
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FeatureIcon, { name: "reset" }),
|
|
3087
3334
|
strings.resetAll
|
|
3088
3335
|
] }) });
|
|
3089
3336
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
3090
3337
|
}
|
|
3091
3338
|
|
|
3092
3339
|
// src/core/controls/ToggleControl.tsx
|
|
3093
|
-
var
|
|
3340
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3094
3341
|
function ToggleControl({
|
|
3095
3342
|
id,
|
|
3096
3343
|
label,
|
|
@@ -3112,12 +3359,12 @@ function ToggleControl({
|
|
|
3112
3359
|
onChange(!checked);
|
|
3113
3360
|
}
|
|
3114
3361
|
};
|
|
3115
|
-
return /* @__PURE__ */ (0,
|
|
3362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3116
3363
|
"div",
|
|
3117
3364
|
{
|
|
3118
3365
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3119
3366
|
style,
|
|
3120
|
-
children: /* @__PURE__ */ (0,
|
|
3367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3121
3368
|
"button",
|
|
3122
3369
|
{
|
|
3123
3370
|
id,
|
|
@@ -3131,7 +3378,7 @@ function ToggleControl({
|
|
|
3131
3378
|
disabled: !isInteractive,
|
|
3132
3379
|
onClick: handleClick,
|
|
3133
3380
|
title: unavailableReason || description || toggleLabel,
|
|
3134
|
-
children: /* @__PURE__ */ (0,
|
|
3381
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3135
3382
|
"span",
|
|
3136
3383
|
{
|
|
3137
3384
|
className: "arap-toggle-knob",
|
|
@@ -3147,8 +3394,8 @@ function ToggleControl({
|
|
|
3147
3394
|
}
|
|
3148
3395
|
|
|
3149
3396
|
// src/core/controls/ChoiceControl.tsx
|
|
3150
|
-
var
|
|
3151
|
-
var
|
|
3397
|
+
var import_react14 = require("react");
|
|
3398
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3152
3399
|
function ChoiceControl({
|
|
3153
3400
|
id,
|
|
3154
3401
|
label,
|
|
@@ -3162,12 +3409,12 @@ function ChoiceControl({
|
|
|
3162
3409
|
style,
|
|
3163
3410
|
orientation = "horizontal"
|
|
3164
3411
|
}) {
|
|
3165
|
-
const containerRef = (0,
|
|
3166
|
-
const allOptions = (0,
|
|
3412
|
+
const containerRef = (0, import_react14.useRef)(null);
|
|
3413
|
+
const allOptions = (0, import_react14.useMemo)(
|
|
3167
3414
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
3168
3415
|
[groups, options]
|
|
3169
3416
|
);
|
|
3170
|
-
const handleKeyDown = (0,
|
|
3417
|
+
const handleKeyDown = (0, import_react14.useCallback)(
|
|
3171
3418
|
(e) => {
|
|
3172
3419
|
if (disabled || allOptions.length === 0) return;
|
|
3173
3420
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -3204,7 +3451,7 @@ function ChoiceControl({
|
|
|
3204
3451
|
const renderOptionButton = (opt) => {
|
|
3205
3452
|
const isSelected = value === opt.value;
|
|
3206
3453
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3207
|
-
return /* @__PURE__ */ (0,
|
|
3454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3208
3455
|
"button",
|
|
3209
3456
|
{
|
|
3210
3457
|
type: "button",
|
|
@@ -3218,15 +3465,15 @@ function ChoiceControl({
|
|
|
3218
3465
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3219
3466
|
title: opt.description,
|
|
3220
3467
|
children: [
|
|
3221
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3222
|
-
/* @__PURE__ */ (0,
|
|
3223
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3468
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: opt.label }),
|
|
3470
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3224
3471
|
]
|
|
3225
3472
|
},
|
|
3226
3473
|
String(opt.value)
|
|
3227
3474
|
);
|
|
3228
3475
|
};
|
|
3229
|
-
return /* @__PURE__ */ (0,
|
|
3476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3230
3477
|
"div",
|
|
3231
3478
|
{
|
|
3232
3479
|
ref: containerRef,
|
|
@@ -3237,15 +3484,15 @@ function ChoiceControl({
|
|
|
3237
3484
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3238
3485
|
style,
|
|
3239
3486
|
onKeyDown: handleKeyDown,
|
|
3240
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3487
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3241
3488
|
"div",
|
|
3242
3489
|
{
|
|
3243
3490
|
className: "arap-choice-group",
|
|
3244
3491
|
role: "group",
|
|
3245
3492
|
"aria-label": group.label,
|
|
3246
3493
|
children: [
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3249
3496
|
]
|
|
3250
3497
|
},
|
|
3251
3498
|
group.label
|
|
@@ -3255,7 +3502,7 @@ function ChoiceControl({
|
|
|
3255
3502
|
}
|
|
3256
3503
|
|
|
3257
3504
|
// src/core/controls/StepperControl.tsx
|
|
3258
|
-
var
|
|
3505
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3259
3506
|
function StepperControl({
|
|
3260
3507
|
id,
|
|
3261
3508
|
label,
|
|
@@ -3285,15 +3532,15 @@ function StepperControl({
|
|
|
3285
3532
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3286
3533
|
}
|
|
3287
3534
|
};
|
|
3288
|
-
return /* @__PURE__ */ (0,
|
|
3535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3289
3536
|
"div",
|
|
3290
3537
|
{
|
|
3291
3538
|
id,
|
|
3292
3539
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3293
3540
|
style,
|
|
3294
3541
|
children: [
|
|
3295
|
-
/* @__PURE__ */ (0,
|
|
3296
|
-
/* @__PURE__ */ (0,
|
|
3542
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-controls", children: [
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3297
3544
|
"button",
|
|
3298
3545
|
{
|
|
3299
3546
|
type: "button",
|
|
@@ -3304,8 +3551,8 @@ function StepperControl({
|
|
|
3304
3551
|
children: "\u2212"
|
|
3305
3552
|
}
|
|
3306
3553
|
),
|
|
3307
|
-
/* @__PURE__ */ (0,
|
|
3308
|
-
/* @__PURE__ */ (0,
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3309
3556
|
"button",
|
|
3310
3557
|
{
|
|
3311
3558
|
type: "button",
|
|
@@ -3317,7 +3564,7 @@ function StepperControl({
|
|
|
3317
3564
|
}
|
|
3318
3565
|
)
|
|
3319
3566
|
] }),
|
|
3320
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3567
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3321
3568
|
"input",
|
|
3322
3569
|
{
|
|
3323
3570
|
type: "range",
|
|
@@ -3341,7 +3588,7 @@ function StepperControl({
|
|
|
3341
3588
|
}
|
|
3342
3589
|
|
|
3343
3590
|
// src/core/controls/FeatureCard.tsx
|
|
3344
|
-
var
|
|
3591
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3345
3592
|
function FeatureCard({
|
|
3346
3593
|
id,
|
|
3347
3594
|
featureKey,
|
|
@@ -3360,7 +3607,7 @@ function FeatureCard({
|
|
|
3360
3607
|
largeControls = false
|
|
3361
3608
|
}) {
|
|
3362
3609
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
3363
|
-
return /* @__PURE__ */ (0,
|
|
3610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3364
3611
|
"div",
|
|
3365
3612
|
{
|
|
3366
3613
|
id,
|
|
@@ -3369,27 +3616,27 @@ function FeatureCard({
|
|
|
3369
3616
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3370
3617
|
style,
|
|
3371
3618
|
children: [
|
|
3372
|
-
/* @__PURE__ */ (0,
|
|
3373
|
-
/* @__PURE__ */ (0,
|
|
3374
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
3375
|
-
/* @__PURE__ */ (0,
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-card-header", children: [
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "arap-label", children: [
|
|
3621
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
3622
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-card-title", children: title })
|
|
3376
3623
|
] }),
|
|
3377
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3624
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
3378
3625
|
] }),
|
|
3379
|
-
description && /* @__PURE__ */ (0,
|
|
3380
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
3381
|
-
/* @__PURE__ */ (0,
|
|
3382
|
-
/* @__PURE__ */ (0,
|
|
3626
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
3627
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3628
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3629
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: errorMessage })
|
|
3383
3630
|
] }),
|
|
3384
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
3385
|
-
/* @__PURE__ */ (0,
|
|
3386
|
-
/* @__PURE__ */ (0,
|
|
3631
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3632
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3633
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: unavailableMessage })
|
|
3387
3634
|
] }),
|
|
3388
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
3389
|
-
/* @__PURE__ */ (0,
|
|
3390
|
-
/* @__PURE__ */ (0,
|
|
3391
|
-
/* @__PURE__ */ (0,
|
|
3392
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
3635
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3636
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3637
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-permission-content", children: [
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: permissionMessage }),
|
|
3639
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3393
3640
|
"button",
|
|
3394
3641
|
{
|
|
3395
3642
|
type: "button",
|
|
@@ -3400,14 +3647,14 @@ function FeatureCard({
|
|
|
3400
3647
|
)
|
|
3401
3648
|
] })
|
|
3402
3649
|
] }),
|
|
3403
|
-
/* @__PURE__ */ (0,
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-card-content", children })
|
|
3404
3651
|
]
|
|
3405
3652
|
}
|
|
3406
3653
|
);
|
|
3407
3654
|
}
|
|
3408
3655
|
|
|
3409
3656
|
// src/core/controls/FeatureStatusState.tsx
|
|
3410
|
-
var
|
|
3657
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3411
3658
|
function SearchCount({
|
|
3412
3659
|
totalCount,
|
|
3413
3660
|
matchedCount,
|
|
@@ -3416,7 +3663,7 @@ function SearchCount({
|
|
|
3416
3663
|
style
|
|
3417
3664
|
}) {
|
|
3418
3665
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
3419
|
-
return /* @__PURE__ */ (0,
|
|
3666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3420
3667
|
"div",
|
|
3421
3668
|
{
|
|
3422
3669
|
role: "status",
|
|
@@ -3436,17 +3683,17 @@ function EmptyState({
|
|
|
3436
3683
|
className = "",
|
|
3437
3684
|
style
|
|
3438
3685
|
}) {
|
|
3439
|
-
return /* @__PURE__ */ (0,
|
|
3686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3440
3687
|
"div",
|
|
3441
3688
|
{
|
|
3442
3689
|
role: "status",
|
|
3443
3690
|
className: `arap-empty-state ${className}`,
|
|
3444
3691
|
style,
|
|
3445
3692
|
children: [
|
|
3446
|
-
/* @__PURE__ */ (0,
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3448
|
-
/* @__PURE__ */ (0,
|
|
3449
|
-
onAction && /* @__PURE__ */ (0,
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
3695
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
3696
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
3450
3697
|
]
|
|
3451
3698
|
}
|
|
3452
3699
|
);
|
|
@@ -3459,18 +3706,18 @@ function ErrorState({
|
|
|
3459
3706
|
className = "",
|
|
3460
3707
|
style
|
|
3461
3708
|
}) {
|
|
3462
|
-
return /* @__PURE__ */ (0,
|
|
3709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3463
3710
|
"div",
|
|
3464
3711
|
{
|
|
3465
3712
|
role: "alert",
|
|
3466
3713
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
3467
3714
|
style,
|
|
3468
3715
|
children: [
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
3470
|
-
/* @__PURE__ */ (0,
|
|
3471
|
-
title && /* @__PURE__ */ (0,
|
|
3472
|
-
/* @__PURE__ */ (0,
|
|
3473
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3717
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-error-content", children: [
|
|
3718
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
3719
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "arap-error-message", children: message }),
|
|
3720
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
3474
3721
|
] })
|
|
3475
3722
|
]
|
|
3476
3723
|
}
|
|
@@ -3478,7 +3725,7 @@ function ErrorState({
|
|
|
3478
3725
|
}
|
|
3479
3726
|
|
|
3480
3727
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
3481
|
-
var
|
|
3728
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3482
3729
|
function ProfilePreviewCard({
|
|
3483
3730
|
profile,
|
|
3484
3731
|
isActive,
|
|
@@ -3528,7 +3775,7 @@ function ProfilePreviewCard({
|
|
|
3528
3775
|
if (val === null || val === void 0) return "Original";
|
|
3529
3776
|
return String(val);
|
|
3530
3777
|
};
|
|
3531
|
-
return /* @__PURE__ */ (0,
|
|
3778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3532
3779
|
"div",
|
|
3533
3780
|
{
|
|
3534
3781
|
role: "group",
|
|
@@ -3536,10 +3783,10 @@ function ProfilePreviewCard({
|
|
|
3536
3783
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3537
3784
|
style,
|
|
3538
3785
|
children: [
|
|
3539
|
-
/* @__PURE__ */ (0,
|
|
3540
|
-
/* @__PURE__ */ (0,
|
|
3541
|
-
/* @__PURE__ */ (0,
|
|
3542
|
-
isActive && /* @__PURE__ */ (0,
|
|
3786
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-profile-header", children: [
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3789
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3543
3790
|
"span",
|
|
3544
3791
|
{
|
|
3545
3792
|
className: "arap-profile-active-badge",
|
|
@@ -3548,14 +3795,14 @@ function ProfilePreviewCard({
|
|
|
3548
3795
|
}
|
|
3549
3796
|
)
|
|
3550
3797
|
] }),
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
3552
3799
|
] }),
|
|
3553
|
-
/* @__PURE__ */ (0,
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3555
|
-
/* @__PURE__ */ (0,
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
3556
3803
|
const val = profile.settings[key];
|
|
3557
|
-
return /* @__PURE__ */ (0,
|
|
3558
|
-
/* @__PURE__ */ (0,
|
|
3804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("strong", { children: [
|
|
3559
3806
|
formatKeyName(key),
|
|
3560
3807
|
":"
|
|
3561
3808
|
] }),
|
|
@@ -3564,7 +3811,7 @@ function ProfilePreviewCard({
|
|
|
3564
3811
|
] }, key);
|
|
3565
3812
|
}) })
|
|
3566
3813
|
] }),
|
|
3567
|
-
/* @__PURE__ */ (0,
|
|
3814
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3568
3815
|
"button",
|
|
3569
3816
|
{
|
|
3570
3817
|
type: "button",
|
|
@@ -3573,7 +3820,7 @@ function ProfilePreviewCard({
|
|
|
3573
3820
|
"aria-label": `Revert ${profile.label} profile`,
|
|
3574
3821
|
children: "Revert to custom settings"
|
|
3575
3822
|
}
|
|
3576
|
-
) : /* @__PURE__ */ (0,
|
|
3823
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3577
3824
|
"button",
|
|
3578
3825
|
{
|
|
3579
3826
|
type: "button",
|
|
@@ -3594,8 +3841,12 @@ function ProfilePreviewCard({
|
|
|
3594
3841
|
AccessibilityList,
|
|
3595
3842
|
AccessibilityPlugin,
|
|
3596
3843
|
BigCursorController,
|
|
3844
|
+
CONTRAST_MODES,
|
|
3845
|
+
CONTRAST_PALETTES,
|
|
3846
|
+
CONTRAST_PROTECTED_SELECTOR,
|
|
3597
3847
|
ChoiceControl,
|
|
3598
3848
|
ContrastController,
|
|
3849
|
+
ContrastModeController,
|
|
3599
3850
|
DEFAULT_PREFERENCES,
|
|
3600
3851
|
DYSLEXIA_FONT_STACK,
|
|
3601
3852
|
EmptyState,
|
|
@@ -3635,6 +3886,8 @@ function ProfilePreviewCard({
|
|
|
3635
3886
|
createInitialPreferencesState,
|
|
3636
3887
|
enLocale,
|
|
3637
3888
|
getScriptSpacingConstraints,
|
|
3889
|
+
isForcedColorsActive,
|
|
3890
|
+
isProtectedFromContrast,
|
|
3638
3891
|
isProtectedFromFontFamily,
|
|
3639
3892
|
isProtectedFromTextAlign,
|
|
3640
3893
|
isProtectedFromTextScale,
|