a11y-panel 1.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 (50) hide show
  1. package/README.md +114 -0
  2. package/dist/a11y-panel.es.js +2618 -0
  3. package/dist/a11y-panel.umd.cjs +333 -0
  4. package/dist/components/AccessibilityWidget.d.ts +18 -0
  5. package/dist/components/ConfigComponents/ColorsSelect.d.ts +7 -0
  6. package/dist/components/ConfigComponents/Counter.d.ts +9 -0
  7. package/dist/components/ConfigComponents/FontButtons.d.ts +1 -0
  8. package/dist/components/ConfigComponents/FontColor.d.ts +1 -0
  9. package/dist/components/ConfigComponents/FontSize.d.ts +1 -0
  10. package/dist/components/ConfigComponents/HideImages.d.ts +1 -0
  11. package/dist/components/ConfigComponents/HighContrast.d.ts +1 -0
  12. package/dist/components/ConfigComponents/HighlightLinks.d.ts +1 -0
  13. package/dist/components/ConfigComponents/HighlightTitles.d.ts +1 -0
  14. package/dist/components/ConfigComponents/LetterSpacing.d.ts +1 -0
  15. package/dist/components/ConfigComponents/LineHeight.d.ts +1 -0
  16. package/dist/components/ConfigComponents/LowContrast.d.ts +1 -0
  17. package/dist/components/ConfigComponents/Monochrome.d.ts +1 -0
  18. package/dist/components/ConfigComponents/SettingsBox.d.ts +8 -0
  19. package/dist/components/ConfigComponents/TextCase.d.ts +2 -0
  20. package/dist/components/ConfigComponents/TitleBackgroundColor.d.ts +1 -0
  21. package/dist/components/ConfigComponents/TitleColor.d.ts +1 -0
  22. package/dist/components/ConfigComponents/Toggle.d.ts +6 -0
  23. package/dist/components/Context/Store.d.ts +14 -0
  24. package/dist/components/Context/initialState.d.ts +21 -0
  25. package/dist/components/Context/reducer.d.ts +66 -0
  26. package/dist/components/Footer.d.ts +1 -0
  27. package/dist/components/Header.d.ts +1 -0
  28. package/dist/components/StyleSettings.d.ts +1 -0
  29. package/dist/components/TextContent/SectionTitle.d.ts +5 -0
  30. package/dist/components/TextContent/SubSectionTitle.d.ts +5 -0
  31. package/dist/components/Widget.d.ts +11 -0
  32. package/dist/components/assets/AccessibilityIcon.d.ts +3 -0
  33. package/dist/components/assets/BoldIcon.d.ts +2 -0
  34. package/dist/components/assets/CloseIcon.d.ts +4 -0
  35. package/dist/components/assets/ItalicIcon.d.ts +2 -0
  36. package/dist/components/assets/MinusIcon.d.ts +2 -0
  37. package/dist/components/assets/PlusIcon.d.ts +4 -0
  38. package/dist/components/assets/TextAlignCenterIcon.d.ts +2 -0
  39. package/dist/components/assets/TextAlignLeftIcon.d.ts +2 -0
  40. package/dist/components/assets/TextAlignRightIcon.d.ts +2 -0
  41. package/dist/components/helpers/createStyles.d.ts +4 -0
  42. package/dist/components/variables/initialStyleSettings.d.ts +13 -0
  43. package/dist/favicon.ico +0 -0
  44. package/dist/index.d.ts +4 -0
  45. package/dist/logo192.png +0 -0
  46. package/dist/logo512.png +0 -0
  47. package/dist/manifest.json +25 -0
  48. package/dist/robots.txt +3 -0
  49. package/dist/style.css +1 -0
  50. package/package.json +62 -0
@@ -0,0 +1,66 @@
1
+ import { GlobalState } from './initialState';
2
+
3
+ export type Action = {
4
+ type: 'OPEN_WIDGET';
5
+ } | {
6
+ type: 'CLOSE_WIDGET';
7
+ } | {
8
+ type: 'SET_FONT_COLOR';
9
+ data: string | false;
10
+ } | {
11
+ type: 'ADD_FONT_SIZE';
12
+ } | {
13
+ type: 'MINUS_FONT_SIZE';
14
+ } | {
15
+ type: 'ADD_LINE_HEIGHT';
16
+ } | {
17
+ type: 'MINUS_LINE_HEIGHT';
18
+ } | {
19
+ type: 'ADD_LETTER_SPACING';
20
+ } | {
21
+ type: 'MINUS_LETTER_SPACING';
22
+ } | {
23
+ type: 'TOGGLE_BOLD';
24
+ } | {
25
+ type: 'TOGGLE_ITALIC';
26
+ } | {
27
+ type: 'SET_TEXT_CASE';
28
+ data: 'initial' | 'uppercase' | 'lowercase' | 'capitalize';
29
+ } | {
30
+ type: 'SET_TEXT_ALIGNMENT';
31
+ data: 'initial' | 'left' | 'right' | 'center' | 'justify';
32
+ } | {
33
+ type: 'SET_TITLE_COLOR';
34
+ data: string | false;
35
+ } | {
36
+ type: 'SET_TITLE_BACKGROUND_COLOR';
37
+ data: string | null;
38
+ } | {
39
+ type: 'SET_HIGHLIGHT_TITLES';
40
+ } | {
41
+ type: 'UNSET_HIGHLIGHT_TITLES';
42
+ } | {
43
+ type: 'SET_HIGHLIGHT_LINKS';
44
+ } | {
45
+ type: 'UNSET_HIGHLIGHT_LINKS';
46
+ } | {
47
+ type: 'HIDE_IMAGES';
48
+ } | {
49
+ type: 'UNHIDE_IMAGES';
50
+ } | {
51
+ type: 'SET_MONOCHROME';
52
+ } | {
53
+ type: 'UNSET_MONOCHROME';
54
+ } | {
55
+ type: 'SET_HIGH_CONTRAST';
56
+ } | {
57
+ type: 'UNSET_HIGH_CONTRAST';
58
+ } | {
59
+ type: 'SET_LOW_CONTRAST';
60
+ } | {
61
+ type: 'UNSET_LOW_CONTRAST';
62
+ } | {
63
+ type: 'RESET_SETTINGS';
64
+ };
65
+ declare const _default: (state: GlobalState, action: Action) => GlobalState;
66
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function Footer(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Header(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function StyleSettings(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export default function SectionTitle({ children }: {
4
+ children: ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export default function SubSectionTitle({ children }: {
4
+ children: ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface WidgetProps {
4
+ initialPosition?: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ customIcon?: React.ReactNode;
9
+ }
10
+ export default function Widget({ initialPosition, customIcon }: WidgetProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+
3
+ export default function AccessibilityIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare const _default: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare const _default: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { GlobalState } from '../Context/initialState';
2
+
3
+ declare const _default: (globalState: GlobalState) => string;
4
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ widgetOpen: boolean;
3
+ fontColor: null;
4
+ fontSizeAdjustment: number;
5
+ lineHeight: number;
6
+ letterSpacing: number;
7
+ titleBackgroundColor: null;
8
+ highlightLinks: boolean;
9
+ hideImages: boolean;
10
+ textAlignment: string;
11
+ monochrome: boolean;
12
+ };
13
+ export default _default;
Binary file
@@ -0,0 +1,4 @@
1
+ import { default as AccessibilityWidget, AccessibilityWidgetProps, WidgetTheme } from './components/AccessibilityWidget';
2
+
3
+ export { AccessibilityWidget };
4
+ export type { AccessibilityWidgetProps, WidgetTheme };
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap";.Dropdown-root{position:relative}.Dropdown-control{position:relative;overflow:hidden;background-color:#fff;border:1px solid #ccc;border-radius:2px;box-sizing:border-box;color:#333;cursor:default;outline:none;padding:8px 52px 8px 10px;transition:all .2s ease}.Dropdown-control:hover{box-shadow:0 1px #0000000f}.Dropdown-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 0;content:" ";display:block;height:0;margin-top:-ceil(2.5);position:absolute;right:10px;top:14px;width:0}.is-open .Dropdown-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.Dropdown-menu{background-color:#fff;border:1px solid #ccc;box-shadow:0 1px #0000000f;box-sizing:border-box;margin-top:-1px;max-height:200px;overflow-y:auto;position:absolute;top:100%;width:100%;z-index:1000;-webkit-overflow-scrolling:touch}.Dropdown-menu .Dropdown-group>.Dropdown-title{padding:8px 10px;color:#333;font-weight:700;text-transform:capitalize}.Dropdown-option{box-sizing:border-box;color:#333c;cursor:pointer;display:block;padding:8px 10px}.Dropdown-option:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.Dropdown-option:hover,.Dropdown-option.is-selected{background-color:#f2f9fc;color:#333}.Dropdown-noresults{box-sizing:border-box;color:#ccc;cursor:default;display:block;padding:8px 10px}html{background-color:gray}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "a11y-panel",
3
+ "version": "1.0.0",
4
+ "description": "An modern draggable React Accessibility Widget that allows users to change sites visual changes",
5
+ "author": "abhishek garg",
6
+ "private": false,
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "react",
10
+ "accessibility",
11
+ "a11y",
12
+ "widget",
13
+ "ui"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/theabgarg/a11y-panel.git"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/theabgarg/a11y-panel/issues"
21
+ },
22
+ "homepage": "https://github.com/theabgarg/a11y-panel#readme",
23
+ "type": "module",
24
+ "main": "dist/a11y-panel.umd.cjs",
25
+ "module": "dist/a11y-panel.es.js",
26
+ "types": "dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "import": "./dist/a11y-panel.es.js",
30
+ "require": "./dist/a11y-panel.umd.cjs",
31
+ "types": "./dist/index.d.ts"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "README.md"
37
+ ],
38
+ "peerDependencies": {
39
+ "react": ">=16.8 <20",
40
+ "react-dom": ">=16.8 <20",
41
+ "styled-components": ">=5.0.0"
42
+ },
43
+ "dependencies": {
44
+ "react-dropdown": "^1.9.2",
45
+ "react-switch": "^6.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/react": "^19.0.0",
49
+ "@types/react-dom": "^19.0.0",
50
+ "@vitejs/plugin-react": "^4.2.1",
51
+ "react": "^19.0.0",
52
+ "react-dom": "^19.0.0",
53
+ "typescript": "^5.3.3",
54
+ "vite": "^5.2.0",
55
+ "vite-plugin-dts": "^3.8.1"
56
+ },
57
+ "scripts": {
58
+ "dev": "vite",
59
+ "build": "tsc && vite build",
60
+ "preview": "vite preview"
61
+ }
62
+ }