@krasnoff/react-accessibility-component 1.0.0 → 1.0.2
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/dist/README.md +53 -0
- package/dist/components/react-accessibility-component/assets/index.d.ts +27 -0
- package/dist/components/react-accessibility-component/assets/index.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/components/accessibility-logo.d.ts +8 -0
- package/dist/components/react-accessibility-component/components/accessibility-logo.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/components/menu-item.d.ts +8 -0
- package/dist/components/react-accessibility-component/components/menu-item.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/enums/font-size-direction.enum.d.ts +6 -0
- package/dist/components/react-accessibility-component/enums/font-size-direction.enum.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/hooks/use-accessibility-compoenent.d.ts +6 -0
- package/dist/components/react-accessibility-component/hooks/use-accessibility-compoenent.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/index.d.ts +9 -0
- package/dist/components/react-accessibility-component/index.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/react-accessibility-component.d.ts +4 -0
- package/dist/components/react-accessibility-component/react-accessibility-component.d.ts.map +1 -0
- package/dist/components/react-accessibility-component/types/font-size.type.d.ts +3 -0
- package/dist/components/react-accessibility-component/types/font-size.type.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# React Vite Accessibility Component
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
`AccessibilityComponent` is a React component designed to enhance web accessibility by providing essential features that support users with disabilities. It is intended to be used as part of a broader strategy for making web applications accessible.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
To install the component, use npm or yarn:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm install react-accessibility-component
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
or
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
yarn add react-accessibility-component
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Import and use the component in your React application:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
import { AccessibilityComponent } from 'react-accessibility-component'
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
return (
|
|
30
|
+
<AccessibilityComponent>
|
|
31
|
+
<h1>Vite + React to NPM repository</h1>
|
|
32
|
+
</AccessibilityComponent>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default App
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Now add the following css file to the `index.html` file in your project:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
<link rel="stylesheet" href="node_modules/react-accessibility-component/dist/react-accessibility-component.css" />
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Important Notice
|
|
46
|
+
|
|
47
|
+
Using `AccessibilityComponent` alone does not guarantee full accessibility compliance. It is the responsibility of developers to build their web applications following the WCAG accessibility standards. This includes proper semantic HTML, keyboard navigability, sufficient color contrast, and providing alternative text for images, among other requirements.
|
|
48
|
+
|
|
49
|
+
For comprehensive guidance on making your website accessible, refer to the official [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) guidelines.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
This component is open-source and available under the MIT License.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { default as AccessibilityIconUrl } from './accessibility_new_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
2
|
+
export { default as BrightBackgroundIconUrl } from './brightness_empty_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
3
|
+
export { default as HighContrastIconUrl } from './contrast_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
4
|
+
export { default as LowContrastIconUrl } from './contrast_rtl_off_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
5
|
+
export { default as HeaderIconUrl } from './format_h1_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
6
|
+
export { default as LinkIconUrl } from './link_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
7
|
+
export { default as ListIconUrl } from './list_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
8
|
+
export { default as GrayScaleIconUrl } from './mist_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
9
|
+
export { default as MonochromePhotosIconUrl } from './monochrome_photos_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
10
|
+
export { default as ReadableFontsIconUrl } from './text_format_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
11
|
+
export { default as TransitionFadeIconUrl } from './transition_fade_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
12
|
+
export { default as ZoomInIconUrl } from './zoom_in_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
13
|
+
export { default as ZoomOutIconUrl } from './zoom_out_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg';
|
|
14
|
+
export { default as AccessibilityIcon } from './accessibility_new_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
15
|
+
export { default as BrightBackgroundIcon } from './brightness_empty_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
16
|
+
export { default as HighContrastIcon } from './contrast_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
17
|
+
export { default as LowContrastIcon } from './contrast_rtl_off_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
18
|
+
export { default as HeaderIcon } from './format_h1_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
19
|
+
export { default as LinkIcon } from './link_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
20
|
+
export { default as ListIcon } from './list_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
21
|
+
export { default as GrayScaleIcon } from './mist_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
22
|
+
export { default as MonochromePhotosIcon } from './monochrome_photos_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
23
|
+
export { default as ReadableFontsIcon } from './text_format_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
24
|
+
export { default as TransitionFadeIcon } from './transition_fade_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
25
|
+
export { default as ZoomInIcon } from './zoom_in_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
26
|
+
export { default as ZoomOutIcon } from './zoom_out_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.svg?react';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/react-accessibility-component/assets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AACjH,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AACvG,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAC9G,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI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
interface AccessibilityLogoProps {
|
|
2
|
+
width: string;
|
|
3
|
+
height: string;
|
|
4
|
+
fill: string;
|
|
5
|
+
}
|
|
6
|
+
declare const AccessibilityLogo: (props: AccessibilityLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { AccessibilityLogo };
|
|
8
|
+
//# sourceMappingURL=accessibility-logo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility-logo.d.ts","sourceRoot":"","sources":["../../../../src/components/react-accessibility-component/components/accessibility-logo.tsx"],"names":[],"mappings":"AAgBA,UAAU,sBAAsB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,4CAsNvD,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/components/react-accessibility-component/components/menu-item.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IAC1E,IAAI,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAOrC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-size-direction.enum.d.ts","sourceRoot":"","sources":["../../../../src/components/react-accessibility-component/enums/font-size-direction.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IACzB,QAAQ,KAAK;IACb,IAAI,IAAI;IACR,QAAQ,IAAI;CACf"}
|
package/dist/components/react-accessibility-component/hooks/use-accessibility-compoenent.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-accessibility-compoenent.d.ts","sourceRoot":"","sources":["../../../../src/components/react-accessibility-component/hooks/use-accessibility-compoenent.ts"],"names":[],"mappings":"AAGA,iBAAS,yBAAyB;;;EAoJjC;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './react-accessibility-component';
|
|
2
|
+
export type { FontSize } from './types/font-size.type';
|
|
3
|
+
export { fontSizeArr } from './types/font-size.type';
|
|
4
|
+
export { useAccessibilityComponent } from './hooks/use-accessibility-compoenent';
|
|
5
|
+
export { FontSizeDirection } from './enums/font-size-direction.enum';
|
|
6
|
+
export { MenuItem } from './components/menu-item';
|
|
7
|
+
export { AccessibilityLogo } from './components/accessibility-logo';
|
|
8
|
+
export * from './assets/index';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/react-accessibility-component/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAK,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-accessibility-component.d.ts","sourceRoot":"","sources":["../../../src/components/react-accessibility-component/react-accessibility-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAkBnC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-size.type.d.ts","sourceRoot":"","sources":["../../../../src/components/react-accessibility-component/types/font-size.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AACnF,eAAO,MAAM,WAAW,UAAsD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED