@entur/a11y 0.2.68 → 0.2.70
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 +11 -11
- package/dist/VisuallyHidden.d.ts +12 -12
- package/dist/a11y.cjs.development.js +2 -6
- package/dist/a11y.cjs.development.js.map +1 -1
- package/dist/a11y.cjs.production.min.js +1 -1
- package/dist/a11y.cjs.production.min.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/styles.css +3 -3
- package/package.json +3 -3
package/dist/SkipToContent.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './SkipToContent.scss';
|
|
3
|
-
export type SkipToContentProps = {
|
|
4
|
-
/** Lenketeksten */
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** IDen til hovedinnholdsområdet
|
|
7
|
-
* @default "main-content"
|
|
8
|
-
*/
|
|
9
|
-
mainId?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const SkipToContent: React.FC<SkipToContentProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SkipToContent.scss';
|
|
3
|
+
export type SkipToContentProps = {
|
|
4
|
+
/** Lenketeksten */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** IDen til hovedinnholdsområdet
|
|
7
|
+
* @default "main-content"
|
|
8
|
+
*/
|
|
9
|
+
mainId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SkipToContent: React.FC<SkipToContentProps>;
|
package/dist/VisuallyHidden.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './VisuallyHidden.scss';
|
|
3
|
-
export type VisuallyHiddenProps = {
|
|
4
|
-
/** HTML-elementet eller React-komponenten som lager elementet
|
|
5
|
-
* @default "span"
|
|
6
|
-
*/
|
|
7
|
-
as?: string | React.ElementType;
|
|
8
|
-
/** Innhold for skjermlesere */
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
|
-
export declare const VisuallyHidden: React.FC<VisuallyHiddenProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './VisuallyHidden.scss';
|
|
3
|
+
export type VisuallyHiddenProps = {
|
|
4
|
+
/** HTML-elementet eller React-komponenten som lager elementet
|
|
5
|
+
* @default "span"
|
|
6
|
+
*/
|
|
7
|
+
as?: string | React.ElementType;
|
|
8
|
+
/** Innhold for skjermlesere */
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
export declare const VisuallyHidden: React.FC<VisuallyHiddenProps>;
|
|
@@ -5,15 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var utils = require('@entur/utils');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
-
|
|
12
8
|
var SkipToContent = function SkipToContent(_ref) {
|
|
13
9
|
var children = _ref.children,
|
|
14
10
|
_ref$mainId = _ref.mainId,
|
|
15
11
|
mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
|
|
16
|
-
return
|
|
12
|
+
return React.createElement("a", {
|
|
17
13
|
className: "eds-skip-to-content",
|
|
18
14
|
href: "#" + mainId
|
|
19
15
|
}, children);
|
|
@@ -52,7 +48,7 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
|
|
|
52
48
|
Element = _ref$as === void 0 ? 'span' : _ref$as,
|
|
53
49
|
children = _ref.children,
|
|
54
50
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
55
|
-
return
|
|
51
|
+
return React.createElement(Element, _extends({
|
|
56
52
|
className: "eds-visually-hidden"
|
|
57
53
|
}, rest), children);
|
|
58
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.cjs.development.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: React.FC<SkipToContentProps> = ({\n children,\n mainId = 'main-content',\n}) => (\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: React.FC<VisuallyHiddenProps> = ({\n as: Element = 'span',\n children,\n ...rest\n}) => (\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":["SkipToContent","children","mainId","React","createElement","className","href","VisuallyHidden","as","Element","rest","warnAboutMissingStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"a11y.cjs.development.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: React.FC<SkipToContentProps> = ({\n children,\n mainId = 'main-content',\n}) => (\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: React.FC<VisuallyHiddenProps> = ({\n as: Element = 'span',\n children,\n ...rest\n}) => (\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":["SkipToContent","children","mainId","React","createElement","className","href","VisuallyHidden","as","Element","rest","warnAboutMissingStyles"],"mappings":";;;;;;;AAYaA,IAAAA,aAAa,GAAiC,SAA9CA,aAAa,CAAA,IAAA,EAAA;EAAA,IACxBC,QAAQ,QAARA,QAAQ;AAAA,IAAA,WAAA,GAAA,IAAA,CACRC,MAAM;AAANA,IAAAA,MAAM,4BAAG,cAAc,GAAA,WAAA,CAAA;AAAA,EAAA,OAEvBC,KAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGC,IAAAA,SAAS,EAAC,qBAAqB;AAACC,IAAAA,IAAI,EAAMJ,GAAAA,GAAAA,MAAAA;GAAQ,EAClDD,QAAQ,CACP,CAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLOM,IAAAA,cAAc,GAAkC,SAAhDA,cAAc,CAAA,IAAA,EAAA;AAAA,EAAA,IAAA,OAAA,GAAA,IAAA,CACzBC,EAAE;AAAEC,IAAAA,OAAO,wBAAG,MAAM,GAAA,OAAA;AACpBR,IAAAA,QAAQ,QAARA,QAAQ;IACLS,IAAI,GAAA,6BAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAAA,EAAA,OAEPP,KAAA,CAAAC,aAAA,CAACK,OAAO,EAAA,QAAA,CAAA;AAACJ,IAAAA,SAAS,EAAC,qBAAA;GAA0BK,EAAAA,IAAI,CAC9CT,EAAAA,QAAQ,CACD,CAAA;AAAA;;ACjBZU,4BAAsB,CAAC,MAAM,CAAC;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),n=require("react");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},r.apply(this,arguments)}var t=["as","children"];e.warnAboutMissingStyles("a11y"),exports.SkipToContent=function(e){var r=e.mainId;return n.createElement("a",{className:"eds-skip-to-content",href:"#"+(void 0===r?"main-content":r)},e.children)},exports.VisuallyHidden=function(e){var i=e.as,a=void 0===i?"span":i,s=e.children,o=function(e,n){if(null==e)return{};var r,t,i={},a=Object.keys(e);for(t=0;t<a.length;t++)n.indexOf(r=a[t])>=0||(i[r]=e[r]);return i}(e,t);return n.createElement(a,r({className:"eds-visually-hidden"},o),s)};
|
|
2
2
|
//# sourceMappingURL=a11y.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.cjs.production.min.js","sources":["../src/index.tsx","../src/SkipToContent.tsx","../src/VisuallyHidden.tsx"],"sourcesContent":["import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('a11y');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n","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: React.FC<SkipToContentProps> = ({\n children,\n mainId = 'main-content',\n}) => (\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: React.FC<VisuallyHiddenProps> = ({\n as: Element = 'span',\n children,\n ...rest\n}) => (\n <Element className=\"eds-visually-hidden\" {...rest}>\n {children}\n </Element>\n);\n"],"names":["warnAboutMissingStyles","_ref","_ref$mainId","mainId","React","createElement","className","href","children","_ref$as","as","Element","rest","_objectWithoutPropertiesLoose","_excluded","_extends"],"mappings":"
|
|
1
|
+
{"version":3,"file":"a11y.cjs.production.min.js","sources":["../src/index.tsx","../src/SkipToContent.tsx","../src/VisuallyHidden.tsx"],"sourcesContent":["import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('a11y');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n","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: React.FC<SkipToContentProps> = ({\n children,\n mainId = 'main-content',\n}) => (\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: React.FC<VisuallyHiddenProps> = ({\n as: Element = 'span',\n children,\n ...rest\n}) => (\n <Element className=\"eds-visually-hidden\" {...rest}>\n {children}\n </Element>\n);\n"],"names":["warnAboutMissingStyles","_ref","_ref$mainId","mainId","React","createElement","className","href","children","_ref$as","as","Element","rest","_objectWithoutPropertiesLoose","_excluded","_extends"],"mappings":"iXAGAA,EAAsBA,uBAAC,8BCSoC,SAAjCC,GAAA,IAChBC,EAAAD,EACRE,OAAuB,OAEvBC,EAAAC,cAAA,IAAA,CAAGC,UAAU,sBAAsBC,KAAUJ,gBAFpC,eAAcD,MADvBM,SAKI,yBCLuD,SAAlCP,GAAA,IAAAQ,EAAAR,EACzBS,GAAIC,aAAU,OAAMF,EACpBD,IAAAA,SACGI,oIAAIC,CAAAZ,EAAAa,GAAA,OAEPV,EAAAC,cAACM,EAAOI,EAAA,CAACT,UAAU,uBAA0BM,GAC1CJ,EACO"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import './index.scss';
|
|
2
|
-
export * from './SkipToContent';
|
|
3
|
-
export * from './VisuallyHidden';
|
|
1
|
+
import './index.scss';
|
|
2
|
+
export * from './SkipToContent';
|
|
3
|
+
export * from './VisuallyHidden';
|
package/dist/styles.css
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--eds-a11y: 1;
|
|
3
|
-
}
|
|
4
1
|
/* DO NOT CHANGE!*/
|
|
5
2
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
6
3
|
.eds-skip-to-content {
|
|
@@ -38,3 +35,6 @@
|
|
|
38
35
|
overflow: hidden;
|
|
39
36
|
position: absolute;
|
|
40
37
|
}
|
|
38
|
+
:root {
|
|
39
|
+
--eds-a11y: 1;
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/a11y",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.70",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/a11y.esm.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@entur/tokens": "^3.10.0",
|
|
30
|
-
"@entur/utils": "^0.9.
|
|
30
|
+
"@entur/utils": "^0.9.5"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "9b8d4e5d2e6f7a74256371e30ebef43e046c9338"
|
|
33
33
|
}
|