@villedemontreal/angular-ui 2.0.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.
- package/README.md +25 -0
- package/esm2020/lib/alert/alert.component.mjs +164 -0
- package/esm2020/lib/alert/index.mjs +8 -0
- package/esm2020/lib/alert/module.mjs +41 -0
- package/esm2020/lib/badge/badge.component.mjs +27 -0
- package/esm2020/lib/badge/index.mjs +8 -0
- package/esm2020/lib/badge/module.mjs +24 -0
- package/esm2020/lib/bao.module.mjs +87 -0
- package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +36 -0
- package/esm2020/lib/breadcrumb/index.mjs +8 -0
- package/esm2020/lib/breadcrumb/module.mjs +25 -0
- package/esm2020/lib/button/button.component.mjs +100 -0
- package/esm2020/lib/button/index.mjs +8 -0
- package/esm2020/lib/button/module.mjs +25 -0
- package/esm2020/lib/card/card.component.mjs +94 -0
- package/esm2020/lib/card/index.mjs +8 -0
- package/esm2020/lib/card/module.mjs +38 -0
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +59 -0
- package/esm2020/lib/checkbox/checkbox.component.mjs +305 -0
- package/esm2020/lib/checkbox/index.mjs +9 -0
- package/esm2020/lib/checkbox/module.mjs +35 -0
- package/esm2020/lib/common-components/error-text/errorText.component.mjs +16 -0
- package/esm2020/lib/common-components/guiding-text/guidingText.component.mjs +16 -0
- package/esm2020/lib/common-components/index.mjs +10 -0
- package/esm2020/lib/common-components/legend-text/legendText.component.mjs +22 -0
- package/esm2020/lib/common-components/module.mjs +32 -0
- package/esm2020/lib/core/colors.mjs +42 -0
- package/esm2020/lib/header-info/header-info.component.mjs +104 -0
- package/esm2020/lib/header-info/index.mjs +8 -0
- package/esm2020/lib/header-info/module.mjs +41 -0
- package/esm2020/lib/icon/bao-icon-registry.mjs +44 -0
- package/esm2020/lib/icon/icon.component.mjs +160 -0
- package/esm2020/lib/icon/icons-dictionary.mjs +123 -0
- package/esm2020/lib/icon/index.mjs +8 -0
- package/esm2020/lib/icon/module.mjs +24 -0
- package/esm2020/lib/list/index.mjs +8 -0
- package/esm2020/lib/list/list.component.mjs +73 -0
- package/esm2020/lib/list/module.mjs +38 -0
- package/esm2020/lib/radio/index.mjs +9 -0
- package/esm2020/lib/radio/module.mjs +56 -0
- package/esm2020/lib/radio/radio-group.component.mjs +250 -0
- package/esm2020/lib/radio/radio.component.mjs +292 -0
- package/esm2020/lib/tag/index.mjs +8 -0
- package/esm2020/lib/tag/module.mjs +24 -0
- package/esm2020/lib/tag/tag.component.mjs +75 -0
- package/esm2020/public-api.mjs +19 -0
- package/esm2020/villedemontreal-angular-ui.mjs +5 -0
- package/fesm2015/villedemontreal-angular-ui.mjs +2461 -0
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -0
- package/fesm2020/villedemontreal-angular-ui.mjs +2455 -0
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -0
- package/global.scss +6 -0
- package/lib/alert/alert.component.d.ts +77 -0
- package/lib/alert/index.d.ts +2 -0
- package/lib/alert/module.d.ts +10 -0
- package/lib/badge/badge.component.d.ts +6 -0
- package/lib/badge/index.d.ts +2 -0
- package/lib/badge/module.d.ts +8 -0
- package/lib/bao.module.d.ts +17 -0
- package/lib/breadcrumb/breadcrumb.component.d.ts +12 -0
- package/lib/breadcrumb/index.d.ts +2 -0
- package/lib/breadcrumb/module.d.ts +9 -0
- package/lib/button/button.component.d.ts +47 -0
- package/lib/button/index.d.ts +2 -0
- package/lib/button/module.d.ts +9 -0
- package/lib/card/card.component.d.ts +44 -0
- package/lib/card/index.d.ts +2 -0
- package/lib/card/module.d.ts +8 -0
- package/lib/checkbox/checkbox-group.component.d.ts +25 -0
- package/lib/checkbox/checkbox.component.d.ts +152 -0
- package/lib/checkbox/index.d.ts +3 -0
- package/lib/checkbox/module.d.ts +11 -0
- package/lib/common-components/error-text/errorText.component.d.ts +5 -0
- package/lib/common-components/guiding-text/guidingText.component.d.ts +5 -0
- package/lib/common-components/index.d.ts +4 -0
- package/lib/common-components/legend-text/legendText.component.d.ts +6 -0
- package/lib/common-components/module.d.ts +10 -0
- package/lib/core/colors.d.ts +12 -0
- package/lib/header-info/header-info.component.d.ts +39 -0
- package/lib/header-info/index.d.ts +2 -0
- package/lib/header-info/module.d.ts +8 -0
- package/lib/icon/bao-icon-registry.d.ts +12 -0
- package/lib/icon/icon.component.d.ts +43 -0
- package/lib/icon/icons-dictionary.d.ts +3 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/icon/module.d.ts +8 -0
- package/lib/list/index.d.ts +2 -0
- package/lib/list/list.component.d.ts +21 -0
- package/lib/list/module.d.ts +8 -0
- package/lib/radio/index.d.ts +3 -0
- package/lib/radio/module.d.ts +13 -0
- package/lib/radio/radio-group.component.d.ts +110 -0
- package/lib/radio/radio.component.d.ts +112 -0
- package/lib/tag/index.d.ts +2 -0
- package/lib/tag/module.d.ts +8 -0
- package/lib/tag/tag.component.d.ts +25 -0
- package/package.json +33 -0
- package/public-api.d.ts +13 -0
- package/villedemontreal-angular-ui.d.ts +5 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { BaoRadioButtonComponent } from '.';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* We have to inject the radio button group and all its children to each child.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BAO_RADIO_GROUP: InjectionToken<BaoRadioButtonGroupComponent>;
|
|
9
|
+
export declare class BaoRadioButtonGroupComponent implements AfterContentInit, ControlValueAccessor, AfterViewInit {
|
|
10
|
+
private cdr;
|
|
11
|
+
private _radios;
|
|
12
|
+
private _value;
|
|
13
|
+
private _name;
|
|
14
|
+
private _selected;
|
|
15
|
+
private _isInitialized;
|
|
16
|
+
private _disabled;
|
|
17
|
+
private _required;
|
|
18
|
+
private _uniqueId;
|
|
19
|
+
/**
|
|
20
|
+
* The checkbox group ID. It is set dynamically with an unique ID by default
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Define the name property of all radio buttons. Default : null
|
|
25
|
+
*/
|
|
26
|
+
get name(): string | null;
|
|
27
|
+
set name(value: string | null);
|
|
28
|
+
/**
|
|
29
|
+
* Define the value of the selected radio button. Default : null
|
|
30
|
+
*/
|
|
31
|
+
get value(): string | null;
|
|
32
|
+
set value(newValue: string | null);
|
|
33
|
+
/**
|
|
34
|
+
* Define which radio button is selected. Default : null
|
|
35
|
+
*/
|
|
36
|
+
get selected(): BaoRadioButtonComponent | null;
|
|
37
|
+
set selected(selected: BaoRadioButtonComponent | null);
|
|
38
|
+
/**
|
|
39
|
+
* Whether the radio button groupd is disabled. Default : false
|
|
40
|
+
*/
|
|
41
|
+
get disabled(): boolean;
|
|
42
|
+
set disabled(value: boolean);
|
|
43
|
+
/**
|
|
44
|
+
* Whether the radio button groupd is required. Default : false
|
|
45
|
+
*/
|
|
46
|
+
get required(): boolean;
|
|
47
|
+
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
|
+
ngAfterContentInit(): void;
|
|
59
|
+
ngAfterViewInit(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Implement ControlValueAccessor
|
|
62
|
+
*/
|
|
63
|
+
writeValue(value: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Implement ControlValueAccessor
|
|
66
|
+
*/
|
|
67
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
68
|
+
/**
|
|
69
|
+
* Implement ControlValueAccessor
|
|
70
|
+
*/
|
|
71
|
+
registerOnTouched(fn: any): void;
|
|
72
|
+
/**
|
|
73
|
+
* Implement ControlValueAccessor
|
|
74
|
+
*/
|
|
75
|
+
setDisabledState(isDisabled: boolean): void;
|
|
76
|
+
/**
|
|
77
|
+
* onTouch() called from the button children
|
|
78
|
+
*/
|
|
79
|
+
onGroupTouch(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Update all radio button name
|
|
82
|
+
*/
|
|
83
|
+
updateRadioButtonNames(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Define which radio button is selected.
|
|
86
|
+
*/
|
|
87
|
+
updateSelectedRadioFromValue(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Update checked property on selected radio button
|
|
90
|
+
*/
|
|
91
|
+
checkSelectedRadioButton(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Emit the value of the new selected radio button
|
|
94
|
+
*/
|
|
95
|
+
emitChangeEvent(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Call markForCheck function on all radio buttons since one of the parent inputs could't have change meanwhile. Prevent change detection error.
|
|
98
|
+
*/
|
|
99
|
+
markRadiosForCheck(): void;
|
|
100
|
+
onContentChange(): void;
|
|
101
|
+
onModelChange: (value: any) => void;
|
|
102
|
+
/**
|
|
103
|
+
* Set the aria-describedby property to bao-guiding-text if available
|
|
104
|
+
*/
|
|
105
|
+
private setAriaDescribedByToDescription;
|
|
106
|
+
private showAriaDescribedBy;
|
|
107
|
+
private onTouch;
|
|
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"; }, ["_radios"], ["*", "bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]"]>;
|
|
110
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
+
import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
|
|
3
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
4
|
+
import { BaoRadioButtonGroupComponent } from './radio-group.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class BaoRadioButtonComponent implements AfterViewInit, OnInit, OnDestroy {
|
|
7
|
+
private elementRef;
|
|
8
|
+
private cdr;
|
|
9
|
+
private focusMonitor;
|
|
10
|
+
private radioDispatcher;
|
|
11
|
+
private _checked;
|
|
12
|
+
private _disabled;
|
|
13
|
+
private _required;
|
|
14
|
+
private _value;
|
|
15
|
+
private _uniqueId;
|
|
16
|
+
/**
|
|
17
|
+
* The radio button ID. It is set dynamically with an unique ID by default
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* The aria-label for web accessibility
|
|
22
|
+
*/
|
|
23
|
+
ariaLabel: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the radio button has a border and is considered as a card.
|
|
26
|
+
*/
|
|
27
|
+
brandBorder: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the radio button is inline.
|
|
30
|
+
*/
|
|
31
|
+
inline: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The name property of the radio button
|
|
34
|
+
*/
|
|
35
|
+
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
|
+
/**
|
|
57
|
+
* The visible state of the label
|
|
58
|
+
*/
|
|
59
|
+
hiddenLabel: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Emitted boolean on change
|
|
62
|
+
*/
|
|
63
|
+
readonly change: EventEmitter<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Reference to the input html element
|
|
66
|
+
*/
|
|
67
|
+
private inputElement;
|
|
68
|
+
/**
|
|
69
|
+
* The radio buttons group
|
|
70
|
+
*/
|
|
71
|
+
radioGroup: BaoRadioButtonGroupComponent;
|
|
72
|
+
/**
|
|
73
|
+
* The aria-describedby id for web accessibilty
|
|
74
|
+
*/
|
|
75
|
+
ariaDescribedby: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* The aria-labeledby id for web accessibilty
|
|
78
|
+
*/
|
|
79
|
+
ariaLabelledby: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* The ID of the input html element
|
|
82
|
+
*/
|
|
83
|
+
inputID: string;
|
|
84
|
+
constructor(radioGroup: BaoRadioButtonGroupComponent, elementRef: ElementRef, cdr: ChangeDetectorRef, focusMonitor: FocusMonitor, radioDispatcher: UniqueSelectionDispatcher);
|
|
85
|
+
get nativeElement(): HTMLElement;
|
|
86
|
+
focus(options?: FocusOptions, origin?: FocusOrigin): void;
|
|
87
|
+
/**
|
|
88
|
+
* Method called from the parent as one of the parent input has changed. Prevent change detection error.
|
|
89
|
+
*/
|
|
90
|
+
markForCheck(): void;
|
|
91
|
+
ngOnInit(): void;
|
|
92
|
+
ngAfterViewInit(): void;
|
|
93
|
+
ngOnDestroy(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Emit the new value from the selected radio-button and the parent
|
|
96
|
+
*/
|
|
97
|
+
onInputInteraction(event: Event): void;
|
|
98
|
+
private emitChangeEvent;
|
|
99
|
+
private setDisabled;
|
|
100
|
+
/**
|
|
101
|
+
* Set the id property to bao-radio-button-description as a description to the input
|
|
102
|
+
*/
|
|
103
|
+
private setAriaDescribedByToDescription;
|
|
104
|
+
/** Unregister function for radioDispatcher */
|
|
105
|
+
private _removeUniqueSelectionListener;
|
|
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"; "hiddenLabel": "hiddenLabel"; }, { "change": "change"; }, never, ["*", "bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]"]>;
|
|
108
|
+
}
|
|
109
|
+
export declare class BaoRadioDescription {
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioDescription, never>;
|
|
111
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaoRadioDescription, "bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]", never, {}, {}, never>;
|
|
112
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./tag.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class BaoTagModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTagModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BaoTagModule, [typeof i1.BaoTagComponent], [typeof i2.CommonModule], [typeof i1.BaoTagComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BaoTagModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BaoTagComponent implements AfterViewInit {
|
|
4
|
+
private renderer;
|
|
5
|
+
private elementRef;
|
|
6
|
+
/**
|
|
7
|
+
* The color of the tag.
|
|
8
|
+
*/
|
|
9
|
+
type: 'neutral' | 'info' | 'positive' | 'alert' | 'negative';
|
|
10
|
+
/**
|
|
11
|
+
* The shade of the tags color.
|
|
12
|
+
*/
|
|
13
|
+
variant: 'light' | 'strong';
|
|
14
|
+
/**
|
|
15
|
+
* The hidden text for screen readers.
|
|
16
|
+
*/
|
|
17
|
+
hiddenText: string;
|
|
18
|
+
constructor(renderer: Renderer2, elementRef: ElementRef);
|
|
19
|
+
get nativeElement(): HTMLElement;
|
|
20
|
+
ngAfterViewInit(): void;
|
|
21
|
+
private addHiddenText;
|
|
22
|
+
private addIconClass;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoTagComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoTagComponent, "bao-tag, [bao-tag], [baoTag]", never, { "type": "type"; "variant": "variant"; "hiddenText": "hiddenText"; }, {}, never, ["bao-icon", "*"]>;
|
|
25
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@villedemontreal/angular-ui",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": ">=8.0.0 <14.0.0",
|
|
6
|
+
"@angular/core": ">=8.0.0 <14.0.0",
|
|
7
|
+
"@angular/cdk": ">=8.0.0 <14.0.0",
|
|
8
|
+
"@angular/forms": ">=8.0.0 <14.0.0"
|
|
9
|
+
},
|
|
10
|
+
"module": "fesm2015/villedemontreal-angular-ui.mjs",
|
|
11
|
+
"es2020": "fesm2020/villedemontreal-angular-ui.mjs",
|
|
12
|
+
"esm2020": "esm2020/villedemontreal-angular-ui.mjs",
|
|
13
|
+
"fesm2020": "fesm2020/villedemontreal-angular-ui.mjs",
|
|
14
|
+
"fesm2015": "fesm2015/villedemontreal-angular-ui.mjs",
|
|
15
|
+
"typings": "villedemontreal-angular-ui.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./villedemontreal-angular-ui.d.ts",
|
|
22
|
+
"esm2020": "./esm2020/villedemontreal-angular-ui.mjs",
|
|
23
|
+
"es2020": "./fesm2020/villedemontreal-angular-ui.mjs",
|
|
24
|
+
"es2015": "./fesm2015/villedemontreal-angular-ui.mjs",
|
|
25
|
+
"node": "./fesm2015/villedemontreal-angular-ui.mjs",
|
|
26
|
+
"default": "./fesm2020/villedemontreal-angular-ui.mjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"tslib": "^2.3.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './lib/bao.module';
|
|
2
|
+
export * from './lib/button/index';
|
|
3
|
+
export * from './lib/icon/index';
|
|
4
|
+
export * from './lib/alert/index';
|
|
5
|
+
export * from './lib/breadcrumb/index';
|
|
6
|
+
export * from './lib/card/index';
|
|
7
|
+
export * from './lib/badge/index';
|
|
8
|
+
export * from './lib/tag/index';
|
|
9
|
+
export * from './lib/header-info/index';
|
|
10
|
+
export * from './lib/list/index';
|
|
11
|
+
export * from './lib/checkbox/index';
|
|
12
|
+
export * from './lib/radio/index';
|
|
13
|
+
export * from './lib/common-components/index';
|