accessibility-react-widget 2.0.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.
Files changed (56) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +111 -0
  3. package/dist/assets/main.css +1 -0
  4. package/dist/components/AccColors/AccColors.d.ts +8 -0
  5. package/dist/components/AccContent/AccContent.d.ts +9 -0
  6. package/dist/components/AccMenuContent/AccMenuContent.d.ts +12 -0
  7. package/dist/components/AccMenuContentBlock/AccMenuContentBlock.d.ts +14 -0
  8. package/dist/components/AccTools/AccTools.d.ts +8 -0
  9. package/dist/components/Accessibilik/index.d.ts +3 -0
  10. package/dist/components/AccessibilityMenu/AccessibilityMenu.d.ts +15 -0
  11. package/dist/components/Footer/Footer.d.ts +3 -0
  12. package/dist/components/Header/Header.d.ts +7 -0
  13. package/dist/components/Portal/Portal.d.ts +8 -0
  14. package/dist/components/RcSlider/RcSlider.d.ts +12 -0
  15. package/dist/components/buttons/AccButton/AccButton.d.ts +23 -0
  16. package/dist/components/buttons/AccValueControl/AccValueControl.d.ts +8 -0
  17. package/dist/components/buttons/AccValueControlButton/AccValueControlButton.d.ts +9 -0
  18. package/dist/components/buttons/AccessibilityButton/AccessibilityButton.d.ts +7 -0
  19. package/dist/components/buttons/colors/BlueLightFilterButton/BlueLightFilterButton.d.ts +8 -0
  20. package/dist/components/buttons/colors/BrightnessControl/BrightnessControl.d.ts +8 -0
  21. package/dist/components/buttons/colors/DarkContrastButton/DarkContrastButton.d.ts +8 -0
  22. package/dist/components/buttons/colors/HighContrastButton/HighContrastButton.d.ts +8 -0
  23. package/dist/components/buttons/colors/HighSaturationButton/HighSaturationButton.d.ts +8 -0
  24. package/dist/components/buttons/colors/LightContrastButton/LightContrastButton.d.ts +8 -0
  25. package/dist/components/buttons/colors/LowSaturationButton/LowSaturationButton.d.ts +8 -0
  26. package/dist/components/buttons/colors/MonochromeButton/MonochromeButton.d.ts +8 -0
  27. package/dist/components/buttons/colors/TextColorPickerButton/TextColorPickerButton.d.ts +8 -0
  28. package/dist/components/buttons/colors/VisualImpairmentButton/VisualImpairmentButton.d.ts +8 -0
  29. package/dist/components/buttons/content/AdjustFontSize/AdjustFontSize.d.ts +9 -0
  30. package/dist/components/buttons/content/AlignTextButton/AlignTextButton.d.ts +11 -0
  31. package/dist/components/buttons/content/DyslexiaFontButton/DyslexiaFontButton.d.ts +8 -0
  32. package/dist/components/buttons/content/DyslexiaFontButton/style.d.ts +2 -0
  33. package/dist/components/buttons/content/FontWeightButton/FontWeightButton.d.ts +8 -0
  34. package/dist/components/buttons/content/HighlightLinksButton/HighlightLinksButton.d.ts +8 -0
  35. package/dist/components/buttons/content/HighlightTitlesButton/HighlightTitlesButton.d.ts +8 -0
  36. package/dist/components/buttons/content/LetterSpacingButton/LetterSpacingButton.d.ts +8 -0
  37. package/dist/components/buttons/content/LineHeightButton/LineHeightButton.d.ts +8 -0
  38. package/dist/components/buttons/content/WordSpacingButton/WordSpacingButton.d.ts +8 -0
  39. package/dist/components/buttons/content/ZoomButton/ZoomButton.d.ts +8 -0
  40. package/dist/components/buttons/tools/BigCursorButton/BigCursorButton.d.ts +8 -0
  41. package/dist/components/buttons/tools/BigCursorButton/cursor.d.ts +2 -0
  42. package/dist/components/buttons/tools/ReadingGuide/ReadingGuide.d.ts +9 -0
  43. package/dist/components/buttons/tools/TextToSpeech/TextToSpeech.d.ts +8 -0
  44. package/dist/components/main.d.ts +0 -0
  45. package/dist/config.d.ts +22 -0
  46. package/dist/constants.d.ts +4 -0
  47. package/dist/hooks/useFontSizeMutationObserver.d.ts +2 -0
  48. package/dist/hooks/useFontSizeTraverse.d.ts +2 -0
  49. package/dist/i18/locale/en.json.d.ts +40 -0
  50. package/dist/i18/locale/index.d.ts +13 -0
  51. package/dist/main.d.ts +2 -0
  52. package/dist/main.min.js +193 -0
  53. package/dist/types.d.ts +56 -0
  54. package/dist/utils.d.ts +5 -0
  55. package/dist/vite-env.d.ts +2 -0
  56. package/package.json +124 -0
@@ -0,0 +1,56 @@
1
+ /// <reference types="react" />
2
+ import { Draft } from 'immer';
3
+ export type ChangeAccDraftHander = (d: Draft<AccessibilikState>) => void;
4
+ interface TextAlign {
5
+ left: string | null;
6
+ center: string | null;
7
+ right: string | null;
8
+ }
9
+ export interface AccessibilikState {
10
+ language: string;
11
+ isBlueLightFilter: boolean;
12
+ brightness: {
13
+ isBrightness: boolean;
14
+ brightness: number;
15
+ };
16
+ isDarkContrast: boolean;
17
+ isLightContrast: boolean;
18
+ highContrast: {
19
+ isHighContrast: boolean;
20
+ contrast: number;
21
+ };
22
+ highSaturation: {
23
+ isHighSaturation: boolean;
24
+ saturation: number;
25
+ };
26
+ lowSaturation: {
27
+ isLowSaturation: boolean;
28
+ saturation: number;
29
+ };
30
+ isMonochrome: boolean;
31
+ color: string;
32
+ isVisualImpairment: boolean;
33
+ adjustFontSizePercentage: number;
34
+ textAlign: TextAlign;
35
+ isDyslexiaFont: boolean;
36
+ isFontWeightBold: boolean;
37
+ highlightLinks: boolean;
38
+ highlightTitles: boolean;
39
+ letterSpacing: number;
40
+ lineHeight: {
41
+ isLineHeight: boolean;
42
+ lineHeight: number;
43
+ };
44
+ wordSpacing: number;
45
+ zoom: {
46
+ isZoom: boolean;
47
+ zoom: number;
48
+ };
49
+ isBigCursor: boolean;
50
+ showReadingGuide: boolean;
51
+ activateTextToSpeech: boolean;
52
+ }
53
+ export type IconSvgComponent = React.FunctionComponent<React.SVGProps<SVGSVGElement> & {
54
+ title?: string | undefined;
55
+ }>;
56
+ export {};
@@ -0,0 +1,5 @@
1
+ import { AccessibilikState } from "./types";
2
+ export declare const isRuleAppliedToElement: (element: HTMLElement, rule: CSSStyleRule) => boolean;
3
+ export declare const getComputedStyleAndSetAccDataFontSize: (elem: HTMLElement) => void;
4
+ export declare const getDataImageSvgBase64: (svg: string) => string;
5
+ export declare const getAccInitState: () => AccessibilikState;
@@ -0,0 +1,2 @@
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="vite-plugin-svgr/client" />
package/package.json ADDED
@@ -0,0 +1,124 @@
1
+ {
2
+ "name": "accessibility-react-widget",
3
+ "author": "Vladi Iokhim",
4
+ "license": "MIT",
5
+ "description": "A React-based web accessibility widget to enhance UI/UX for all users. This powerful tool seamlessly integrates with React applications, offering a wide range of features like adjustable font sizes, text alignment options, dyslexia-friendly fonts, and color contrast adjustments. It's equipped with advanced functionalities including a BlueLight filter, brightness control, text-to-speech, and a zoom button, ensuring an optimal viewing experience for users with visual impairments. With Accessibilik, developers can easily adhere to the latest web accessibility standards (WCAG), enhancing the UI/UX for diverse audiences. Ideal for creating universally accessible web applications, Accessibilik is your go-to solution for making the web more accessible to everyone.",
6
+ "keywords": [
7
+ "accessibility",
8
+ "web-accessibility",
9
+ "a11y",
10
+ "React",
11
+ "widget",
12
+ "accessibilik",
13
+ "Multilingual Support",
14
+ "Adjust Font Size",
15
+ "Align Text",
16
+ "Dyslexia Font",
17
+ "Font Weight",
18
+ "Highlight Links",
19
+ "Highlight Titles",
20
+ "Letter Spacing",
21
+ "Line Height",
22
+ "Word Spacing",
23
+ "BlueLight Filter",
24
+ "Brightness Control",
25
+ "DarkContrast Button",
26
+ "HighContrast Button",
27
+ "HighSaturation Button",
28
+ "LightContrast Button",
29
+ "LowSaturation Button",
30
+ "Monochrome Button",
31
+ "TextColor Picker",
32
+ "Visual Impairment",
33
+ "Zoom Button",
34
+ "Big Cursor",
35
+ "Reading Guide",
36
+ "Text To Speech",
37
+ "React Accessibility",
38
+ "Accessibility for React",
39
+ "Accessibility React component",
40
+ "Accessibility component",
41
+ "Accessibility widget",
42
+ "React accessibility",
43
+ "accessibility for React",
44
+ "accessibility React component",
45
+ "accessibility component",
46
+ "accessibility widget",
47
+ "WCAG compliance",
48
+ "User-friendly web accessibility",
49
+ "Inclusive web design",
50
+ "React JS accessibility",
51
+ "Accessible user interface",
52
+ "Web inclusivity tools",
53
+ "User experience enhancement",
54
+ "Web accessibility standards",
55
+ "Universal web access solutions"
56
+ ],
57
+ "version": "2.0.0",
58
+ "type": "module",
59
+ "main": "dist/main.min.js",
60
+ "types": "dist/main.d.ts",
61
+ "files": [
62
+ "dist"
63
+ ],
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/RosenGray/accessibilik.git"
67
+ },
68
+ "bugs": {
69
+ "url": "https://github.com/RosenGray/accessibilik/issues"
70
+ },
71
+ "scripts": {
72
+ "dev": "vite",
73
+ "build": "tsc --p ./tsconfig-build.json && vite build && npm run uglify && rm ./dist/main.js",
74
+ "buildUmd": "tsc --p ./tsconfig-build.json && vite build && npm run uglifyUmd && rm ./dist/accessibilik.umd.cjs",
75
+ "uglify": "uglifyjs ./dist/main.js -o ./dist/main.min.js --compress --mangle",
76
+ "uglifyUmd": "uglifyjs ./dist/accessibilik.umd.cjs -o ./dist/accessibilik.umd.min.cjs --compress --mangle",
77
+ "prepublishOnly": "npm run build",
78
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
79
+ "preview": "vite preview"
80
+ },
81
+ "peerDependencies": {
82
+ "react": "^18.2.0",
83
+ "react-dom": "^18.2.0"
84
+ },
85
+ "devDependencies": {
86
+ "@types/react": "^18.2.37",
87
+ "@types/react-dom": "^18.2.15",
88
+ "@typescript-eslint/eslint-plugin": "^6.10.0",
89
+ "@typescript-eslint/parser": "^6.10.0",
90
+ "@vitejs/plugin-react": "^4.2.0",
91
+ "autoprefixer": "^10.4.16",
92
+ "eslint": "^8.53.0",
93
+ "eslint-plugin-react-hooks": "^4.6.0",
94
+ "eslint-plugin-react-refresh": "^0.4.4",
95
+ "glob": "^10.3.10",
96
+ "postcss": "^8.4.32",
97
+ "react": "^18.2.0",
98
+ "react-dom": "^18.2.0",
99
+ "rollup-plugin-terser": "^7.0.2",
100
+ "rollup-plugin-visualizer": "^5.12.0",
101
+ "sass": "^1.69.5",
102
+ "typescript": "^5.2.2",
103
+ "uglify-js": "^3.17.4",
104
+ "vite": "^5.0.0",
105
+ "vite-plugin-dts": "^3.6.4",
106
+ "vite-plugin-lib-inject-css": "^1.3.0",
107
+ "vite-plugin-svgr": "^4.2.0"
108
+ },
109
+ "sideEffects": [
110
+ "**/*.css"
111
+ ],
112
+ "dependencies": {
113
+ "@types/i18n": "^0.13.10",
114
+ "@uidotdev/usehooks": "^2.4.1",
115
+ "classnames": "^2.3.2",
116
+ "i18next": "^23.7.11",
117
+ "i18next-browser-languagedetector": "^7.2.0",
118
+ "immer": "^10.0.3",
119
+ "rc-slider": "^10.5.0",
120
+ "react-colorful": "^5.6.1",
121
+ "react-i18next": "^13.5.0",
122
+ "react-select": "^5.8.0"
123
+ }
124
+ }