@entur/a11y 0.2.51 → 0.2.53

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/CHANGELOG.md ADDED
@@ -0,0 +1,243 @@
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))
@@ -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
@@ -23,35 +23,42 @@ function _extends() {
23
23
  _extends = Object.assign || function (target) {
24
24
  for (var i = 1; i < arguments.length; i++) {
25
25
  var source = arguments[i];
26
+
26
27
  for (var key in source) {
27
28
  if (Object.prototype.hasOwnProperty.call(source, key)) {
28
29
  target[key] = source[key];
29
30
  }
30
31
  }
31
32
  }
33
+
32
34
  return target;
33
35
  };
36
+
34
37
  return _extends.apply(this, arguments);
35
38
  }
39
+
36
40
  function _objectWithoutPropertiesLoose(source, excluded) {
37
41
  if (source == null) return {};
38
42
  var target = {};
39
43
  var sourceKeys = Object.keys(source);
40
44
  var key, i;
45
+
41
46
  for (i = 0; i < sourceKeys.length; i++) {
42
47
  key = sourceKeys[i];
43
48
  if (excluded.indexOf(key) >= 0) continue;
44
49
  target[key] = source[key];
45
50
  }
51
+
46
52
  return target;
47
53
  }
48
54
 
49
55
  var _excluded = ["as", "children"];
50
56
  var VisuallyHidden = function VisuallyHidden(_ref) {
51
57
  var _ref$as = _ref.as,
52
- Element = _ref$as === void 0 ? 'span' : _ref$as,
53
- children = _ref.children,
54
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
58
+ Element = _ref$as === void 0 ? 'span' : _ref$as,
59
+ children = _ref.children,
60
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
61
+
55
62
  return React__default["default"].createElement(Element, _extends({
56
63
  className: "eds-visually-hidden"
57
64
  }, 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,aAAa;EAAA,IACxBC,QAAQ,QAARA,QAAQ;IAAA,mBACRC,MAAM;IAANA,MAAM,4BAAG,cAAc;EAAA,OAEvBC;IAAGC,SAAS,EAAC,qBAAqB;IAACC,IAAI,QAAMH;KAC1CD,QAAQ,CACP;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICLOK,cAAc,GAAkC,SAAhDA,cAAc;EAAA,mBACzBC,EAAE;IAAEC,OAAO,wBAAG,MAAM;IACpBP,QAAQ,QAARA,QAAQ;IACLQ,IAAI;EAAA,OAEPN,wCAACK,OAAO;IAACJ,SAAS,EAAC;KAA0BK,IAAI,GAC9CR,QAAQ,CACD;AAAA;;ACjBZS,4BAAsB,CAAC,MAAM,EAAE,YAAY,CAAC;;;;;"}
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 +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","_ref$mainId","mainId","React","className","href","children","as","Element","rest"],"mappings":"4aAGAA,yBAAuB,OAAQ,oCCS4B,YAAjC,IAChBC,IACRC,OAAuB,OAEvBC,6BAAGC,UAAU,sBAAsBC,qBAF1B,qBADTC,kCCA2D,YAAlC,QACzBC,GAAIC,aAAU,SACdF,IAAAA,SACGG,0IAAI,OAEPN,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","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"}
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
@@ -15,35 +15,42 @@ function _extends() {
15
15
  _extends = Object.assign || function (target) {
16
16
  for (var i = 1; i < arguments.length; i++) {
17
17
  var source = arguments[i];
18
+
18
19
  for (var key in source) {
19
20
  if (Object.prototype.hasOwnProperty.call(source, key)) {
20
21
  target[key] = source[key];
21
22
  }
22
23
  }
23
24
  }
25
+
24
26
  return target;
25
27
  };
28
+
26
29
  return _extends.apply(this, arguments);
27
30
  }
31
+
28
32
  function _objectWithoutPropertiesLoose(source, excluded) {
29
33
  if (source == null) return {};
30
34
  var target = {};
31
35
  var sourceKeys = Object.keys(source);
32
36
  var key, i;
37
+
33
38
  for (i = 0; i < sourceKeys.length; i++) {
34
39
  key = sourceKeys[i];
35
40
  if (excluded.indexOf(key) >= 0) continue;
36
41
  target[key] = source[key];
37
42
  }
43
+
38
44
  return target;
39
45
  }
40
46
 
41
47
  var _excluded = ["as", "children"];
42
48
  var VisuallyHidden = function VisuallyHidden(_ref) {
43
49
  var _ref$as = _ref.as,
44
- Element = _ref$as === void 0 ? 'span' : _ref$as,
45
- children = _ref.children,
46
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
50
+ Element = _ref$as === void 0 ? 'span' : _ref$as,
51
+ children = _ref.children,
52
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
53
+
47
54
  return React.createElement(Element, _extends({
48
55
  className: "eds-visually-hidden"
49
56
  }, 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,aAAa;EAAA,IACxBC,QAAQ,QAARA,QAAQ;IAAA,mBACRC,MAAM;IAANA,MAAM,4BAAG,cAAc;EAAA,OAEvBC;IAAGC,SAAS,EAAC,qBAAqB;IAACC,IAAI,QAAMH;KAC1CD,QAAQ,CACP;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICLOK,cAAc,GAAkC,SAAhDA,cAAc;EAAA,mBACzBC,EAAE;IAAEC,OAAO,wBAAG,MAAM;IACpBP,QAAQ,QAARA,QAAQ;IACLQ,IAAI;EAAA,OAEPN,oBAACK,OAAO;IAACJ,SAAS,EAAC;KAA0BK,IAAI,GAC9CR,QAAQ,CACD;AAAA;;ACjBZS,sBAAsB,CAAC,MAAM,EAAE,YAAY,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', '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;;;;"}
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.51",
3
+ "version": "0.2.53",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/a11y.esm.js",
@@ -17,21 +17,18 @@
17
17
  "access": "public"
18
18
  },
19
19
  "scripts": {
20
- "start": "yarn run dts watch --noClean",
21
- "build": "yarn run dts build",
22
- "lint": "yarn run dts lint"
20
+ "start": "dts watch --noClean",
21
+ "build": "dts build",
22
+ "lint": "dts lint"
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.2",
30
- "@entur/typography": "^1.7.2",
31
- "@entur/utils": "^0.4.7"
29
+ "@entur/tokens": "^3.4.4",
30
+ "@entur/typography": "^1.7.4",
31
+ "@entur/utils": "^0.4.9"
32
32
  },
33
- "devDependencies": {
34
- "dts-cli": "^1.1.6"
35
- },
36
- "gitHead": "8915b1630bd936740ba9a4a88883f3432948a80e"
33
+ "gitHead": "de71e205560a699e2dce301e133966dc9348c459"
37
34
  }