accessibility-plugin-react 2.3.2 → 2.4.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 +18 -17
- package/dist/index.d.mts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +398 -222
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +394 -222
- package/dist/index.mjs.map +1 -1
- package/docs/API.md +17 -14
- package/docs/BUILD_AND_RELEASE_PLAN.md +1 -1
- package/docs/FEATURES.md +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,10 +49,14 @@ __export(index_exports, {
|
|
|
49
49
|
SaturationController: () => SaturationController,
|
|
50
50
|
SearchCount: () => SearchCount,
|
|
51
51
|
StepperControl: () => StepperControl,
|
|
52
|
+
TEXT_SCALE_PROTECTED_SELECTOR: () => TEXT_SCALE_PROTECTED_SELECTOR,
|
|
53
|
+
TEXT_SCALE_STEPS: () => TEXT_SCALE_STEPS,
|
|
52
54
|
TextAlignController: () => TextAlignController,
|
|
55
|
+
TextScaleController: () => TextScaleController,
|
|
53
56
|
ToggleControl: () => ToggleControl,
|
|
54
57
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
55
58
|
enLocale: () => enLocale,
|
|
59
|
+
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
56
60
|
isRtlLocale: () => isRtlLocale,
|
|
57
61
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
58
62
|
normalizePreferences: () => normalizePreferences,
|
|
@@ -296,8 +300,11 @@ function createPreferenceStore(key, persist, storageMode) {
|
|
|
296
300
|
// src/core/featureSchema.ts
|
|
297
301
|
var numberIn = (min, max) => (v) => typeof v === "number" && Number.isFinite(v) && v >= min && v <= max;
|
|
298
302
|
var oneOf = (...values) => (v) => values.includes(v);
|
|
303
|
+
var TEXT_SCALE_STEPS = [1, 1.125, 1.25, 1.5, 2];
|
|
299
304
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
300
305
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
306
|
+
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
307
|
+
textScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
301
308
|
lineHeight: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
302
309
|
letterSpacing: { defaultValue: 0, validate: numberIn(0, 10) },
|
|
303
310
|
contrast: {
|
|
@@ -376,6 +383,60 @@ function composeFilter(values) {
|
|
|
376
383
|
values.grayscale && "grayscale(1)"
|
|
377
384
|
].filter(Boolean).join(" ");
|
|
378
385
|
}
|
|
386
|
+
var TEXT_SCALE_PROTECTED_SELECTOR = [
|
|
387
|
+
"input",
|
|
388
|
+
"textarea",
|
|
389
|
+
"select",
|
|
390
|
+
"select *",
|
|
391
|
+
"option",
|
|
392
|
+
"optgroup",
|
|
393
|
+
"button",
|
|
394
|
+
"button *",
|
|
395
|
+
"datalist",
|
|
396
|
+
"output",
|
|
397
|
+
"progress",
|
|
398
|
+
"meter",
|
|
399
|
+
"label",
|
|
400
|
+
"label *",
|
|
401
|
+
"legend",
|
|
402
|
+
"legend *",
|
|
403
|
+
"pre",
|
|
404
|
+
"pre *",
|
|
405
|
+
"code",
|
|
406
|
+
"kbd",
|
|
407
|
+
"samp",
|
|
408
|
+
"var",
|
|
409
|
+
"svg",
|
|
410
|
+
"svg *",
|
|
411
|
+
"[data-icon]",
|
|
412
|
+
"[data-icon] *",
|
|
413
|
+
'i[class*="icon"]',
|
|
414
|
+
'span[class*="icon"]',
|
|
415
|
+
'i[class*="fa-"]',
|
|
416
|
+
'span[class*="fa-"]',
|
|
417
|
+
'i[class*="material-symbols"]',
|
|
418
|
+
'span[class*="material-symbols"]',
|
|
419
|
+
'i[class*="lucide"]',
|
|
420
|
+
'span[class*="lucide"]',
|
|
421
|
+
"[data-arap-ignore]",
|
|
422
|
+
"[data-arap-ignore] *",
|
|
423
|
+
"[data-arap-exempt]",
|
|
424
|
+
"[data-arap-exempt] *"
|
|
425
|
+
].join(", ");
|
|
426
|
+
function isProtectedFromTextScale(element) {
|
|
427
|
+
try {
|
|
428
|
+
if (element.matches(EXCLUDED)) return true;
|
|
429
|
+
if (element.matches(TEXT_SCALE_PROTECTED_SELECTOR)) return true;
|
|
430
|
+
if (element.closest(
|
|
431
|
+
"pre, button, label, legend, select, [data-arap-ignore], [data-arap-exempt], [data-arap-ui]"
|
|
432
|
+
)) {
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
} catch {
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
379
440
|
function applyPage(values) {
|
|
380
441
|
const undo = [];
|
|
381
442
|
function set(element, property, value) {
|
|
@@ -394,9 +455,11 @@ function applyPage(values) {
|
|
|
394
455
|
document.body.querySelectorAll("*")
|
|
395
456
|
).filter((el) => el instanceof HTMLElement && !el.matches(EXCLUDED));
|
|
396
457
|
const elements = allElements.length > MAX_HOST_ELEMENTS ? allElements.slice(0, MAX_HOST_ELEMENTS) : allElements;
|
|
397
|
-
const
|
|
458
|
+
const fontScaleValue = typeof values.fontScale === "number" && values.fontScale !== 1 ? values.fontScale : typeof values.textScale === "number" && values.textScale !== 1 ? values.textScale : void 0;
|
|
459
|
+
const fontSizeScale = typeof values.fontSize === "number" && values.fontSize !== 100 ? values.fontSize / 100 : void 0;
|
|
460
|
+
const font = fontScaleValue ?? fontSizeScale ?? 1;
|
|
398
461
|
const line = Number(values.lineHeight ?? 100) / 100;
|
|
399
|
-
const measurements = font !== 1 || line !== 1 ? elements.map((el) => {
|
|
462
|
+
const measurements = font !== 1 || line !== 1 ? elements.filter((el) => !isProtectedFromTextScale(el)).map((el) => {
|
|
400
463
|
const computed = getComputedStyle(el);
|
|
401
464
|
return {
|
|
402
465
|
el,
|
|
@@ -1642,11 +1705,44 @@ var DEFAULT_VALUE = 100;
|
|
|
1642
1705
|
var MIN = 50;
|
|
1643
1706
|
var MAX = 200;
|
|
1644
1707
|
var STEP = 10;
|
|
1645
|
-
|
|
1708
|
+
var DEFAULT_STEP_SCALE = [100, 112.5, 125, 150, 200];
|
|
1709
|
+
function FontSizeController({
|
|
1710
|
+
steps: customSteps,
|
|
1711
|
+
stepScale
|
|
1712
|
+
} = {}) {
|
|
1646
1713
|
const { value, setValue } = useAccessibility(
|
|
1647
1714
|
FEATURE_KEY,
|
|
1648
1715
|
DEFAULT_VALUE
|
|
1649
1716
|
);
|
|
1717
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 1e3) / 10 : s) : stepScale ? DEFAULT_STEP_SCALE : null;
|
|
1718
|
+
const handleDecrease = () => {
|
|
1719
|
+
if (steps && steps.length > 0) {
|
|
1720
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
1721
|
+
if (idx > 0) {
|
|
1722
|
+
setValue(steps[idx - 1]);
|
|
1723
|
+
} else if (idx === -1) {
|
|
1724
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
1725
|
+
setValue(lower ?? steps[0]);
|
|
1726
|
+
}
|
|
1727
|
+
} else {
|
|
1728
|
+
setValue(Math.max(MIN, value - STEP));
|
|
1729
|
+
}
|
|
1730
|
+
};
|
|
1731
|
+
const handleIncrease = () => {
|
|
1732
|
+
if (steps && steps.length > 0) {
|
|
1733
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
1734
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
1735
|
+
setValue(steps[idx + 1]);
|
|
1736
|
+
} else if (idx === -1) {
|
|
1737
|
+
const higher = steps.find((s) => s > value);
|
|
1738
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
1739
|
+
}
|
|
1740
|
+
} else {
|
|
1741
|
+
setValue(Math.min(MAX, value + STEP));
|
|
1742
|
+
}
|
|
1743
|
+
};
|
|
1744
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= MIN;
|
|
1745
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= MAX;
|
|
1650
1746
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1651
1747
|
"div",
|
|
1652
1748
|
{
|
|
@@ -1663,23 +1759,23 @@ function FontSizeController() {
|
|
|
1663
1759
|
"button",
|
|
1664
1760
|
{
|
|
1665
1761
|
className: "arap-btn-sm",
|
|
1666
|
-
onClick:
|
|
1667
|
-
disabled:
|
|
1762
|
+
onClick: handleDecrease,
|
|
1763
|
+
disabled: isMin,
|
|
1668
1764
|
"aria-label": "Decrease font size",
|
|
1669
1765
|
type: "button",
|
|
1670
1766
|
children: "\u2212"
|
|
1671
1767
|
}
|
|
1672
1768
|
),
|
|
1673
1769
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1674
|
-
value,
|
|
1770
|
+
Math.round(value),
|
|
1675
1771
|
"%"
|
|
1676
1772
|
] }),
|
|
1677
1773
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1678
1774
|
"button",
|
|
1679
1775
|
{
|
|
1680
1776
|
className: "arap-btn-sm",
|
|
1681
|
-
onClick:
|
|
1682
|
-
disabled:
|
|
1777
|
+
onClick: handleIncrease,
|
|
1778
|
+
disabled: isMax,
|
|
1683
1779
|
"aria-label": "Increase font size",
|
|
1684
1780
|
type: "button",
|
|
1685
1781
|
children: "+"
|
|
@@ -1691,31 +1787,107 @@ function FontSizeController() {
|
|
|
1691
1787
|
);
|
|
1692
1788
|
}
|
|
1693
1789
|
|
|
1694
|
-
// src/features/
|
|
1790
|
+
// src/features/TextScaleController.tsx
|
|
1695
1791
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1696
|
-
var FEATURE_KEY2 = "
|
|
1697
|
-
var DEFAULT_VALUE2 =
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1792
|
+
var FEATURE_KEY2 = "fontScale";
|
|
1793
|
+
var DEFAULT_VALUE2 = 1;
|
|
1794
|
+
function TextScaleController({
|
|
1795
|
+
steps = TEXT_SCALE_STEPS,
|
|
1796
|
+
label = "Bigger Text"
|
|
1797
|
+
} = {}) {
|
|
1702
1798
|
const { value, setValue } = useAccessibility(
|
|
1703
1799
|
FEATURE_KEY2,
|
|
1704
1800
|
DEFAULT_VALUE2
|
|
1705
1801
|
);
|
|
1802
|
+
const currentIndex = steps.findIndex((s) => Math.abs(s - value) < 0.01);
|
|
1803
|
+
const isMin = currentIndex === 0 || value <= steps[0];
|
|
1804
|
+
const isMax = currentIndex === steps.length - 1 || value >= steps[steps.length - 1];
|
|
1805
|
+
const handleDecrease = () => {
|
|
1806
|
+
if (currentIndex > 0) {
|
|
1807
|
+
setValue(steps[currentIndex - 1]);
|
|
1808
|
+
} else if (currentIndex === -1) {
|
|
1809
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
1810
|
+
setValue(lower ?? steps[0]);
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
const handleIncrease = () => {
|
|
1814
|
+
if (currentIndex !== -1 && currentIndex < steps.length - 1) {
|
|
1815
|
+
setValue(steps[currentIndex + 1]);
|
|
1816
|
+
} else if (currentIndex === -1) {
|
|
1817
|
+
const higher = steps.find((s) => s > value);
|
|
1818
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
1821
|
+
const percentage = Math.round(value * 100);
|
|
1706
1822
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1707
1823
|
"div",
|
|
1708
1824
|
{
|
|
1709
1825
|
className: "arap-feature arap-feature-stepper",
|
|
1710
1826
|
role: "group",
|
|
1711
|
-
"aria-label":
|
|
1827
|
+
"aria-label": label,
|
|
1712
1828
|
children: [
|
|
1713
1829
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "arap-label", children: [
|
|
1714
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FeatureIcon, { name:
|
|
1715
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children:
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FeatureIcon, { name: "fontSize" }),
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label })
|
|
1716
1832
|
] }),
|
|
1717
1833
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "arap-controls", children: [
|
|
1718
1834
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1835
|
+
"button",
|
|
1836
|
+
{
|
|
1837
|
+
className: "arap-btn-sm",
|
|
1838
|
+
onClick: handleDecrease,
|
|
1839
|
+
disabled: isMin,
|
|
1840
|
+
"aria-label": "Decrease text size",
|
|
1841
|
+
type: "button",
|
|
1842
|
+
children: "\u2212"
|
|
1843
|
+
}
|
|
1844
|
+
),
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1846
|
+
percentage,
|
|
1847
|
+
"%"
|
|
1848
|
+
] }),
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1850
|
+
"button",
|
|
1851
|
+
{
|
|
1852
|
+
className: "arap-btn-sm",
|
|
1853
|
+
onClick: handleIncrease,
|
|
1854
|
+
disabled: isMax,
|
|
1855
|
+
"aria-label": "Increase text size",
|
|
1856
|
+
type: "button",
|
|
1857
|
+
children: "+"
|
|
1858
|
+
}
|
|
1859
|
+
)
|
|
1860
|
+
] })
|
|
1861
|
+
]
|
|
1862
|
+
}
|
|
1863
|
+
);
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
// src/features/LineHeightController.tsx
|
|
1867
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1868
|
+
var FEATURE_KEY3 = "lineHeight";
|
|
1869
|
+
var DEFAULT_VALUE3 = 100;
|
|
1870
|
+
var MIN2 = 50;
|
|
1871
|
+
var MAX2 = 200;
|
|
1872
|
+
var STEP2 = 10;
|
|
1873
|
+
function LineHeightController() {
|
|
1874
|
+
const { value, setValue } = useAccessibility(
|
|
1875
|
+
FEATURE_KEY3,
|
|
1876
|
+
DEFAULT_VALUE3
|
|
1877
|
+
);
|
|
1878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1879
|
+
"div",
|
|
1880
|
+
{
|
|
1881
|
+
className: "arap-feature arap-feature-stepper",
|
|
1882
|
+
role: "group",
|
|
1883
|
+
"aria-label": "Line Height",
|
|
1884
|
+
children: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "arap-label", children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureIcon, { name: FEATURE_KEY3 }),
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Line Height" })
|
|
1888
|
+
] }),
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "arap-controls", children: [
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1719
1891
|
"button",
|
|
1720
1892
|
{
|
|
1721
1893
|
className: "arap-btn-sm",
|
|
@@ -1726,11 +1898,11 @@ function LineHeightController() {
|
|
|
1726
1898
|
children: "\u2212"
|
|
1727
1899
|
}
|
|
1728
1900
|
),
|
|
1729
|
-
/* @__PURE__ */ (0,
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1730
1902
|
value,
|
|
1731
1903
|
"%"
|
|
1732
1904
|
] }),
|
|
1733
|
-
/* @__PURE__ */ (0,
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1734
1906
|
"button",
|
|
1735
1907
|
{
|
|
1736
1908
|
className: "arap-btn-sm",
|
|
@@ -1748,30 +1920,30 @@ function LineHeightController() {
|
|
|
1748
1920
|
}
|
|
1749
1921
|
|
|
1750
1922
|
// src/features/LetterSpacingController.tsx
|
|
1751
|
-
var
|
|
1752
|
-
var
|
|
1753
|
-
var
|
|
1923
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1924
|
+
var FEATURE_KEY4 = "letterSpacing";
|
|
1925
|
+
var DEFAULT_VALUE4 = 0;
|
|
1754
1926
|
var MIN3 = 0;
|
|
1755
1927
|
var MAX3 = 10;
|
|
1756
1928
|
var STEP3 = 1;
|
|
1757
1929
|
function LetterSpacingController() {
|
|
1758
1930
|
const { value, setValue } = useAccessibility(
|
|
1759
|
-
|
|
1760
|
-
|
|
1931
|
+
FEATURE_KEY4,
|
|
1932
|
+
DEFAULT_VALUE4
|
|
1761
1933
|
);
|
|
1762
|
-
return /* @__PURE__ */ (0,
|
|
1934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1763
1935
|
"div",
|
|
1764
1936
|
{
|
|
1765
1937
|
className: "arap-feature arap-feature-stepper",
|
|
1766
1938
|
role: "group",
|
|
1767
1939
|
"aria-label": "Letter Spacing",
|
|
1768
1940
|
children: [
|
|
1769
|
-
/* @__PURE__ */ (0,
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "arap-label", children: [
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FeatureIcon, { name: FEATURE_KEY4 }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Letter Spacing" })
|
|
1772
1944
|
] }),
|
|
1773
|
-
/* @__PURE__ */ (0,
|
|
1774
|
-
/* @__PURE__ */ (0,
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "arap-controls", children: [
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1775
1947
|
"button",
|
|
1776
1948
|
{
|
|
1777
1949
|
className: "arap-btn-sm",
|
|
@@ -1782,11 +1954,11 @@ function LetterSpacingController() {
|
|
|
1782
1954
|
children: "\u2212"
|
|
1783
1955
|
}
|
|
1784
1956
|
),
|
|
1785
|
-
/* @__PURE__ */ (0,
|
|
1957
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1786
1958
|
value,
|
|
1787
1959
|
"px"
|
|
1788
1960
|
] }),
|
|
1789
|
-
/* @__PURE__ */ (0,
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1790
1962
|
"button",
|
|
1791
1963
|
{
|
|
1792
1964
|
className: "arap-btn-sm",
|
|
@@ -1804,9 +1976,9 @@ function LetterSpacingController() {
|
|
|
1804
1976
|
}
|
|
1805
1977
|
|
|
1806
1978
|
// src/features/ContrastController.tsx
|
|
1807
|
-
var
|
|
1808
|
-
var
|
|
1809
|
-
var
|
|
1979
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1980
|
+
var FEATURE_KEY5 = "contrast";
|
|
1981
|
+
var DEFAULT_VALUE5 = 0;
|
|
1810
1982
|
var LEVELS = [
|
|
1811
1983
|
{ label: "Off", value: 0 },
|
|
1812
1984
|
{ label: "Reduced", value: "reduced" },
|
|
@@ -1819,15 +1991,15 @@ var LEVELS = [
|
|
|
1819
1991
|
];
|
|
1820
1992
|
function ContrastController() {
|
|
1821
1993
|
const { value, setValue } = useAccessibility(
|
|
1822
|
-
|
|
1823
|
-
|
|
1994
|
+
FEATURE_KEY5,
|
|
1995
|
+
DEFAULT_VALUE5
|
|
1824
1996
|
);
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
-
/* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
1998
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "arap-label", children: [
|
|
1999
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2000
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Contrast" })
|
|
1829
2001
|
] }),
|
|
1830
|
-
/* @__PURE__ */ (0,
|
|
2002
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1831
2003
|
"button",
|
|
1832
2004
|
{
|
|
1833
2005
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1835,7 +2007,7 @@ function ContrastController() {
|
|
|
1835
2007
|
"aria-pressed": value === level.value,
|
|
1836
2008
|
type: "button",
|
|
1837
2009
|
children: [
|
|
1838
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
2010
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1839
2011
|
level.label
|
|
1840
2012
|
]
|
|
1841
2013
|
},
|
|
@@ -1845,9 +2017,9 @@ function ContrastController() {
|
|
|
1845
2017
|
}
|
|
1846
2018
|
|
|
1847
2019
|
// src/features/SaturationController.tsx
|
|
1848
|
-
var
|
|
1849
|
-
var
|
|
1850
|
-
var
|
|
2020
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2021
|
+
var FEATURE_KEY6 = "saturation";
|
|
2022
|
+
var DEFAULT_VALUE6 = 0;
|
|
1851
2023
|
var LEVELS2 = [
|
|
1852
2024
|
{ label: "Off", value: 0 },
|
|
1853
2025
|
{ label: "Low", value: 1 },
|
|
@@ -1855,15 +2027,15 @@ var LEVELS2 = [
|
|
|
1855
2027
|
];
|
|
1856
2028
|
function SaturationController() {
|
|
1857
2029
|
const { value, setValue } = useAccessibility(
|
|
1858
|
-
|
|
1859
|
-
|
|
2030
|
+
FEATURE_KEY6,
|
|
2031
|
+
DEFAULT_VALUE6
|
|
1860
2032
|
);
|
|
1861
|
-
return /* @__PURE__ */ (0,
|
|
1862
|
-
/* @__PURE__ */ (0,
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
1864
|
-
/* @__PURE__ */ (0,
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2034
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "arap-label", children: [
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Saturation" })
|
|
1865
2037
|
] }),
|
|
1866
|
-
/* @__PURE__ */ (0,
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1867
2039
|
"button",
|
|
1868
2040
|
{
|
|
1869
2041
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1871,7 +2043,7 @@ function SaturationController() {
|
|
|
1871
2043
|
"aria-pressed": value === level.value,
|
|
1872
2044
|
type: "button",
|
|
1873
2045
|
children: [
|
|
1874
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
2046
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1875
2047
|
level.label
|
|
1876
2048
|
]
|
|
1877
2049
|
},
|
|
@@ -1881,20 +2053,20 @@ function SaturationController() {
|
|
|
1881
2053
|
}
|
|
1882
2054
|
|
|
1883
2055
|
// src/features/InvertColorsController.tsx
|
|
1884
|
-
var
|
|
1885
|
-
var
|
|
1886
|
-
var
|
|
2056
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2057
|
+
var FEATURE_KEY7 = "invertColors";
|
|
2058
|
+
var DEFAULT_VALUE7 = false;
|
|
1887
2059
|
function InvertColorsController() {
|
|
1888
2060
|
const { value, setValue } = useAccessibility(
|
|
1889
|
-
|
|
1890
|
-
|
|
2061
|
+
FEATURE_KEY7,
|
|
2062
|
+
DEFAULT_VALUE7
|
|
1891
2063
|
);
|
|
1892
|
-
return /* @__PURE__ */ (0,
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1895
|
-
/* @__PURE__ */ (0,
|
|
2064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "arap-label", children: [
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Invert Colors" })
|
|
1896
2068
|
] }),
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1898
2070
|
"button",
|
|
1899
2071
|
{
|
|
1900
2072
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1902,27 +2074,27 @@ function InvertColorsController() {
|
|
|
1902
2074
|
"aria-label": "Invert Colors",
|
|
1903
2075
|
"aria-pressed": value,
|
|
1904
2076
|
type: "button",
|
|
1905
|
-
children: /* @__PURE__ */ (0,
|
|
2077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1906
2078
|
}
|
|
1907
2079
|
)
|
|
1908
2080
|
] });
|
|
1909
2081
|
}
|
|
1910
2082
|
|
|
1911
2083
|
// src/features/GrayscaleController.tsx
|
|
1912
|
-
var
|
|
1913
|
-
var
|
|
1914
|
-
var
|
|
2084
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2085
|
+
var FEATURE_KEY8 = "grayscale";
|
|
2086
|
+
var DEFAULT_VALUE8 = false;
|
|
1915
2087
|
function GrayscaleController() {
|
|
1916
2088
|
const { value, setValue } = useAccessibility(
|
|
1917
|
-
|
|
1918
|
-
|
|
2089
|
+
FEATURE_KEY8,
|
|
2090
|
+
DEFAULT_VALUE8
|
|
1919
2091
|
);
|
|
1920
|
-
return /* @__PURE__ */ (0,
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1922
|
-
/* @__PURE__ */ (0,
|
|
1923
|
-
/* @__PURE__ */ (0,
|
|
2092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "arap-label", children: [
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Grayscale" })
|
|
1924
2096
|
] }),
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
2097
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1926
2098
|
"button",
|
|
1927
2099
|
{
|
|
1928
2100
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1930,27 +2102,27 @@ function GrayscaleController() {
|
|
|
1930
2102
|
"aria-label": "Grayscale",
|
|
1931
2103
|
"aria-pressed": value,
|
|
1932
2104
|
type: "button",
|
|
1933
|
-
children: /* @__PURE__ */ (0,
|
|
2105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1934
2106
|
}
|
|
1935
2107
|
)
|
|
1936
2108
|
] });
|
|
1937
2109
|
}
|
|
1938
2110
|
|
|
1939
2111
|
// src/features/LinkHighlightController.tsx
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
1942
|
-
var
|
|
2112
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2113
|
+
var FEATURE_KEY9 = "linkHighlight";
|
|
2114
|
+
var DEFAULT_VALUE9 = false;
|
|
1943
2115
|
function LinkHighlightController() {
|
|
1944
2116
|
const { value, setValue } = useAccessibility(
|
|
1945
|
-
|
|
1946
|
-
|
|
2117
|
+
FEATURE_KEY9,
|
|
2118
|
+
DEFAULT_VALUE9
|
|
1947
2119
|
);
|
|
1948
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "arap-label", children: [
|
|
2122
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Link Highlight" })
|
|
1952
2124
|
] }),
|
|
1953
|
-
/* @__PURE__ */ (0,
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1954
2126
|
"button",
|
|
1955
2127
|
{
|
|
1956
2128
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1958,10 +2130,10 @@ function LinkHighlightController() {
|
|
|
1958
2130
|
"aria-label": "Link Highlight",
|
|
1959
2131
|
"aria-pressed": !!value,
|
|
1960
2132
|
type: "button",
|
|
1961
|
-
children: /* @__PURE__ */ (0,
|
|
2133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1962
2134
|
}
|
|
1963
2135
|
),
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1965
2137
|
"button",
|
|
1966
2138
|
{
|
|
1967
2139
|
type: "button",
|
|
@@ -1969,7 +2141,7 @@ function LinkHighlightController() {
|
|
|
1969
2141
|
"aria-pressed": value === mode,
|
|
1970
2142
|
onClick: () => setValue(mode),
|
|
1971
2143
|
children: [
|
|
1972
|
-
value === mode && /* @__PURE__ */ (0,
|
|
2144
|
+
value === mode && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1973
2145
|
mode.split("-").join(" ")
|
|
1974
2146
|
]
|
|
1975
2147
|
},
|
|
@@ -1979,21 +2151,21 @@ function LinkHighlightController() {
|
|
|
1979
2151
|
}
|
|
1980
2152
|
|
|
1981
2153
|
// src/features/TextAlignController.tsx
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
2154
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2155
|
+
var FEATURE_KEY10 = "textAlign";
|
|
2156
|
+
var DEFAULT_VALUE10 = "default";
|
|
1985
2157
|
var OPTIONS = ["default", "left", "center", "right", "justify"];
|
|
1986
2158
|
function TextAlignController() {
|
|
1987
2159
|
const { value, setValue } = useAccessibility(
|
|
1988
|
-
|
|
1989
|
-
|
|
2160
|
+
FEATURE_KEY10,
|
|
2161
|
+
DEFAULT_VALUE10
|
|
1990
2162
|
);
|
|
1991
|
-
return /* @__PURE__ */ (0,
|
|
1992
|
-
/* @__PURE__ */ (0,
|
|
1993
|
-
/* @__PURE__ */ (0,
|
|
1994
|
-
/* @__PURE__ */ (0,
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
2164
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
2165
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
2166
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Text Alignment" })
|
|
1995
2167
|
] }),
|
|
1996
|
-
/* @__PURE__ */ (0,
|
|
2168
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1997
2169
|
"button",
|
|
1998
2170
|
{
|
|
1999
2171
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -2002,7 +2174,7 @@ function TextAlignController() {
|
|
|
2002
2174
|
type: "button",
|
|
2003
2175
|
style: { textTransform: "capitalize" },
|
|
2004
2176
|
children: [
|
|
2005
|
-
value === option && /* @__PURE__ */ (0,
|
|
2177
|
+
value === option && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2006
2178
|
option
|
|
2007
2179
|
]
|
|
2008
2180
|
},
|
|
@@ -2012,53 +2184,25 @@ function TextAlignController() {
|
|
|
2012
2184
|
}
|
|
2013
2185
|
|
|
2014
2186
|
// src/features/HideImagesController.tsx
|
|
2015
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2016
|
-
var FEATURE_KEY10 = "hideImages";
|
|
2017
|
-
var DEFAULT_VALUE10 = false;
|
|
2018
|
-
function HideImagesController() {
|
|
2019
|
-
const { value, setValue } = useAccessibility(
|
|
2020
|
-
FEATURE_KEY10,
|
|
2021
|
-
DEFAULT_VALUE10
|
|
2022
|
-
);
|
|
2023
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2024
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
2025
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
2026
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Hide Images" })
|
|
2027
|
-
] }),
|
|
2028
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2029
|
-
"button",
|
|
2030
|
-
{
|
|
2031
|
-
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2032
|
-
onClick: () => setValue(!value),
|
|
2033
|
-
"aria-label": "Hide Images",
|
|
2034
|
-
"aria-pressed": value,
|
|
2035
|
-
type: "button",
|
|
2036
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2037
|
-
}
|
|
2038
|
-
)
|
|
2039
|
-
] });
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
// src/features/HideVideosController.tsx
|
|
2043
2187
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2044
|
-
var FEATURE_KEY11 = "
|
|
2188
|
+
var FEATURE_KEY11 = "hideImages";
|
|
2045
2189
|
var DEFAULT_VALUE11 = false;
|
|
2046
|
-
function
|
|
2190
|
+
function HideImagesController() {
|
|
2047
2191
|
const { value, setValue } = useAccessibility(
|
|
2048
2192
|
FEATURE_KEY11,
|
|
2049
2193
|
DEFAULT_VALUE11
|
|
2050
2194
|
);
|
|
2051
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide
|
|
2195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2052
2196
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "arap-label", children: [
|
|
2053
2197
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
2054
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Hide
|
|
2198
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Hide Images" })
|
|
2055
2199
|
] }),
|
|
2056
2200
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2057
2201
|
"button",
|
|
2058
2202
|
{
|
|
2059
2203
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2060
2204
|
onClick: () => setValue(!value),
|
|
2061
|
-
"aria-label": "Hide
|
|
2205
|
+
"aria-label": "Hide Images",
|
|
2062
2206
|
"aria-pressed": value,
|
|
2063
2207
|
type: "button",
|
|
2064
2208
|
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2067,26 +2211,26 @@ function HideVideosController() {
|
|
|
2067
2211
|
] });
|
|
2068
2212
|
}
|
|
2069
2213
|
|
|
2070
|
-
// src/features/
|
|
2214
|
+
// src/features/HideVideosController.tsx
|
|
2071
2215
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2072
|
-
var FEATURE_KEY12 = "
|
|
2216
|
+
var FEATURE_KEY12 = "hideVideos";
|
|
2073
2217
|
var DEFAULT_VALUE12 = false;
|
|
2074
|
-
function
|
|
2218
|
+
function HideVideosController() {
|
|
2075
2219
|
const { value, setValue } = useAccessibility(
|
|
2076
2220
|
FEATURE_KEY12,
|
|
2077
2221
|
DEFAULT_VALUE12
|
|
2078
2222
|
);
|
|
2079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
2223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2080
2224
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "arap-label", children: [
|
|
2081
2225
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
2082
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "
|
|
2226
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Hide Videos" })
|
|
2083
2227
|
] }),
|
|
2084
2228
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2085
2229
|
"button",
|
|
2086
2230
|
{
|
|
2087
2231
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2088
2232
|
onClick: () => setValue(!value),
|
|
2089
|
-
"aria-label": "
|
|
2233
|
+
"aria-label": "Hide Videos",
|
|
2090
2234
|
"aria-pressed": value,
|
|
2091
2235
|
type: "button",
|
|
2092
2236
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2095,26 +2239,26 @@ function BigCursorController() {
|
|
|
2095
2239
|
] });
|
|
2096
2240
|
}
|
|
2097
2241
|
|
|
2098
|
-
// src/features/
|
|
2242
|
+
// src/features/BigCursorController.tsx
|
|
2099
2243
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2100
|
-
var FEATURE_KEY13 = "
|
|
2244
|
+
var FEATURE_KEY13 = "bigCursor";
|
|
2101
2245
|
var DEFAULT_VALUE13 = false;
|
|
2102
|
-
function
|
|
2246
|
+
function BigCursorController() {
|
|
2103
2247
|
const { value, setValue } = useAccessibility(
|
|
2104
2248
|
FEATURE_KEY13,
|
|
2105
2249
|
DEFAULT_VALUE13
|
|
2106
2250
|
);
|
|
2107
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
2251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
2108
2252
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
2109
2253
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
2110
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "
|
|
2254
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Big Cursor" })
|
|
2111
2255
|
] }),
|
|
2112
2256
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2113
2257
|
"button",
|
|
2114
2258
|
{
|
|
2115
2259
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2116
2260
|
onClick: () => setValue(!value),
|
|
2117
|
-
"aria-label": "
|
|
2261
|
+
"aria-label": "Big Cursor",
|
|
2118
2262
|
"aria-pressed": value,
|
|
2119
2263
|
type: "button",
|
|
2120
2264
|
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2123,26 +2267,26 @@ function ReadingMaskController() {
|
|
|
2123
2267
|
] });
|
|
2124
2268
|
}
|
|
2125
2269
|
|
|
2126
|
-
// src/features/
|
|
2270
|
+
// src/features/ReadingMaskController.tsx
|
|
2127
2271
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2128
|
-
var FEATURE_KEY14 = "
|
|
2272
|
+
var FEATURE_KEY14 = "readingMask";
|
|
2129
2273
|
var DEFAULT_VALUE14 = false;
|
|
2130
|
-
function
|
|
2274
|
+
function ReadingMaskController() {
|
|
2131
2275
|
const { value, setValue } = useAccessibility(
|
|
2132
2276
|
FEATURE_KEY14,
|
|
2133
2277
|
DEFAULT_VALUE14
|
|
2134
2278
|
);
|
|
2135
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading
|
|
2279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
2136
2280
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
2137
2281
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2138
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Reading
|
|
2282
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Reading Mask" })
|
|
2139
2283
|
] }),
|
|
2140
2284
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2141
2285
|
"button",
|
|
2142
2286
|
{
|
|
2143
2287
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2144
2288
|
onClick: () => setValue(!value),
|
|
2145
|
-
"aria-label": "Reading
|
|
2289
|
+
"aria-label": "Reading Mask",
|
|
2146
2290
|
"aria-pressed": value,
|
|
2147
2291
|
type: "button",
|
|
2148
2292
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2151,10 +2295,38 @@ function ReadingGuideController() {
|
|
|
2151
2295
|
] });
|
|
2152
2296
|
}
|
|
2153
2297
|
|
|
2298
|
+
// src/features/ReadingGuideController.tsx
|
|
2299
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2300
|
+
var FEATURE_KEY15 = "readingGuide";
|
|
2301
|
+
var DEFAULT_VALUE15 = false;
|
|
2302
|
+
function ReadingGuideController() {
|
|
2303
|
+
const { value, setValue } = useAccessibility(
|
|
2304
|
+
FEATURE_KEY15,
|
|
2305
|
+
DEFAULT_VALUE15
|
|
2306
|
+
);
|
|
2307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
2309
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Reading Guide" })
|
|
2311
|
+
] }),
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2313
|
+
"button",
|
|
2314
|
+
{
|
|
2315
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2316
|
+
onClick: () => setValue(!value),
|
|
2317
|
+
"aria-label": "Reading Guide",
|
|
2318
|
+
"aria-pressed": value,
|
|
2319
|
+
type: "button",
|
|
2320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2321
|
+
}
|
|
2322
|
+
)
|
|
2323
|
+
] });
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2154
2326
|
// src/features/ResetController.tsx
|
|
2155
2327
|
var import_react_dom2 = require("react-dom");
|
|
2156
2328
|
var import_react11 = require("react");
|
|
2157
|
-
var
|
|
2329
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2158
2330
|
function ResetController() {
|
|
2159
2331
|
const ctx = (0, import_react11.useContext)(AccessibilityContext);
|
|
2160
2332
|
if (!ctx) {
|
|
@@ -2165,15 +2337,15 @@ function ResetController() {
|
|
|
2165
2337
|
const actionHost = (0, import_react11.useContext)(PanelActionsContext);
|
|
2166
2338
|
const { resetAll } = ctx;
|
|
2167
2339
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
2168
|
-
const button = /* @__PURE__ */ (0,
|
|
2169
|
-
/* @__PURE__ */ (0,
|
|
2340
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: "reset" }),
|
|
2170
2342
|
strings.resetAll
|
|
2171
2343
|
] }) });
|
|
2172
2344
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
2173
2345
|
}
|
|
2174
2346
|
|
|
2175
2347
|
// src/core/controls/ToggleControl.tsx
|
|
2176
|
-
var
|
|
2348
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2177
2349
|
function ToggleControl({
|
|
2178
2350
|
id,
|
|
2179
2351
|
label,
|
|
@@ -2195,12 +2367,12 @@ function ToggleControl({
|
|
|
2195
2367
|
onChange(!checked);
|
|
2196
2368
|
}
|
|
2197
2369
|
};
|
|
2198
|
-
return /* @__PURE__ */ (0,
|
|
2370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2199
2371
|
"div",
|
|
2200
2372
|
{
|
|
2201
2373
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2202
2374
|
style,
|
|
2203
|
-
children: /* @__PURE__ */ (0,
|
|
2375
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2204
2376
|
"button",
|
|
2205
2377
|
{
|
|
2206
2378
|
id,
|
|
@@ -2214,7 +2386,7 @@ function ToggleControl({
|
|
|
2214
2386
|
disabled: !isInteractive,
|
|
2215
2387
|
onClick: handleClick,
|
|
2216
2388
|
title: unavailableReason || description || toggleLabel,
|
|
2217
|
-
children: /* @__PURE__ */ (0,
|
|
2389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2218
2390
|
"span",
|
|
2219
2391
|
{
|
|
2220
2392
|
className: "arap-toggle-knob",
|
|
@@ -2231,7 +2403,7 @@ function ToggleControl({
|
|
|
2231
2403
|
|
|
2232
2404
|
// src/core/controls/ChoiceControl.tsx
|
|
2233
2405
|
var import_react12 = require("react");
|
|
2234
|
-
var
|
|
2406
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2235
2407
|
function ChoiceControl({
|
|
2236
2408
|
id,
|
|
2237
2409
|
label,
|
|
@@ -2287,7 +2459,7 @@ function ChoiceControl({
|
|
|
2287
2459
|
const renderOptionButton = (opt) => {
|
|
2288
2460
|
const isSelected = value === opt.value;
|
|
2289
2461
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
2290
|
-
return /* @__PURE__ */ (0,
|
|
2462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2291
2463
|
"button",
|
|
2292
2464
|
{
|
|
2293
2465
|
type: "button",
|
|
@@ -2301,15 +2473,15 @@ function ChoiceControl({
|
|
|
2301
2473
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
2302
2474
|
title: opt.description,
|
|
2303
2475
|
children: [
|
|
2304
|
-
isSelected && /* @__PURE__ */ (0,
|
|
2305
|
-
/* @__PURE__ */ (0,
|
|
2306
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
2476
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: opt.label }),
|
|
2478
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
2307
2479
|
]
|
|
2308
2480
|
},
|
|
2309
2481
|
String(opt.value)
|
|
2310
2482
|
);
|
|
2311
2483
|
};
|
|
2312
|
-
return /* @__PURE__ */ (0,
|
|
2484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2313
2485
|
"div",
|
|
2314
2486
|
{
|
|
2315
2487
|
ref: containerRef,
|
|
@@ -2320,15 +2492,15 @@ function ChoiceControl({
|
|
|
2320
2492
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2321
2493
|
style,
|
|
2322
2494
|
onKeyDown: handleKeyDown,
|
|
2323
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
2495
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2324
2496
|
"div",
|
|
2325
2497
|
{
|
|
2326
2498
|
className: "arap-choice-group",
|
|
2327
2499
|
role: "group",
|
|
2328
2500
|
"aria-label": group.label,
|
|
2329
2501
|
children: [
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
2332
2504
|
]
|
|
2333
2505
|
},
|
|
2334
2506
|
group.label
|
|
@@ -2338,7 +2510,7 @@ function ChoiceControl({
|
|
|
2338
2510
|
}
|
|
2339
2511
|
|
|
2340
2512
|
// src/core/controls/StepperControl.tsx
|
|
2341
|
-
var
|
|
2513
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2342
2514
|
function StepperControl({
|
|
2343
2515
|
id,
|
|
2344
2516
|
label,
|
|
@@ -2368,15 +2540,15 @@ function StepperControl({
|
|
|
2368
2540
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
2369
2541
|
}
|
|
2370
2542
|
};
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2372
2544
|
"div",
|
|
2373
2545
|
{
|
|
2374
2546
|
id,
|
|
2375
2547
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2376
2548
|
style,
|
|
2377
2549
|
children: [
|
|
2378
|
-
/* @__PURE__ */ (0,
|
|
2379
|
-
/* @__PURE__ */ (0,
|
|
2550
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-controls", children: [
|
|
2551
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2380
2552
|
"button",
|
|
2381
2553
|
{
|
|
2382
2554
|
type: "button",
|
|
@@ -2387,8 +2559,8 @@ function StepperControl({
|
|
|
2387
2559
|
children: "\u2212"
|
|
2388
2560
|
}
|
|
2389
2561
|
),
|
|
2390
|
-
/* @__PURE__ */ (0,
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
2562
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
2563
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2392
2564
|
"button",
|
|
2393
2565
|
{
|
|
2394
2566
|
type: "button",
|
|
@@ -2400,7 +2572,7 @@ function StepperControl({
|
|
|
2400
2572
|
}
|
|
2401
2573
|
)
|
|
2402
2574
|
] }),
|
|
2403
|
-
showSlider && /* @__PURE__ */ (0,
|
|
2575
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2404
2576
|
"input",
|
|
2405
2577
|
{
|
|
2406
2578
|
type: "range",
|
|
@@ -2424,7 +2596,7 @@ function StepperControl({
|
|
|
2424
2596
|
}
|
|
2425
2597
|
|
|
2426
2598
|
// src/core/controls/FeatureCard.tsx
|
|
2427
|
-
var
|
|
2599
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2428
2600
|
function FeatureCard({
|
|
2429
2601
|
id,
|
|
2430
2602
|
featureKey,
|
|
@@ -2443,7 +2615,7 @@ function FeatureCard({
|
|
|
2443
2615
|
largeControls = false
|
|
2444
2616
|
}) {
|
|
2445
2617
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
2446
|
-
return /* @__PURE__ */ (0,
|
|
2618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2447
2619
|
"div",
|
|
2448
2620
|
{
|
|
2449
2621
|
id,
|
|
@@ -2452,27 +2624,27 @@ function FeatureCard({
|
|
|
2452
2624
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2453
2625
|
style,
|
|
2454
2626
|
children: [
|
|
2455
|
-
/* @__PURE__ */ (0,
|
|
2456
|
-
/* @__PURE__ */ (0,
|
|
2457
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
2458
|
-
/* @__PURE__ */ (0,
|
|
2627
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-card-header", children: [
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "arap-label", children: [
|
|
2629
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-card-title", children: title })
|
|
2459
2631
|
] }),
|
|
2460
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
2632
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
2461
2633
|
] }),
|
|
2462
|
-
description && /* @__PURE__ */ (0,
|
|
2463
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
2464
|
-
/* @__PURE__ */ (0,
|
|
2465
|
-
/* @__PURE__ */ (0,
|
|
2634
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
2635
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: errorMessage })
|
|
2466
2638
|
] }),
|
|
2467
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2639
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: unavailableMessage })
|
|
2470
2642
|
] }),
|
|
2471
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
2472
|
-
/* @__PURE__ */ (0,
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
2474
|
-
/* @__PURE__ */ (0,
|
|
2475
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
2643
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
2645
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-permission-content", children: [
|
|
2646
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: permissionMessage }),
|
|
2647
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2476
2648
|
"button",
|
|
2477
2649
|
{
|
|
2478
2650
|
type: "button",
|
|
@@ -2483,14 +2655,14 @@ function FeatureCard({
|
|
|
2483
2655
|
)
|
|
2484
2656
|
] })
|
|
2485
2657
|
] }),
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "arap-card-content", children })
|
|
2487
2659
|
]
|
|
2488
2660
|
}
|
|
2489
2661
|
);
|
|
2490
2662
|
}
|
|
2491
2663
|
|
|
2492
2664
|
// src/core/controls/FeatureStatusState.tsx
|
|
2493
|
-
var
|
|
2665
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2494
2666
|
function SearchCount({
|
|
2495
2667
|
totalCount,
|
|
2496
2668
|
matchedCount,
|
|
@@ -2499,7 +2671,7 @@ function SearchCount({
|
|
|
2499
2671
|
style
|
|
2500
2672
|
}) {
|
|
2501
2673
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
2502
|
-
return /* @__PURE__ */ (0,
|
|
2674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2503
2675
|
"div",
|
|
2504
2676
|
{
|
|
2505
2677
|
role: "status",
|
|
@@ -2519,17 +2691,17 @@ function EmptyState({
|
|
|
2519
2691
|
className = "",
|
|
2520
2692
|
style
|
|
2521
2693
|
}) {
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
2694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2523
2695
|
"div",
|
|
2524
2696
|
{
|
|
2525
2697
|
role: "status",
|
|
2526
2698
|
className: `arap-empty-state ${className}`,
|
|
2527
2699
|
style,
|
|
2528
2700
|
children: [
|
|
2529
|
-
/* @__PURE__ */ (0,
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2532
|
-
onAction && /* @__PURE__ */ (0,
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
2704
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
2533
2705
|
]
|
|
2534
2706
|
}
|
|
2535
2707
|
);
|
|
@@ -2542,18 +2714,18 @@ function ErrorState({
|
|
|
2542
2714
|
className = "",
|
|
2543
2715
|
style
|
|
2544
2716
|
}) {
|
|
2545
|
-
return /* @__PURE__ */ (0,
|
|
2717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2546
2718
|
"div",
|
|
2547
2719
|
{
|
|
2548
2720
|
role: "alert",
|
|
2549
2721
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
2550
2722
|
style,
|
|
2551
2723
|
children: [
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2554
|
-
title && /* @__PURE__ */ (0,
|
|
2555
|
-
/* @__PURE__ */ (0,
|
|
2556
|
-
onRetry && /* @__PURE__ */ (0,
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "arap-error-content", children: [
|
|
2726
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "arap-error-message", children: message }),
|
|
2728
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
2557
2729
|
] })
|
|
2558
2730
|
]
|
|
2559
2731
|
}
|
|
@@ -2561,7 +2733,7 @@ function ErrorState({
|
|
|
2561
2733
|
}
|
|
2562
2734
|
|
|
2563
2735
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
2564
|
-
var
|
|
2736
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2565
2737
|
function ProfilePreviewCard({
|
|
2566
2738
|
profile,
|
|
2567
2739
|
isActive,
|
|
@@ -2611,7 +2783,7 @@ function ProfilePreviewCard({
|
|
|
2611
2783
|
if (val === null || val === void 0) return "Original";
|
|
2612
2784
|
return String(val);
|
|
2613
2785
|
};
|
|
2614
|
-
return /* @__PURE__ */ (0,
|
|
2786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2615
2787
|
"div",
|
|
2616
2788
|
{
|
|
2617
2789
|
role: "group",
|
|
@@ -2619,10 +2791,10 @@ function ProfilePreviewCard({
|
|
|
2619
2791
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2620
2792
|
style,
|
|
2621
2793
|
children: [
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2623
|
-
/* @__PURE__ */ (0,
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2625
|
-
isActive && /* @__PURE__ */ (0,
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-profile-header", children: [
|
|
2795
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
2796
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
2797
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2626
2798
|
"span",
|
|
2627
2799
|
{
|
|
2628
2800
|
className: "arap-profile-active-badge",
|
|
@@ -2631,14 +2803,14 @@ function ProfilePreviewCard({
|
|
|
2631
2803
|
}
|
|
2632
2804
|
)
|
|
2633
2805
|
] }),
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
2806
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
2635
2807
|
] }),
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
2810
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
2639
2811
|
const val = profile.settings[key];
|
|
2640
|
-
return /* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("strong", { children: [
|
|
2642
2814
|
formatKeyName(key),
|
|
2643
2815
|
":"
|
|
2644
2816
|
] }),
|
|
@@ -2647,7 +2819,7 @@ function ProfilePreviewCard({
|
|
|
2647
2819
|
] }, key);
|
|
2648
2820
|
}) })
|
|
2649
2821
|
] }),
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2651
2823
|
"button",
|
|
2652
2824
|
{
|
|
2653
2825
|
type: "button",
|
|
@@ -2656,7 +2828,7 @@ function ProfilePreviewCard({
|
|
|
2656
2828
|
"aria-label": `Revert ${profile.label} profile`,
|
|
2657
2829
|
children: "Revert to custom settings"
|
|
2658
2830
|
}
|
|
2659
|
-
) : /* @__PURE__ */ (0,
|
|
2831
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2660
2832
|
"button",
|
|
2661
2833
|
{
|
|
2662
2834
|
type: "button",
|
|
@@ -2699,10 +2871,14 @@ function ProfilePreviewCard({
|
|
|
2699
2871
|
SaturationController,
|
|
2700
2872
|
SearchCount,
|
|
2701
2873
|
StepperControl,
|
|
2874
|
+
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
2875
|
+
TEXT_SCALE_STEPS,
|
|
2702
2876
|
TextAlignController,
|
|
2877
|
+
TextScaleController,
|
|
2703
2878
|
ToggleControl,
|
|
2704
2879
|
createInitialPreferencesState,
|
|
2705
2880
|
enLocale,
|
|
2881
|
+
isProtectedFromTextScale,
|
|
2706
2882
|
isRtlLocale,
|
|
2707
2883
|
normalizePreferenceValue,
|
|
2708
2884
|
normalizePreferences,
|