vision-accessibility 1.0.0 → 1.0.1

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.
Files changed (29) hide show
  1. package/dist/components/AccessibilityPanel/AccessibilityPanel.d.ts.map +1 -1
  2. package/dist/index.esm.js +263 -74
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.umd.js +7 -2
  5. package/dist/index.umd.js.map +1 -1
  6. package/dist/lib/css-applier.d.ts +9 -1
  7. package/dist/lib/css-applier.d.ts.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/dist/types/index.d.ts +1 -1
  10. package/dist/types/index.d.ts.map +1 -1
  11. package/package.json +21 -13
  12. package/src/components/AccessibilityPanel/AccessibilityPanel.module.scss +32 -12
  13. package/src/components/AccessibilityPanel/AccessibilityPanel.stories.tsx +105 -0
  14. package/src/components/AccessibilityPanel/AccessibilityPanel.tsx +29 -19
  15. package/src/components/AccessibilityToggle/AccessibilityToggle.module.scss +1 -1
  16. package/src/components/AccessibilityToggle/AccessibilityToggle.stories.tsx +34 -0
  17. package/src/components/AccessibilityToggle/AccessibilityToggle.tsx +1 -1
  18. package/src/components/ColorSchemeControl/ColorSchemeControl.module.scss +1 -1
  19. package/src/components/ColorSchemeControl/ColorSchemeControl.stories.tsx +34 -0
  20. package/src/components/ColorSchemeControl/ColorSchemeControl.tsx +1 -1
  21. package/src/components/FontSizeControl/FontSizeControl.module.scss +1 -1
  22. package/src/components/FontSizeControl/FontSizeControl.stories.tsx +34 -0
  23. package/src/components/FontSizeControl/FontSizeControl.tsx +1 -1
  24. package/src/components/ImageControl/ImageControl.module.scss +1 -1
  25. package/src/components/ImageControl/ImageControl.stories.tsx +43 -0
  26. package/src/components/ImageControl/ImageControl.tsx +1 -1
  27. package/src/lib/css-applier.ts +127 -4
  28. package/src/styles/global.scss +7 -7
  29. package/src/types/index.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AccessibilityPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AccessibilityPanel/AccessibilityPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AA6HtD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAMhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"AccessibilityPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AccessibilityPanel/AccessibilityPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAuItD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAMhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/dist/index.esm.js CHANGED
@@ -91,6 +91,68 @@ const safeDOMOperation = (operation, errorMessage) => {
91
91
  const isDOMAvailable = () => {
92
92
  return typeof window !== "undefined" && typeof document !== "undefined";
93
93
  };
94
+ function getDefaultExportFromCjs(x) {
95
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
96
+ }
97
+ var classnames = { exports: {} };
98
+ /*!
99
+ Copyright (c) 2018 Jed Watson.
100
+ Licensed under the MIT License (MIT), see
101
+ http://jedwatson.github.io/classnames
102
+ */
103
+ (function(module) {
104
+ (function() {
105
+ var hasOwn = {}.hasOwnProperty;
106
+ function classNames() {
107
+ var classes = "";
108
+ for (var i = 0; i < arguments.length; i++) {
109
+ var arg = arguments[i];
110
+ if (arg) {
111
+ classes = appendClass(classes, parseValue(arg));
112
+ }
113
+ }
114
+ return classes;
115
+ }
116
+ function parseValue(arg) {
117
+ if (typeof arg === "string" || typeof arg === "number") {
118
+ return arg;
119
+ }
120
+ if (typeof arg !== "object") {
121
+ return "";
122
+ }
123
+ if (Array.isArray(arg)) {
124
+ return classNames.apply(null, arg);
125
+ }
126
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
127
+ return arg.toString();
128
+ }
129
+ var classes = "";
130
+ for (var key in arg) {
131
+ if (hasOwn.call(arg, key) && arg[key]) {
132
+ classes = appendClass(classes, key);
133
+ }
134
+ }
135
+ return classes;
136
+ }
137
+ function appendClass(value, newClass) {
138
+ if (!newClass) {
139
+ return value;
140
+ }
141
+ if (value) {
142
+ return value + " " + newClass;
143
+ }
144
+ return value + newClass;
145
+ }
146
+ if (module.exports) {
147
+ classNames.default = classNames;
148
+ module.exports = classNames;
149
+ } else {
150
+ window.classNames = classNames;
151
+ }
152
+ })();
153
+ })(classnames);
154
+ var classnamesExports = classnames.exports;
155
+ const cn = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
94
156
  const ORIGINAL_FONT_SIZE_ATTR = "data-original-font-size";
95
157
  const FONT_SIZE_MULTIPLIERS = {
96
158
  small: 0.8,
@@ -192,7 +254,7 @@ const isFontSizeModified = () => {
192
254
  return false;
193
255
  };
194
256
  const CSS_CLASSES = {
195
- HIGH_CONTRAST: "accessibility-high-contrast",
257
+ HIGH_CONTRAST: cn("accessibility-high-contrast"),
196
258
  FONT_SMALL: "accessibility-font-small",
197
259
  FONT_LARGE: "accessibility-font-large",
198
260
  HIDE_IMAGES: "accessibility-hide-images"
@@ -202,9 +264,11 @@ const applyColorScheme = (scheme) => {
202
264
  if (!isDOMAvailable()) return;
203
265
  document.body.classList.remove(CSS_CLASSES.HIGH_CONTRAST);
204
266
  document.body.style.filter = "";
267
+ removeHighContrastStylesFromAllElements();
205
268
  switch (scheme) {
206
269
  case "high-contrast":
207
270
  document.body.classList.add(CSS_CLASSES.HIGH_CONTRAST);
271
+ applyHighContrastStylesToAllElements();
208
272
  break;
209
273
  case "grayscale":
210
274
  document.body.style.filter = "grayscale(100%)";
@@ -241,6 +305,7 @@ const removeAllAccessibilityStyles = () => {
241
305
  resetAllFontSizes();
242
306
  const imageElements = getImageElements();
243
307
  removeClassFromElements(imageElements, CSS_CLASSES.HIDE_IMAGES);
308
+ removeHighContrastStylesFromAllElements();
244
309
  }, "Ошибка при удалении всех стилей доступности");
245
310
  };
246
311
  const applyAllSettings = (settings) => {
@@ -252,6 +317,88 @@ const applyAllSettings = (settings) => {
252
317
  applyFontSize(settings.fontSize);
253
318
  applyImageVisibility(settings.showImages);
254
319
  };
320
+ const applyHighContrastStylesToAllElements = () => {
321
+ safeDOMOperation(() => {
322
+ if (!isDOMAvailable()) return;
323
+ const allElements = document.querySelectorAll("*");
324
+ allElements.forEach((element) => {
325
+ if (element instanceof HTMLElement) {
326
+ element.style.backgroundColor = "#000";
327
+ element.style.color = "#fff";
328
+ element.style.borderColor = "#fff";
329
+ }
330
+ });
331
+ const links = document.querySelectorAll("a");
332
+ links.forEach((link) => {
333
+ if (link instanceof HTMLElement) {
334
+ link.style.color = "#ffff00";
335
+ }
336
+ });
337
+ const visitedLinks = document.querySelectorAll("a:visited");
338
+ visitedLinks.forEach((link) => {
339
+ if (link instanceof HTMLElement) {
340
+ link.style.color = "#ff00ff";
341
+ }
342
+ });
343
+ const buttons = document.querySelectorAll("button");
344
+ buttons.forEach((button) => {
345
+ if (button instanceof HTMLElement) {
346
+ button.style.backgroundColor = "#fff";
347
+ button.style.color = "#000";
348
+ button.style.border = "2px solid #fff";
349
+ }
350
+ });
351
+ const inputs = document.querySelectorAll("input, textarea, select");
352
+ inputs.forEach((input) => {
353
+ if (input instanceof HTMLElement) {
354
+ input.style.backgroundColor = "#fff";
355
+ input.style.color = "#000";
356
+ input.style.border = "2px solid #fff";
357
+ }
358
+ });
359
+ }, "Ошибка при применении стилей высокого контраста ко всем элементам");
360
+ };
361
+ const removeHighContrastStylesFromAllElements = () => {
362
+ safeDOMOperation(() => {
363
+ if (!isDOMAvailable()) return;
364
+ const allElements = document.querySelectorAll("*");
365
+ allElements.forEach((element) => {
366
+ if (element instanceof HTMLElement) {
367
+ element.style.backgroundColor = "";
368
+ element.style.color = "";
369
+ element.style.borderColor = "";
370
+ }
371
+ });
372
+ const links = document.querySelectorAll("a");
373
+ links.forEach((link) => {
374
+ if (link instanceof HTMLElement) {
375
+ link.style.color = "";
376
+ }
377
+ });
378
+ const visitedLinks = document.querySelectorAll("a:visited");
379
+ visitedLinks.forEach((link) => {
380
+ if (link instanceof HTMLElement) {
381
+ link.style.color = "";
382
+ }
383
+ });
384
+ const buttons = document.querySelectorAll("button");
385
+ buttons.forEach((button) => {
386
+ if (button instanceof HTMLElement) {
387
+ button.style.backgroundColor = "";
388
+ button.style.color = "";
389
+ button.style.border = "";
390
+ }
391
+ });
392
+ const inputs = document.querySelectorAll("input, textarea, select");
393
+ inputs.forEach((input) => {
394
+ if (input instanceof HTMLElement) {
395
+ input.style.backgroundColor = "";
396
+ input.style.color = "";
397
+ input.style.border = "";
398
+ }
399
+ });
400
+ }, "Ошибка при удалении стилей высокого контраста со всех элементов");
401
+ };
255
402
  const applySettingIfEnabled = (isEnabled, settingType, value) => {
256
403
  if (!isEnabled) {
257
404
  return;
@@ -699,16 +846,17 @@ const useAccessibilityContext = () => {
699
846
  }
700
847
  return context;
701
848
  };
702
- const accessibilityToggle = "_accessibilityToggle_jwfla_9";
703
- const toggleContainer = "_toggleContainer_jwfla_15";
704
- const toggleLabel = "_toggleLabel_jwfla_21";
705
- const toggleInput = "_toggleInput_jwfla_42";
706
- const toggleSlider = "_toggleSlider_jwfla_49";
707
- const toggleThumb = "_toggleThumb_jwfla_55";
708
- const toggleContent = "_toggleContent_jwfla_81";
709
- const toggleTitle = "_toggleTitle_jwfla_88";
710
- const toggleStatus = "_toggleStatus_jwfla_95";
711
- const description$2 = "_description_jwfla_102";
849
+ const accessibilityToggle = "_accessibilityToggle_kpjm6_9";
850
+ const toggleContainer = "_toggleContainer_kpjm6_15";
851
+ const toggleLabel = "_toggleLabel_kpjm6_21";
852
+ const toggleInput = "_toggleInput_kpjm6_42";
853
+ const toggleSlider = "_toggleSlider_kpjm6_49";
854
+ const toggleThumb = "_toggleThumb_kpjm6_55";
855
+ const toggleContent = "_toggleContent_kpjm6_81";
856
+ const toggleTitle = "_toggleTitle_kpjm6_88";
857
+ const toggleStatus = "_toggleStatus_kpjm6_95";
858
+ const description$2 = "_description_kpjm6_102";
859
+ const highContrastMode$4 = "_highContrastMode_kpjm6_110";
712
860
  const styles$4 = {
713
861
  accessibilityToggle,
714
862
  toggleContainer,
@@ -719,7 +867,8 @@ const styles$4 = {
719
867
  toggleContent,
720
868
  toggleTitle,
721
869
  toggleStatus,
722
- description: description$2
870
+ description: description$2,
871
+ highContrastMode: highContrastMode$4
723
872
  };
724
873
  const AccessibilityToggle = ({
725
874
  className
@@ -729,7 +878,7 @@ const AccessibilityToggle = ({
729
878
  const handleToggleChange = (event) => {
730
879
  updateSettings({ isEnabled: event.target.checked });
731
880
  };
732
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${styles$4.accessibilityToggle} ${className || ""}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.toggleContainer, children: [
881
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${styles$4.accessibilityToggle} ${className || ""} ${settings.colorScheme === "high-contrast" ? styles$4.highContrastMode : ""}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.toggleContainer, children: [
733
882
  /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: styles$4.toggleLabel, children: [
734
883
  /* @__PURE__ */ jsxRuntimeExports.jsx(
735
884
  "input",
@@ -757,18 +906,19 @@ const AccessibilityToggle = ({
757
906
  )
758
907
  ] }) });
759
908
  };
760
- const colorSchemeControl = "_colorSchemeControl_tkb2w_9";
761
- const disabled$2 = "_disabled_tkb2w_12";
762
- const title$3 = "_title_tkb2w_12";
763
- const optionsContainer$1 = "_optionsContainer_tkb2w_23";
764
- const option$1 = "_option_tkb2w_23";
765
- const selected$1 = "_selected_tkb2w_50";
766
- const radioIndicator$1 = "_radioIndicator_tkb2w_54";
767
- const optionDisabled$1 = "_optionDisabled_tkb2w_62";
768
- const radioInput$1 = "_radioInput_tkb2w_72";
769
- const optionContent$1 = "_optionContent_tkb2w_79";
770
- const optionLabel$1 = "_optionLabel_tkb2w_91";
771
- const optionDescription$1 = "_optionDescription_tkb2w_98";
909
+ const colorSchemeControl = "_colorSchemeControl_1kr72_9";
910
+ const disabled$2 = "_disabled_1kr72_12";
911
+ const title$3 = "_title_1kr72_12";
912
+ const optionsContainer$1 = "_optionsContainer_1kr72_23";
913
+ const option$1 = "_option_1kr72_23";
914
+ const selected$1 = "_selected_1kr72_50";
915
+ const radioIndicator$1 = "_radioIndicator_1kr72_54";
916
+ const optionDisabled$1 = "_optionDisabled_1kr72_62";
917
+ const radioInput$1 = "_radioInput_1kr72_72";
918
+ const optionContent$1 = "_optionContent_1kr72_79";
919
+ const optionLabel$1 = "_optionLabel_1kr72_91";
920
+ const optionDescription$1 = "_optionDescription_1kr72_98";
921
+ const highContrastMode$3 = "_highContrastMode_1kr72_129";
772
922
  const styles$3 = {
773
923
  colorSchemeControl,
774
924
  disabled: disabled$2,
@@ -781,7 +931,8 @@ const styles$3 = {
781
931
  radioInput: radioInput$1,
782
932
  optionContent: optionContent$1,
783
933
  optionLabel: optionLabel$1,
784
- optionDescription: optionDescription$1
934
+ optionDescription: optionDescription$1,
935
+ highContrastMode: highContrastMode$3
785
936
  };
786
937
  const COLOR_SCHEME_OPTIONS = [
787
938
  {
@@ -810,7 +961,7 @@ const ColorSchemeControl = ({
810
961
  const newColorScheme = event.target.value;
811
962
  updateSettings({ colorScheme: newColorScheme });
812
963
  };
813
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$3.colorSchemeControl} ${className || ""} ${!isEnabled ? styles$3.disabled : ""}`, children: [
964
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$3.colorSchemeControl} ${className || ""} ${!isEnabled ? styles$3.disabled : ""} ${colorScheme === "high-contrast" ? styles$3.highContrastMode : ""}`, children: [
814
965
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: styles$3.title, children: "Цветовая схема" }),
815
966
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.optionsContainer, role: "radiogroup", "aria-labelledby": "color-scheme-title", children: COLOR_SCHEME_OPTIONS.map((option2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
816
967
  "label",
@@ -848,18 +999,19 @@ const ColorSchemeControl = ({
848
999
  )) })
849
1000
  ] });
850
1001
  };
851
- const fontSizeControl = "_fontSizeControl_xe2rx_9";
852
- const disabled$1 = "_disabled_xe2rx_12";
853
- const title$2 = "_title_xe2rx_12";
854
- const optionsContainer = "_optionsContainer_xe2rx_23";
855
- const option = "_option_xe2rx_23";
856
- const selected = "_selected_xe2rx_50";
857
- const radioIndicator = "_radioIndicator_xe2rx_54";
858
- const optionDisabled = "_optionDisabled_xe2rx_62";
859
- const radioInput = "_radioInput_xe2rx_72";
860
- const optionContent = "_optionContent_xe2rx_79";
861
- const optionLabel = "_optionLabel_xe2rx_91";
862
- const optionDescription = "_optionDescription_xe2rx_98";
1002
+ const fontSizeControl = "_fontSizeControl_1c68l_9";
1003
+ const disabled$1 = "_disabled_1c68l_12";
1004
+ const title$2 = "_title_1c68l_12";
1005
+ const optionsContainer = "_optionsContainer_1c68l_23";
1006
+ const option = "_option_1c68l_23";
1007
+ const selected = "_selected_1c68l_50";
1008
+ const radioIndicator = "_radioIndicator_1c68l_54";
1009
+ const optionDisabled = "_optionDisabled_1c68l_62";
1010
+ const radioInput = "_radioInput_1c68l_72";
1011
+ const optionContent = "_optionContent_1c68l_79";
1012
+ const optionLabel = "_optionLabel_1c68l_91";
1013
+ const optionDescription = "_optionDescription_1c68l_98";
1014
+ const highContrastMode$2 = "_highContrastMode_1c68l_129";
863
1015
  const styles$2 = {
864
1016
  fontSizeControl,
865
1017
  disabled: disabled$1,
@@ -872,7 +1024,8 @@ const styles$2 = {
872
1024
  radioInput,
873
1025
  optionContent,
874
1026
  optionLabel,
875
- optionDescription
1027
+ optionDescription,
1028
+ highContrastMode: highContrastMode$2
876
1029
  };
877
1030
  const FONT_SIZE_OPTIONS = [
878
1031
  {
@@ -901,7 +1054,7 @@ const FontSizeControl = ({
901
1054
  const newFontSize = event.target.value;
902
1055
  updateSettings({ fontSize: newFontSize });
903
1056
  };
904
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$2.fontSizeControl} ${className || ""} ${!isEnabled ? styles$2.disabled : ""}`, children: [
1057
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$2.fontSizeControl} ${className || ""} ${!isEnabled ? styles$2.disabled : ""} ${settings.colorScheme === "high-contrast" ? styles$2.highContrastMode : ""}`, children: [
905
1058
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: styles$2.title, children: "Размер шрифта" }),
906
1059
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$2.optionsContainer, role: "radiogroup", "aria-labelledby": "font-size-title", children: FONT_SIZE_OPTIONS.map((option2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
907
1060
  "label",
@@ -939,17 +1092,18 @@ const FontSizeControl = ({
939
1092
  )) })
940
1093
  ] });
941
1094
  };
942
- const imageControl = "_imageControl_rczak_9";
943
- const disabled = "_disabled_rczak_12";
944
- const title$1 = "_title_rczak_12";
945
- const switchContainer = "_switchContainer_rczak_23";
946
- const switchLabel = "_switchLabel_rczak_29";
947
- const switchDisabled = "_switchDisabled_rczak_49";
948
- const switchInput = "_switchInput_rczak_59";
949
- const switchSlider = "_switchSlider_rczak_66";
950
- const switchThumb = "_switchThumb_rczak_72";
951
- const switchText = "_switchText_rczak_98";
952
- const description$1 = "_description_rczak_106";
1095
+ const imageControl = "_imageControl_hkxkm_9";
1096
+ const disabled = "_disabled_hkxkm_12";
1097
+ const title$1 = "_title_hkxkm_12";
1098
+ const switchContainer = "_switchContainer_hkxkm_23";
1099
+ const switchLabel = "_switchLabel_hkxkm_29";
1100
+ const switchDisabled = "_switchDisabled_hkxkm_49";
1101
+ const switchInput = "_switchInput_hkxkm_59";
1102
+ const switchSlider = "_switchSlider_hkxkm_66";
1103
+ const switchThumb = "_switchThumb_hkxkm_72";
1104
+ const switchText = "_switchText_hkxkm_98";
1105
+ const description$1 = "_description_hkxkm_106";
1106
+ const highContrastMode$1 = "_highContrastMode_hkxkm_114";
953
1107
  const styles$1 = {
954
1108
  imageControl,
955
1109
  disabled,
@@ -961,7 +1115,8 @@ const styles$1 = {
961
1115
  switchSlider,
962
1116
  switchThumb,
963
1117
  switchText,
964
- description: description$1
1118
+ description: description$1,
1119
+ highContrastMode: highContrastMode$1
965
1120
  };
966
1121
  const ImageControl = ({
967
1122
  className
@@ -972,7 +1127,7 @@ const ImageControl = ({
972
1127
  const handleImageVisibilityChange = (event) => {
973
1128
  updateSettings({ showImages: event.target.checked });
974
1129
  };
975
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$1.imageControl} ${className || ""} ${!isEnabled ? styles$1.disabled : ""}`, children: [
1130
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$1.imageControl} ${className || ""} ${!isEnabled ? styles$1.disabled : ""} ${settings.colorScheme === "high-contrast" ? styles$1.highContrastMode : ""}`, children: [
976
1131
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: styles$1.title, children: "Изображения" }),
977
1132
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.switchContainer, children: [
978
1133
  /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: `${styles$1.switchLabel} ${!isEnabled ? styles$1.switchDisabled : ""}`, children: [
@@ -1001,30 +1156,59 @@ const ImageControl = ({
1001
1156
  ] })
1002
1157
  ] });
1003
1158
  };
1004
- const stickyContainer = "_stickyContainer_1xqyi_9";
1005
- const panel = "_panel_1xqyi_23";
1006
- const topRight = "_topRight_1xqyi_38";
1007
- const topLeft = "_topLeft_1xqyi_42";
1008
- const header = "_header_1xqyi_59";
1009
- const title = "_title_1xqyi_68";
1010
- const closeButton = "_closeButton_1xqyi_76";
1011
- const description = "_description_1xqyi_107";
1012
- const content = "_content_1xqyi_115";
1013
- const controls = "_controls_1xqyi_135";
1014
- const slideIn = "_slideIn_1xqyi_1";
1015
- const styles = {
1159
+ const stickyContainer = "_stickyContainer_lzoik_9";
1160
+ const panel = "_panel_lzoik_23";
1161
+ const topRight = "_top-right_lzoik_38";
1162
+ const topLeft = "_top-left_lzoik_42";
1163
+ const bottomRight = "_bottom-right_lzoik_46";
1164
+ const bottomLeft = "_bottom-left_lzoik_54";
1165
+ const header = "_header_lzoik_75";
1166
+ const title = "_title_lzoik_84";
1167
+ const closeButton = "_closeButton_lzoik_92";
1168
+ const description = "_description_lzoik_123";
1169
+ const content = "_content_lzoik_131";
1170
+ const controls = "_controls_lzoik_151";
1171
+ const highContrastMode = "_highContrastMode_lzoik_157";
1172
+ const slideIn = "_slideIn_lzoik_1";
1173
+ const AccessibilityPanel_module = {
1016
1174
  stickyContainer,
1017
1175
  panel,
1176
+ "top-right": "_top-right_lzoik_38",
1018
1177
  topRight,
1178
+ "top-left": "_top-left_lzoik_42",
1019
1179
  topLeft,
1180
+ "bottom-right": "_bottom-right_lzoik_46",
1181
+ bottomRight,
1182
+ "bottom-left": "_bottom-left_lzoik_54",
1183
+ bottomLeft,
1020
1184
  header,
1021
1185
  title,
1022
1186
  closeButton,
1023
1187
  description,
1024
1188
  content,
1025
1189
  controls,
1190
+ highContrastMode,
1026
1191
  slideIn
1027
1192
  };
1193
+ const stylesImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1194
+ __proto__: null,
1195
+ bottomLeft,
1196
+ bottomRight,
1197
+ closeButton,
1198
+ content,
1199
+ controls,
1200
+ default: AccessibilityPanel_module,
1201
+ description,
1202
+ header,
1203
+ highContrastMode,
1204
+ panel,
1205
+ slideIn,
1206
+ stickyContainer,
1207
+ title,
1208
+ topLeft,
1209
+ topRight
1210
+ }, Symbol.toStringTag, { value: "Module" }));
1211
+ const styles = typeof stylesImport === "object" && AccessibilityPanel_module ? AccessibilityPanel_module : AccessibilityPanel_module || stylesImport;
1028
1212
  const AccessibilityPanelInner = ({
1029
1213
  isOpen,
1030
1214
  onClose,
@@ -1066,23 +1250,28 @@ const AccessibilityPanelInner = ({
1066
1250
  if (!isOpen) {
1067
1251
  return null;
1068
1252
  }
1069
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${styles.stickyContainer} accessibility-panel-container`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
1253
+ const { settings } = useAccessibilityContext();
1254
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn(styles.stickyContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
1070
1255
  "div",
1071
1256
  {
1072
1257
  ref: panelRef,
1073
- className: `${styles.panel} ${styles[position]}`,
1258
+ className: cn(
1259
+ styles.panel,
1260
+ styles[position],
1261
+ settings.colorScheme === "high-contrast" && styles.highContrastMode
1262
+ ),
1074
1263
  role: "dialog",
1075
1264
  "aria-modal": "true",
1076
1265
  "aria-labelledby": "accessibility-panel-title",
1077
1266
  "aria-describedby": "accessibility-panel-description",
1078
1267
  children: [
1079
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.header, children: [
1080
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { id: "accessibility-panel-title", className: styles.title, children: "Настройки доступности" }),
1268
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn(styles.header), children: [
1269
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { id: "accessibility-panel-title", className: cn(styles.title), children: "Настройки доступности" }),
1081
1270
  /* @__PURE__ */ jsxRuntimeExports.jsx(
1082
1271
  "button",
1083
1272
  {
1084
1273
  onClick: handleCloseClick,
1085
- className: styles.closeButton,
1274
+ className: cn(styles.closeButton),
1086
1275
  "aria-label": "Закрыть панель настроек доступности",
1087
1276
  type: "button",
1088
1277
  children: "×"
@@ -1093,13 +1282,13 @@ const AccessibilityPanelInner = ({
1093
1282
  "div",
1094
1283
  {
1095
1284
  id: "accessibility-panel-description",
1096
- className: styles.description,
1285
+ className: cn(styles.description),
1097
1286
  children: "Настройте отображение страницы для улучшения доступности"
1098
1287
  }
1099
1288
  ),
1100
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.content, children: [
1289
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn(styles.content), children: [
1101
1290
  /* @__PURE__ */ jsxRuntimeExports.jsx(AccessibilityToggle, {}),
1102
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.controls, children: [
1291
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn(styles.controls), children: [
1103
1292
  /* @__PURE__ */ jsxRuntimeExports.jsx(ColorSchemeControl, {}),
1104
1293
  /* @__PURE__ */ jsxRuntimeExports.jsx(FontSizeControl, {}),
1105
1294
  /* @__PURE__ */ jsxRuntimeExports.jsx(ImageControl, {})