@skyux/a11y 5.7.0 → 6.0.0-beta.1

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 (35) hide show
  1. package/documentation.json +2 -2
  2. package/esm2020/index.mjs +5 -0
  3. package/esm2020/lib/modules/shared/sky-a11y-resources.module.mjs +45 -0
  4. package/esm2020/lib/modules/skip-link/skip-link-adapter.service.mjs +25 -0
  5. package/esm2020/lib/modules/skip-link/skip-link-args.mjs +2 -0
  6. package/esm2020/lib/modules/skip-link/skip-link-host.component.mjs +29 -0
  7. package/esm2020/lib/modules/skip-link/skip-link.mjs +2 -0
  8. package/esm2020/lib/modules/skip-link/skip-link.module.mjs +22 -0
  9. package/esm2020/lib/modules/skip-link/skip-link.service.mjs +51 -0
  10. package/esm2020/skyux-a11y.mjs +5 -0
  11. package/fesm2015/{skyux-a11y.js → skyux-a11y.mjs} +19 -26
  12. package/fesm2015/skyux-a11y.mjs.map +1 -0
  13. package/fesm2020/skyux-a11y.mjs +163 -0
  14. package/fesm2020/skyux-a11y.mjs.map +1 -0
  15. package/package.json +23 -10
  16. package/bundles/skyux-a11y.umd.js +0 -212
  17. package/esm2015/index.js +0 -5
  18. package/esm2015/index.js.map +0 -1
  19. package/esm2015/lib/modules/shared/sky-a11y-resources.module.js +0 -45
  20. package/esm2015/lib/modules/shared/sky-a11y-resources.module.js.map +0 -1
  21. package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js +0 -25
  22. package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js.map +0 -1
  23. package/esm2015/lib/modules/skip-link/skip-link-args.js +0 -2
  24. package/esm2015/lib/modules/skip-link/skip-link-args.js.map +0 -1
  25. package/esm2015/lib/modules/skip-link/skip-link-host.component.js +0 -35
  26. package/esm2015/lib/modules/skip-link/skip-link-host.component.js.map +0 -1
  27. package/esm2015/lib/modules/skip-link/skip-link.js +0 -2
  28. package/esm2015/lib/modules/skip-link/skip-link.js.map +0 -1
  29. package/esm2015/lib/modules/skip-link/skip-link.module.js +0 -23
  30. package/esm2015/lib/modules/skip-link/skip-link.module.js.map +0 -1
  31. package/esm2015/lib/modules/skip-link/skip-link.service.js +0 -51
  32. package/esm2015/lib/modules/skip-link/skip-link.service.js.map +0 -1
  33. package/esm2015/skyux-a11y.js +0 -5
  34. package/esm2015/skyux-a11y.js.map +0 -1
  35. package/fesm2015/skyux-a11y.js.map +0 -1
@@ -32,7 +32,7 @@
32
32
  "name": "NgModule"
33
33
  },
34
34
  "arguments": {
35
- "obj": "{\n entryComponents: [SkySkipLinkHostComponent],\n declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n}"
35
+ "obj": "{\n declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n}"
36
36
  }
37
37
  }
38
38
  ],
@@ -49,7 +49,7 @@
49
49
  "sources": [
50
50
  {
51
51
  "fileName": "projects/a11y/src/modules/skip-link/skip-link.module.ts",
52
- "line": 17,
52
+ "line": 16,
53
53
  "character": 13
54
54
  }
55
55
  ]
@@ -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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvYTExeS9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3Q0FBd0MsQ0FBQztBQUN2RCxjQUFjLDBDQUEwQyxDQUFDO0FBQ3pELGNBQWMsMkNBQTJDLENBQUM7QUFDMUQsY0FBYyxtQ0FBbUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL21vZHVsZXMvc2tpcC1saW5rL3NraXAtbGluay1hcmdzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL21vZHVsZXMvc2tpcC1saW5rL3NraXAtbGluay5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rJztcbiJdfQ==
@@ -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 lib/modules/shared/sky-a11y' schematic.
5
+ * To update this file, simply rerun the command.
6
+ */
7
+ import { NgModule } from '@angular/core';
8
+ import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } 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: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
24
+ SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
25
+ SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", 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: "13.2.7", 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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2t5LWExMXktcmVzb3VyY2VzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hMTF5L3NyYy9saWIvbW9kdWxlcy9zaGFyZWQvc2t5LWExMXktcmVzb3VyY2VzLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRztBQUNILE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUNMLDJCQUEyQixFQUUzQixhQUFhLEVBR2IscUJBQXFCLEdBQ3RCLE1BQU0sYUFBYSxDQUFDOztBQUVyQixNQUFNLFNBQVMsR0FBMEM7SUFDdkQsT0FBTyxFQUFFLEVBQUUsdUJBQXVCLEVBQUUsRUFBRSxPQUFPLEVBQUUsYUFBYSxFQUFFLEVBQUU7Q0FDakUsQ0FBQztBQUVGLE1BQU0sT0FBTyx3QkFBd0I7SUFDNUIsU0FBUyxDQUNkLFVBQTRCLEVBQzVCLElBQVk7UUFFWixPQUFPLHFCQUFxQixDQUFDLFNBQVMsRUFB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HVsZSB7fVxuIl19
@@ -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: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
21
+ SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
23
+ type: Injectable
24
+ }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWFkYXB0ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hMTF5L3NyYy9saWIvbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rLWFkYXB0ZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10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0Bza3l1eC9jb3JlJztcblxuaW1wb3J0IHsgU2t5U2tpcExpbmsgfSBmcm9tICcuL3NraXAtbGluayc7XG5cbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBTa3lTa2lwTGlua0FkYXB0ZXJTZXJ2aWNlIHtcbiAgY29uc3RydWN0b3IocHJpdmF0ZSB3aW5kb3dSZWY6IFNreUFwcFdpbmRvd1JlZikge31cblxuICBwdWJsaWMgc2tpcFRvKGxpbms6IFNreVNraXBMaW5rKTogdm9pZCB7XG4gICAgY29uc3QgdGFyZ2V0RWxlbWVudCA9IGxpbmsuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50O1xuICAgIGNvbnN0IHdpbiA9IHRoaXMud2luZG93UmVmLm5hdGl2ZVdpbmRvdztcbiAgICBjb25zdCBib2R5RWxlbWVudCA9IHdpbi5kb2N1bWVudC5ib2R5O1xuXG4gICAgY29uc3QgYm9keU1hcmdpblRvcCA9IHBhcnNlSW50KFxuICAgICAgd2luLmdldENvbXB1dGVkU3R5bGUoYm9keUVsZW1lbnQpLm1hcmdpblRvcCxcbiAgICAgIDEwXG4gICAgKTtcbiAgICBjb25zdCBib2R5RGVmYXVsdFBhZGRpbmcgPSAxMDtcbiAgICBjb25zdCBzY3JvbGxUb3AgPVxuICAgICAgdGFyZ2V0RWxlbWVudC5vZmZzZXRUb3AgLSBib2R5TWFyZ2luVG9wIC0gYm9keURlZmF1bHRQYWRkaW5nO1xuXG4gICAgd2luLnNjcm9sbCgwLCBzY3JvbGxUb3ApO1xuXG4gICAgdGFyZ2V0RWxlbWVudC5mb2N1cygpO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWFyZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvYTExeS9zcmMvbGliL21vZHVsZXMvc2tpcC1saW5rL3NraXAtbGluay1hcmdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvLyNyZWdpb24gaW1wb3J0c1xuaW1wb3J0IHsgU2t5U2tpcExpbmsgfSBmcm9tICcuL3NraXAtbGluayc7XG5cbi8vI2VuZHJlZ2lvblxuXG4vKipcbiAqIE9wdGlvbnMgc3BlY2lmaWVkIHdoZW4gc2V0dGluZyB0aGUgcGFnZSdzIHNraXAgbGlua3MuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgU2t5U2tpcExpbmtBcmdzIHtcbiAgLyoqXG4gICAqIFRoZSBza2lwIGxpbmtzIHRvIGNyZWF0ZS5cbiAgICovXG4gIGxpbmtzOiBTa3lTa2lwTGlua1tdO1xufVxuIl19
@@ -0,0 +1,29 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, 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: "13.2.7", 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: "13.2.7", 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: "13.2.7", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
26
+ type: Component,
27
+ args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], 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"] }]
28
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SkySkipLinkAdapterService }]; } });
29
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4v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cbmV4cG9ydCBpbnRlcmZhY2UgU2t5U2tpcExpbmsge1xuICAvKipcbiAgICogVGhlIHRpdGxlIG9mIHRoZSBza2lwIGxpbmsuXG4gICAqL1xuICB0aXRsZTogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBUaGUgZWxlbWVudCB0byBzY3JvbGwgdG8gYW5kIGZvY3VzIHdoZW4gdGhlIHNraXAgbGluayBpcyBjbGlja2VkLiAgVGhpcyBlbGVtZW50IG11c3RcbiAgICogYWxsb3cgZm9jdXMsIGVpdGhlciBieSBzcGNlY2lmeWluZyBhbiBIVE1MIGVsZW1lbnQgdGhhdCBhbGxvd3MgZm9jdXMgYnkgZGVmYXVsdCAoc3VjaFxuICAgKiBhcyBhIGBidXR0b25gIG9yIGBhYCBlbGVtZW50KSBvciBieSBzZXR0aW5nIGB0YWJpbmRleD1cIi0xXCIgb24gdGhlIHNwZWNpZmllZCBlbGVtZW50LlxuICAgKi9cbiAgZWxlbWVudFJlZjogRWxlbWVudFJlZjtcbn1cbiJdfQ==
@@ -0,0 +1,22 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { NgModule } from '@angular/core';
3
+ import { SkyI18nModule } from '@skyux/i18n';
4
+ import { SkyA11yResourcesModule } from '../shared/sky-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: "13.2.7", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
+ SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
14
+ SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, decorators: [{
16
+ type: NgModule,
17
+ args: [{
18
+ declarations: [SkySkipLinkHostComponent],
19
+ imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
20
+ }]
21
+ }] });
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hMTF5L3NyYy9saWIvbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBRTVDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBRTdFLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDOztBQUV0RTs7R0FFRztBQUtILE1BQU0sT0FBTyxpQkFBaUI7OzhHQUFqQixpQkFBaUI7K0dBQWpCLGlCQUFpQixpQkFIYix3QkFBd0IsYUFDN0IsWUFBWSxFQUFFLGFBQWEsRUFBRSxzQkFBc0I7K0dBRWxELGlCQUFpQixZQUZuQixDQUFDLFlBQVksRUFBRSxhQUFhLEVBQUUsc0JBQXNCLENBQUM7MkZBRW5ELGlCQUFpQjtrQkFKN0IsUUFBUTttQkFBQztvQkFDUixZQUFZLEVBQUUsQ0FBQyx3QkFBd0IsQ0FBQztvQkFDeEMsT0FBTyxFQUFFLENBQUMsWUFBWSxFQUFFLGFBQWEsRUFBRSxzQkFBc0IsQ0FBQztpQkFDL0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFNreUkxOG5Nb2R1bGUgfSBmcm9tICdAc2t5dXgvaTE4bic7XG5cbmltcG9ydCB7IFNreUExMXlSZXNvdXJjZXNNb2R1bGUgfSBmcm9tICcuLi9zaGFyZWQvc2t5LWExMXktcmVzb3VyY2VzLm1vZHVsZSc7XG5cbmltcG9ydCB7IFNreVNraXBMaW5rSG9zdENvbXBvbmVudCB9IGZyb20gJy4vc2tpcC1saW5rLWhvc3QuY29tcG9uZW50JztcblxuLyoqXG4gKiBUaGUgQW5ndWxhciBtb2R1bGUgdGhhdCBlbmFibGVzIFwic2tpcCBsaW5rc1wiIHRvIGJlIGFkZGVkIHRvIHRoZSBwYWdlLlxuICovXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtTa3lTa2lwTGlua0hvc3RDb21wb25lbnRdLFxuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLCBTa3lJMThuTW9kdWxlLCBTa3lBMTF5UmVzb3VyY2VzTW9kdWxlXSxcbn0pXG5leHBvcnQgY2xhc3MgU2t5U2tpcExpbmtNb2R1bGUge31cbiJdfQ==
@@ -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: "13.2.7", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
44
+ SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, decorators: [{
46
+ type: Injectable,
47
+ args: [{
48
+ providedIn: 'root',
49
+ }]
50
+ }], ctorParameters: function () {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W50TG9jYXRpb24uQm9keVRvcCxcbiAgICAgICAgfVxuICAgICAgKTtcblxuICAgICAgU2t5U2tpcExpbmtTZXJ2aWNlLmhvc3QgPSBjb21wb25lbnRSZWY7XG4gICAgfVxuXG4gICAgcmV0dXJuIFNreVNraXBMaW5rU2VydmljZS5ob3N0O1xuICB9XG59XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2t5dXgtYTExeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hMTF5L3NyYy9za3l1eC1hMTF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -26,16 +26,16 @@ class SkyA11yResourcesProvider {
26
26
  */
27
27
  class SkyA11yResourcesModule {
28
28
  }
29
- SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
30
- SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
31
- SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, providers: [
29
+ SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
30
+ SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
31
+ SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, providers: [
32
32
  {
33
33
  provide: SKY_LIB_RESOURCES_PROVIDERS,
34
34
  useClass: SkyA11yResourcesProvider,
35
35
  multi: true,
36
36
  },
37
37
  ], imports: [SkyI18nModule] });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
39
39
  type: NgModule,
40
40
  args: [{
41
41
  exports: [SkyI18nModule],
@@ -64,9 +64,9 @@ class SkySkipLinkAdapterService {
64
64
  targetElement.focus();
65
65
  }
66
66
  }
67
- SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
68
- SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService });
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
67
+ SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
68
+ SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
70
70
  type: Injectable
71
71
  }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
72
72
 
@@ -86,17 +86,11 @@ class SkySkipLinkHostComponent {
86
86
  this.adapter.skipTo(link);
87
87
  }
88
88
  }
89
- SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
90
- 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 });
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
89
+ SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
90
+ SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", 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 });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
92
92
  type: Component,
93
- args: [{
94
- selector: 'sky-skip-link-host',
95
- templateUrl: './skip-link-host.component.html',
96
- styleUrls: ['./skip-link-host.component.scss'],
97
- changeDetection: ChangeDetectionStrategy.OnPush,
98
- providers: [SkySkipLinkAdapterService],
99
- }]
93
+ args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], 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"] }]
100
94
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
101
95
 
102
96
  /**
@@ -104,13 +98,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
104
98
  */
105
99
  class SkySkipLinkModule {
106
100
  }
107
- SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
108
- SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
109
- SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, decorators: [{
101
+ SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
102
+ SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
103
+ SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, decorators: [{
111
105
  type: NgModule,
112
106
  args: [{
113
- entryComponents: [SkySkipLinkHostComponent],
114
107
  declarations: [SkySkipLinkHostComponent],
115
108
  imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
116
109
  }]
@@ -153,9 +146,9 @@ class SkySkipLinkService {
153
146
  return SkySkipLinkService.host;
154
147
  }
155
148
  }
156
- SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
157
- SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, decorators: [{
149
+ SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
150
+ SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, decorators: [{
159
152
  type: Injectable,
160
153
  args: [{
161
154
  providedIn: 'root',
@@ -167,4 +160,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
167
160
  */
168
161
 
169
162
  export { SkySkipLinkModule, SkySkipLinkService };
170
- //# sourceMappingURL=skyux-a11y.js.map
163
+ //# sourceMappingURL=skyux-a11y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skyux-a11y.mjs","sources":["../../../../../libs/components/a11y/src/lib/modules/shared/sky-a11y-resources.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts","../../../../../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","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts","../../../../../libs/components/a11y/src/skyux-a11y.ts"],"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 lib/modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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","import { Injectable } from '@angular/core';\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","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\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","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/sky-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 declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n})\nexport class SkySkipLinkModule {}\n","import { ComponentRef, Injectable } from '@angular/core';\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkArgs } from './skip-link-args';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SkySkipLinkAdapterService"],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAWH,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;CACjE,CAAC;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AC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AACnC,SAAC,CAAC,CAAC;KACJ;IAEM,mBAAmB,GAAA;QACxB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AACtE,QAAA,kBAAkB,CAAC,IAAI,GAAG,SAAS,CAAC;KACrC;IAEO,mBAAmB,GAAA;AACzB,QAAA,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,aAAA,CACF,CAAC;AAEF,YAAA,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC;AACxC,SAAA;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;KAChC;;+GApCU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,kBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACpBD;;AAEG;;;;"}
@@ -0,0 +1,163 @@
1
+ import * as i2 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { NgModule, Injectable, Component, ChangeDetectionStrategy } from '@angular/core';
5
+ import * as i3 from '@skyux/i18n';
6
+ import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
7
+ import * as i1 from '@skyux/core';
8
+ import { SkyDynamicComponentLocation } from '@skyux/core';
9
+
10
+ /**
11
+ * NOTICE: DO NOT MODIFY THIS FILE!
12
+ * The contents of this file were automatically generated by
13
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
14
+ * To update this file, simply rerun the command.
15
+ */
16
+ const RESOURCES = {
17
+ 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
18
+ };
19
+ class SkyA11yResourcesProvider {
20
+ getString(localeInfo, name) {
21
+ return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
22
+ }
23
+ }
24
+ /**
25
+ * Import into any component library module that needs to use resource strings.
26
+ */
27
+ class SkyA11yResourcesModule {
28
+ }
29
+ SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
30
+ SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
31
+ SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, providers: [
32
+ {
33
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
34
+ useClass: SkyA11yResourcesProvider,
35
+ multi: true,
36
+ },
37
+ ], imports: [SkyI18nModule] });
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
39
+ type: NgModule,
40
+ args: [{
41
+ exports: [SkyI18nModule],
42
+ providers: [
43
+ {
44
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
45
+ useClass: SkyA11yResourcesProvider,
46
+ multi: true,
47
+ },
48
+ ],
49
+ }]
50
+ }] });
51
+
52
+ class SkySkipLinkAdapterService {
53
+ constructor(windowRef) {
54
+ this.windowRef = windowRef;
55
+ }
56
+ skipTo(link) {
57
+ const targetElement = link.elementRef.nativeElement;
58
+ const win = this.windowRef.nativeWindow;
59
+ const bodyElement = win.document.body;
60
+ const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
61
+ const bodyDefaultPadding = 10;
62
+ const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
63
+ win.scroll(0, scrollTop);
64
+ targetElement.focus();
65
+ }
66
+ }
67
+ SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
68
+ SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
70
+ type: Injectable
71
+ }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
72
+
73
+ class SkySkipLinkHostComponent {
74
+ constructor(changeDetector, adapter) {
75
+ this.changeDetector = changeDetector;
76
+ this.adapter = adapter;
77
+ }
78
+ get links() {
79
+ return this._links;
80
+ }
81
+ set links(value) {
82
+ this._links = value;
83
+ this.changeDetector.markForCheck();
84
+ }
85
+ skipTo(link) {
86
+ this.adapter.skipTo(link);
87
+ }
88
+ }
89
+ SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
90
+ SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", 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 });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
92
+ type: Component,
93
+ args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], 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"] }]
94
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
95
+
96
+ /**
97
+ * The Angular module that enables "skip links" to be added to the page.
98
+ */
99
+ class SkySkipLinkModule {
100
+ }
101
+ SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
102
+ SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
103
+ SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkModule, decorators: [{
105
+ type: NgModule,
106
+ args: [{
107
+ declarations: [SkySkipLinkHostComponent],
108
+ imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
109
+ }]
110
+ }] });
111
+
112
+ /**
113
+ * An Angular service that adds "skip links" to the page. Skip links will only be displayed
114
+ * when the page initially loads and the user presses the Tab key, in which case the first link will
115
+ * be displayed and focused. Clicking the button will skip to the specified element. Pressing
116
+ * the Tab key again will move to the next skip link if more than one skip link is specified;
117
+ * otherwise, focus will move to the first focusable element on the page.
118
+ * @dynamic
119
+ */
120
+ class SkySkipLinkService {
121
+ constructor(dynamicComponentService) {
122
+ this.dynamicComponentService = dynamicComponentService;
123
+ }
124
+ setSkipLinks(args) {
125
+ args.links = args.links.filter((link) => {
126
+ const elementRefExists = link.elementRef;
127
+ return elementRefExists;
128
+ });
129
+ // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
130
+ setTimeout(() => {
131
+ const host = this.createHostComponent();
132
+ host.instance.links = args.links;
133
+ });
134
+ }
135
+ removeHostComponent() {
136
+ this.dynamicComponentService.removeComponent(SkySkipLinkService.host);
137
+ SkySkipLinkService.host = undefined;
138
+ }
139
+ createHostComponent() {
140
+ if (!SkySkipLinkService.host) {
141
+ const componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
142
+ location: SkyDynamicComponentLocation.BodyTop,
143
+ });
144
+ SkySkipLinkService.host = componentRef;
145
+ }
146
+ return SkySkipLinkService.host;
147
+ }
148
+ }
149
+ SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
150
+ SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySkipLinkService, decorators: [{
152
+ type: Injectable,
153
+ args: [{
154
+ providedIn: 'root',
155
+ }]
156
+ }], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
157
+
158
+ /**
159
+ * Generated bundle index. Do not edit.
160
+ */
161
+
162
+ export { SkySkipLinkModule, SkySkipLinkService };
163
+ //# sourceMappingURL=skyux-a11y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skyux-a11y.mjs","sources":["../../../../../libs/components/a11y/src/lib/modules/shared/sky-a11y-resources.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts","../../../../../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","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts","../../../../../libs/components/a11y/src/skyux-a11y.ts"],"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 lib/modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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","import { Injectable } from '@angular/core';\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","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\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","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/sky-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 declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n})\nexport class SkySkipLinkModule {}\n","import { ComponentRef, Injectable } from '@angular/core';\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkArgs } from './skip-link-args';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SkySkipLinkAdapterService"],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAWH,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;CACjE,CAAC;MAEW,wBAAwB,CAAA;IAC5B,SAAS,CACd,UAA4B,EAC5B,IAAY,EAAA;QAEZ,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAClE;AACF,CAAA;AAED;;AAEG;MAWU,sBAAsB,CAAA;;mHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YATvB,aAAa,CAAA,EAAA,CAAA,CAAA;AASZ,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA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A,EAAA,CAAA,0BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,kBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/a11y",
3
- "version": "5.7.0",
3
+ "version": "6.0.0-beta.1",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -16,19 +16,32 @@
16
16
  },
17
17
  "homepage": "https://github.com/blackbaud/skyux#readme",
18
18
  "peerDependencies": {
19
- "@angular/common": "^12.2.16",
20
- "@angular/core": "^12.2.16",
21
- "@skyux/core": "5.7.0",
22
- "@skyux/i18n": "5.7.0"
19
+ "@angular/common": "^13.2.7",
20
+ "@angular/core": "^13.2.7",
21
+ "@skyux/core": "6.0.0-beta.1",
22
+ "@skyux/i18n": "6.0.0-beta.1"
23
23
  },
24
24
  "dependencies": {
25
25
  "tslib": "^2.3.1"
26
26
  },
27
- "main": "bundles/skyux-a11y.umd.js",
28
- "module": "fesm2015/skyux-a11y.js",
29
- "es2015": "fesm2015/skyux-a11y.js",
30
- "esm2015": "esm2015/skyux-a11y.js",
31
- "fesm2015": "fesm2015/skyux-a11y.js",
27
+ "module": "fesm2015/skyux-a11y.mjs",
28
+ "es2020": "fesm2020/skyux-a11y.mjs",
29
+ "esm2020": "esm2020/skyux-a11y.mjs",
30
+ "fesm2020": "fesm2020/skyux-a11y.mjs",
31
+ "fesm2015": "fesm2015/skyux-a11y.mjs",
32
32
  "typings": "skyux-a11y.d.ts",
33
+ "exports": {
34
+ "./package.json": {
35
+ "default": "./package.json"
36
+ },
37
+ ".": {
38
+ "types": "./skyux-a11y.d.ts",
39
+ "esm2020": "./esm2020/skyux-a11y.mjs",
40
+ "es2020": "./fesm2020/skyux-a11y.mjs",
41
+ "es2015": "./fesm2015/skyux-a11y.mjs",
42
+ "node": "./fesm2015/skyux-a11y.mjs",
43
+ "default": "./fesm2020/skyux-a11y.mjs"
44
+ }
45
+ },
33
46
  "sideEffects": false
34
47
  }
@@ -1,212 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/i18n'), require('@skyux/core')) :
3
- typeof define === 'function' && define.amd ? define('@skyux/a11y', ['exports', '@angular/common', '@angular/core', '@skyux/i18n', '@skyux/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.a11y = {}), global.ng.common, global.ng.core, global.i3, global.i1));
5
- })(this, (function (exports, i2, i0, i3, i1) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
26
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
-
30
- /**
31
- * NOTICE: DO NOT MODIFY THIS FILE!
32
- * The contents of this file were automatically generated by
33
- * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
34
- * To update this file, simply rerun the command.
35
- */
36
- var RESOURCES = {
37
- 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
38
- };
39
- var SkyA11yResourcesProvider = /** @class */ (function () {
40
- function SkyA11yResourcesProvider() {
41
- }
42
- SkyA11yResourcesProvider.prototype.getString = function (localeInfo, name) {
43
- return i3.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
44
- };
45
- return SkyA11yResourcesProvider;
46
- }());
47
- /**
48
- * Import into any component library module that needs to use resource strings.
49
- */
50
- var SkyA11yResourcesModule = /** @class */ (function () {
51
- function SkyA11yResourcesModule() {
52
- }
53
- return SkyA11yResourcesModule;
54
- }());
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
- {
59
- provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
60
- useClass: SkyA11yResourcesProvider,
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
- type: i0.NgModule,
66
- args: [{
67
- exports: [i3.SkyI18nModule],
68
- providers: [
69
- {
70
- provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
71
- useClass: SkyA11yResourcesProvider,
72
- multi: true,
73
- },
74
- ],
75
- }]
76
- }] });
77
-
78
- var SkySkipLinkAdapterService = /** @class */ (function () {
79
- function SkySkipLinkAdapterService(windowRef) {
80
- this.windowRef = windowRef;
81
- }
82
- SkySkipLinkAdapterService.prototype.skipTo = function (link) {
83
- var targetElement = link.elementRef.nativeElement;
84
- var win = this.windowRef.nativeWindow;
85
- var bodyElement = win.document.body;
86
- var bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
87
- var bodyDefaultPadding = 10;
88
- var scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
89
- win.scroll(0, scrollTop);
90
- targetElement.focus();
91
- };
92
- return SkySkipLinkAdapterService;
93
- }());
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: [{
97
- type: i0.Injectable
98
- }], ctorParameters: function () { return [{ type: i1__namespace.SkyAppWindowRef }]; } });
99
-
100
- var SkySkipLinkHostComponent = /** @class */ (function () {
101
- function SkySkipLinkHostComponent(changeDetector, adapter) {
102
- this.changeDetector = changeDetector;
103
- this.adapter = adapter;
104
- }
105
- Object.defineProperty(SkySkipLinkHostComponent.prototype, "links", {
106
- get: function () {
107
- return this._links;
108
- },
109
- set: function (value) {
110
- this._links = value;
111
- this.changeDetector.markForCheck();
112
- },
113
- enumerable: false,
114
- configurable: true
115
- });
116
- SkySkipLinkHostComponent.prototype.skipTo = function (link) {
117
- this.adapter.skipTo(link);
118
- };
119
- return SkySkipLinkHostComponent;
120
- }());
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
- type: i0.Component,
125
- args: [{
126
- selector: 'sky-skip-link-host',
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
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
130
- providers: [SkySkipLinkAdapterService],
131
- }]
132
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
133
-
134
- /**
135
- * The Angular module that enables "skip links" to be added to the page.
136
- */
137
- var SkySkipLinkModule = /** @class */ (function () {
138
- function SkySkipLinkModule() {
139
- }
140
- return SkySkipLinkModule;
141
- }());
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: [{
146
- type: i0.NgModule,
147
- args: [{
148
- entryComponents: [SkySkipLinkHostComponent],
149
- declarations: [SkySkipLinkHostComponent],
150
- imports: [i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule],
151
- }]
152
- }] });
153
-
154
- /**
155
- * An Angular service that adds "skip links" to the page. Skip links will only be displayed
156
- * when the page initially loads and the user presses the Tab key, in which case the first link will
157
- * be displayed and focused. Clicking the button will skip to the specified element. Pressing
158
- * the Tab key again will move to the next skip link if more than one skip link is specified;
159
- * otherwise, focus will move to the first focusable element on the page.
160
- * @dynamic
161
- */
162
- var SkySkipLinkService = /** @class */ (function () {
163
- function SkySkipLinkService(dynamicComponentService) {
164
- this.dynamicComponentService = dynamicComponentService;
165
- }
166
- SkySkipLinkService.prototype.setSkipLinks = function (args) {
167
- var _this = this;
168
- args.links = args.links.filter(function (link) {
169
- var elementRefExists = link.elementRef;
170
- return elementRefExists;
171
- });
172
- // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
173
- setTimeout(function () {
174
- var host = _this.createHostComponent();
175
- host.instance.links = args.links;
176
- });
177
- };
178
- SkySkipLinkService.prototype.removeHostComponent = function () {
179
- this.dynamicComponentService.removeComponent(SkySkipLinkService.host);
180
- SkySkipLinkService.host = undefined;
181
- };
182
- SkySkipLinkService.prototype.createHostComponent = function () {
183
- if (!SkySkipLinkService.host) {
184
- var componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
185
- location: i1.SkyDynamicComponentLocation.BodyTop,
186
- });
187
- SkySkipLinkService.host = componentRef;
188
- }
189
- return SkySkipLinkService.host;
190
- };
191
- return SkySkipLinkService;
192
- }());
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: [{
196
- type: i0.Injectable,
197
- args: [{
198
- providedIn: 'root',
199
- }]
200
- }], ctorParameters: function () { return [{ type: i1__namespace.SkyDynamicComponentService }]; } });
201
-
202
- /**
203
- * Generated bundle index. Do not edit.
204
- */
205
-
206
- exports.SkySkipLinkModule = SkySkipLinkModule;
207
- exports.SkySkipLinkService = SkySkipLinkService;
208
-
209
- Object.defineProperty(exports, '__esModule', { value: true });
210
-
211
- }));
212
- //# sourceMappingURL=skyux-a11y.umd.js.map
package/esm2015/index.js DELETED
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"]}
@@ -1,45 +0,0 @@
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 lib/modules/shared/sky-a11y' schematic.
5
- * To update this file, simply rerun the command.
6
- */
7
- import { NgModule } from '@angular/core';
8
- import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } 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=sky-a11y-resources.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sky-a11y-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/shared/sky-a11y-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,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,CACd,UAA4B,EAC5B,IAAY;QAEZ,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 lib/modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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"]}
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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;AAC3C,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';\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"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=skip-link-args.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skip-link-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-args.ts"],"names":[],"mappings":"","sourcesContent":["//#region imports\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"]}
@@ -1,35 +0,0 @@
1
- import { ChangeDetectionStrategy, ChangeDetectorRef, 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
@@ -1 +0,0 @@
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,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,eAAe,CAAC;AAGvB,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,0BCdxC,4NAQA;4FDQa,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 ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\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"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=skip-link.js.map
@@ -1 +0,0 @@
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"]}
@@ -1,23 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { SkyI18nModule } from '@skyux/i18n';
4
- import { SkyA11yResourcesModule } from '../shared/sky-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
@@ -1 +0,0 @@
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,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,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 { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/sky-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"]}
@@ -1,51 +0,0 @@
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
@@ -1 +0,0 @@
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;AACzD,OAAO,EACL,2BAA2B,EAC3B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nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkArgs } from './skip-link-args';\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 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
5
- //# sourceMappingURL=skyux-a11y.js.map
@@ -1 +0,0 @@
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"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"skyux-a11y.js","sources":["../../../../../libs/components/a11y/src/lib/modules/shared/sky-a11y-resources.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts","../../../../../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","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts","../../../../../libs/components/a11y/src/skyux-a11y.ts"],"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 lib/modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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","import { Injectable } from '@angular/core';\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","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\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","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/sky-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","import { ComponentRef, Injectable } from '@angular/core';\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkArgs } from './skip-link-args';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAgBA,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;CACjE,CAAC;MAEW,wBAAwB;IAC5B,SAAS,CACd,UAA4B,EAC5B,IAAY;QAEZ,OAAO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