@clr/angular 16.0.0 → 16.0.2
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/accordion/accordion-panel.d.ts +12 -0
- package/accordion/accordion.d.ts +3 -0
- package/clarity.api.md +2 -7
- package/emphasis/alert/alert.d.ts +5 -3
- package/esm2020/accordion/accordion-panel.mjs +13 -1
- package/esm2020/accordion/accordion.mjs +4 -1
- package/esm2020/emphasis/alert/alert.mjs +15 -9
- package/fesm2015/clr-angular.mjs +28 -7
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +28 -7
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2020/clr-angular.mjs
CHANGED
|
@@ -535,8 +535,17 @@ class ClrAccordionPanel {
|
|
|
535
535
|
this.accordionService = accordionService;
|
|
536
536
|
this.ifExpandService = ifExpandService;
|
|
537
537
|
this.cdr = cdr;
|
|
538
|
+
/**
|
|
539
|
+
* Whether the panel is disabled.
|
|
540
|
+
*/
|
|
538
541
|
this.disabled = false;
|
|
542
|
+
/**
|
|
543
|
+
* Whether the panel is open.
|
|
544
|
+
*/
|
|
539
545
|
this.panelOpen = false;
|
|
546
|
+
/**
|
|
547
|
+
* Event that is emitted when the panel is opened or closed. The boolean emitted indicates the current state.
|
|
548
|
+
*/
|
|
540
549
|
this.panelOpenChange = new EventEmitter();
|
|
541
550
|
this.AccordionStatus = AccordionStatus;
|
|
542
551
|
this.isAccordion = true;
|
|
@@ -565,6 +574,9 @@ class ClrAccordionPanel {
|
|
|
565
574
|
this.accordionService.disablePanel(this.id, changes.disabled.currentValue);
|
|
566
575
|
}
|
|
567
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Toggles this panel open or closed.
|
|
579
|
+
*/
|
|
568
580
|
togglePanel() {
|
|
569
581
|
this.accordionService.togglePanel(this.id);
|
|
570
582
|
}
|
|
@@ -638,6 +650,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
638
650
|
class ClrAccordion {
|
|
639
651
|
constructor(accordionService) {
|
|
640
652
|
this.accordionService = accordionService;
|
|
653
|
+
/**
|
|
654
|
+
* Whether the accordion supports multiple panels opened at the same time.
|
|
655
|
+
*/
|
|
641
656
|
this.multiPanel = false;
|
|
642
657
|
this.subscriptions = [];
|
|
643
658
|
}
|
|
@@ -19834,11 +19849,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
19834
19849
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
19835
19850
|
*/
|
|
19836
19851
|
class ClrAlert {
|
|
19837
|
-
constructor(iconService, cdr, multiAlertService, commonStrings) {
|
|
19852
|
+
constructor(iconService, cdr, multiAlertService, commonStrings, renderer, hostElement) {
|
|
19838
19853
|
this.iconService = iconService;
|
|
19839
19854
|
this.cdr = cdr;
|
|
19840
19855
|
this.multiAlertService = multiAlertService;
|
|
19841
19856
|
this.commonStrings = commonStrings;
|
|
19857
|
+
this.renderer = renderer;
|
|
19858
|
+
this.hostElement = hostElement;
|
|
19842
19859
|
this.isLight = false;
|
|
19843
19860
|
this.isSmall = false;
|
|
19844
19861
|
this.closable = true;
|
|
@@ -19874,6 +19891,13 @@ class ClrAlert {
|
|
|
19874
19891
|
set hidden(value) {
|
|
19875
19892
|
if (value !== this._hidden) {
|
|
19876
19893
|
this._hidden = value;
|
|
19894
|
+
// CDE-1249 @HostBinding('class.alert-hidden') decoration will raise error in console https://angular.io/errors/NG0100
|
|
19895
|
+
if (this._hidden) {
|
|
19896
|
+
this.renderer.addClass(this.hostElement.nativeElement, 'alert-hidden');
|
|
19897
|
+
}
|
|
19898
|
+
else {
|
|
19899
|
+
this.renderer.removeClass(this.hostElement.nativeElement, 'alert-hidden');
|
|
19900
|
+
}
|
|
19877
19901
|
this.cdr.detectChanges();
|
|
19878
19902
|
}
|
|
19879
19903
|
}
|
|
@@ -19906,14 +19930,14 @@ class ClrAlert {
|
|
|
19906
19930
|
this._closedChanged.emit(true);
|
|
19907
19931
|
}
|
|
19908
19932
|
}
|
|
19909
|
-
ClrAlert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlert, deps: [{ token: AlertIconAndTypesService }, { token: i0.ChangeDetectorRef }, { token: MultiAlertService, optional: true }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
19910
|
-
ClrAlert.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAlert, selector: "clr-alert", inputs: { isLight: ["clrAlertLightweight", "isLight"], isSmall: ["clrAlertSizeSmall", "isSmall"], closable: ["clrAlertClosable", "closable"], isAppLevel: ["clrAlertAppLevel", "isAppLevel"], clrCloseButtonAriaLabel: "clrCloseButtonAriaLabel", alertType: ["clrAlertType", "alertType"], alertIconShape: ["clrAlertIcon", "alertIconShape"], closed: ["clrAlertClosed", "closed"] }, outputs: { _closedChanged: "clrAlertClosedChange" },
|
|
19933
|
+
ClrAlert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlert, deps: [{ token: AlertIconAndTypesService }, { token: i0.ChangeDetectorRef }, { token: MultiAlertService, optional: true }, { token: ClrCommonStringsService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
19934
|
+
ClrAlert.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAlert, selector: "clr-alert", inputs: { isLight: ["clrAlertLightweight", "isLight"], isSmall: ["clrAlertSizeSmall", "isSmall"], closable: ["clrAlertClosable", "closable"], isAppLevel: ["clrAlertAppLevel", "isAppLevel"], clrCloseButtonAriaLabel: "clrCloseButtonAriaLabel", alertType: ["clrAlertType", "alertType"], alertIconShape: ["clrAlertIcon", "alertIconShape"], closed: ["clrAlertClosed", "closed"] }, outputs: { _closedChanged: "clrAlertClosedChange" }, providers: [AlertIconAndTypesService], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n *ngIf=\"!_closed\"\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n <button type=\"button\" class=\"close\" *ngIf=\"closable\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }] });
|
|
19911
19935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlert, decorators: [{
|
|
19912
19936
|
type: Component,
|
|
19913
19937
|
args: [{ selector: 'clr-alert', providers: [AlertIconAndTypesService], template: "<!--\n ~ Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n *ngIf=\"!_closed\"\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n <button type=\"button\" class=\"close\" *ngIf=\"closable\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n</div>\n" }]
|
|
19914
19938
|
}], ctorParameters: function () { return [{ type: AlertIconAndTypesService }, { type: i0.ChangeDetectorRef }, { type: MultiAlertService, decorators: [{
|
|
19915
19939
|
type: Optional
|
|
19916
|
-
}] }, { type: ClrCommonStringsService }]; }, propDecorators: { isLight: [{
|
|
19940
|
+
}] }, { type: ClrCommonStringsService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { isLight: [{
|
|
19917
19941
|
type: Input,
|
|
19918
19942
|
args: ['clrAlertLightweight']
|
|
19919
19943
|
}], isSmall: [{
|
|
@@ -19939,9 +19963,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
19939
19963
|
}], closed: [{
|
|
19940
19964
|
type: Input,
|
|
19941
19965
|
args: ['clrAlertClosed']
|
|
19942
|
-
}], hidden: [{
|
|
19943
|
-
type: HostBinding,
|
|
19944
|
-
args: ['class.alert-hidden']
|
|
19945
19966
|
}] } });
|
|
19946
19967
|
|
|
19947
19968
|
/*
|