@villedemontreal/angular-ui 2.2.0 → 3.1.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/esm2020/lib/alert/alert.component.mjs +7 -9
- package/esm2020/lib/avatar/avatar.component.mjs +102 -0
- package/esm2020/lib/avatar/index.mjs +8 -0
- package/esm2020/lib/avatar/module.mjs +24 -0
- package/esm2020/lib/bao.module.mjs +16 -4
- package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +5 -5
- package/esm2020/lib/button/button.component.mjs +3 -3
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +5 -6
- package/esm2020/lib/checkbox/checkbox.component.mjs +38 -39
- package/esm2020/lib/core/colors.mjs +10 -27
- package/esm2020/lib/icon/icon.component.mjs +29 -33
- package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
- package/esm2020/lib/modal/index.mjs +12 -0
- package/esm2020/lib/modal/modal-animations.mjs +29 -0
- package/esm2020/lib/modal/modal-config.mjs +65 -0
- package/esm2020/lib/modal/modal-container.mjs +254 -0
- package/esm2020/lib/modal/modal-directives.mjs +84 -0
- package/esm2020/lib/modal/modal-ref.mjs +195 -0
- package/esm2020/lib/modal/modal.mjs +291 -0
- package/esm2020/lib/modal/module.mjs +46 -0
- package/esm2020/lib/radio/radio-group.component.mjs +40 -41
- package/esm2020/lib/radio/radio.component.mjs +38 -39
- package/esm2020/lib/shared/enum/display-mode.mjs +2 -11
- package/esm2020/lib/summary/summary.component.mjs +5 -7
- package/esm2020/lib/tabs/index.mjs +8 -0
- package/esm2020/lib/tabs/module.mjs +35 -0
- package/esm2020/lib/tabs/tabs.component.mjs +295 -0
- package/esm2020/lib/tag/tag.component.mjs +3 -3
- package/esm2020/public-api.mjs +5 -1
- package/fesm2015/villedemontreal-angular-ui.mjs +1607 -230
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +1597 -228
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/lib/alert/alert.component.d.ts +2 -3
- package/lib/avatar/avatar.component.d.ts +26 -0
- package/lib/avatar/index.d.ts +2 -0
- package/lib/avatar/module.d.ts +8 -0
- package/lib/bao.module.d.ts +4 -1
- package/lib/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/lib/button/button.component.d.ts +1 -1
- package/lib/checkbox/checkbox-group.component.d.ts +2 -2
- package/lib/checkbox/checkbox.component.d.ts +27 -27
- package/lib/core/colors.d.ts +1 -1
- package/lib/icon/icon.component.d.ts +11 -11
- package/lib/modal/index.d.ts +6 -0
- package/lib/modal/modal-animations.d.ts +8 -0
- package/lib/modal/modal-config.d.ts +105 -0
- package/lib/modal/modal-container.d.ts +106 -0
- package/lib/modal/modal-directives.d.ts +25 -0
- package/lib/modal/modal-ref.d.ts +91 -0
- package/lib/modal/modal.d.ts +91 -0
- package/lib/modal/module.d.ts +12 -0
- package/lib/radio/radio-group.component.d.ts +19 -19
- package/lib/radio/radio.component.d.ts +27 -27
- package/lib/shared/enum/display-mode.d.ts +1 -1
- package/lib/summary/summary.component.d.ts +5 -5
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/module.d.ts +8 -0
- package/lib/tabs/tabs.component.d.ts +95 -0
- package/lib/tag/tag.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
|
+
import { BaoModalContainer, _BaoModalContainerBase } from './modal-container';
|
|
4
|
+
import { BaoModalRef } from './modal-ref';
|
|
5
|
+
import { BaoModalConfig } from './modal-config';
|
|
6
|
+
import { ComponentType, Overlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/** Injection token that can be used to access the data that was passed in to a modal. */
|
|
9
|
+
export declare const BAO_MODAL_DATA: InjectionToken<unknown>;
|
|
10
|
+
export declare abstract class BaoModalBase<C extends _BaoModalContainerBase> implements OnDestroy {
|
|
11
|
+
private _overlay;
|
|
12
|
+
private _injector;
|
|
13
|
+
private _parentModal;
|
|
14
|
+
private _overlayContainer;
|
|
15
|
+
private _modalRefConstructor;
|
|
16
|
+
private _modalContainerType;
|
|
17
|
+
private _modalDataToken;
|
|
18
|
+
private _animationMode?;
|
|
19
|
+
readonly afterAllClosed: Observable<void>;
|
|
20
|
+
private _openModalsAtThisLevel;
|
|
21
|
+
private readonly _afterAllClosedAtThisLevel;
|
|
22
|
+
private readonly _afterOpenedAtThisLevel;
|
|
23
|
+
private _ariaHiddenElements;
|
|
24
|
+
private _modalAnimatingOpen;
|
|
25
|
+
private _animationStateSubscriptions;
|
|
26
|
+
private _lastModalRef;
|
|
27
|
+
constructor(_overlay: Overlay, _injector: Injector, _parentModal: BaoModalBase<C> | undefined, _overlayContainer: OverlayContainer, _modalRefConstructor: Type<BaoModalRef<unknown>>, _modalContainerType: Type<C>, _modalDataToken: InjectionToken<unknown>, _animationMode?: 'NoopAnimations' | 'BrowserAnimations');
|
|
28
|
+
/** Keeps track of the currently-open modals. */
|
|
29
|
+
get openModals(): BaoModalRef<unknown>[];
|
|
30
|
+
/** Stream that emits when a modal has been opened. */
|
|
31
|
+
get afterOpened(): Subject<BaoModalRef<unknown>>;
|
|
32
|
+
getAfterAllClosed(): Subject<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Opens a modal modal containing the given template.
|
|
35
|
+
*/
|
|
36
|
+
open<T>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: BaoModalConfig): BaoModalRef<unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Closes all of the currently-open modals.
|
|
39
|
+
*/
|
|
40
|
+
closeAll(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Finds an open modal by its id.
|
|
43
|
+
*/
|
|
44
|
+
getModalById(id: string): BaoModalRef<unknown> | undefined;
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Creates the overlay into which the modal will be loaded.
|
|
48
|
+
*/
|
|
49
|
+
private _createOverlay;
|
|
50
|
+
/**
|
|
51
|
+
* Creates an overlay config from a modal config.
|
|
52
|
+
*/
|
|
53
|
+
private _getOverlayConfig;
|
|
54
|
+
/**
|
|
55
|
+
* Attaches a modal container to a modal's already-created overlay.
|
|
56
|
+
*/
|
|
57
|
+
private _attachModalContainer;
|
|
58
|
+
/**
|
|
59
|
+
* Attaches the user-provided component to the already-created modal container.
|
|
60
|
+
*/
|
|
61
|
+
private _attachModalContent;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a custom injector to be used inside the modal. This allows a component loaded inside
|
|
64
|
+
* of a modal to close itself and, optionally, to return a value.
|
|
65
|
+
*/
|
|
66
|
+
private _createInjector;
|
|
67
|
+
/**
|
|
68
|
+
* Removes a modal from the array of open modals.
|
|
69
|
+
*/
|
|
70
|
+
private _removeOpenModal;
|
|
71
|
+
/**
|
|
72
|
+
* Hides all of the content that isn't an overlay from assistive technology.
|
|
73
|
+
*/
|
|
74
|
+
private _hideNonModalContentFromAssistiveTechnology;
|
|
75
|
+
/** Closes all of the modals in an array. */
|
|
76
|
+
private _closeModals;
|
|
77
|
+
/**
|
|
78
|
+
* Applies default options to the modal config.
|
|
79
|
+
*/
|
|
80
|
+
private _applyConfigDefaults;
|
|
81
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoModalBase<any>, never>;
|
|
82
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaoModalBase<any>, never, never, {}, {}, never>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Service to open modal.
|
|
86
|
+
*/
|
|
87
|
+
export declare class BaoModal extends BaoModalBase<BaoModalContainer> {
|
|
88
|
+
constructor(overlay: Overlay, injector: Injector, parentModal: BaoModal, overlayContainer: OverlayContainer, animationMode?: 'NoopAnimations' | 'BrowserAnimations');
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoModal, [null, null, { optional: true; skipSelf: true; }, null, { optional: true; }]>;
|
|
90
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaoModal>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./modal-container";
|
|
3
|
+
import * as i2 from "./modal-directives";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/cdk/overlay";
|
|
6
|
+
import * as i5 from "@angular/cdk/portal";
|
|
7
|
+
import * as i6 from "@angular/platform-browser/animations";
|
|
8
|
+
export declare class BaoModalModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoModalModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BaoModalModule, [typeof i1.BaoModalContainer, typeof i2.BaoModalClose], [typeof i3.CommonModule, typeof i4.OverlayModule, typeof i5.PortalModule, typeof i6.BrowserAnimationsModule, typeof i6.NoopAnimationsModule], [typeof i1.BaoModalContainer, typeof i2.BaoModalClose]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BaoModalModule>;
|
|
12
|
+
}
|
|
@@ -8,6 +8,19 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare const BAO_RADIO_GROUP: InjectionToken<BaoRadioButtonGroupComponent>;
|
|
9
9
|
export declare class BaoRadioButtonGroupComponent implements AfterContentInit, ControlValueAccessor, AfterViewInit {
|
|
10
10
|
private cdr;
|
|
11
|
+
/**
|
|
12
|
+
* The checkbox group ID. It is set dynamically with an unique ID by default
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Emit the value of the selected radio button
|
|
17
|
+
*/
|
|
18
|
+
readonly change: EventEmitter<string>;
|
|
19
|
+
private staticContainer;
|
|
20
|
+
/**
|
|
21
|
+
* The aria-describedby for web accessibilty
|
|
22
|
+
*/
|
|
23
|
+
ariaDescribedby: string | null;
|
|
11
24
|
private _radios;
|
|
12
25
|
private _value;
|
|
13
26
|
private _name;
|
|
@@ -16,45 +29,32 @@ export declare class BaoRadioButtonGroupComponent implements AfterContentInit, C
|
|
|
16
29
|
private _disabled;
|
|
17
30
|
private _required;
|
|
18
31
|
private _uniqueId;
|
|
19
|
-
|
|
20
|
-
* The checkbox group ID. It is set dynamically with an unique ID by default
|
|
21
|
-
*/
|
|
22
|
-
id: string;
|
|
32
|
+
constructor(cdr: ChangeDetectorRef);
|
|
23
33
|
/**
|
|
24
34
|
* Define the name property of all radio buttons. Default : null
|
|
25
35
|
*/
|
|
26
36
|
get name(): string | null;
|
|
27
|
-
set name(value: string | null);
|
|
28
37
|
/**
|
|
29
38
|
* Define the value of the selected radio button. Default : null
|
|
30
39
|
*/
|
|
31
40
|
get value(): string | null;
|
|
32
|
-
set value(newValue: string | null);
|
|
33
41
|
/**
|
|
34
42
|
* Define which radio button is selected. Default : null
|
|
35
43
|
*/
|
|
36
44
|
get selected(): BaoRadioButtonComponent | null;
|
|
37
|
-
set selected(selected: BaoRadioButtonComponent | null);
|
|
38
45
|
/**
|
|
39
46
|
* Whether the radio button groupd is disabled. Default : false
|
|
40
47
|
*/
|
|
41
48
|
get disabled(): boolean;
|
|
42
|
-
set disabled(value: boolean);
|
|
43
49
|
/**
|
|
44
50
|
* Whether the radio button groupd is required. Default : false
|
|
45
51
|
*/
|
|
46
52
|
get required(): boolean;
|
|
53
|
+
set name(value: string | null);
|
|
54
|
+
set value(newValue: string | null);
|
|
55
|
+
set selected(selected: BaoRadioButtonComponent | null);
|
|
56
|
+
set disabled(value: boolean);
|
|
47
57
|
set required(value: boolean);
|
|
48
|
-
/**
|
|
49
|
-
* Emit the value of the selected radio button
|
|
50
|
-
*/
|
|
51
|
-
readonly change: EventEmitter<string>;
|
|
52
|
-
/**
|
|
53
|
-
* The aria-describedby for web accessibilty
|
|
54
|
-
*/
|
|
55
|
-
ariaDescribedby: string | null;
|
|
56
|
-
private staticContainer;
|
|
57
|
-
constructor(cdr: ChangeDetectorRef);
|
|
58
58
|
ngAfterContentInit(): void;
|
|
59
59
|
ngAfterViewInit(): void;
|
|
60
60
|
/**
|
|
@@ -106,5 +106,5 @@ export declare class BaoRadioButtonGroupComponent implements AfterContentInit, C
|
|
|
106
106
|
private showAriaDescribedBy;
|
|
107
107
|
private onTouch;
|
|
108
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioButtonGroupComponent, never>;
|
|
109
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaoRadioButtonGroupComponent, "bao-radio-button-group, [bao-radio-button-group], [baoRadioButtonGroup]", ["baoRadioGroup"], { "id": "id"; "name": "name"; "value": "value"; "selected": "selected"; "disabled": "disabled"; "required": "required"; }, { "change": "change"; }, ["
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoRadioButtonGroupComponent, "bao-radio-button-group, [bao-radio-button-group], [baoRadioButtonGroup]", ["baoRadioGroup"], { "id": "id"; "name": "name"; "value": "value"; "selected": "selected"; "disabled": "disabled"; "required": "required"; }, { "change": "change"; }, ["staticContainer"], ["*", "bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]"]>;
|
|
110
110
|
}
|
|
@@ -8,11 +8,6 @@ export declare class BaoRadioButtonComponent implements AfterViewInit, OnInit, O
|
|
|
8
8
|
private cdr;
|
|
9
9
|
private focusMonitor;
|
|
10
10
|
private radioDispatcher;
|
|
11
|
-
private _checked;
|
|
12
|
-
private _disabled;
|
|
13
|
-
private _required;
|
|
14
|
-
private _value;
|
|
15
|
-
private _uniqueId;
|
|
16
11
|
/**
|
|
17
12
|
* The radio button ID. It is set dynamically with an unique ID by default
|
|
18
13
|
*/
|
|
@@ -33,26 +28,6 @@ export declare class BaoRadioButtonComponent implements AfterViewInit, OnInit, O
|
|
|
33
28
|
* The name property of the radio button
|
|
34
29
|
*/
|
|
35
30
|
name: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Whether the radio button is checked. Default : false
|
|
38
|
-
*/
|
|
39
|
-
get checked(): boolean;
|
|
40
|
-
set checked(value: boolean);
|
|
41
|
-
/**
|
|
42
|
-
* Define the radio button value. Default : null
|
|
43
|
-
*/
|
|
44
|
-
get value(): string;
|
|
45
|
-
set value(value: string);
|
|
46
|
-
/**
|
|
47
|
-
* Whether the radio button is disabled. Default : false
|
|
48
|
-
*/
|
|
49
|
-
get disabled(): boolean;
|
|
50
|
-
set disabled(value: boolean);
|
|
51
|
-
/**
|
|
52
|
-
* Whether the radio button is required. Default : false
|
|
53
|
-
*/
|
|
54
|
-
get required(): boolean;
|
|
55
|
-
set required(value: boolean);
|
|
56
31
|
/**
|
|
57
32
|
* The visible state of the label
|
|
58
33
|
*/
|
|
@@ -81,8 +56,33 @@ export declare class BaoRadioButtonComponent implements AfterViewInit, OnInit, O
|
|
|
81
56
|
* The ID of the input html element
|
|
82
57
|
*/
|
|
83
58
|
inputID: string;
|
|
84
|
-
|
|
59
|
+
private _checked;
|
|
60
|
+
private _disabled;
|
|
61
|
+
private _required;
|
|
62
|
+
private _value;
|
|
63
|
+
private _uniqueId;
|
|
64
|
+
constructor(radioGroup: BaoRadioButtonGroupComponent, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, focusMonitor: FocusMonitor, radioDispatcher: UniqueSelectionDispatcher);
|
|
65
|
+
/**
|
|
66
|
+
* Whether the radio button is checked. Default : false
|
|
67
|
+
*/
|
|
68
|
+
get checked(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Define the radio button value. Default : null
|
|
71
|
+
*/
|
|
72
|
+
get value(): string;
|
|
73
|
+
/**
|
|
74
|
+
* Whether the radio button is disabled. Default : false
|
|
75
|
+
*/
|
|
76
|
+
get disabled(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the radio button is required. Default : false
|
|
79
|
+
*/
|
|
80
|
+
get required(): boolean;
|
|
85
81
|
get nativeElement(): HTMLElement;
|
|
82
|
+
set checked(value: boolean);
|
|
83
|
+
set value(value: string);
|
|
84
|
+
set disabled(value: boolean);
|
|
85
|
+
set required(value: boolean);
|
|
86
86
|
focus(options?: FocusOptions, origin?: FocusOrigin): void;
|
|
87
87
|
/**
|
|
88
88
|
* Method called from the parent as one of the parent input has changed. Prevent change detection error.
|
|
@@ -104,7 +104,7 @@ export declare class BaoRadioButtonComponent implements AfterViewInit, OnInit, O
|
|
|
104
104
|
/** Unregister function for radioDispatcher */
|
|
105
105
|
private _removeUniqueSelectionListener;
|
|
106
106
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioButtonComponent, [{ optional: true; }, null, null, null, null]>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaoRadioButtonComponent, "bao-radio-button, [bao-radio-button]", never, { "id": "id"; "ariaLabel": "aria-label"; "brandBorder": "brandBorder"; "inline": "inline"; "name": "name"; "checked": "checked"; "value": "value"; "disabled": "disabled"; "required": "required";
|
|
107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoRadioButtonComponent, "bao-radio-button, [bao-radio-button]", never, { "id": "id"; "ariaLabel": "aria-label"; "brandBorder": "brandBorder"; "inline": "inline"; "name": "name"; "hiddenLabel": "hiddenLabel"; "checked": "checked"; "value": "value"; "disabled": "disabled"; "required": "required"; }, { "change": "change"; }, never, ["*", "bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]"]>;
|
|
108
108
|
}
|
|
109
109
|
export declare class BaoRadioDescription {
|
|
110
110
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioDescription, never>;
|
|
@@ -9,10 +9,6 @@ export declare class BaoSummaryComponent implements OnInit, AfterViewInit {
|
|
|
9
9
|
* COMPACT (viewport width < 576px)
|
|
10
10
|
*/
|
|
11
11
|
displayMode: EDisplayMode;
|
|
12
|
-
/**
|
|
13
|
-
* Initialize the ID for summary
|
|
14
|
-
*/
|
|
15
|
-
private _uniqueId;
|
|
16
12
|
/**
|
|
17
13
|
* Set value of unique ID for bao-label
|
|
18
14
|
*/
|
|
@@ -31,8 +27,12 @@ export declare class BaoSummaryComponent implements OnInit, AfterViewInit {
|
|
|
31
27
|
* The aria-labelledby id for web accessibility
|
|
32
28
|
*/
|
|
33
29
|
ariaLabelledby?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Initialize the ID for summary
|
|
32
|
+
*/
|
|
33
|
+
private _uniqueId;
|
|
34
34
|
private attribues;
|
|
35
|
-
constructor(elementRef: ElementRef);
|
|
35
|
+
constructor(elementRef: ElementRef<HTMLElement>);
|
|
36
36
|
get nativeElement(): HTMLElement;
|
|
37
37
|
ngOnInit(): void;
|
|
38
38
|
ngAfterViewInit(): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./tabs.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class BaoTabsModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTabsModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BaoTabsModule, [typeof i1.BaoTabsContainer, typeof i1.BaoTablistComponent, typeof i1.BaoTabHeader, typeof i1.BaoTabPanel], [typeof i2.CommonModule], [typeof i1.BaoTabsContainer, typeof i1.BaoTablistComponent, typeof i1.BaoTabHeader, typeof i1.BaoTabPanel]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BaoTabsModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnDestroy, QueryList, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BaoTabHeader implements AfterViewInit {
|
|
4
|
+
private renderer;
|
|
5
|
+
private elementRef;
|
|
6
|
+
/**
|
|
7
|
+
* Emits its index when tab is clicked
|
|
8
|
+
*/
|
|
9
|
+
onTabClick: EventEmitter<string>;
|
|
10
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
|
|
11
|
+
get nativeElement(): HTMLElement;
|
|
12
|
+
onClick(el: HTMLElement): void;
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTabHeader, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaoTabHeader, "bao-tab-header, [bao-tab-header]", ["baoTabHeader"], {}, { "onTabClick": "onTabClick"; }, never>;
|
|
16
|
+
}
|
|
17
|
+
export declare class BaoTabPanel implements AfterViewInit {
|
|
18
|
+
private renderer;
|
|
19
|
+
private elementRef;
|
|
20
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
|
|
21
|
+
get nativeElement(): HTMLElement;
|
|
22
|
+
ngAfterViewInit(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTabPanel, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaoTabPanel, "bao-panel, [bao-panel]", ["baoPanel"], {}, {}, never>;
|
|
25
|
+
}
|
|
26
|
+
export declare class BaoTablistComponent implements AfterViewInit, AfterContentInit, OnDestroy {
|
|
27
|
+
private renderer;
|
|
28
|
+
private elementRef;
|
|
29
|
+
tabHeaders: QueryList<BaoTabHeader>;
|
|
30
|
+
/**
|
|
31
|
+
* Size of the tabs displayed
|
|
32
|
+
*/
|
|
33
|
+
size: 'small' | 'medium' | 'large';
|
|
34
|
+
/**
|
|
35
|
+
* Optionnal value to be used as aria-label property on tablist component
|
|
36
|
+
*/
|
|
37
|
+
ariaLabel: string;
|
|
38
|
+
/**
|
|
39
|
+
* Emits the index of the new active tab
|
|
40
|
+
*/
|
|
41
|
+
activeTabChange: EventEmitter<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Index of the tab that is currently active
|
|
44
|
+
*/
|
|
45
|
+
private activeTabIndex;
|
|
46
|
+
/**
|
|
47
|
+
* Unique ID for every instance of BaoTablist component
|
|
48
|
+
*/
|
|
49
|
+
private uniqueId;
|
|
50
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
|
|
51
|
+
get nativeElement(): HTMLElement;
|
|
52
|
+
get tabs(): HTMLCollection;
|
|
53
|
+
leftKeyEvent(): void;
|
|
54
|
+
rightKeyEvent(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Makes the focus visible on tab header when changing from mouse to keyboard navigation
|
|
57
|
+
*/
|
|
58
|
+
tabKeyEvent(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Makes the focus visible on tab header when changing from mouse to keyboard navigation
|
|
61
|
+
*/
|
|
62
|
+
tabShiftKeyEvent(): void;
|
|
63
|
+
ngAfterViewInit(): void;
|
|
64
|
+
ngAfterContentInit(): void;
|
|
65
|
+
ngOnDestroy(): void;
|
|
66
|
+
private setTablistAttributes;
|
|
67
|
+
private setInitialActiveTab;
|
|
68
|
+
private changeActiveTab;
|
|
69
|
+
/**
|
|
70
|
+
* Finds the next activable tab index when navigating with left and right arrow keys
|
|
71
|
+
* @param currentIndex Tab index which currently has focus
|
|
72
|
+
* @param isRight Whether the tab navigation is going in the right direction or not
|
|
73
|
+
* @returns Index of the new tab that will receive focus
|
|
74
|
+
*/
|
|
75
|
+
private getNextActivableTabIndex;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTablistComponent, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoTablistComponent, "bao-tablist, [bao-tablist]", never, { "size": "size"; "ariaLabel": "ariaLabel"; }, { "activeTabChange": "activeTabChange"; }, ["tabHeaders"], ["*"]>;
|
|
78
|
+
}
|
|
79
|
+
export declare class BaoTabsContainer implements AfterViewInit, AfterContentInit, OnDestroy {
|
|
80
|
+
private renderer;
|
|
81
|
+
private elementRef;
|
|
82
|
+
tablist: BaoTablistComponent;
|
|
83
|
+
private panelIdPrefix;
|
|
84
|
+
private tabIdPrefix;
|
|
85
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
|
|
86
|
+
get tabs(): HTMLCollection;
|
|
87
|
+
get panels(): NodeListOf<Element>;
|
|
88
|
+
ngAfterViewInit(): void;
|
|
89
|
+
ngAfterContentInit(): void;
|
|
90
|
+
ngOnDestroy(): void;
|
|
91
|
+
private setInitialActivePanel;
|
|
92
|
+
private changeActivePanel;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTabsContainer, never>;
|
|
94
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaoTabsContainer, "bao-tabs, [bao-tabs]", ["baoTabs"], {}, {}, ["tablist"]>;
|
|
95
|
+
}
|
|
@@ -15,7 +15,7 @@ export declare class BaoTagComponent implements AfterViewInit {
|
|
|
15
15
|
* The hidden text for screen readers.
|
|
16
16
|
*/
|
|
17
17
|
hiddenText: string;
|
|
18
|
-
constructor(renderer: Renderer2, elementRef: ElementRef);
|
|
18
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
|
|
19
19
|
get nativeElement(): HTMLElement;
|
|
20
20
|
ngAfterViewInit(): void;
|
|
21
21
|
private addHiddenText;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -12,3 +12,7 @@ export * from './lib/checkbox/index';
|
|
|
12
12
|
export * from './lib/radio/index';
|
|
13
13
|
export * from './lib/common-components/index';
|
|
14
14
|
export * from './lib/summary/index';
|
|
15
|
+
export * from './lib/shared';
|
|
16
|
+
export * from './lib/avatar';
|
|
17
|
+
export * from './lib/tabs';
|
|
18
|
+
export * from './lib/modal';
|