@clr/angular 13.3.2 → 13.4.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.
package/package.json CHANGED
@@ -45,5 +45,5 @@
45
45
  "dependencies": {
46
46
  "tslib": "^2.3.0"
47
47
  },
48
- "version": "13.3.2"
48
+ "version": "13.4.0"
49
49
  }
package/utils/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from './focus/focus-on-view-init/index';
9
9
  export * from './focus-trap/index';
10
10
  export * from './destroy';
11
11
  export * from './for-type-ahead/index';
12
+ export * from './list-key-navigation/index';
@@ -0,0 +1,4 @@
1
+ export * from './key-navigation-list';
2
+ export * from './key-navigation-list.module';
3
+ export * from './providers/focusable-items';
4
+ export * from './providers/key-navigation-list.config';
@@ -0,0 +1,30 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface KeyNavigationListConfig {
4
+ keyListItems: string;
5
+ layout: 'both' | 'horizontal' | 'vertical';
6
+ manageFocus: boolean;
7
+ manageTabindex: boolean;
8
+ loop: boolean;
9
+ dir: string | null;
10
+ }
11
+ export declare class ClrKeyNavigationList implements AfterViewInit {
12
+ private host;
13
+ private defaultConfig;
14
+ private focusableElementSelectors;
15
+ private config;
16
+ set configuration(config: Partial<KeyNavigationListConfig>);
17
+ constructor(host: ElementRef<HTMLElement>, defaultConfig: KeyNavigationListConfig, focusableElementSelectors: string[]);
18
+ ngAfterViewInit(): void;
19
+ onClick(e: Event): void;
20
+ onKeyDown(e: KeyboardEvent): void;
21
+ private initializeTabIndex;
22
+ private clickItem;
23
+ private focusItem;
24
+ private getActiveItem;
25
+ private setActiveItem;
26
+ private getListItems;
27
+ private getClosestDirAttribute;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClrKeyNavigationList, never>;
29
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ClrKeyNavigationList, "[clrKeyNavigationList]", never, { "configuration": "configuration"; }, {}, never>;
30
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./key-navigation-list";
3
+ export declare class ClrKeyNavigationListModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClrKeyNavigationListModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ClrKeyNavigationListModule, [typeof i1.ClrKeyNavigationList], never, [typeof i1.ClrKeyNavigationList]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<ClrKeyNavigationListModule>;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ export declare const FOCUSABLE_ELEMENT_SELECTORS: InjectionToken<unknown>;
3
+ export declare const FOCUSABLE_ELEMENT_SELECTORS_PROVIDER: ValueProvider;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ export declare const CLR_LIST_KEY_NAVIGATION_CONFIG: InjectionToken<unknown>;
3
+ export declare const CLR_LIST_KEY_NAVIGATION_COFNIG_PROVIDER: ValueProvider;
@@ -0,0 +1,11 @@
1
+ import { KeyNavigationCode } from '@cds/core/internal';
2
+ export interface KeyListConfig {
3
+ code: KeyNavigationCode;
4
+ loop?: boolean;
5
+ layout?: 'horizontal' | 'vertical' | 'both';
6
+ dir: string | null | undefined;
7
+ }
8
+ export declare function getNextKeyListItem(item: HTMLElement, items: HTMLElement[], config: KeyListConfig): {
9
+ next: number;
10
+ previous: number;
11
+ };