@skyux/a11y 5.0.0 → 5.5.0-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.
Files changed (44) hide show
  1. package/README.md +6 -4
  2. package/bundles/skyux-a11y.umd.js +41 -57
  3. package/documentation.json +21 -15
  4. package/esm2015/index.js +5 -0
  5. package/esm2015/index.js.map +1 -0
  6. package/esm2015/lib/modules/shared/a11y-resources.module.js +45 -0
  7. package/esm2015/lib/modules/shared/a11y-resources.module.js.map +1 -0
  8. package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js +25 -0
  9. package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js.map +1 -0
  10. package/esm2015/lib/modules/skip-link/skip-link-args.js +3 -0
  11. package/esm2015/lib/modules/skip-link/skip-link-args.js.map +1 -0
  12. package/esm2015/lib/modules/skip-link/skip-link-host.component.js +35 -0
  13. package/esm2015/lib/modules/skip-link/skip-link-host.component.js.map +1 -0
  14. package/esm2015/lib/modules/skip-link/skip-link.js +2 -0
  15. package/esm2015/lib/modules/skip-link/skip-link.js.map +1 -0
  16. package/esm2015/lib/modules/skip-link/skip-link.module.js +23 -0
  17. package/esm2015/lib/modules/skip-link/skip-link.module.js.map +1 -0
  18. package/esm2015/lib/modules/skip-link/skip-link.service.js +51 -0
  19. package/esm2015/lib/modules/skip-link/skip-link.service.js.map +1 -0
  20. package/esm2015/skyux-a11y.js +2 -2
  21. package/esm2015/skyux-a11y.js.map +1 -0
  22. package/fesm2015/skyux-a11y.js +35 -49
  23. package/fesm2015/skyux-a11y.js.map +1 -1
  24. package/index.d.ts +4 -0
  25. package/{modules → lib/modules}/shared/a11y-resources.module.d.ts +0 -0
  26. package/{modules → lib/modules}/skip-link/skip-link-adapter.service.d.ts +0 -0
  27. package/{modules → lib/modules}/skip-link/skip-link-args.d.ts +0 -0
  28. package/{modules → lib/modules}/skip-link/skip-link-host.component.d.ts +0 -0
  29. package/{modules → lib/modules}/skip-link/skip-link.d.ts +0 -0
  30. package/{modules → lib/modules}/skip-link/skip-link.module.d.ts +0 -0
  31. package/{modules → lib/modules}/skip-link/skip-link.service.d.ts +0 -0
  32. package/package.json +19 -5
  33. package/skyux-a11y.d.ts +1 -1
  34. package/LICENSE +0 -21
  35. package/bundles/skyux-a11y.umd.js.map +0 -1
  36. package/esm2015/modules/shared/a11y-resources.module.js +0 -41
  37. package/esm2015/modules/skip-link/skip-link-adapter.service.js +0 -24
  38. package/esm2015/modules/skip-link/skip-link-args.js +0 -3
  39. package/esm2015/modules/skip-link/skip-link-host.component.js +0 -39
  40. package/esm2015/modules/skip-link/skip-link.js +0 -2
  41. package/esm2015/modules/skip-link/skip-link.module.js +0 -37
  42. package/esm2015/modules/skip-link/skip-link.service.js +0 -51
  43. package/esm2015/public-api.js +0 -5
  44. package/public-api.d.ts +0 -4
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
- # @skyux/a11y
1
+ # a11y
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@skyux/a11y.svg)](https://www.npmjs.com/package/@skyux/a11y)
4
- ![SKY UX CI](https://github.com/blackbaud/skyux-a11y/workflows/SKY%20UX%20CI/badge.svg)
5
- [![coverage](https://codecov.io/gh/blackbaud/skyux-a11y/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/blackbaud/skyux-a11y/branch/master)
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test a11y` to execute the unit tests.
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@skyux/i18n'), require('@skyux/core')) :
3
3
  typeof define === 'function' && define.amd ? define('@skyux/a11y', ['exports', '@angular/core', '@angular/common', '@skyux/i18n', '@skyux/core'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.a11y = {}), global.ng.core, global.ng.common, global.i3, global.i1));
5
- }(this, (function (exports, i0, i2, i3, i1) { 'use strict';
5
+ })(this, (function (exports, i0, i2, i3, i1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -13,14 +13,12 @@
13
13
  var d = Object.getOwnPropertyDescriptor(e, k);
14
14
  Object.defineProperty(n, k, d.get ? d : {
15
15
  enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
16
+ get: function () { return e[k]; }
19
17
  });
20
18
  }
21
19
  });
22
20
  }
23
- n['default'] = e;
21
+ n["default"] = e;
24
22
  return Object.freeze(n);
25
23
  }
26
24
 
@@ -36,7 +34,7 @@
36
34
  * To update this file, simply rerun the command.
37
35
  */
38
36
  var RESOURCES = {
39
- 'EN-US': { "skyux_list_skip_to_link": { "message": "Skip to {0}" } },
37
+ 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
40
38
  };
41
39
  var SkyA11yResourcesProvider = /** @class */ (function () {
42
40
  function SkyA11yResourcesProvider() {
@@ -54,22 +52,26 @@
54
52
  }
55
53
  return SkyA11yResourcesModule;
56
54
  }());
57
- SkyA11yResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyA11yResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
58
- SkyA11yResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyA11yResourcesModule, exports: [i3.SkyI18nModule] });
59
- SkyA11yResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyA11yResourcesModule, providers: [{
55
+ SkyA11yResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
56
+ SkyA11yResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, exports: [i3.SkyI18nModule] });
57
+ SkyA11yResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, providers: [
58
+ {
60
59
  provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
61
60
  useClass: SkyA11yResourcesProvider,
62
- multi: true
63
- }], imports: [i3.SkyI18nModule] });
64
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyA11yResourcesModule, decorators: [{
61
+ multi: true,
62
+ },
63
+ ], imports: [i3.SkyI18nModule] });
64
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, decorators: [{
65
65
  type: i0.NgModule,
66
66
  args: [{
67
67
  exports: [i3.SkyI18nModule],
68
- providers: [{
68
+ providers: [
69
+ {
69
70
  provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
70
71
  useClass: SkyA11yResourcesProvider,
71
- multi: true
72
- }]
72
+ multi: true,
73
+ },
74
+ ],
73
75
  }]
74
76
  }] });
75
77
 
@@ -89,9 +91,9 @@
89
91
  };
90
92
  return SkySkipLinkAdapterService;
91
93
  }());
92
- SkySkipLinkAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkAdapterService, deps: [{ token: i1__namespace.SkyAppWindowRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
93
- SkySkipLinkAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkAdapterService });
94
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkAdapterService, decorators: [{
94
+ SkySkipLinkAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService, deps: [{ token: i1__namespace.SkyAppWindowRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
95
+ SkySkipLinkAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService });
96
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService, decorators: [{
95
97
  type: i0.Injectable
96
98
  }], ctorParameters: function () { return [{ type: i1__namespace.SkyAppWindowRef }]; } });
97
99
 
@@ -116,20 +118,16 @@
116
118
  };
117
119
  return SkySkipLinkHostComponent;
118
120
  }());
119
- SkySkipLinkHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkHostComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
120
- SkySkipLinkHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [
121
- SkySkipLinkAdapterService
122
- ], ngImport: i0__namespace, template: "<button *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources:link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
123
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkHostComponent, decorators: [{
121
+ SkySkipLinkHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkHostComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
122
+ SkySkipLinkHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0__namespace, template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources: link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
123
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkHostComponent, decorators: [{
124
124
  type: i0.Component,
125
125
  args: [{
126
126
  selector: 'sky-skip-link-host',
127
- templateUrl: './skip-link-host.component.html',
128
- styleUrls: ['./skip-link-host.component.scss'],
127
+ template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources: link.title }}\n</button>\n",
128
+ styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"],
129
129
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
130
- providers: [
131
- SkySkipLinkAdapterService
132
- ]
130
+ providers: [SkySkipLinkAdapterService],
133
131
  }]
134
132
  }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
135
133
 
@@ -141,29 +139,15 @@
141
139
  }
142
140
  return SkySkipLinkModule;
143
141
  }());
144
- SkySkipLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
145
- SkySkipLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [i2.CommonModule,
146
- i3.SkyI18nModule,
147
- SkyA11yResourcesModule] });
148
- SkySkipLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkModule, imports: [[
149
- i2.CommonModule,
150
- i3.SkyI18nModule,
151
- SkyA11yResourcesModule
152
- ]] });
153
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkModule, decorators: [{
142
+ SkySkipLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
143
+ SkySkipLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule] });
144
+ SkySkipLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, imports: [[i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule]] });
145
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, decorators: [{
154
146
  type: i0.NgModule,
155
147
  args: [{
156
- entryComponents: [
157
- SkySkipLinkHostComponent
158
- ],
159
- declarations: [
160
- SkySkipLinkHostComponent
161
- ],
162
- imports: [
163
- i2.CommonModule,
164
- i3.SkyI18nModule,
165
- SkyA11yResourcesModule
166
- ]
148
+ entryComponents: [SkySkipLinkHostComponent],
149
+ declarations: [SkySkipLinkHostComponent],
150
+ imports: [i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule],
167
151
  }]
168
152
  }] });
169
153
 
@@ -182,8 +166,8 @@
182
166
  SkySkipLinkService.prototype.setSkipLinks = function (args) {
183
167
  var _this = this;
184
168
  args.links = args.links.filter(function (link) {
185
- var elementRefExists = (link.elementRef);
186
- return (elementRefExists);
169
+ var elementRefExists = link.elementRef;
170
+ return elementRefExists;
187
171
  });
188
172
  // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
189
173
  setTimeout(function () {
@@ -198,7 +182,7 @@
198
182
  SkySkipLinkService.prototype.createHostComponent = function () {
199
183
  if (!SkySkipLinkService.host) {
200
184
  var componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
201
- location: i1.SkyDynamicComponentLocation.BodyTop
185
+ location: i1.SkyDynamicComponentLocation.BodyTop,
202
186
  });
203
187
  SkySkipLinkService.host = componentRef;
204
188
  }
@@ -206,12 +190,12 @@
206
190
  };
207
191
  return SkySkipLinkService;
208
192
  }());
209
- SkySkipLinkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkService, deps: [{ token: i1__namespace.SkyDynamicComponentService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
210
- SkySkipLinkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkService, providedIn: 'root' });
211
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkySkipLinkService, decorators: [{
193
+ SkySkipLinkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, deps: [{ token: i1__namespace.SkyDynamicComponentService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
194
+ SkySkipLinkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, providedIn: 'root' });
195
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, decorators: [{
212
196
  type: i0.Injectable,
213
197
  args: [{
214
- providedIn: 'root'
198
+ providedIn: 'root',
215
199
  }]
216
200
  }], ctorParameters: function () { return [{ type: i1__namespace.SkyDynamicComponentService }]; } });
217
201
 
@@ -224,5 +208,5 @@
224
208
 
225
209
  Object.defineProperty(exports, '__esModule', { value: true });
226
210
 
227
- })));
211
+ }));
228
212
  //# sourceMappingURL=skyux-a11y.umd.js.map
@@ -8,7 +8,7 @@
8
8
  "typedoc": {
9
9
  "id": 0,
10
10
  "name": "@skyux/a11y",
11
- "kind": 0,
11
+ "kind": 1,
12
12
  "kindString": "Project",
13
13
  "flags": {},
14
14
  "originalName": "",
@@ -27,10 +27,12 @@
27
27
  "name": "NgModule",
28
28
  "type": {
29
29
  "type": "reference",
30
+ "qualifiedName": "NgModuleDecorator",
31
+ "package": "@angular/core",
30
32
  "name": "NgModule"
31
33
  },
32
34
  "arguments": {
33
- "obj": "{\n entryComponents: [\n SkySkipLinkHostComponent\n ],\n declarations: [\n SkySkipLinkHostComponent\n ],\n imports: [\n CommonModule,\n SkyI18nModule,\n SkyA11yResourcesModule\n ]\n}"
35
+ "obj": "{\n entryComponents: [SkySkipLinkHostComponent],\n declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n}"
34
36
  }
35
37
  }
36
38
  ],
@@ -69,7 +71,7 @@
69
71
  "sources": [
70
72
  {
71
73
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.module.ts",
72
- "line": 37,
74
+ "line": 19,
73
75
  "character": 13
74
76
  }
75
77
  ]
@@ -94,10 +96,12 @@
94
96
  "name": "Injectable",
95
97
  "type": {
96
98
  "type": "reference",
99
+ "qualifiedName": "InjectableDecorator",
100
+ "package": "@angular/core",
97
101
  "name": "Injectable"
98
102
  },
99
103
  "arguments": {
100
- "options": "{\n providedIn: 'root'\n}"
104
+ "options": "{\n providedIn: 'root',\n}"
101
105
  }
102
106
  }
103
107
  ],
@@ -111,7 +115,7 @@
111
115
  "sources": [
112
116
  {
113
117
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
114
- "line": 37,
118
+ "line": 28,
115
119
  "character": 2
116
120
  }
117
121
  ],
@@ -154,7 +158,7 @@
154
158
  "sources": [
155
159
  {
156
160
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
157
- "line": 54,
161
+ "line": 43,
158
162
  "character": 9
159
163
  }
160
164
  ],
@@ -183,7 +187,7 @@
183
187
  "sources": [
184
188
  {
185
189
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
186
- "line": 41,
190
+ "line": 30,
187
191
  "character": 9
188
192
  }
189
193
  ],
@@ -236,7 +240,7 @@
236
240
  "sources": [
237
241
  {
238
242
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
239
- "line": 34,
243
+ "line": 25,
240
244
  "character": 13
241
245
  }
242
246
  ]
@@ -263,7 +267,7 @@
263
267
  "sources": [
264
268
  {
265
269
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.ts",
266
- "line": 20,
270
+ "line": 17,
267
271
  "character": 2
268
272
  }
269
273
  ],
@@ -275,6 +279,8 @@
275
279
  "name": "any"
276
280
  }
277
281
  ],
282
+ "qualifiedName": "ElementRef",
283
+ "package": "@angular/core",
278
284
  "name": "ElementRef"
279
285
  }
280
286
  },
@@ -290,7 +296,7 @@
290
296
  "sources": [
291
297
  {
292
298
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.ts",
293
- "line": 13,
299
+ "line": 10,
294
300
  "character": 2
295
301
  }
296
302
  ],
@@ -313,7 +319,7 @@
313
319
  "sources": [
314
320
  {
315
321
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.ts",
316
- "line": 8,
322
+ "line": 6,
317
323
  "character": 17
318
324
  }
319
325
  ]
@@ -340,7 +346,7 @@
340
346
  "sources": [
341
347
  {
342
348
  "fileName": "projects/a11y/src/modules/skip-link/skip-link-args.ts",
343
- "line": 17,
349
+ "line": 14,
344
350
  "character": 2
345
351
  }
346
352
  ],
@@ -366,7 +372,7 @@
366
372
  "sources": [
367
373
  {
368
374
  "fileName": "projects/a11y/src/modules/skip-link/skip-link-args.ts",
369
- "line": 12,
375
+ "line": 10,
370
376
  "character": 17
371
377
  }
372
378
  ]
@@ -392,11 +398,11 @@
392
398
  ],
393
399
  "sources": [
394
400
  {
395
- "fileName": "projects/a11y/src/public-api.ts",
401
+ "fileName": "index.ts",
396
402
  "line": 1,
397
403
  "character": 0
398
404
  }
399
405
  ]
400
406
  },
401
407
  "codeExamples": []
402
- }
408
+ }
@@ -0,0 +1,5 @@
1
+ export * from './lib/modules/skip-link/skip-link-args';
2
+ export * from './lib/modules/skip-link/skip-link.module';
3
+ export * from './lib/modules/skip-link/skip-link.service';
4
+ export * from './lib/modules/skip-link/skip-link';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/a11y/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './lib/modules/skip-link/skip-link-args';\nexport * from './lib/modules/skip-link/skip-link.module';\nexport * from './lib/modules/skip-link/skip-link.service';\nexport * from './lib/modules/skip-link/skip-link';\n"]}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * NOTICE: DO NOT MODIFY THIS FILE!
3
+ * The contents of this file were automatically generated by
4
+ * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.
5
+ * To update this file, simply rerun the command.
6
+ */
7
+ import { NgModule } from '@angular/core';
8
+ import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS, } from '@skyux/i18n';
9
+ import * as i0 from "@angular/core";
10
+ const RESOURCES = {
11
+ 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
12
+ };
13
+ export class SkyA11yResourcesProvider {
14
+ getString(localeInfo, name) {
15
+ return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
16
+ }
17
+ }
18
+ /**
19
+ * Import into any component library module that needs to use resource strings.
20
+ */
21
+ export class SkyA11yResourcesModule {
22
+ }
23
+ SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
24
+ SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
25
+ SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, providers: [
26
+ {
27
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
28
+ useClass: SkyA11yResourcesProvider,
29
+ multi: true,
30
+ },
31
+ ], imports: [SkyI18nModule] });
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
33
+ type: NgModule,
34
+ args: [{
35
+ exports: [SkyI18nModule],
36
+ providers: [
37
+ {
38
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
39
+ useClass: SkyA11yResourcesProvider,
40
+ multi: true,
41
+ },
42
+ ],
43
+ }]
44
+ }] });
45
+ //# sourceMappingURL=a11y-resources.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"a11y-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/shared/a11y-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,qBAAqB,EAErB,aAAa,EAGb,2BAA2B,GAC5B,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;CACjE,CAAC;AAEF,MAAM,OAAO,wBAAwB;IAC5B,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,sBAAsB;;oHAAtB,sBAAsB;qHAAtB,sBAAsB,YATvB,aAAa;qHASZ,sBAAsB,aARtB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,wBAAwB;YAClC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,sBAAsB;kBAVlC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,wBAAwB;4BAClC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },\n};\n\nexport class SkyA11yResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyA11yResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyA11yResourcesModule {}\n"]}
@@ -0,0 +1,25 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { SkyAppWindowRef } from '@skyux/core';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@skyux/core";
5
+ export class SkySkipLinkAdapterService {
6
+ constructor(windowRef) {
7
+ this.windowRef = windowRef;
8
+ }
9
+ skipTo(link) {
10
+ const targetElement = link.elementRef.nativeElement;
11
+ const win = this.windowRef.nativeWindow;
12
+ const bodyElement = win.document.body;
13
+ const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
14
+ const bodyDefaultPadding = 10;
15
+ const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
16
+ win.scroll(0, scrollTop);
17
+ targetElement.focus();
18
+ }
19
+ }
20
+ SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
21
+ SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
23
+ type: Injectable
24
+ }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
25
+ //# sourceMappingURL=skip-link-adapter.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;;;AAK9C,MAAM,OAAO,yBAAyB;IACpC,YAAoB,SAA0B;QAA1B,cAAS,GAAT,SAAS,CAAiB;IAAG,CAAC;IAE3C,MAAM,CAAC,IAAiB;QAC7B,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACpD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACxC,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEtC,MAAM,aAAa,GAAG,QAAQ,CAC5B,GAAG,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,SAAS,EAC3C,EAAE,CACH,CAAC;QACF,MAAM,kBAAkB,GAAG,EAAE,CAAC;QAC9B,MAAM,SAAS,GACb,aAAa,CAAC,SAAS,GAAG,aAAa,GAAG,kBAAkB,CAAC;QAE/D,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QAEzB,aAAa,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;;uHAnBU,yBAAyB;2HAAzB,yBAAyB;4FAAzB,yBAAyB;kBADrC,UAAU","sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\n@Injectable()\nexport class SkySkipLinkAdapterService {\n constructor(private windowRef: SkyAppWindowRef) {}\n\n public skipTo(link: SkySkipLink): void {\n const targetElement = link.elementRef.nativeElement;\n const win = this.windowRef.nativeWindow;\n const bodyElement = win.document.body;\n\n const bodyMarginTop = parseInt(\n win.getComputedStyle(bodyElement).marginTop,\n 10\n );\n const bodyDefaultPadding = 10;\n const scrollTop =\n targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;\n\n win.scroll(0, scrollTop);\n\n targetElement.focus();\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ //#region imports
2
+ export {};
3
+ //# sourceMappingURL=skip-link-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-args.ts"],"names":[],"mappings":"AAAA,iBAAiB","sourcesContent":["//#region imports\n\nimport { SkySkipLink } from './skip-link';\n\n//#endregion\n\n/**\n * Options specified when setting the page's skip links.\n */\nexport interface SkySkipLinkArgs {\n /**\n * The skip links to create.\n */\n links: SkySkipLink[];\n}\n"]}
@@ -0,0 +1,35 @@
1
+ import { ChangeDetectorRef, ChangeDetectionStrategy, Component, } from '@angular/core';
2
+ import { SkySkipLinkAdapterService } from './skip-link-adapter.service';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./skip-link-adapter.service";
5
+ import * as i2 from "@angular/common";
6
+ import * as i3 from "@skyux/i18n";
7
+ export class SkySkipLinkHostComponent {
8
+ constructor(changeDetector, adapter) {
9
+ this.changeDetector = changeDetector;
10
+ this.adapter = adapter;
11
+ }
12
+ get links() {
13
+ return this._links;
14
+ }
15
+ set links(value) {
16
+ this._links = value;
17
+ this.changeDetector.markForCheck();
18
+ }
19
+ skipTo(link) {
20
+ this.adapter.skipTo(link);
21
+ }
22
+ }
23
+ SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
24
+ SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0, template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources: link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
26
+ type: Component,
27
+ args: [{
28
+ selector: 'sky-skip-link-host',
29
+ templateUrl: './skip-link-host.component.html',
30
+ styleUrls: ['./skip-link-host.component.scss'],
31
+ changeDetection: ChangeDetectionStrategy.OnPush,
32
+ providers: [SkySkipLinkAdapterService],
33
+ }]
34
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SkySkipLinkAdapterService }]; } });
35
+ //# sourceMappingURL=skip-link-host.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link-host.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.ts","../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,SAAS,GACV,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;;;;;AASxE,MAAM,OAAO,wBAAwB;IAYnC,YACU,cAAiC,EACjC,OAAkC;QADlC,mBAAc,GAAd,cAAc,CAAmB;QACjC,YAAO,GAAP,OAAO,CAA2B;IACzC,CAAC;IAdJ,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,KAAK,CAAC,KAAoB;QACnC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IASM,MAAM,CAAC,IAAiB;QAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;;sHAnBU,wBAAwB;0GAAxB,wBAAwB,6CAFxB,CAAC,yBAAyB,CAAC,0BCfxC,4NAQA;4FDSa,wBAAwB;kBAPpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,iCAAiC;oBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;oBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,yBAAyB,CAAC;iBACvC","sourcesContent":["import {\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\n\nimport { SkySkipLinkAdapterService } from './skip-link-adapter.service';\n\n@Component({\n selector: 'sky-skip-link-host',\n templateUrl: './skip-link-host.component.html',\n styleUrls: ['./skip-link-host.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SkySkipLinkAdapterService],\n})\nexport class SkySkipLinkHostComponent {\n public get links(): SkySkipLink[] {\n return this._links;\n }\n\n public set links(value: SkySkipLink[]) {\n this._links = value;\n this.changeDetector.markForCheck();\n }\n\n private _links: SkySkipLink[];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private adapter: SkySkipLinkAdapterService\n ) {}\n\n public skipTo(link: SkySkipLink): void {\n this.adapter.skipTo(link);\n }\n}\n","<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources: link.title }}\n</button>\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=skip-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.ts"],"names":[],"mappings":"","sourcesContent":["import { ElementRef } from '@angular/core';\n\n/**\n * A \"skip link\" that allows a user to skip parts of the page and go directly to the main content.\n */\nexport interface SkySkipLink {\n /**\n * The title of the skip link.\n */\n title: string;\n\n /**\n * The element to scroll to and focus when the skip link is clicked. This element must\n * allow focus, either by spcecifying an HTML element that allows focus by default (such\n * as a `button` or `a` element) or by setting `tabindex=\"-1\" on the specified element.\n */\n elementRef: ElementRef;\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { SkyI18nModule } from '@skyux/i18n';
4
+ import { SkyA11yResourcesModule } from '../shared/a11y-resources.module';
5
+ import { SkySkipLinkHostComponent } from './skip-link-host.component';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * The Angular module that enables "skip links" to be added to the page.
9
+ */
10
+ export class SkySkipLinkModule {
11
+ }
12
+ SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
+ SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
14
+ SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, decorators: [{
16
+ type: NgModule,
17
+ args: [{
18
+ entryComponents: [SkySkipLinkHostComponent],
19
+ declarations: [SkySkipLinkHostComponent],
20
+ imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
21
+ }]
22
+ }] });
23
+ //# sourceMappingURL=skip-link.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;;AAEtE;;GAEG;AAMH,MAAM,OAAO,iBAAiB;;+GAAjB,iBAAiB;gHAAjB,iBAAiB,iBAHb,wBAAwB,aAC7B,YAAY,EAAE,aAAa,EAAE,sBAAsB;gHAElD,iBAAiB,YAFnB,CAAC,YAAY,EAAE,aAAa,EAAE,sBAAsB,CAAC;4FAEnD,iBAAiB;kBAL7B,QAAQ;mBAAC;oBACR,eAAe,EAAE,CAAC,wBAAwB,CAAC;oBAC3C,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,sBAAsB,CAAC;iBAC/D","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/a11y-resources.module';\n\nimport { SkySkipLinkHostComponent } from './skip-link-host.component';\n\n/**\n * The Angular module that enables \"skip links\" to be added to the page.\n */\n@NgModule({\n entryComponents: [SkySkipLinkHostComponent],\n declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n})\nexport class SkySkipLinkModule {}\n"]}
@@ -0,0 +1,51 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { SkyDynamicComponentLocation, SkyDynamicComponentService, } from '@skyux/core';
3
+ import { SkySkipLinkHostComponent } from './skip-link-host.component';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@skyux/core";
6
+ /**
7
+ * An Angular service that adds "skip links" to the page. Skip links will only be displayed
8
+ * when the page initially loads and the user presses the Tab key, in which case the first link will
9
+ * be displayed and focused. Clicking the button will skip to the specified element. Pressing
10
+ * the Tab key again will move to the next skip link if more than one skip link is specified;
11
+ * otherwise, focus will move to the first focusable element on the page.
12
+ * @dynamic
13
+ */
14
+ export class SkySkipLinkService {
15
+ constructor(dynamicComponentService) {
16
+ this.dynamicComponentService = dynamicComponentService;
17
+ }
18
+ setSkipLinks(args) {
19
+ args.links = args.links.filter((link) => {
20
+ const elementRefExists = link.elementRef;
21
+ return elementRefExists;
22
+ });
23
+ // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
24
+ setTimeout(() => {
25
+ const host = this.createHostComponent();
26
+ host.instance.links = args.links;
27
+ });
28
+ }
29
+ removeHostComponent() {
30
+ this.dynamicComponentService.removeComponent(SkySkipLinkService.host);
31
+ SkySkipLinkService.host = undefined;
32
+ }
33
+ createHostComponent() {
34
+ if (!SkySkipLinkService.host) {
35
+ const componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
36
+ location: SkyDynamicComponentLocation.BodyTop,
37
+ });
38
+ SkySkipLinkService.host = componentRef;
39
+ }
40
+ return SkySkipLinkService.host;
41
+ }
42
+ }
43
+ SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
44
+ SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, decorators: [{
46
+ type: Injectable,
47
+ args: [{
48
+ providedIn: 'root',
49
+ }]
50
+ }], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
51
+ //# sourceMappingURL=skip-link.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;;;AAEtE;;;;;;;GAOG;AAIH,MAAM,OAAO,kBAAkB;IAG7B,YAAoB,uBAAmD;QAAnD,4BAAuB,GAAvB,uBAAuB,CAA4B;IAAG,CAAC;IAEpE,YAAY,CAAC,IAAqB;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAiB,EAAE,EAAE;YACnD,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,OAAO,gBAAgB,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,4FAA4F;QAC5F,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,mBAAmB;QACxB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACtE,kBAAkB,CAAC,IAAI,GAAG,SAAS,CAAC;IACtC,CAAC;IAEO,mBAAmB;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE;YAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAC/D,wBAAwB,EACxB;gBACE,QAAQ,EAAE,2BAA2B,CAAC,OAAO;aAC9C,CACF,CAAC;YAEF,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC;SACxC;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACjC,CAAC;;gHApCU,kBAAkB;oHAAlB,kBAAkB,cAFjB,MAAM;4FAEP,kBAAkB;kBAH9B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { ComponentRef, Injectable } from '@angular/core';\n\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\nimport { SkySkipLinkArgs } from './skip-link-args';\n\nimport { SkySkipLinkHostComponent } from './skip-link-host.component';\n\n/**\n * An Angular service that adds \"skip links\" to the page. Skip links will only be displayed\n * when the page initially loads and the user presses the Tab key, in which case the first link will\n * be displayed and focused. Clicking the button will skip to the specified element. Pressing\n * the Tab key again will move to the next skip link if more than one skip link is specified;\n * otherwise, focus will move to the first focusable element on the page.\n * @dynamic\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkySkipLinkService {\n private static host: ComponentRef<SkySkipLinkHostComponent>;\n\n constructor(private dynamicComponentService: SkyDynamicComponentService) {}\n\n public setSkipLinks(args: SkySkipLinkArgs) {\n args.links = args.links.filter((link: SkySkipLink) => {\n const elementRefExists = link.elementRef;\n return elementRefExists;\n });\n\n // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.\n setTimeout(() => {\n const host = this.createHostComponent();\n host.instance.links = args.links;\n });\n }\n\n public removeHostComponent(): void {\n this.dynamicComponentService.removeComponent(SkySkipLinkService.host);\n SkySkipLinkService.host = undefined;\n }\n\n private createHostComponent(): ComponentRef<SkySkipLinkHostComponent> {\n if (!SkySkipLinkService.host) {\n const componentRef = this.dynamicComponentService.createComponent(\n SkySkipLinkHostComponent,\n {\n location: SkyDynamicComponentLocation.BodyTop,\n }\n );\n\n SkySkipLinkService.host = componentRef;\n }\n\n return SkySkipLinkService.host;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
- export * from './public-api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2t5dXgtYTExeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2ExMXkvc3JjL3NreXV4LWExMXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
4
+ export * from './index';
5
+ //# sourceMappingURL=skyux-a11y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skyux-a11y.js","sourceRoot":"","sources":["../../../../../libs/components/a11y/src/skyux-a11y.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}