@entur/a11y 0.2.56 → 0.2.58
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.
|
@@ -57,7 +57,7 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
|
|
|
57
57
|
}, rest), children);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
utils.warnAboutMissingStyles('a11y'
|
|
60
|
+
utils.warnAboutMissingStyles('a11y');
|
|
61
61
|
|
|
62
62
|
exports.SkipToContent = SkipToContent;
|
|
63
63
|
exports.VisuallyHidden = VisuallyHidden;
|
|
@@ -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'
|
|
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,yBAAA,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,yBAAA,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");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(require("react"));function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var a=["as","children"];e.warnAboutMissingStyles("a11y"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(require("react"));function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var a=["as","children"];e.warnAboutMissingStyles("a11y"),exports.SkipToContent=function(e){var t=e.mainId;return n.default.createElement("a",{className:"eds-skip-to-content",href:"#"+(void 0===t?"main-content":t)},e.children)},exports.VisuallyHidden=function(e){var t=e.as,i=void 0===t?"span":t,s=e.children,u=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}(e,a);return n.default.createElement(i,r({className:"eds-visually-hidden"},u),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'
|
|
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":"gcAGAA,EAAsBA,uBAAC,8BCSoC,SAAjCC,GAAA,IAChBC,EAAAD,EACRE,OAAuB,OAEvBC,EAAA,QAAAC,cAAA,IAAA,CAAGC,UAAU,sBAAsBC,KAAUJ,gBAFpC,eAAcD,MADvBM,kCCA2D,SAAlCP,GAAA,IAAAQ,EAAAR,EACzBS,GAAIC,aAAU,OAAMF,EACpBD,IAAAA,SACGI,oIAAIC,CAAAZ,EAAAa,GAAA,OAEPV,UAAAC,cAACM,EAAOI,EAAA,CAACT,UAAU,uBAA0BM,GAC1CJ"}
|
package/dist/a11y.esm.js
CHANGED
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: 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'
|
|
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: 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,sBAAsB,CAAC,MAAM,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/a11y",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.58",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/a11y.esm.js",
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
"react-dom": ">=16.8.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@entur/tokens": "^3.
|
|
30
|
-
"@entur/
|
|
31
|
-
"@entur/utils": "^0.5.2"
|
|
29
|
+
"@entur/tokens": "^3.7.0",
|
|
30
|
+
"@entur/utils": "^0.5.4"
|
|
32
31
|
},
|
|
33
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "0488198c40c8c610f981c97c8a755a9a435044dd"
|
|
34
33
|
}
|