@clr/angular 12.0.13 → 12.0.14
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/bundles/clr-angular.umd.js +857 -557
- package/bundles/clr-angular.umd.js.map +1 -1
- package/clarity.api.md +4010 -0
- package/clr-angular.d.ts +21 -20
- package/clr-angular.metadata.json +1 -1
- package/esm2015/clr-angular.js +21 -20
- package/esm2015/data/datagrid/datagrid-column-toggle.js +4 -2
- package/esm2015/forms/datepicker/calendar.js +1 -1
- package/esm2015/forms/password/password-container.js +4 -1
- package/esm2015/layout/nav/header.js +25 -5
- package/esm2015/layout/nav/nav-level.js +106 -5
- package/esm2015/utils/breakpoints/breakpoints.js +15 -1
- package/esm2015/utils/focus-trap/focus-trap.js +144 -0
- package/esm2015/utils/i18n/common-strings.default.js +14 -1
- package/esm2015/utils/i18n/common-strings.interface.js +1 -1
- package/esm2015/wizard/providers/wizard-navigation.service.js +1 -1
- package/esm2015/wizard/wizard.js +9 -2
- package/fesm2015/clr-angular.js +862 -567
- package/fesm2015/clr-angular.js.map +1 -1
- package/layout/nav/header.d.ts +6 -0
- package/layout/nav/nav-level.d.ts +15 -3
- package/package.json +5 -5
- package/utils/breakpoints/breakpoints.d.ts +14 -0
- package/utils/focus-trap/focus-trap.d.ts +26 -0
- package/utils/i18n/common-strings.interface.d.ts +21 -0
package/layout/nav/header.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export declare class ClrHeader implements OnDestroy {
|
|
|
14
14
|
resetNavTriggers(): void;
|
|
15
15
|
initializeNavTriggers(navList: number[]): void;
|
|
16
16
|
closeOpenNav(): void;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Will be removed in with @clr/angular v15.0.0
|
|
19
|
+
*
|
|
20
|
+
* Use `openNav(navLevel)` instead to open the navigation and ResponsiveNavService to close it.
|
|
21
|
+
*/
|
|
17
22
|
toggleNav(navLevel: number): void;
|
|
23
|
+
openNav(navLevel: number): void;
|
|
18
24
|
ngOnDestroy(): void;
|
|
19
25
|
}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import { ElementRef, OnInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, Injector, OnInit, Renderer2 } from '@angular/core';
|
|
2
2
|
import { ResponsiveNavigationService } from './providers/responsive-navigation.service';
|
|
3
3
|
import { ResponsiveNavCodes } from './responsive-nav-codes';
|
|
4
|
-
|
|
4
|
+
import { FocusTrap, FocusTrapElement } from '../../utils/focus-trap/focus-trap';
|
|
5
|
+
import '@cds/core/internal-components/close-button/register.js';
|
|
6
|
+
export declare class ClrNavLevel extends FocusTrap implements OnInit {
|
|
5
7
|
private responsiveNavService;
|
|
6
8
|
private elementRef;
|
|
7
9
|
_level: number;
|
|
8
|
-
|
|
10
|
+
closeButtonAriaLabel: string;
|
|
11
|
+
private _subscription;
|
|
12
|
+
private _isOpen;
|
|
13
|
+
constructor(platformId: any, responsiveNavService: ResponsiveNavigationService, elementRef: ElementRef<FocusTrapElement>, renderer: Renderer2, injector: Injector);
|
|
9
14
|
ngOnInit(): void;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
10
16
|
addNavClass(level: number): void;
|
|
11
17
|
get level(): number;
|
|
12
18
|
get responsiveNavCodes(): ResponsiveNavCodes;
|
|
19
|
+
get isOpen(): boolean;
|
|
20
|
+
onResize(event: Event): void;
|
|
13
21
|
open(): void;
|
|
14
22
|
close(): void;
|
|
15
23
|
onMouseClick(target: any): void;
|
|
24
|
+
protected hideNavigation(): void;
|
|
25
|
+
protected showNavigation(): void;
|
|
26
|
+
protected hideCloseButton(): void;
|
|
27
|
+
protected showCloseButton(): void;
|
|
16
28
|
ngOnDestroy(): void;
|
|
17
29
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clr/angular",
|
|
3
3
|
"description": "Angular components for Clarity",
|
|
4
|
-
"homepage": "https://clarity.design",
|
|
4
|
+
"homepage": "https://angular.clarity.design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ng-add",
|
|
7
7
|
"clarity",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
],
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/vmware/clarity.git"
|
|
13
|
+
"url": "https://github.com/vmware-clarity/ng-clarity.git"
|
|
14
14
|
},
|
|
15
15
|
"author": "Clarity Design System",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/vmware/clarity/issues"
|
|
18
|
+
"url": "https://github.com/vmware-clarity/ng-clarity/issues"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@angular/common": "^12.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"metadata": "clr-angular.metadata.json",
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"tslib": "^2.
|
|
34
|
+
"tslib": "^2.1.0"
|
|
35
35
|
},
|
|
36
|
-
"version": "12.0.
|
|
36
|
+
"version": "12.0.14"
|
|
37
37
|
}
|
|
@@ -1 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO:
|
|
3
|
+
* Using core functions like:
|
|
4
|
+
* - pluckPixelValue
|
|
5
|
+
* - getCssPropertyValue
|
|
6
|
+
*
|
|
7
|
+
* to get the value of the design token.
|
|
8
|
+
*
|
|
9
|
+
* Note: Memoization/Cache usage possible.
|
|
10
|
+
*/
|
|
1
11
|
export declare const DATEPICKER_ENABLE_BREAKPOINT = 768;
|
|
12
|
+
export declare const SMALL_BREAKPOINT = 576;
|
|
13
|
+
export declare const MEDIUM_BREAKPOINT = 768;
|
|
14
|
+
export declare const LARGE_BREAKPOINT = 992;
|
|
15
|
+
export declare const EXTRA_LARGE_BREAKPOINT = 1200;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Injector, Renderer2 } from '@angular/core';
|
|
2
|
+
export interface FocusTrapElement extends HTMLElement {
|
|
3
|
+
topReboundElement: HTMLElement | undefined;
|
|
4
|
+
bottomReboundElement: HTMLElement | undefined;
|
|
5
|
+
focusTrapId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function refocusIfOutsideFocusTrapElement(focusedElement: HTMLElement, focusTrapElement: FocusTrapElement, elementToRefocus?: HTMLElement): void;
|
|
8
|
+
export declare function elementIsOutsideFocusTrapElement(focusedElement: HTMLElement, focusTrapElement: FocusTrapElement): boolean;
|
|
9
|
+
export declare function createFocusTrapReboundElement(document: Document): HTMLSpanElement;
|
|
10
|
+
export declare function addReboundElementsToFocusTrapElement(document: Document, focusTrapElement: FocusTrapElement): void;
|
|
11
|
+
export declare function removeReboundElementsFromFocusTrapElement(focusTrapElement: FocusTrapElement): void;
|
|
12
|
+
export declare function castHtmlElementToFocusTrapElement(el: HTMLElement): FocusTrapElement;
|
|
13
|
+
export declare class FocusTrap {
|
|
14
|
+
protected renderer: Renderer2;
|
|
15
|
+
focusTrapElement: FocusTrapElement;
|
|
16
|
+
private previousFocus;
|
|
17
|
+
private onFocusInEvent;
|
|
18
|
+
private unlisten;
|
|
19
|
+
protected _document: Document;
|
|
20
|
+
firstFocusElement: HTMLElement | FocusTrapElement;
|
|
21
|
+
active: boolean;
|
|
22
|
+
constructor(renderer: Renderer2, injector: Injector, platformId: any, hostElement: FocusTrapElement);
|
|
23
|
+
enableFocusTrap(): void;
|
|
24
|
+
removeFocusTrap(): void;
|
|
25
|
+
private onFocusIn;
|
|
26
|
+
}
|
|
@@ -204,6 +204,13 @@ export interface ClrCommonStrings {
|
|
|
204
204
|
datepickerCurrentDecade: string;
|
|
205
205
|
datepickerSelectMonthText: string;
|
|
206
206
|
datepickerSelectYearText: string;
|
|
207
|
+
/**
|
|
208
|
+
* Navigation
|
|
209
|
+
*/
|
|
210
|
+
responsiveNavToggleOpen: string;
|
|
211
|
+
responsiveNavToggleClose: string;
|
|
212
|
+
responsiveNavOverflowOpen: string;
|
|
213
|
+
responsiveNavOverflowClose: string;
|
|
207
214
|
/**
|
|
208
215
|
* Stack View: Record has changed
|
|
209
216
|
*/
|
|
@@ -247,4 +254,18 @@ export interface ClrCommonStrings {
|
|
|
247
254
|
comboboxSelected: string;
|
|
248
255
|
comboboxNoResults: string;
|
|
249
256
|
comboboxOpen: string;
|
|
257
|
+
/**
|
|
258
|
+
* Wizard: Screen-reader text for completed step.
|
|
259
|
+
*/
|
|
260
|
+
wizardStepSuccess: string;
|
|
261
|
+
/**
|
|
262
|
+
* Wizard: Screen-reader text for step with error.
|
|
263
|
+
*/
|
|
264
|
+
wizardStepError: string;
|
|
265
|
+
/**
|
|
266
|
+
* Password Input
|
|
267
|
+
* Screen-reader text for the hide/show password field button.
|
|
268
|
+
*/
|
|
269
|
+
passwordHide: string;
|
|
270
|
+
passwordShow: string;
|
|
250
271
|
}
|