@entur/a11y 0.2.54 → 0.2.56

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/LICENSE.md CHANGED
@@ -208,74 +208,3 @@ The European Commission may update this Appendix to later versions of the above
208
208
  a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the
209
209
  covered Source Code from exclusive appropriation.
210
210
  All other changes or additions to this Appendix require the production of a new EUPL version.
211
-
212
- # Standard Nucleo License
213
-
214
- - Last updated: July 2, 2018
215
- - [Github repo](https://github.com/NucleoApp/license-standard)
216
-
217
- By purchasing the Nucleo icons, you have the right to:
218
-
219
- - Use the Nucleo icons in unlimited personal and commercial projects, for yourself or a client, with no limitation to the number of impressions for your end product.
220
- - Use the Nucleo icons in applications, software, UI/UX design, print, and logo design.
221
- - Modify the Nucleo icons to create your icon variations.
222
-
223
- You don't have the right to:
224
-
225
- - Sublicense, resell, share, transfer, or otherwise redistribute the Nucleo icons (even for free or within a more complex downloadable file).
226
- - Use the Nucleo icons in a product that is directly competitive with Nucleo.
227
-
228
- ## Limitations & Extended license
229
-
230
- - **For each project, you can use a maximum of 250 Nucleo icons** (intended per unique style: for example, if you're using the same icon in both the outline and glyph styles, or in 2 different sizes, you're using 2 icons). You can lift this limit by purchasing an Extended License.
231
- - If you're using Nucleo icons in templates, themes or plugins offered for sale, you can use a maximum of 100 Nucleo icons. You can lift this limit by purchasing an Extended License.
232
- - If you're using the Nucleo icons in open source projects, you can use a maximum of 100 Nucleo icons.
233
- - If you're interested in using the Nucleo icons in items offered for sale (or for free) where the Nucleo icons contribute to the core value of the product being sold/shared, you will need an Extended License (e.g., a CMS where users can browse the Nucleo icons and pick the ones to include in their design).
234
-
235
- [Learn more about the Extended License](https://nucleoapp.com/extended-license)
236
-
237
- ## Freelance Projects & Contracted work
238
-
239
- If you're working on a project for a client, you can share with your client a maximum of 250 Nucleo icons per project. You can't share the Nucleo source files unless the client purchases a license.
240
-
241
- If the Nucleo icons contribute to the core value of the product being sold/shared, or if you (or your client) wish to include more than 250 icons in the project, the [Extended License](https://nucleoapp.com/extended-license) is required.
242
-
243
- ## Templates, Themes, UI Kits & Plugins
244
-
245
- If you're using Nucleo icons in templates, themes or plugins offered for sale (e.g., UI kits, Wordpress Themes, HTML/CSS Templates), **you can include up to 100 icons in the downloadable source files**. This limitation applies to the icon fonts as well.
246
-
247
- The downloadable source file has to include the [Nucleo Copyright Notice](https://nucleoapp.com/copyright-notice).
248
-
249
- If the Nucleo icons contribute to the core value of the template, theme or plugin sold (e.g., a theme builder where users can browse Nucleo icons and pick the ones to include in their design), or if you wish to use more than 100 Nucleo icons, you will need an [Extended License](https://nucleoapp.com/extended-license).
250
-
251
- It's not possible to purchase an Extended License if the template, theme or plugin is distributed for free.
252
-
253
- If you're offering a free and pro version of your product, the free version cannot include more than 100 icons even if you purchased an Extended License to lift the limit. The Extended License applies only to the pro version of your product.
254
-
255
- ## Open source projects
256
-
257
- If you're using the Nucleo icons in open source projects, **you can include up to 100 icons in the downloadable source files**. This limitation applies to the icon fonts as well.
258
-
259
- The downloadable source file has to include the [Nucleo Copyright Notice](https://nucleoapp.com/copyright-notice).
260
-
261
- It's not possible to purchase an Extended License for open source projects.
262
-
263
- ## Sharing Nucleo icons with team members
264
-
265
- If you're the sole owner of a Nucleo license, you can share with your team members only the icons used in your work, with a maximum of 250 icons (e.g., if you're a designer, you can share with the developers of your team only the Nucleo icons used in your design files).
266
-
267
- Your team members cannot reuse the Nucleo icons in other projects unless they purchase a license.
268
-
269
- If more than one team member needs access to the Nucleo icons, you can consider purchasing a [team license](https://nucleoapp.com/pricing).
270
-
271
- ## Design systems
272
-
273
- If you wish to include the Nucleo icons in a design system available on a public server, you can use a maximum of 250 Nucleo icons, even if your team purchased a Nucleo team license.
274
-
275
- If the design system is accessible only by the members of your organization (e.g., is hosted on a password protected server), but you're the sole owner of a Nucleo license, you can share with your colleagues a maximum of 250 Nucleo icons.
276
-
277
- If the design system is on a public server, you can lift the 250 icons limit by buying an [Extended License](https://nucleoapp.com/extended-license). However, please keep in mind you can't provide a link/button to download all the icons.
278
-
279
- If your team purchased a Nucleo team license that covers all the users with access to the design system, and the design system is not public (e.g., is hosted on a password protected server), then there's no limitation to the number of icons that can be included.
280
-
281
- If you're still unclear about what is or isn't allowed under this license, please contact us at info@nucleoapp.com.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './SkipToContent.scss';
3
- export declare type SkipToContentProps = {
3
+ export type SkipToContentProps = {
4
4
  /** Lenketeksten */
5
5
  children: React.ReactNode;
6
6
  /** IDen til hovedinnholdsområdet
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './VisuallyHidden.scss';
3
- export declare type VisuallyHiddenProps = {
3
+ export type VisuallyHiddenProps = {
4
4
  /** HTML-elementet eller React-komponenten som lager elementet
5
5
  * @default "span"
6
6
  */
@@ -11,8 +11,8 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
11
 
12
12
  var SkipToContent = function SkipToContent(_ref) {
13
13
  var children = _ref.children,
14
- _ref$mainId = _ref.mainId,
15
- mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
14
+ _ref$mainId = _ref.mainId,
15
+ mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
16
16
  return React__default["default"].createElement("a", {
17
17
  className: "eds-skip-to-content",
18
18
  href: "#" + mainId
@@ -20,45 +20,38 @@ var SkipToContent = function SkipToContent(_ref) {
20
20
  };
21
21
 
22
22
  function _extends() {
23
- _extends = Object.assign || function (target) {
23
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
24
24
  for (var i = 1; i < arguments.length; i++) {
25
25
  var source = arguments[i];
26
-
27
26
  for (var key in source) {
28
27
  if (Object.prototype.hasOwnProperty.call(source, key)) {
29
28
  target[key] = source[key];
30
29
  }
31
30
  }
32
31
  }
33
-
34
32
  return target;
35
33
  };
36
-
37
34
  return _extends.apply(this, arguments);
38
35
  }
39
-
40
36
  function _objectWithoutPropertiesLoose(source, excluded) {
41
37
  if (source == null) return {};
42
38
  var target = {};
43
39
  var sourceKeys = Object.keys(source);
44
40
  var key, i;
45
-
46
41
  for (i = 0; i < sourceKeys.length; i++) {
47
42
  key = sourceKeys[i];
48
43
  if (excluded.indexOf(key) >= 0) continue;
49
44
  target[key] = source[key];
50
45
  }
51
-
52
46
  return target;
53
47
  }
54
48
 
55
49
  var _excluded = ["as", "children"];
56
50
  var VisuallyHidden = function VisuallyHidden(_ref) {
57
51
  var _ref$as = _ref.as,
58
- Element = _ref$as === void 0 ? 'span' : _ref$as,
59
- children = _ref.children,
60
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
61
-
52
+ Element = _ref$as === void 0 ? 'span' : _ref$as,
53
+ children = _ref.children,
54
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
62
55
  return React__default["default"].createElement(Element, _extends({
63
56
  className: "eds-visually-hidden"
64
57
  }, rest), children);
@@ -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', 'typography');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n"],"names":["SkipToContent","children","mainId","React","className","href","VisuallyHidden","as","Element","rest","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;IAYaA,aAAa,GAAiC,SAA9CA,aAA8C;AAAA,MACzDC,QADyD,QACzDA,QADyD;AAAA,yBAEzDC,MAFyD;AAAA,MAEzDA,MAFyD,4BAEhD,cAFgD;AAAA,SAIzDC,uCAAA,IAAA;AAAGC,IAAAA,SAAS,EAAC;AAAsBC,IAAAA,IAAI,QAAMH;GAA7C,EACGD,QADH,CAJyD;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICC9CK,cAAc,GAAkC,SAAhDA,cAAgD;AAAA,qBAC3DC,EAD2D;AAAA,MACvDC,OADuD,wBAC7C,MAD6C;AAAA,MAE3DP,QAF2D,QAE3DA,QAF2D;AAAA,MAGxDQ,IAHwD;;AAAA,SAK3DN,uCAAA,CAACK,OAAD;AAASJ,IAAAA,SAAS,EAAC;AAAnB,KAA6CK,IAA7C,GACGR,QADH,CAL2D;AAAA;;ACV7DS,4BAAsB,CAAC,MAAD,EAAS,YAAT,CAAtB;;;;;"}
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', 'typography');\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,EAAE,YAAY,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 r=t(require("react"));function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var a=["as","children"];e.warnAboutMissingStyles("a11y","typography"),exports.SkipToContent=function(e){var t=e.mainId;return r.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,o=e.children,u=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)t.indexOf(r=i[n])>=0||(a[r]=e[r]);return a}(e,a);return r.default.createElement(i,n({className:"eds-visually-hidden"},u),o)};
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","typography"),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,o=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"},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', 'typography');\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","mainId","React","className","href","children","as","Element","rest"],"mappings":"4aAGAA,yBAAuB,OAAQ,oCCS4B,oBAEzDC,cAEAC,6BAAGC,UAAU,sBAAsBC,qBAF1B,qBADTC,kCCA2D,oBAC3DC,GAAIC,aAAU,SACdF,IAAAA,SACGG,iJAEHN,wBAACK,KAAQJ,UAAU,uBAA0BK,GAC1CH"}
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', 'typography');\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,EAAAA,uBAAuB,OAAQ,oCCS4B,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
@@ -3,8 +3,8 @@ import React from 'react';
3
3
 
4
4
  var SkipToContent = function SkipToContent(_ref) {
5
5
  var children = _ref.children,
6
- _ref$mainId = _ref.mainId,
7
- mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
6
+ _ref$mainId = _ref.mainId,
7
+ mainId = _ref$mainId === void 0 ? 'main-content' : _ref$mainId;
8
8
  return React.createElement("a", {
9
9
  className: "eds-skip-to-content",
10
10
  href: "#" + mainId
@@ -12,45 +12,38 @@ var SkipToContent = function SkipToContent(_ref) {
12
12
  };
13
13
 
14
14
  function _extends() {
15
- _extends = Object.assign || function (target) {
15
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
16
16
  for (var i = 1; i < arguments.length; i++) {
17
17
  var source = arguments[i];
18
-
19
18
  for (var key in source) {
20
19
  if (Object.prototype.hasOwnProperty.call(source, key)) {
21
20
  target[key] = source[key];
22
21
  }
23
22
  }
24
23
  }
25
-
26
24
  return target;
27
25
  };
28
-
29
26
  return _extends.apply(this, arguments);
30
27
  }
31
-
32
28
  function _objectWithoutPropertiesLoose(source, excluded) {
33
29
  if (source == null) return {};
34
30
  var target = {};
35
31
  var sourceKeys = Object.keys(source);
36
32
  var key, i;
37
-
38
33
  for (i = 0; i < sourceKeys.length; i++) {
39
34
  key = sourceKeys[i];
40
35
  if (excluded.indexOf(key) >= 0) continue;
41
36
  target[key] = source[key];
42
37
  }
43
-
44
38
  return target;
45
39
  }
46
40
 
47
41
  var _excluded = ["as", "children"];
48
42
  var VisuallyHidden = function VisuallyHidden(_ref) {
49
43
  var _ref$as = _ref.as,
50
- Element = _ref$as === void 0 ? 'span' : _ref$as,
51
- children = _ref.children,
52
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
53
-
44
+ Element = _ref$as === void 0 ? 'span' : _ref$as,
45
+ children = _ref.children,
46
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
54
47
  return React.createElement(Element, _extends({
55
48
  className: "eds-visually-hidden"
56
49
  }, rest), children);
@@ -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', 'typography');\n\nexport * from './SkipToContent';\nexport * from './VisuallyHidden';\n"],"names":["SkipToContent","children","mainId","React","className","href","VisuallyHidden","as","Element","rest","warnAboutMissingStyles"],"mappings":";;;IAYaA,aAAa,GAAiC,SAA9CA,aAA8C;AAAA,MACzDC,QADyD,QACzDA,QADyD;AAAA,yBAEzDC,MAFyD;AAAA,MAEzDA,MAFyD,4BAEhD,cAFgD;AAAA,SAIzDC,mBAAA,IAAA;AAAGC,IAAAA,SAAS,EAAC;AAAsBC,IAAAA,IAAI,QAAMH;GAA7C,EACGD,QADH,CAJyD;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICC9CK,cAAc,GAAkC,SAAhDA,cAAgD;AAAA,qBAC3DC,EAD2D;AAAA,MACvDC,OADuD,wBAC7C,MAD6C;AAAA,MAE3DP,QAF2D,QAE3DA,QAF2D;AAAA,MAGxDQ,IAHwD;;AAAA,SAK3DN,mBAAA,CAACK,OAAD;AAASJ,IAAAA,SAAS,EAAC;AAAnB,KAA6CK,IAA7C,GACGR,QADH,CAL2D;AAAA;;ACV7DS,sBAAsB,CAAC,MAAD,EAAS,YAAT,CAAtB;;;;"}
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', 'typography');\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,EAAE,YAAY,CAAC;;;;"}
package/dist/styles.css CHANGED
@@ -1,5 +1,15 @@
1
1
  :root {
2
2
  --eds-a11y: 1;
3
+ }.eds-visually-hidden {
4
+ display: block;
5
+ border: 0;
6
+ clip: rect(0 0 0 0);
7
+ height: 1px;
8
+ width: 1px;
9
+ margin: -1px;
10
+ padding: 0;
11
+ overflow: hidden;
12
+ position: absolute;
3
13
  }/* DO NOT CHANGE!*/
4
14
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
5
15
  .eds-skip-to-content {
@@ -25,14 +35,4 @@
25
35
  outline: none;
26
36
  box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
27
37
  outline-offset: 0.125rem;
28
- }.eds-visually-hidden {
29
- display: block;
30
- border: 0;
31
- clip: rect(0 0 0 0);
32
- height: 1px;
33
- width: 1px;
34
- margin: -1px;
35
- padding: 0;
36
- overflow: hidden;
37
- position: absolute;
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/a11y",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/a11y.esm.js",
@@ -19,16 +19,16 @@
19
19
  "scripts": {
20
20
  "start": "dts watch --noClean",
21
21
  "build": "dts build",
22
- "lint": "dts lint"
22
+ "lint": "dts lint src"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=16.8.0",
26
26
  "react-dom": ">=16.8.0"
27
27
  },
28
28
  "dependencies": {
29
- "@entur/tokens": "^3.4.4",
30
- "@entur/typography": "^1.7.5",
31
- "@entur/utils": "^0.5.0"
29
+ "@entur/tokens": "^3.5.0",
30
+ "@entur/typography": "^1.7.7",
31
+ "@entur/utils": "^0.5.2"
32
32
  },
33
- "gitHead": "36772ae4f2d8375622acff19736c07d15435cb95"
33
+ "gitHead": "30b38034aaafba9fb308fb3d8c8bfaab9608d720"
34
34
  }
package/CHANGELOG.md DELETED
@@ -1,243 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [0.2.53](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.52...@entur/a11y@0.2.53) (2023-01-19)
7
-
8
- **Note:** Version bump only for package @entur/a11y
9
-
10
- ## [0.2.52](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.49...@entur/a11y@0.2.52) (2022-12-09)
11
-
12
- **Note:** Version bump only for package @entur/a11y
13
-
14
- ## [0.2.51](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.50...@entur/a11y@0.2.51) (2022-11-24)
15
-
16
- **Note:** Version bump only for package @entur/a11y
17
-
18
- ## [0.2.50](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.49...@entur/a11y@0.2.50) (2022-10-31)
19
-
20
- **Note:** Version bump only for package @entur/a11y
21
-
22
- ## [0.2.48](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.47...@entur/a11y@0.2.48) (2022-08-31)
23
-
24
- **Note:** Version bump only for package @entur/a11y
25
-
26
- ## [0.2.47](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.46...@entur/a11y@0.2.47) (2022-08-24)
27
-
28
- **Note:** Version bump only for package @entur/a11y
29
-
30
- ## [0.2.46](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.45...@entur/a11y@0.2.46) (2022-08-09)
31
-
32
- **Note:** Version bump only for package @entur/a11y
33
-
34
- ## [0.2.45](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.44...@entur/a11y@0.2.45) (2022-06-02)
35
-
36
- **Note:** Version bump only for package @entur/a11y
37
-
38
- ## [0.2.44](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.43...@entur/a11y@0.2.44) (2022-05-13)
39
-
40
- **Note:** Version bump only for package @entur/a11y
41
-
42
- ## [0.2.43](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.42...@entur/a11y@0.2.43) (2022-04-27)
43
-
44
- **Note:** Version bump only for package @entur/a11y
45
-
46
- ## [0.2.42](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.41...@entur/a11y@0.2.42) (2022-02-09)
47
-
48
- **Note:** Version bump only for package @entur/a11y
49
-
50
- ## [0.2.41](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.40...@entur/a11y@0.2.41) (2021-11-17)
51
-
52
- **Note:** Version bump only for package @entur/a11y
53
-
54
- ## [0.2.40](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.39...@entur/a11y@0.2.40) (2021-09-23)
55
-
56
- **Note:** Version bump only for package @entur/a11y
57
-
58
- ## [0.2.39](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.38...@entur/a11y@0.2.39) (2021-09-07)
59
-
60
- ### Bug Fixes
61
-
62
- - utilize reworked focus token ([586758f](https://bitbucket.org/enturas/design-system/commits/586758fc86eb5aa52116c63c14ef033eb2e8b12f))
63
-
64
- ## [0.2.38](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.37...@entur/a11y@0.2.38) (2021-06-25)
65
-
66
- **Note:** Version bump only for package @entur/a11y
67
-
68
- ## [0.2.37](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.36...@entur/a11y@0.2.37) (2021-04-23)
69
-
70
- ### Bug Fixes
71
-
72
- - utilize new focus tokens ([17113ef](https://bitbucket.org/enturas/design-system/commits/17113ef3f791c86fa6e19e71680fd5acdbae4990))
73
- - **skiptocontent:** increase z index ([fc40d22](https://bitbucket.org/enturas/design-system/commits/fc40d228cd4a303bffc2a176cfc75d2dde6c4f21))
74
-
75
- ## [0.2.36](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.35...@entur/a11y@0.2.36) (2021-03-02)
76
-
77
- **Note:** Version bump only for package @entur/a11y
78
-
79
- ## [0.2.35](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.34...@entur/a11y@0.2.35) (2021-02-17)
80
-
81
- **Note:** Version bump only for package @entur/a11y
82
-
83
- ## [0.2.34](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.33...@entur/a11y@0.2.34) (2021-01-20)
84
-
85
- **Note:** Version bump only for package @entur/a11y
86
-
87
- ## [0.2.33](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.32...@entur/a11y@0.2.33) (2021-01-13)
88
-
89
- **Note:** Version bump only for package @entur/a11y
90
-
91
- ## [0.2.32](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.31...@entur/a11y@0.2.32) (2021-01-05)
92
-
93
- **Note:** Version bump only for package @entur/a11y
94
-
95
- ## [0.2.31](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.30...@entur/a11y@0.2.31) (2020-12-04)
96
-
97
- **Note:** Version bump only for package @entur/a11y
98
-
99
- ## [0.2.30](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.29...@entur/a11y@0.2.30) (2020-10-23)
100
-
101
- **Note:** Version bump only for package @entur/a11y
102
-
103
- ## [0.2.29](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.28...@entur/a11y@0.2.29) (2020-10-09)
104
-
105
- **Note:** Version bump only for package @entur/a11y
106
-
107
- ## [0.2.28](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.27...@entur/a11y@0.2.28) (2020-09-14)
108
-
109
- **Note:** Version bump only for package @entur/a11y
110
-
111
- ## [0.2.27](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.26...@entur/a11y@0.2.27) (2020-09-02)
112
-
113
- **Note:** Version bump only for package @entur/a11y
114
-
115
- ## [0.2.26](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.25...@entur/a11y@0.2.26) (2020-08-19)
116
-
117
- **Note:** Version bump only for package @entur/a11y
118
-
119
- ## [0.2.25](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.24...@entur/a11y@0.2.25) (2020-08-11)
120
-
121
- **Note:** Version bump only for package @entur/a11y
122
-
123
- ## [0.2.24](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.23...@entur/a11y@0.2.24) (2020-07-03)
124
-
125
- **Note:** Version bump only for package @entur/a11y
126
-
127
- ## [0.2.23](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.22...@entur/a11y@0.2.23) (2020-06-17)
128
-
129
- **Note:** Version bump only for package @entur/a11y
130
-
131
- ## [0.2.22](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.21...@entur/a11y@0.2.22) (2020-05-27)
132
-
133
- **Note:** Version bump only for package @entur/a11y
134
-
135
- ## [0.2.21](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.20...@entur/a11y@0.2.21) (2020-05-26)
136
-
137
- **Note:** Version bump only for package @entur/a11y
138
-
139
- ## [0.2.20](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.19...@entur/a11y@0.2.20) (2020-05-20)
140
-
141
- **Note:** Version bump only for package @entur/a11y
142
-
143
- ## [0.2.19](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.18...@entur/a11y@0.2.19) (2020-04-27)
144
-
145
- **Note:** Version bump only for package @entur/a11y
146
-
147
- ## [0.2.18](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.17...@entur/a11y@0.2.18) (2020-04-23)
148
-
149
- ### Bug Fixes
150
-
151
- - updated to use new focus styling where applicable ([d0a52c0](https://bitbucket.org/enturas/design-system/commits/d0a52c096b673c6647070a90dd79bef9003ee0ad))
152
-
153
- ## [0.2.17](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.16...@entur/a11y@0.2.17) (2020-03-20)
154
-
155
- **Note:** Version bump only for package @entur/a11y
156
-
157
- ## [0.2.16](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.15...@entur/a11y@0.2.16) (2020-03-18)
158
-
159
- **Note:** Version bump only for package @entur/a11y
160
-
161
- ## [0.2.15](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.14...@entur/a11y@0.2.15) (2020-02-20)
162
-
163
- **Note:** Version bump only for package @entur/a11y
164
-
165
- ## [0.2.14](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.13...@entur/a11y@0.2.14) (2020-02-14)
166
-
167
- **Note:** Version bump only for package @entur/a11y
168
-
169
- ## [0.2.13](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.12...@entur/a11y@0.2.13) (2020-02-10)
170
-
171
- **Note:** Version bump only for package @entur/a11y
172
-
173
- ## [0.2.12](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.11...@entur/a11y@0.2.12) (2020-02-05)
174
-
175
- ### Bug Fixes
176
-
177
- - remove test-files from build process ([e0b24af](https://bitbucket.org/enturas/design-system/commits/e0b24af05d5c2ad8de4ae587d83c389495235890))
178
-
179
- ## [0.2.11](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.10...@entur/a11y@0.2.11) (2020-01-28)
180
-
181
- **Note:** Version bump only for package @entur/a11y
182
-
183
- ## [0.2.10](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.9...@entur/a11y@0.2.10) (2020-01-27)
184
-
185
- ### Bug Fixes
186
-
187
- - **types:** place types in the correct place ([acace09](https://bitbucket.org/enturas/design-system/commits/acace09ec0e258c5cff3a65e13ab29d6603780d9))
188
-
189
- ## [0.2.9](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.8...@entur/a11y@0.2.9) (2020-01-20)
190
-
191
- **Note:** Version bump only for package @entur/a11y
192
-
193
- ## [0.2.8](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.7...@entur/a11y@0.2.8) (2020-01-14)
194
-
195
- **Note:** Version bump only for package @entur/a11y
196
-
197
- ## [0.2.7](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.6...@entur/a11y@0.2.7) (2020-01-13)
198
-
199
- **Note:** Version bump only for package @entur/a11y
200
-
201
- ## [0.2.6](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.5...@entur/a11y@0.2.6) (2020-01-08)
202
-
203
- ### Bug Fixes
204
-
205
- - warn in development if the developer have forgotten the CSS ([e5c30fc](https://bitbucket.org/enturas/design-system/commits/e5c30fc08624ef22c02773892778abd92205c6b0))
206
-
207
- ## [0.2.5](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.4...@entur/a11y@0.2.5) (2020-01-06)
208
-
209
- **Note:** Version bump only for package @entur/a11y
210
-
211
- ## [0.2.4](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.3...@entur/a11y@0.2.4) (2019-12-17)
212
-
213
- ### Bug Fixes
214
-
215
- - **VisuallyHidden:** make as prop optional ([d272e4d](https://bitbucket.org/enturas/design-system/commits/d272e4d32bcf954f164e99c5b90aa5aabf98c365))
216
-
217
- ## [0.2.3](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.2...@entur/a11y@0.2.3) (2019-12-10)
218
-
219
- ### Bug Fixes
220
-
221
- - **SkipToContent:** make sure the SkipToContent line is hidden on all screens ([c5a87db](https://bitbucket.org/enturas/design-system/commits/c5a87dbf0bb35d8d86503abe9624db97a9060a41))
222
-
223
- ## [0.2.2](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.1...@entur/a11y@0.2.2) (2019-12-10)
224
-
225
- ### Bug Fixes
226
-
227
- - adding default prop as part of documentation ([1ef7510](https://bitbucket.org/enturas/design-system/commits/1ef75107362f6262429d7fe31519b4353eccc8de))
228
- - improving visuallyhidden by spreading props ([fb6ef99](https://bitbucket.org/enturas/design-system/commits/fb6ef995457a3921156114569ed4cac545566d58))
229
-
230
- ## [0.2.1](https://bitbucket.org/enturas/design-system/compare/@entur/a11y@0.2.0...@entur/a11y@0.2.1) (2019-11-29)
231
-
232
- **Note:** Version bump only for package @entur/a11y
233
-
234
- # 0.2.0 (2019-11-22)
235
-
236
- ### Bug Fixes
237
-
238
- - **SkipToContent:** make sure the SkipToContent doesn't show up when using the modal ([c227e2a](https://bitbucket.org/enturas/design-system/commits/c227e2a8224f2c8b12513fc17ca931c9c3596453))
239
-
240
- ### Features
241
-
242
- - **types:** exporting all public types for public components ([4a277ab](https://bitbucket.org/enturas/design-system/commits/4a277ab266fdb32a6760821a07b1c6cc716bac85))
243
- - add new package @entur/a11y ([9f54a30](https://bitbucket.org/enturas/design-system/commits/9f54a3030cc133fa4968cd654b062a29cd411309))