@entur/a11y 0.2.113 → 1.0.0-next.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.
- package/dist/SkipToContent.d.ts +1 -1
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/a11y.cjs.js.map +1 -1
- package/dist/a11y.esm.js.map +1 -1
- package/package.json +18 -7
package/dist/SkipToContent.d.ts
CHANGED
package/dist/VisuallyHidden.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export type VisuallyHiddenProps = {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
};
|
|
11
|
-
export declare const VisuallyHidden:
|
|
11
|
+
export declare const VisuallyHidden: ({ as: Element, children, ...rest }: VisuallyHiddenProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/a11y.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.cjs.js","sources":["../src/SkipToContent.tsx","../src/VisuallyHidden.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport './SkipToContent.scss';\n\nexport type SkipToContentProps = {\n /** Lenketeksten */\n children: React.ReactNode;\n /** IDen til hovedinnholdsområdet\n * @default \"main-content\"\n */\n mainId?: string;\n};\n\nexport const SkipToContent
|
|
1
|
+
{"version":3,"file":"a11y.cjs.js","sources":["../src/SkipToContent.tsx","../src/VisuallyHidden.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport './SkipToContent.scss';\n\nexport type SkipToContentProps = {\n /** Lenketeksten */\n children: React.ReactNode;\n /** IDen til hovedinnholdsområdet\n * @default \"main-content\"\n */\n mainId?: string;\n};\n\nexport const SkipToContent = ({\n children,\n mainId = 'main-content',\n}: SkipToContentProps) => (\n <a className=\"eds-skip-to-content\" href={`#${mainId}`}>\n {children}\n </a>\n);\n","import React from 'react';\nimport './VisuallyHidden.scss';\n\nexport type VisuallyHiddenProps = {\n /** HTML-elementet eller React-komponenten som lager elementet\n * @default \"span\"\n */\n as?: string | React.ElementType;\n /** Innhold for skjermlesere */\n children: React.ReactNode;\n [key: string]: any;\n};\n\nexport const VisuallyHidden = ({\n as: Element = 'span',\n children,\n ...rest\n}: VisuallyHiddenProps) => (\n <Element className=\"eds-visually-hidden\" {...rest}>\n {children}\n </Element>\n);\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('a11y');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n"],"names":["jsx","warnAboutMissingStyles"],"mappings":";;;;AAYO,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA,SAAS;AACX,MACEA,+BAAC,OAAE,WAAU,uBAAsB,MAAM,IAAI,MAAM,IAChD,SAAA,CACH;ACLK,MAAM,iBAAiB,CAAC;AAAA,EAC7B,IAAI,UAAU;AAAA,EACd;AAAA,EACA,GAAG;AACL,qCACG,SAAA,EAAQ,WAAU,uBAAuB,GAAG,MAC1C,SAAA,CACH;ACjBFC,MAAAA,uBAAuB,MAAM;;;"}
|
package/dist/a11y.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.esm.js","sources":["../src/SkipToContent.tsx","../src/VisuallyHidden.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport './SkipToContent.scss';\n\nexport type SkipToContentProps = {\n /** Lenketeksten */\n children: React.ReactNode;\n /** IDen til hovedinnholdsområdet\n * @default \"main-content\"\n */\n mainId?: string;\n};\n\nexport const SkipToContent
|
|
1
|
+
{"version":3,"file":"a11y.esm.js","sources":["../src/SkipToContent.tsx","../src/VisuallyHidden.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport './SkipToContent.scss';\n\nexport type SkipToContentProps = {\n /** Lenketeksten */\n children: React.ReactNode;\n /** IDen til hovedinnholdsområdet\n * @default \"main-content\"\n */\n mainId?: string;\n};\n\nexport const SkipToContent = ({\n children,\n mainId = 'main-content',\n}: SkipToContentProps) => (\n <a className=\"eds-skip-to-content\" href={`#${mainId}`}>\n {children}\n </a>\n);\n","import React from 'react';\nimport './VisuallyHidden.scss';\n\nexport type VisuallyHiddenProps = {\n /** HTML-elementet eller React-komponenten som lager elementet\n * @default \"span\"\n */\n as?: string | React.ElementType;\n /** Innhold for skjermlesere */\n children: React.ReactNode;\n [key: string]: any;\n};\n\nexport const VisuallyHidden = ({\n as: Element = 'span',\n children,\n ...rest\n}: VisuallyHiddenProps) => (\n <Element className=\"eds-visually-hidden\" {...rest}>\n {children}\n </Element>\n);\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('a11y');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n"],"names":[],"mappings":";;AAYO,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA,SAAS;AACX,MACE,oBAAC,OAAE,WAAU,uBAAsB,MAAM,IAAI,MAAM,IAChD,SAAA,CACH;ACLK,MAAM,iBAAiB,CAAC;AAAA,EAC7B,IAAI,UAAU;AAAA,EACd;AAAA,EACA,GAAG;AACL,0BACG,SAAA,EAAQ,WAAU,uBAAuB,GAAG,MAC1C,SAAA,CACH;ACjBF,uBAAuB,MAAM;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/a11y",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-next.1",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/a11y.cjs.js",
|
|
6
6
|
"module": "dist/a11y.esm.js",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"test": "jest"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"react": ">=
|
|
26
|
-
"react-dom": ">=
|
|
25
|
+
"react": ">=18.0.0",
|
|
26
|
+
"react-dom": ">=18.0.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@entur/tokens": "^
|
|
30
|
-
"@entur/utils": "^0.
|
|
29
|
+
"@entur/tokens": "^4.0.0-next.0",
|
|
30
|
+
"@entur/utils": "^1.0.0-next.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.17.0",
|
|
34
|
-
"@testing-library/react": "^
|
|
34
|
+
"@testing-library/react": "^16.3.0",
|
|
35
35
|
"@testing-library/user-event": "14.6.1",
|
|
36
36
|
"@vitejs/plugin-react": "^5.0.1",
|
|
37
37
|
"jest": "^29.0.0",
|
|
@@ -41,5 +41,16 @@
|
|
|
41
41
|
"vite": "^7.3.2",
|
|
42
42
|
"vite-plugin-dts": "^4.5.4"
|
|
43
43
|
},
|
|
44
|
-
"
|
|
44
|
+
"exports": {
|
|
45
|
+
".": {
|
|
46
|
+
"types": "./dist/index.d.ts",
|
|
47
|
+
"import": "./dist/a11y.esm.js",
|
|
48
|
+
"require": "./dist/a11y.cjs.js",
|
|
49
|
+
"default": "./dist/a11y.esm.js"
|
|
50
|
+
},
|
|
51
|
+
"./styles": "./dist/styles.css",
|
|
52
|
+
"./dist/styles.css": "./dist/styles.css",
|
|
53
|
+
"./package.json": "./package.json"
|
|
54
|
+
},
|
|
55
|
+
"gitHead": "0696d63a328007af9797bc57b63c8e1c65ecfa5a"
|
|
45
56
|
}
|