@skyux/a11y 13.12.0 → 14.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,11 +11,11 @@ import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
11
11
  * @internal
12
12
  */
13
13
  class SkySkipLinkModule {
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
15
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkModule }); }
16
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkModule }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
15
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkModule }); }
16
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkModule }); }
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkModule, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkModule, decorators: [{
19
19
  type: NgModule,
20
20
  args: [{}]
21
21
  }] });
@@ -36,11 +36,11 @@ SkyLibResourcesService.addResources(RESOURCES);
36
36
  * Import into any component library module that needs to use resource strings.
37
37
  */
38
38
  class SkyA11yResourcesModule {
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
40
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] }); }
41
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkyA11yResourcesModule, imports: [SkyI18nModule] }); }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
40
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] }); }
41
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkyA11yResourcesModule, imports: [SkyI18nModule] }); }
42
42
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
44
44
  type: NgModule,
45
45
  args: [{
46
46
  exports: [SkyI18nModule],
@@ -62,10 +62,10 @@ class SkySkipLinkAdapterService {
62
62
  win.scroll(0, scrollTop);
63
63
  targetElement.focus();
64
64
  }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
66
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkAdapterService }); }
65
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
66
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkAdapterService }); }
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
69
69
  type: Injectable
70
70
  }], ctorParameters: () => [{ type: i1.SkyAppWindowRef }] });
71
71
 
@@ -83,10 +83,10 @@ class SkySkipLinkHostComponent {
83
83
  skipTo(link) {
84
84
  this.#adapter.skipTo(link);
85
85
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: SkySkipLinkHostComponent, isStandalone: true, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0, template: "@for (link of links; track link.title) {\n <button\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}\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"], dependencies: [{ kind: "ngmodule", type: SkyA11yResourcesModule }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SkySkipLinkHostComponent, isStandalone: true, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0, template: "@for (link of links; track link.title) {\n <button\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}\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"], dependencies: [{ kind: "ngmodule", type: SkyA11yResourcesModule }, { kind: "pipe", type: i1$1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
90
90
  type: Component,
91
91
  args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], imports: [SkyA11yResourcesModule], template: "@for (link of links; track link.title) {\n <button\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}\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"] }]
92
92
  }] });
@@ -128,10 +128,10 @@ class SkySkipLinkService {
128
128
  });
129
129
  return componentRef;
130
130
  }
131
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
132
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' }); }
131
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
132
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' }); }
133
133
  }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SkySkipLinkService, decorators: [{
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SkySkipLinkService, decorators: [{
135
135
  type: Injectable,
136
136
  args: [{
137
137
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-a11y.mjs","sources":["../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts","../../../../../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.service.ts","../../../../../libs/components/a11y/src/skyux-a11y.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\n/**\n * The Angular module that enables \"skip links\" to be added to the page.\n * @deprecated The `SkySkipLinkModule` is no longer needed and can be removed from your application.\n * @internal\n */\n@NgModule({})\nexport class SkySkipLinkModule {}\n","/* istanbul ignore file */\n/**\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 SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesService,\n} from '@skyux/i18n';\n\nconst RESOURCES: Record<string, SkyLibResources> = {\n 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },\n 'FR-CA': { skyux_list_skip_to_link: { message: 'Passer à {0}' } },\n};\n\nSkyLibResourcesService.addResources(RESOURCES);\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\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 #windowRef: SkyAppWindowRef;\n\n constructor(windowRef: SkyAppWindowRef) {\n this.#windowRef = windowRef;\n }\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 inject,\n} from '@angular/core';\n\nimport { SkyA11yResourcesModule } from '../shared/sky-a11y-resources.module';\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 imports: [SkyA11yResourcesModule],\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 #_links: SkySkipLink[] = [];\n\n readonly #adapter = inject(SkySkipLinkAdapterService);\n readonly #changeDetector = inject(ChangeDetectorRef);\n\n public skipTo(link: SkySkipLink): void {\n this.#adapter.skipTo(link);\n }\n}\n","@for (link of links; track link.title) {\n <button\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}\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 */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkySkipLinkService {\n private static host: ComponentRef<SkySkipLinkHostComponent> | undefined;\n\n #dynamicComponentService: SkyDynamicComponentService;\n\n constructor(dynamicComponentService: SkyDynamicComponentService) {\n this.#dynamicComponentService = dynamicComponentService;\n }\n\n public setSkipLinks(args: SkySkipLinkArgs): void {\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 if (!SkySkipLinkService.host) {\n SkySkipLinkService.host = this.#createHostComponent();\n }\n\n SkySkipLinkService.host.instance.links = args.links;\n });\n }\n\n public removeHostComponent(): void {\n if (SkySkipLinkService.host) {\n this.#dynamicComponentService.removeComponent(SkySkipLinkService.host);\n SkySkipLinkService.host = undefined;\n }\n }\n\n #createHostComponent(): ComponentRef<SkySkipLinkHostComponent> {\n const componentRef = this.#dynamicComponentService.createComponent(\n SkySkipLinkHostComponent,\n {\n location: SkyDynamicComponentLocation.BodyTop,\n },\n );\n\n return componentRef;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;AAEA;;;;AAIG;MAEU,iBAAiB,CAAA;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAjB,iBAAiB,EAAA,CAAA,CAAA;gHAAjB,iBAAiB,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,QAAQ;mBAAC,EAAE;;;ACPZ;AACA;;;;;AAKG;AAQH,MAAM,SAAS,GAAoC;IACjD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;IAChE,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE;CAClE;AAED,sBAAsB,CAAC,YAAY,CAAC,SAAS,CAAC;AAE9C;;AAEG;MAIU,sBAAsB,CAAA;+GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,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AA,EAAA,CAAA,0BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;4FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"skyux-a11y.mjs","sources":["../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts","../../../../../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.service.ts","../../../../../libs/components/a11y/src/skyux-a11y.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\n/**\n * The Angular module that enables \"skip links\" to be added to the page.\n * @deprecated The `SkySkipLinkModule` is no longer needed and can be removed from your application.\n * @internal\n */\n@NgModule({})\nexport class SkySkipLinkModule {}\n","/* istanbul ignore file */\n/**\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 SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesService,\n} from '@skyux/i18n';\n\nconst RESOURCES: Record<string, SkyLibResources> = {\n 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },\n 'FR-CA': { skyux_list_skip_to_link: { message: 'Passer à {0}' } },\n};\n\nSkyLibResourcesService.addResources(RESOURCES);\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\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 #windowRef: SkyAppWindowRef;\n\n constructor(windowRef: SkyAppWindowRef) {\n this.#windowRef = windowRef;\n }\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 inject,\n} from '@angular/core';\n\nimport { SkyA11yResourcesModule } from '../shared/sky-a11y-resources.module';\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 imports: [SkyA11yResourcesModule],\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 #_links: SkySkipLink[] = [];\n\n readonly #adapter = inject(SkySkipLinkAdapterService);\n readonly #changeDetector = inject(ChangeDetectorRef);\n\n public skipTo(link: SkySkipLink): void {\n this.#adapter.skipTo(link);\n }\n}\n","@for (link of links; track link.title) {\n <button\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}\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 */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkySkipLinkService {\n private static host: ComponentRef<SkySkipLinkHostComponent> | undefined;\n\n #dynamicComponentService: SkyDynamicComponentService;\n\n constructor(dynamicComponentService: SkyDynamicComponentService) {\n this.#dynamicComponentService = dynamicComponentService;\n }\n\n public setSkipLinks(args: SkySkipLinkArgs): void {\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 if (!SkySkipLinkService.host) {\n SkySkipLinkService.host = this.#createHostComponent();\n }\n\n SkySkipLinkService.host.instance.links = args.links;\n });\n }\n\n public removeHostComponent(): void {\n if (SkySkipLinkService.host) {\n this.#dynamicComponentService.removeComponent(SkySkipLinkService.host);\n SkySkipLinkService.host = undefined;\n }\n }\n\n #createHostComponent(): ComponentRef<SkySkipLinkHostComponent> {\n const componentRef = this.#dynamicComponentService.createComponent(\n SkySkipLinkHostComponent,\n {\n location: SkyDynamicComponentLocation.BodyTop,\n },\n );\n\n return componentRef;\n }\n}\n","/**\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;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/a11y",
3
- "version": "13.12.0",
3
+ "version": "14.0.0-alpha.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -16,26 +16,26 @@
16
16
  },
17
17
  "homepage": "https://github.com/blackbaud/skyux#readme",
18
18
  "peerDependencies": {
19
- "@angular/core": "^20.3.15",
20
- "@skyux/core": "13.12.0",
21
- "@skyux/i18n": "13.12.0"
19
+ "@angular/core": "^21.0.8",
20
+ "@skyux/core": "14.0.0-alpha.0",
21
+ "@skyux/i18n": "14.0.0-alpha.0"
22
22
  },
23
23
  "dependencies": {
24
24
  "tslib": "^2.8.1"
25
25
  },
26
26
  "sideEffects": false,
27
27
  "module": "fesm2022/skyux-a11y.mjs",
28
- "typings": "index.d.ts",
28
+ "typings": "types/skyux-a11y.d.ts",
29
29
  "exports": {
30
30
  "./package.json": {
31
31
  "default": "./package.json"
32
32
  },
33
33
  ".": {
34
- "types": "./index.d.ts",
34
+ "types": "./types/skyux-a11y.d.ts",
35
35
  "default": "./fesm2022/skyux-a11y.mjs"
36
36
  },
37
37
  "./testing": {
38
- "types": "./testing/index.d.ts",
38
+ "types": "./types/skyux-a11y-testing.d.ts",
39
39
  "default": "./fesm2022/skyux-a11y-testing.mjs"
40
40
  }
41
41
  }
File without changes