@entur/a11y 0.2.98 → 0.2.100-beta.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.
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils = require("@entur/utils");
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const SkipToContent = ({
6
+ children,
7
+ mainId = "main-content"
8
+ }) => /* @__PURE__ */ jsxRuntime.jsx("a", { className: "eds-skip-to-content", href: `#${mainId}`, children });
9
+ const VisuallyHidden = ({
10
+ as: Element = "span",
11
+ children,
12
+ ...rest
13
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Element, { className: "eds-visually-hidden", ...rest, children });
14
+ utils.warnAboutMissingStyles("a11y");
15
+ exports.SkipToContent = SkipToContent;
16
+ exports.VisuallyHidden = VisuallyHidden;
17
+ //# sourceMappingURL=a11y.cjs.js.map
@@ -0,0 +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: 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":["jsx","warnAboutMissingStyles"],"mappings":";;;;AAYO,MAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,SAAS;AACX,MACEA,+BAAC,OAAE,WAAU,uBAAsB,MAAM,IAAI,MAAM,IAChD,SAAA,CACH;ACLK,MAAM,iBAAgD,CAAC;AAAA,EAC5D,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 CHANGED
@@ -1,47 +1,17 @@
1
- import { warnAboutMissingStyles } from '@entur/utils';
2
- import React from 'react';
3
-
4
- var SkipToContent = function SkipToContent(_ref) {
5
- var children = _ref.children,
6
- _ref$mainId = _ref.mainId,
7
- mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
8
- return React.createElement("a", {
9
- className: "eds-skip-to-content",
10
- href: "#" + mainId
11
- }, children);
1
+ import { warnAboutMissingStyles } from "@entur/utils";
2
+ import { jsx } from "react/jsx-runtime";
3
+ const SkipToContent = ({
4
+ children,
5
+ mainId = "main-content"
6
+ }) => /* @__PURE__ */ jsx("a", { className: "eds-skip-to-content", href: `#${mainId}`, children });
7
+ const VisuallyHidden = ({
8
+ as: Element = "span",
9
+ children,
10
+ ...rest
11
+ }) => /* @__PURE__ */ jsx(Element, { className: "eds-visually-hidden", ...rest, children });
12
+ warnAboutMissingStyles("a11y");
13
+ export {
14
+ SkipToContent,
15
+ VisuallyHidden
12
16
  };
13
-
14
- function _extends() {
15
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
16
- for (var e = 1; e < arguments.length; e++) {
17
- var t = arguments[e];
18
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
19
- }
20
- return n;
21
- }, _extends.apply(null, arguments);
22
- }
23
- function _objectWithoutPropertiesLoose(r, e) {
24
- if (null == r) return {};
25
- var t = {};
26
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
27
- if (e.includes(n)) continue;
28
- t[n] = r[n];
29
- }
30
- return t;
31
- }
32
-
33
- var _excluded = ["as", "children"];
34
- var VisuallyHidden = function VisuallyHidden(_ref) {
35
- var _ref$as = _ref.as,
36
- Element = _ref$as === void 0 ? 'span' : _ref$as,
37
- children = _ref.children,
38
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
39
- return React.createElement(Element, _extends({
40
- className: "eds-visually-hidden"
41
- }, rest), children);
42
- };
43
-
44
- warnAboutMissingStyles('a11y');
45
-
46
- export { SkipToContent, VisuallyHidden };
47
17
  //# sourceMappingURL=a11y.esm.js.map
@@ -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');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n"],"names":["SkipToContent","_ref","children","_ref$mainId","mainId","React","createElement","className","href","VisuallyHidden","_ref$as","as","Element","rest","_objectWithoutPropertiesLoose","_excluded","_extends","warnAboutMissingStyles"],"mappings":";;;IAYaA,aAAa,GAAiC,SAA9CA,aAAaA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,WAAA,GAAAF,IAAA,CACRG,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,WAAA,CAAA;AAAA,EAAA,OAEvBE,KAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGC,IAAAA,SAAS,EAAC,qBAAqB;AAACC,IAAAA,IAAI,EAAMJ,GAAAA,GAAAA,MAAAA;GAAQ,EAClDF,QAAQ,CACP,CAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ICLOO,cAAc,GAAkC,SAAhDA,cAAcA,CAAAR,IAAA,EAAA;AAAA,EAAA,IAAAS,OAAA,GAAAT,IAAA,CACzBU,EAAE;AAAEC,IAAAA,OAAO,GAAAF,OAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,OAAA;IACpBR,QAAQ,GAAAD,IAAA,CAARC,QAAQ;AACLW,IAAAA,IAAI,GAAAC,6BAAA,CAAAb,IAAA,EAAAc,SAAA,CAAA,CAAA;AAAA,EAAA,OAEPV,KAAA,CAAAC,aAAA,CAACM,OAAO,EAAAI,QAAA,CAAA;AAACT,IAAAA,SAAS,EAAC,qBAAA;GAA0BM,EAAAA,IAAI,CAC9CX,EAAAA,QAAQ,CACD,CAAA;AAAA;;ACjBZe,sBAAsB,CAAC,MAAM,CAAC;;;;"}
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":[],"mappings":";;AAYO,MAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,SAAS;AACX,MACE,oBAAC,OAAE,WAAU,uBAAsB,MAAM,IAAI,MAAM,IAChD,SAAA,CACH;ACLK,MAAM,iBAAgD,CAAC;AAAA,EAC5D,IAAI,UAAU;AAAA,EACd;AAAA,EACA,GAAG;AACL,0BACG,SAAA,EAAQ,WAAU,uBAAuB,GAAG,MAC1C,SAAA,CACH;ACjBF,uBAAuB,MAAM;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,26 @@
1
- import './index.scss';
2
- export * from './SkipToContent';
3
- export * from './VisuallyHidden';
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const SkipToContent: default_2.FC<SkipToContentProps>;
4
+
5
+ export declare type SkipToContentProps = {
6
+ /** Lenketeksten */
7
+ children: default_2.ReactNode;
8
+ /** IDen til hovedinnholdsområdet
9
+ * @default "main-content"
10
+ */
11
+ mainId?: string;
12
+ };
13
+
14
+ export declare const VisuallyHidden: default_2.FC<VisuallyHiddenProps>;
15
+
16
+ export declare type VisuallyHiddenProps = {
17
+ /** HTML-elementet eller React-komponenten som lager elementet
18
+ * @default "span"
19
+ */
20
+ as?: string | default_2.ElementType;
21
+ /** Innhold for skjermlesere */
22
+ children: default_2.ReactNode;
23
+ [key: string]: any;
24
+ };
25
+
26
+ export { }
package/dist/styles.css CHANGED
@@ -1,4 +1,6 @@
1
- /* DO NOT CHANGE!*/
1
+ :root {
2
+ --eds-a11y: 1;
3
+ }/* DO NOT CHANGE!*/
2
4
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
3
5
  .eds-skip-to-content {
4
6
  background: #ffca28;
@@ -23,8 +25,7 @@
23
25
  outline: none;
24
26
  box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
25
27
  outline-offset: 0.125rem;
26
- }
27
- .eds-visually-hidden {
28
+ }.eds-visually-hidden {
28
29
  display: block;
29
30
  border: 0;
30
31
  clip: rect(0 0 0 0);
@@ -34,7 +35,4 @@
34
35
  padding: 0;
35
36
  overflow: hidden;
36
37
  position: absolute;
37
- }
38
- :root {
39
- --eds-a11y: 1;
40
- }
38
+ }
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "@entur/a11y",
3
- "version": "0.2.98",
3
+ "version": "0.2.100-beta.0",
4
4
  "license": "EUPL-1.2",
5
- "main": "dist/index.js",
5
+ "main": "dist/a11y.cjs.js",
6
6
  "module": "dist/a11y.esm.js",
7
7
  "typings": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/a11y.esm.js",
12
+ "require": "./dist/a11y.cjs.js"
13
+ },
14
+ "./dist/*": "./dist/*"
15
+ },
8
16
  "files": [
9
17
  "dist"
10
18
  ],
@@ -17,20 +25,31 @@
17
25
  "access": "public"
18
26
  },
19
27
  "scripts": {
20
- "start": "dts watch --noClean",
21
- "build": "dts build",
22
- "lint": "dts lint src"
28
+ "start": "vite build --watch",
29
+ "build": "vite build",
30
+ "lint": "eslint src",
31
+ "test": "jest"
23
32
  },
24
33
  "peerDependencies": {
25
34
  "react": ">=16.8.0",
26
35
  "react-dom": ">=16.8.0"
27
36
  },
28
37
  "dependencies": {
29
- "@entur/tokens": "^3.19.0",
30
- "@entur/utils": "^0.12.3"
38
+ "@entur/tokens": "^3.19.2-beta.0",
39
+ "@entur/utils": "^0.12.4-beta.0"
31
40
  },
32
41
  "devDependencies": {
33
- "dts-cli": "2.0.5"
42
+ "@testing-library/jest-dom": "^5.17.0",
43
+ "@testing-library/react": "^10.4.9",
44
+ "@testing-library/user-event": "14.6.1",
45
+ "@vitejs/plugin-react": "^5.0.1",
46
+ "eslint": "^7.32.0",
47
+ "jest": "^29.0.0",
48
+ "jest-environment-jsdom": "^29.0.0",
49
+ "ts-jest": "^29.0.0",
50
+ "typescript": "^5.9.2",
51
+ "vite": "^7.1.3",
52
+ "vite-plugin-dts": "^4.5.4"
34
53
  },
35
- "gitHead": "bfd8f62e4735cc13d55e50bc8747535d72aaf679"
54
+ "gitHead": "414181fa2084722438238256a9aa32e304896b9d"
36
55
  }
@@ -1,11 +0,0 @@
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,12 +0,0 @@
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,52 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var utils = require('@entur/utils');
6
- var React = require('react');
7
-
8
- var SkipToContent = function SkipToContent(_ref) {
9
- var children = _ref.children,
10
- _ref$mainId = _ref.mainId,
11
- mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
12
- return React.createElement("a", {
13
- className: "eds-skip-to-content",
14
- href: "#" + mainId
15
- }, children);
16
- };
17
-
18
- function _extends() {
19
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
20
- for (var e = 1; e < arguments.length; e++) {
21
- var t = arguments[e];
22
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
23
- }
24
- return n;
25
- }, _extends.apply(null, arguments);
26
- }
27
- function _objectWithoutPropertiesLoose(r, e) {
28
- if (null == r) return {};
29
- var t = {};
30
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
31
- if (e.includes(n)) continue;
32
- t[n] = r[n];
33
- }
34
- return t;
35
- }
36
-
37
- var _excluded = ["as", "children"];
38
- var VisuallyHidden = function VisuallyHidden(_ref) {
39
- var _ref$as = _ref.as,
40
- Element = _ref$as === void 0 ? 'span' : _ref$as,
41
- children = _ref.children,
42
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
43
- return React.createElement(Element, _extends({
44
- className: "eds-visually-hidden"
45
- }, rest), children);
46
- };
47
-
48
- utils.warnAboutMissingStyles('a11y');
49
-
50
- exports.SkipToContent = SkipToContent;
51
- exports.VisuallyHidden = VisuallyHidden;
52
- //# sourceMappingURL=a11y.cjs.development.js.map
@@ -1 +0,0 @@
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","_ref","children","_ref$mainId","mainId","React","createElement","className","href","VisuallyHidden","_ref$as","as","Element","rest","_objectWithoutPropertiesLoose","_excluded","_extends","warnAboutMissingStyles"],"mappings":";;;;;;;IAYaA,aAAa,GAAiC,SAA9CA,aAAaA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACxBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,WAAA,GAAAF,IAAA,CACRG,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,WAAA,CAAA;AAAA,EAAA,OAEvBE,KAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGC,IAAAA,SAAS,EAAC,qBAAqB;AAACC,IAAAA,IAAI,EAAMJ,GAAAA,GAAAA,MAAAA;GAAQ,EAClDF,QAAQ,CACP,CAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ICLOO,cAAc,GAAkC,SAAhDA,cAAcA,CAAAR,IAAA,EAAA;AAAA,EAAA,IAAAS,OAAA,GAAAT,IAAA,CACzBU,EAAE;AAAEC,IAAAA,OAAO,GAAAF,OAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,OAAA;IACpBR,QAAQ,GAAAD,IAAA,CAARC,QAAQ;AACLW,IAAAA,IAAI,GAAAC,6BAAA,CAAAb,IAAA,EAAAc,SAAA,CAAA,CAAA;AAAA,EAAA,OAEPV,KAAA,CAAAC,aAAA,CAACM,OAAO,EAAAI,QAAA,CAAA;AAACT,IAAAA,SAAS,EAAC,qBAAA;GAA0BM,EAAAA,IAAI,CAC9CX,EAAAA,QAAQ,CACD,CAAA;AAAA;;ACjBZe,4BAAsB,CAAC,MAAM,CAAC;;;;;"}
@@ -1,2 +0,0 @@
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)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},r.apply(null,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,l=function(e,n){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.includes(t))continue;r[t]=e[t]}return r}(e,t);return n.createElement(a,r({className:"eds-visually-hidden"},l),s)};
2
- //# sourceMappingURL=a11y.cjs.production.min.js.map
@@ -1 +0,0 @@
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":"qWAGAA,EAAsBA,uBAAC,8BCSoC,SAAjCC,GAAA,IAChBC,EAAAD,EACRE,OAAuB,OAEvBC,EAAAC,cAAA,IAAA,CAAGC,UAAU,sBAAsBC,KAAUJ,UAFpC,IAAHD,EAAG,eAAcA,IADfD,EAARO,SAKI,yBCLuD,SAAlCP,GAAA,IAAAQ,EAAAR,EACzBS,GAAIC,OAAU,IAAHF,EAAG,OAAMA,EACpBD,EAAQP,EAARO,SACGI,yIAAIC,CAAAZ,EAAAa,GAAA,OAEPV,EAAAC,cAACM,EAAOI,EAAA,CAACT,UAAU,uBAA0BM,GAC1CJ,EACO"}
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
-
2
- 'use strict'
3
-
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./a11y.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./a11y.cjs.development.js')
8
- }