@clr/angular 18.0.0-beta.1 → 18.0.0-beta.10

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.
Files changed (132) hide show
  1. package/fesm2022/clr-angular-accordion.mjs +1 -1
  2. package/fesm2022/clr-angular-accordion.mjs.map +1 -1
  3. package/fesm2022/clr-angular-button.mjs +6 -6
  4. package/fesm2022/clr-angular-button.mjs.map +1 -1
  5. package/fesm2022/clr-angular-data-datagrid.mjs +27 -35
  6. package/fesm2022/clr-angular-data-datagrid.mjs.map +1 -1
  7. package/fesm2022/clr-angular-data-tree-view.mjs +3 -3
  8. package/fesm2022/clr-angular-data-tree-view.mjs.map +1 -1
  9. package/fesm2022/clr-angular-data.mjs +11 -9116
  10. package/fesm2022/clr-angular-data.mjs.map +1 -1
  11. package/fesm2022/clr-angular-emphasis-alert.mjs +2 -2
  12. package/fesm2022/clr-angular-emphasis-alert.mjs.map +1 -1
  13. package/fesm2022/clr-angular-emphasis.mjs +12 -778
  14. package/fesm2022/clr-angular-emphasis.mjs.map +1 -1
  15. package/fesm2022/clr-angular-forms-checkbox.mjs +13 -44
  16. package/fesm2022/clr-angular-forms-checkbox.mjs.map +1 -1
  17. package/fesm2022/clr-angular-forms-combobox.mjs +420 -90
  18. package/fesm2022/clr-angular-forms-combobox.mjs.map +1 -1
  19. package/fesm2022/clr-angular-forms-common.mjs +62 -57
  20. package/fesm2022/clr-angular-forms-common.mjs.map +1 -1
  21. package/fesm2022/clr-angular-forms-datalist.mjs +2 -14
  22. package/fesm2022/clr-angular-forms-datalist.mjs.map +1 -1
  23. package/fesm2022/clr-angular-forms-datepicker.mjs +20 -28
  24. package/fesm2022/clr-angular-forms-datepicker.mjs.map +1 -1
  25. package/fesm2022/clr-angular-forms-file-input.mjs +78 -62
  26. package/fesm2022/clr-angular-forms-file-input.mjs.map +1 -1
  27. package/fesm2022/clr-angular-forms-input.mjs +4 -18
  28. package/fesm2022/clr-angular-forms-input.mjs.map +1 -1
  29. package/fesm2022/clr-angular-forms-number-input.mjs +2 -14
  30. package/fesm2022/clr-angular-forms-number-input.mjs.map +1 -1
  31. package/fesm2022/clr-angular-forms-password.mjs +2 -14
  32. package/fesm2022/clr-angular-forms-password.mjs.map +1 -1
  33. package/fesm2022/clr-angular-forms-radio.mjs +13 -44
  34. package/fesm2022/clr-angular-forms-radio.mjs.map +1 -1
  35. package/fesm2022/clr-angular-forms-range.mjs +3 -16
  36. package/fesm2022/clr-angular-forms-range.mjs.map +1 -1
  37. package/fesm2022/clr-angular-forms-select.mjs +3 -16
  38. package/fesm2022/clr-angular-forms-select.mjs.map +1 -1
  39. package/fesm2022/clr-angular-forms-textarea.mjs +4 -17
  40. package/fesm2022/clr-angular-forms-textarea.mjs.map +1 -1
  41. package/fesm2022/clr-angular-forms.mjs +68 -8560
  42. package/fesm2022/clr-angular-forms.mjs.map +1 -1
  43. package/fesm2022/clr-angular-icon.mjs +10 -0
  44. package/fesm2022/clr-angular-icon.mjs.map +1 -1
  45. package/fesm2022/clr-angular-layout-nav.mjs +27 -25
  46. package/fesm2022/clr-angular-layout-nav.mjs.map +1 -1
  47. package/fesm2022/clr-angular-layout-tabs.mjs +1 -1
  48. package/fesm2022/clr-angular-layout-tabs.mjs.map +1 -1
  49. package/fesm2022/clr-angular-layout.mjs +15 -2057
  50. package/fesm2022/clr-angular-layout.mjs.map +1 -1
  51. package/fesm2022/clr-angular-modal.mjs +4 -5
  52. package/fesm2022/clr-angular-modal.mjs.map +1 -1
  53. package/fesm2022/clr-angular-popover-common.mjs +151 -85
  54. package/fesm2022/clr-angular-popover-common.mjs.map +1 -1
  55. package/fesm2022/clr-angular-popover-dropdown.mjs +7 -4
  56. package/fesm2022/clr-angular-popover-dropdown.mjs.map +1 -1
  57. package/fesm2022/clr-angular-popover-signpost.mjs +30 -15
  58. package/fesm2022/clr-angular-popover-signpost.mjs.map +1 -1
  59. package/fesm2022/clr-angular-popover-tooltip.mjs +7 -7
  60. package/fesm2022/clr-angular-popover-tooltip.mjs.map +1 -1
  61. package/fesm2022/clr-angular-popover.mjs +12 -2242
  62. package/fesm2022/clr-angular-popover.mjs.map +1 -1
  63. package/fesm2022/clr-angular-stepper.mjs +5 -5
  64. package/fesm2022/clr-angular-stepper.mjs.map +1 -1
  65. package/fesm2022/clr-angular-utils.mjs +20 -485
  66. package/fesm2022/clr-angular-utils.mjs.map +1 -1
  67. package/fesm2022/clr-angular-wizard.mjs +434 -223
  68. package/fesm2022/clr-angular-wizard.mjs.map +1 -1
  69. package/fesm2022/clr-angular.mjs +94 -38740
  70. package/fesm2022/clr-angular.mjs.map +1 -1
  71. package/package.json +10 -5
  72. package/popover/common/README.md +14 -12
  73. package/schematics/collection.json +14 -0
  74. package/schematics/ng-update/index.d.ts +2 -0
  75. package/schematics/ng-update/index.js +69 -0
  76. package/schematics/ng-update/index.js.map +1 -0
  77. package/schematics/ng-update/migrations/css-migration.d.ts +6 -0
  78. package/schematics/ng-update/migrations/css-migration.js +177 -0
  79. package/schematics/ng-update/migrations/css-migration.js.map +1 -0
  80. package/schematics/ng-update/migrations/import-migration.d.ts +4 -0
  81. package/schematics/ng-update/migrations/import-migration.js +187 -0
  82. package/schematics/ng-update/migrations/import-migration.js.map +1 -0
  83. package/schematics/ng-update/migrations/template-migration.d.ts +6 -0
  84. package/schematics/ng-update/migrations/template-migration.js +261 -0
  85. package/schematics/ng-update/migrations/template-migration.js.map +1 -0
  86. package/schematics/ng-update/replacements/css-replacements.d.ts +17 -0
  87. package/schematics/ng-update/replacements/css-replacements.js +74 -0
  88. package/schematics/ng-update/replacements/css-replacements.js.map +1 -0
  89. package/schematics/ng-update/replacements/import-replacements.d.ts +13 -0
  90. package/schematics/ng-update/replacements/import-replacements.js +108 -0
  91. package/schematics/ng-update/replacements/import-replacements.js.map +1 -0
  92. package/schematics/ng-update/replacements/symbol-replacements.d.ts +12 -0
  93. package/schematics/ng-update/replacements/symbol-replacements.js +67 -0
  94. package/schematics/ng-update/replacements/symbol-replacements.js.map +1 -0
  95. package/schematics/ng-update/replacements/template-replacements.d.ts +19 -0
  96. package/schematics/ng-update/replacements/template-replacements.js +57 -0
  97. package/schematics/ng-update/replacements/template-replacements.js.map +1 -0
  98. package/schematics/ng-update/tests/test-helpers.d.ts +6 -0
  99. package/schematics/ng-update/tests/test-helpers.js +34 -0
  100. package/schematics/ng-update/tests/test-helpers.js.map +1 -0
  101. package/schematics/ng-update/utils/file-visitor.d.ts +8 -0
  102. package/schematics/ng-update/utils/file-visitor.js +44 -0
  103. package/schematics/ng-update/utils/file-visitor.js.map +1 -0
  104. package/schematics/ng-update/utils/regexp-utils.d.ts +16 -0
  105. package/schematics/ng-update/utils/regexp-utils.js +34 -0
  106. package/schematics/ng-update/utils/regexp-utils.js.map +1 -0
  107. package/schematics/vitest.config.d.ts +2 -0
  108. package/schematics/vitest.config.js +17 -0
  109. package/schematics/vitest.config.js.map +1 -0
  110. package/types/clr-angular-accordion.d.ts +1 -1
  111. package/types/clr-angular-button.d.ts +1 -1
  112. package/types/clr-angular-data-datagrid.d.ts +23 -33
  113. package/types/clr-angular-data-tree-view.d.ts +10 -1
  114. package/types/clr-angular-data.d.ts +4 -2136
  115. package/types/clr-angular-emphasis.d.ts +4 -220
  116. package/types/clr-angular-forms-combobox.d.ts +64 -11
  117. package/types/clr-angular-forms-common.d.ts +9 -9
  118. package/types/clr-angular-forms-datepicker.d.ts +8 -1
  119. package/types/clr-angular-forms-file-input.d.ts +6 -3
  120. package/types/clr-angular-forms.d.ts +26 -2062
  121. package/types/clr-angular-layout-nav.d.ts +6 -2
  122. package/types/clr-angular-layout-tabs.d.ts +1 -1
  123. package/types/clr-angular-layout.d.ts +6 -463
  124. package/types/clr-angular-popover-common.d.ts +38 -13
  125. package/types/clr-angular-popover-dropdown.d.ts +2 -1
  126. package/types/clr-angular-popover-signpost.d.ts +15 -7
  127. package/types/clr-angular-popover-tooltip.d.ts +1 -1
  128. package/types/clr-angular-popover.d.ts +7 -559
  129. package/types/clr-angular-stepper.d.ts +1 -1
  130. package/types/clr-angular-utils.d.ts +13 -175
  131. package/types/clr-angular-wizard.d.ts +92 -35
  132. package/types/clr-angular.d.ts +22 -10238
@@ -1,18 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule, Injectable, EventEmitter, Input, Output, Optional, Component, Directive, ContentChildren } from '@angular/core';
3
- import { ClrAlertModule as ClrAlertModule$1 } from '@clr/angular/emphasis/alert';
4
- import { ClrBadge as ClrBadge$1 } from '@clr/angular/emphasis/badge';
5
- import { ClrLabel as ClrLabel$1 } from '@clr/angular/emphasis/label';
6
- import * as i1 from '@clr/angular/utils';
7
- import { Subject } from 'rxjs';
8
- import * as i4 from '@angular/common';
9
- import { CommonModule } from '@angular/common';
10
- import * as i5 from '@clr/angular/icon';
11
- import { ClarityIcons, errorStandardIcon, helpIcon, infoStandardIcon, noteIcon, successStandardIcon, warningStandardIcon, windowCloseIcon, ClrIcon } from '@clr/angular/icon';
12
- import * as i3 from '@clr/angular/progress/spinner';
13
- import { ClrSpinnerModule } from '@clr/angular/progress/spinner';
14
- import { ClrDropdownModule } from '@clr/angular/popover/dropdown';
15
- import { Type } from '@clr/angular/emphasis/common';
2
+ import { NgModule } from '@angular/core';
3
+ import { ClrAlertModule } from '@clr/angular/emphasis/alert';
4
+ export * from '@clr/angular/emphasis/alert';
5
+ import { ClrBadge } from '@clr/angular/emphasis/badge';
6
+ export * from '@clr/angular/emphasis/badge';
7
+ import { ClrLabel } from '@clr/angular/emphasis/label';
8
+ export * from '@clr/angular/emphasis/label';
16
9
 
17
10
  /*
18
11
  * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
@@ -22,776 +15,17 @@ import { Type } from '@clr/angular/emphasis/common';
22
15
  */
23
16
  class ClrEmphasisModule {
24
17
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrEmphasisModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
25
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: ClrEmphasisModule, imports: [ClrBadge$1, ClrLabel$1], exports: [ClrAlertModule$1, ClrBadge$1, ClrLabel$1] }); }
26
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrEmphasisModule, imports: [ClrBadge$1, ClrLabel$1, ClrAlertModule$1] }); }
18
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: ClrEmphasisModule, imports: [ClrBadge, ClrLabel], exports: [ClrAlertModule, ClrBadge, ClrLabel] }); }
19
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrEmphasisModule, imports: [ClrBadge, ClrLabel, ClrAlertModule] }); }
27
20
  }
28
21
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrEmphasisModule, decorators: [{
29
22
  type: NgModule,
30
23
  args: [{
31
- imports: [ClrBadge$1, ClrLabel$1],
32
- exports: [ClrAlertModule$1, ClrBadge$1, ClrLabel$1],
24
+ imports: [ClrBadge, ClrLabel],
25
+ exports: [ClrAlertModule, ClrBadge, ClrLabel],
33
26
  }]
34
27
  }] });
35
28
 
36
- /*
37
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
38
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
39
- * This software is released under MIT license.
40
- * The full license information can be found in LICENSE in the root directory of this project.
41
- */
42
- // @TODO Make this an enum
43
- const ALERT_TYPES = ['info', 'warning', 'danger', 'success', 'neutral', 'unknown', 'loading'];
44
-
45
- /*
46
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
47
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
48
- * This software is released under MIT license.
49
- * The full license information can be found in LICENSE in the root directory of this project.
50
- */
51
- class AlertIconAndTypesService {
52
- constructor(commonStrings) {
53
- this.commonStrings = commonStrings;
54
- this.defaultIconShape = 'info-standard';
55
- this._alertIconShape = '';
56
- this._alertType = 'info';
57
- }
58
- get alertType() {
59
- return this._alertType;
60
- }
61
- set alertType(val) {
62
- if (ALERT_TYPES.indexOf(val) > -1) {
63
- this._alertType = val;
64
- }
65
- }
66
- get alertIconShape() {
67
- if ('' === this._alertIconShape) {
68
- return this.iconInfoFromType(this._alertType).shape;
69
- }
70
- return this._alertIconShape;
71
- }
72
- set alertIconShape(val) {
73
- if (!val) {
74
- this._alertIconShape = '';
75
- }
76
- else if (val !== this._alertIconShape) {
77
- this._alertIconShape = val;
78
- }
79
- }
80
- get alertIconTitle() {
81
- return this.iconInfoFromType(this._alertType).title;
82
- }
83
- iconInfoFromType(type) {
84
- const returnObj = { shape: '', cssClass: '', title: '' };
85
- switch (type) {
86
- case 'warning':
87
- returnObj.shape = 'warning-standard';
88
- returnObj.cssClass = 'alert-warning';
89
- returnObj.title = this.commonStrings.keys.warning;
90
- break;
91
- case 'danger':
92
- returnObj.shape = 'error-standard';
93
- returnObj.cssClass = 'alert-danger';
94
- returnObj.title = this.commonStrings.keys.danger;
95
- break;
96
- case 'success':
97
- returnObj.shape = 'success-standard';
98
- returnObj.cssClass = 'alert-success';
99
- returnObj.title = this.commonStrings.keys.success;
100
- break;
101
- case 'neutral':
102
- returnObj.shape = 'note';
103
- returnObj.cssClass = 'alert-neutral';
104
- returnObj.title = this.commonStrings.keys.neutral;
105
- break;
106
- case 'unknown':
107
- returnObj.shape = 'help';
108
- returnObj.cssClass = 'alert-neutral';
109
- returnObj.title = this.commonStrings.keys.unknown;
110
- break;
111
- case 'loading':
112
- returnObj.shape = 'loading';
113
- returnObj.cssClass = 'alert-neutral';
114
- returnObj.title = this.commonStrings.keys.unknown;
115
- break;
116
- default:
117
- returnObj.shape = this.defaultIconShape;
118
- returnObj.cssClass = 'alert-info';
119
- returnObj.title = this.commonStrings.keys.info;
120
- break;
121
- }
122
- return returnObj;
123
- }
124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AlertIconAndTypesService, deps: [{ token: i1.ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
125
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AlertIconAndTypesService }); }
126
- }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AlertIconAndTypesService, decorators: [{
128
- type: Injectable
129
- }], ctorParameters: () => [{ type: i1.ClrCommonStringsService }] });
130
-
131
- /*
132
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
133
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
134
- * This software is released under MIT license.
135
- * The full license information can be found in LICENSE in the root directory of this project.
136
- */
137
- class MultiAlertService {
138
- constructor() {
139
- this._change = new Subject();
140
- }
141
- /**
142
- * The Observable that lets other classes subscribe to changes
143
- */
144
- get changes() {
145
- return this._change.asObservable();
146
- }
147
- get current() {
148
- return this._current;
149
- }
150
- set current(index) {
151
- if (index !== this._current) {
152
- this._current = index;
153
- this._change.next(index);
154
- }
155
- }
156
- get activeAlerts() {
157
- return this.allAlerts && this.allAlerts.filter(alert => !alert._closed);
158
- }
159
- get currentAlert() {
160
- return this.activeAlerts && this.activeAlerts[this.current];
161
- }
162
- set currentAlert(alert) {
163
- this.current = this.activeAlerts.indexOf(alert);
164
- }
165
- get count() {
166
- return (this.activeAlerts && this.activeAlerts.length) || 0;
167
- }
168
- manage(alerts) {
169
- if (this.subscription) {
170
- this.subscription.unsubscribe();
171
- }
172
- this.allAlerts = alerts;
173
- // After receiving alerts' QueryList,
174
- // we are picking index 0 as current by default if a user hasn't any index
175
- this.current = typeof this._current === 'number' ? this._current : 0;
176
- // we have to also broadcast that initial index
177
- this._change.next(this.current);
178
- this.subscription = this.allAlerts.changes.subscribe(() => {
179
- if (this.current >= this.allAlerts.length) {
180
- this.current = Math.max(0, this.allAlerts.length - 1);
181
- }
182
- });
183
- }
184
- next() {
185
- this._current = this.current === this.activeAlerts.length - 1 ? 0 : this.current + 1;
186
- this._change.next(this._current);
187
- }
188
- previous() {
189
- if (this.activeAlerts.length === 0) {
190
- return;
191
- }
192
- this._current = this.current === 0 ? this.activeAlerts.length - 1 : this.current - 1;
193
- this._change.next(this._current);
194
- }
195
- open() {
196
- if (this.activeAlerts.length === 0) {
197
- return;
198
- }
199
- if (!this.currentAlert) {
200
- this._current = 0;
201
- }
202
- this._change.next(this._current);
203
- }
204
- close(isCurrentAlert) {
205
- if (this.activeAlerts.length === 0) {
206
- return;
207
- }
208
- if (isCurrentAlert) {
209
- this._current = Math.max(0, this.current - 1);
210
- }
211
- this._change.next(this._current);
212
- }
213
- destroy() {
214
- if (this.subscription) {
215
- this.subscription.unsubscribe();
216
- }
217
- }
218
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MultiAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
219
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MultiAlertService }); }
220
- }
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MultiAlertService, decorators: [{
222
- type: Injectable
223
- }] });
224
-
225
- /*
226
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
227
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
228
- * This software is released under MIT license.
229
- * The full license information can be found in LICENSE in the root directory of this project.
230
- */
231
- class ClrAlert {
232
- constructor(iconService, cdr, multiAlertService, commonStrings, renderer, hostElement) {
233
- this.iconService = iconService;
234
- this.cdr = cdr;
235
- this.multiAlertService = multiAlertService;
236
- this.commonStrings = commonStrings;
237
- this.renderer = renderer;
238
- this.hostElement = hostElement;
239
- this.isSmall = false;
240
- this.closable = true;
241
- this.isAppLevel = false;
242
- this.clrCloseButtonAriaLabel = this.commonStrings.keys.alertCloseButtonAriaLabel;
243
- this._closedChanged = new EventEmitter(false);
244
- this._closed = false;
245
- this.subscriptions = [];
246
- this._isLightweight = false;
247
- }
248
- get isLightweight() {
249
- return this._isLightweight;
250
- }
251
- set isLightweight(val) {
252
- this._isLightweight = val;
253
- this.configAlertType(this._origAlertType);
254
- }
255
- get alertType() {
256
- return this.iconService.alertType;
257
- }
258
- set alertType(val) {
259
- this._origAlertType = val;
260
- this.configAlertType(val);
261
- }
262
- set alertIconShape(value) {
263
- this.iconService.alertIconShape = value;
264
- }
265
- set closed(value) {
266
- if (value && !this._closed) {
267
- this.close();
268
- }
269
- else if (!value && this._closed) {
270
- this.open();
271
- }
272
- }
273
- get alertClass() {
274
- return this.iconService.iconInfoFromType(this.iconService.alertType).cssClass;
275
- }
276
- get hidden() {
277
- return this._hidden;
278
- }
279
- set hidden(value) {
280
- if (value !== this._hidden) {
281
- this._hidden = value;
282
- // CDE-1249 @HostBinding('class.alert-hidden') decoration will raise error in console https://angular.io/errors/NG0100
283
- if (this._hidden) {
284
- this.renderer.addClass(this.hostElement.nativeElement, 'alert-hidden');
285
- }
286
- else {
287
- this.renderer.removeClass(this.hostElement.nativeElement, 'alert-hidden');
288
- }
289
- this.cdr.detectChanges();
290
- }
291
- }
292
- ngOnInit() {
293
- if (this.multiAlertService) {
294
- this.subscriptions.push(this.multiAlertService.changes.subscribe(() => {
295
- this.hidden = this.multiAlertService.currentAlert !== this;
296
- }));
297
- }
298
- }
299
- ngOnDestroy() {
300
- this.subscriptions.forEach(sub => sub.unsubscribe());
301
- }
302
- configAlertType(val) {
303
- this.iconService.alertType = val;
304
- }
305
- open() {
306
- this._closed = false;
307
- if (this.multiAlertService) {
308
- this.multiAlertService.open();
309
- }
310
- this._closedChanged.emit(false);
311
- }
312
- close() {
313
- if (!this.closable) {
314
- return;
315
- }
316
- const isCurrentAlert = this.multiAlertService?.currentAlert === this;
317
- this._closed = true;
318
- if (this.multiAlertService?.activeAlerts) {
319
- this.multiAlertService.close(isCurrentAlert);
320
- }
321
- this._closedChanged.emit(true);
322
- }
323
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlert, deps: [{ token: AlertIconAndTypesService }, { token: i0.ChangeDetectorRef }, { token: MultiAlertService, optional: true }, { token: i1.ClrCommonStringsService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
324
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: ClrAlert, isStandalone: false, selector: "clr-alert", inputs: { isSmall: ["clrAlertSizeSmall", "isSmall"], closable: ["clrAlertClosable", "closable"], isAppLevel: ["clrAlertAppLevel", "isAppLevel"], clrCloseButtonAriaLabel: "clrCloseButtonAriaLabel", isLightweight: ["clrAlertLightweight", "isLightweight"], alertType: ["clrAlertType", "alertType"], alertIconShape: ["clrAlertIcon", "alertIconShape"], closed: ["clrAlertClosed", "closed"] }, outputs: { _closedChanged: "clrAlertClosedChange" }, providers: [AlertIconAndTypesService], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\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@if (!_closed) {\n<div\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLightweight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n @if (closable) {\n <button type=\"button\" class=\"close\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"times\"></cds-icon>\n </button>\n }\n</div>\n}\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i5.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }] }); }
325
- }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlert, decorators: [{
327
- type: Component,
328
- args: [{ selector: 'clr-alert', providers: [AlertIconAndTypesService], standalone: false, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\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@if (!_closed) {\n<div\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLightweight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n @if (closable) {\n <button type=\"button\" class=\"close\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"times\"></cds-icon>\n </button>\n }\n</div>\n}\n" }]
329
- }], ctorParameters: () => [{ type: AlertIconAndTypesService }, { type: i0.ChangeDetectorRef }, { type: MultiAlertService, decorators: [{
330
- type: Optional
331
- }] }, { type: i1.ClrCommonStringsService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { isSmall: [{
332
- type: Input,
333
- args: ['clrAlertSizeSmall']
334
- }], closable: [{
335
- type: Input,
336
- args: ['clrAlertClosable']
337
- }], isAppLevel: [{
338
- type: Input,
339
- args: ['clrAlertAppLevel']
340
- }], clrCloseButtonAriaLabel: [{
341
- type: Input
342
- }], _closedChanged: [{
343
- type: Output,
344
- args: ['clrAlertClosedChange']
345
- }], isLightweight: [{
346
- type: Input,
347
- args: ['clrAlertLightweight']
348
- }], alertType: [{
349
- type: Input,
350
- args: ['clrAlertType']
351
- }], alertIconShape: [{
352
- type: Input,
353
- args: ['clrAlertIcon']
354
- }], closed: [{
355
- type: Input,
356
- args: ['clrAlertClosed']
357
- }] } });
358
-
359
- /*
360
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
361
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
362
- * This software is released under MIT license.
363
- * The full license information can be found in LICENSE in the root directory of this project.
364
- */
365
- class ClrAlertItem {
366
- constructor(iconService) {
367
- this.iconService = iconService;
368
- }
369
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertItem, deps: [{ token: AlertIconAndTypesService }], target: i0.ɵɵFactoryTarget.Component }); }
370
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: ClrAlertItem, isStandalone: false, selector: "clr-alert-item", host: { classAttribute: "alert-item" }, ngImport: i0, template: `
371
- <div class="alert-icon-wrapper">
372
- @if (iconService.alertIconShape === 'loading') {
373
- <clr-spinner class="alert-spinner" clrInline></clr-spinner>
374
- }
375
- @if (iconService.alertIconShape !== 'loading') {
376
- <cds-icon
377
- class="alert-icon"
378
- role="img"
379
- [shape]="iconService.alertIconShape"
380
- [attr.aria-label]="iconService.alertIconTitle"
381
- ></cds-icon>
382
- }
383
- </div>
384
- <ng-content></ng-content>
385
- `, isInline: true, dependencies: [{ kind: "component", type: i5.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "component", type: i3.ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }] }); }
386
- }
387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertItem, decorators: [{
388
- type: Component,
389
- args: [{
390
- selector: 'clr-alert-item',
391
- template: `
392
- <div class="alert-icon-wrapper">
393
- @if (iconService.alertIconShape === 'loading') {
394
- <clr-spinner class="alert-spinner" clrInline></clr-spinner>
395
- }
396
- @if (iconService.alertIconShape !== 'loading') {
397
- <cds-icon
398
- class="alert-icon"
399
- role="img"
400
- [shape]="iconService.alertIconShape"
401
- [attr.aria-label]="iconService.alertIconTitle"
402
- ></cds-icon>
403
- }
404
- </div>
405
- <ng-content></ng-content>
406
- `,
407
- host: { class: 'alert-item' },
408
- standalone: false,
409
- }]
410
- }], ctorParameters: () => [{ type: AlertIconAndTypesService }] });
411
-
412
- /*
413
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
414
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
415
- * This software is released under MIT license.
416
- * The full license information can be found in LICENSE in the root directory of this project.
417
- */
418
- /**
419
- * @remark
420
- * This directive is used only of selectin alert text.
421
- */
422
- class ClrAlertText {
423
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertText, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
424
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: ClrAlertText, isStandalone: false, selector: ".alert-text", ngImport: i0 }); }
425
- }
426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertText, decorators: [{
427
- type: Directive,
428
- args: [{
429
- selector: '.alert-text',
430
- standalone: false,
431
- }]
432
- }] });
433
-
434
- /*
435
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
436
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
437
- * This software is released under MIT license.
438
- * The full license information can be found in LICENSE in the root directory of this project.
439
- */
440
- class ClrAlertsPager {
441
- constructor(multiAlertService, commonStrings) {
442
- this.multiAlertService = multiAlertService;
443
- this.commonStrings = commonStrings;
444
- this.currentAlertChange = new EventEmitter(false);
445
- this.currentAlertIndexChange = new EventEmitter();
446
- }
447
- /**
448
- * Input/Output to support two way binding on current alert instance
449
- */
450
- get currentAlert() {
451
- return this.multiAlertService.currentAlert;
452
- }
453
- set currentAlert(alert) {
454
- if (alert) {
455
- this.multiAlertService.currentAlert = alert;
456
- }
457
- }
458
- /**
459
- * Input/Output to support two way binding on current alert index
460
- */
461
- get currentAlertIndex() {
462
- return this.multiAlertService.current;
463
- }
464
- set currentAlertIndex(index) {
465
- this.multiAlertService.current = index;
466
- }
467
- get previousAlertAriaLabel() {
468
- const CURRENT = this.currentAlertIndex + 1;
469
- return this.commonStrings.parse(this.commonStrings.keys.alertPreviousAlertAriaLabel, {
470
- CURRENT: (CURRENT === 1 ? this.multiAlertService.count : CURRENT - 1).toString(),
471
- COUNT: this.multiAlertService.count.toString(),
472
- });
473
- }
474
- get nextAlertAriaLabel() {
475
- const CURRENT = this.currentAlertIndex + 1;
476
- return this.commonStrings.parse(this.commonStrings.keys.alertNextAlertAriaLabel, {
477
- CURRENT: (CURRENT === this.multiAlertService.count ? 1 : CURRENT + 1).toString(),
478
- COUNT: this.multiAlertService.count.toString(),
479
- });
480
- }
481
- ngOnInit() {
482
- this.multiAlertServiceChanges = this.multiAlertService.changes.subscribe(index => {
483
- this.currentAlertIndexChange.emit(index);
484
- this.currentAlertChange.emit(this.multiAlertService.activeAlerts[index]);
485
- });
486
- }
487
- ngOnDestroy() {
488
- this.multiAlertServiceChanges.unsubscribe();
489
- }
490
- pageUp() {
491
- this.multiAlertService.next();
492
- }
493
- pageDown() {
494
- this.multiAlertService.previous();
495
- }
496
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertsPager, deps: [{ token: MultiAlertService }, { token: i1.ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component }); }
497
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ClrAlertsPager, isStandalone: false, selector: "clr-alerts-pager", inputs: { currentAlert: ["clrCurrentAlert", "currentAlert"], currentAlertIndex: ["clrCurrentAlertIndex", "currentAlertIndex"] }, outputs: { currentAlertChange: "clrCurrentAlertChange", currentAlertIndexChange: "clrCurrentAlertIndexChange" }, host: { properties: { "class.alerts-pager": "true" } }, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\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 class=\"alerts-pager-control\">\n <div class=\"alerts-page-down\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageDown()\" [attr.aria-label]=\"previousAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"left\" [attr.title]=\"commonStrings.keys.previous\"></cds-icon>\n </button>\n </div>\n <div class=\"alerts-pager-text\">{{multiAlertService.current+1}} / {{multiAlertService.count}}</div>\n <div class=\"alerts-page-up\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageUp()\" [attr.aria-label]=\"nextAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"right\" [attr.title]=\"commonStrings.keys.next\"></cds-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i5.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }] }); }
498
- }
499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertsPager, decorators: [{
500
- type: Component,
501
- args: [{ selector: 'clr-alerts-pager', host: { '[class.alerts-pager]': 'true' }, standalone: false, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\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 class=\"alerts-pager-control\">\n <div class=\"alerts-page-down\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageDown()\" [attr.aria-label]=\"previousAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"left\" [attr.title]=\"commonStrings.keys.previous\"></cds-icon>\n </button>\n </div>\n <div class=\"alerts-pager-text\">{{multiAlertService.current+1}} / {{multiAlertService.count}}</div>\n <div class=\"alerts-page-up\">\n <button class=\"alerts-pager-button\" type=\"button\" (click)=\"pageUp()\" [attr.aria-label]=\"nextAlertAriaLabel\">\n <cds-icon shape=\"angle\" direction=\"right\" [attr.title]=\"commonStrings.keys.next\"></cds-icon>\n </button>\n </div>\n</div>\n" }]
502
- }], ctorParameters: () => [{ type: MultiAlertService }, { type: i1.ClrCommonStringsService }], propDecorators: { currentAlertChange: [{
503
- type: Output,
504
- args: ['clrCurrentAlertChange']
505
- }], currentAlertIndexChange: [{
506
- type: Output,
507
- args: ['clrCurrentAlertIndexChange']
508
- }], currentAlert: [{
509
- type: Input,
510
- args: ['clrCurrentAlert']
511
- }], currentAlertIndex: [{
512
- type: Input,
513
- args: ['clrCurrentAlertIndex']
514
- }] } });
515
-
516
- /*
517
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
518
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
519
- * This software is released under MIT license.
520
- * The full license information can be found in LICENSE in the root directory of this project.
521
- */
522
- class ClrAlerts {
523
- constructor(multiAlertService) {
524
- this.multiAlertService = multiAlertService;
525
- this.currentAlertChange = new EventEmitter(false);
526
- this.currentAlertIndexChange = new EventEmitter(false);
527
- this.subscriptions = [];
528
- }
529
- set allAlerts(value) {
530
- this.multiAlertService.manage(value); // provide alerts
531
- }
532
- /**
533
- * Input/Output to support two way binding on current alert index
534
- */
535
- set _inputCurrentIndex(index) {
536
- if (Number.isInteger(index) && index >= 0) {
537
- this.multiAlertService.current = index;
538
- }
539
- }
540
- get currentAlertIndex() {
541
- return this.multiAlertService.current;
542
- }
543
- set currentAlertIndex(index) {
544
- this.multiAlertService.current = index;
545
- }
546
- /**
547
- * Input/Output to support two way binding on current alert instance
548
- */
549
- get currentAlert() {
550
- return this.multiAlertService.currentAlert;
551
- }
552
- set currentAlert(alert) {
553
- if (alert) {
554
- this.multiAlertService.currentAlert = alert;
555
- }
556
- }
557
- /**
558
- * Ensure we are only dealing with alerts that have not been closed yet
559
- */
560
- get alerts() {
561
- return this.allAlerts.filter(alert => {
562
- return alert.hidden === false;
563
- });
564
- }
565
- get currentAlertType() {
566
- if (this.multiAlertService.currentAlert) {
567
- return this.multiAlertService.currentAlert.alertType;
568
- }
569
- return '';
570
- }
571
- ngAfterContentInit() {
572
- this.subscriptions.push(this.multiAlertService.changes.subscribe(index => {
573
- this.currentAlertIndexChange.next(index);
574
- this.currentAlertChange.next(this.multiAlertService.currentAlert);
575
- }));
576
- }
577
- ngOnDestroy() {
578
- this.subscriptions.forEach(sub => sub.unsubscribe());
579
- this.multiAlertService.destroy();
580
- }
581
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlerts, deps: [{ token: MultiAlertService }], target: i0.ɵɵFactoryTarget.Component }); }
582
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: ClrAlerts, isStandalone: false, selector: "clr-alerts", inputs: { _inputCurrentIndex: ["clrCurrentAlertIndex", "_inputCurrentIndex"], currentAlert: ["clrCurrentAlert", "currentAlert"] }, outputs: { currentAlertChange: "clrCurrentAlertChange", currentAlertIndexChange: "clrCurrentAlertIndexChange" }, host: { properties: { "class.alerts": "true", "class.alert-danger": "this.currentAlertType == 'danger'", "class.alert-info": "this.currentAlertType == 'info'", "class.alert-success": "this.currentAlertType == 'success'", "class.alert-warning": "this.currentAlertType == 'warning'", "class.alert-neutral": "this.currentAlertType == 'neutral'" } }, providers: [MultiAlertService], queries: [{ propertyName: "allAlerts", predicate: ClrAlert }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\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<div class=\"alerts-wrapper\">\n @if (multiAlertService.count > 1) {\n <clr-alerts-pager [clrCurrentAlertIndex]=\"currentAlertIndex\"></clr-alerts-pager>\n }\n <ng-content select=\"clr-alert\"></ng-content>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: ClrAlertsPager, selector: "clr-alerts-pager", inputs: ["clrCurrentAlert", "clrCurrentAlertIndex"], outputs: ["clrCurrentAlertChange", "clrCurrentAlertIndexChange"] }] }); }
583
- }
584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlerts, decorators: [{
585
- type: Component,
586
- args: [{ selector: 'clr-alerts', providers: [MultiAlertService], host: {
587
- '[class.alerts]': 'true',
588
- '[class.alert-danger]': "this.currentAlertType == 'danger'",
589
- '[class.alert-info]': "this.currentAlertType == 'info'",
590
- '[class.alert-success]': "this.currentAlertType == 'success'",
591
- '[class.alert-warning]': "this.currentAlertType == 'warning'",
592
- '[class.alert-neutral]': "this.currentAlertType == 'neutral'",
593
- }, standalone: false, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\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<div class=\"alerts-wrapper\">\n @if (multiAlertService.count > 1) {\n <clr-alerts-pager [clrCurrentAlertIndex]=\"currentAlertIndex\"></clr-alerts-pager>\n }\n <ng-content select=\"clr-alert\"></ng-content>\n</div>\n", styles: [":host{display:block}\n"] }]
594
- }], ctorParameters: () => [{ type: MultiAlertService }], propDecorators: { currentAlertChange: [{
595
- type: Output,
596
- args: ['clrCurrentAlertChange']
597
- }], currentAlertIndexChange: [{
598
- type: Output,
599
- args: ['clrCurrentAlertIndexChange']
600
- }], allAlerts: [{
601
- type: ContentChildren,
602
- args: [ClrAlert]
603
- }], _inputCurrentIndex: [{
604
- type: Input,
605
- args: ['clrCurrentAlertIndex']
606
- }], currentAlert: [{
607
- type: Input,
608
- args: ['clrCurrentAlert']
609
- }] } });
610
-
611
- /*
612
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
613
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
614
- * This software is released under MIT license.
615
- * The full license information can be found in LICENSE in the root directory of this project.
616
- */
617
- const CLR_ALERT_DIRECTIVES = [ClrAlert, ClrAlertItem, ClrAlerts, ClrAlertsPager, ClrAlertText];
618
- class ClrAlertModule {
619
- constructor() {
620
- ClarityIcons.addIcons(errorStandardIcon, helpIcon, infoStandardIcon, noteIcon, successStandardIcon, warningStandardIcon, windowCloseIcon);
621
- }
622
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
623
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertModule, declarations: [ClrAlert, ClrAlertItem, ClrAlerts, ClrAlertsPager, ClrAlertText], imports: [CommonModule, ClrIcon, ClrDropdownModule, ClrSpinnerModule], exports: [ClrAlert, ClrAlertItem, ClrAlerts, ClrAlertsPager, ClrAlertText] }); }
624
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertModule, imports: [CommonModule, ClrIcon, ClrDropdownModule, ClrSpinnerModule] }); }
625
- }
626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrAlertModule, decorators: [{
627
- type: NgModule,
628
- args: [{
629
- imports: [CommonModule, ClrIcon, ClrDropdownModule, ClrSpinnerModule],
630
- declarations: [CLR_ALERT_DIRECTIVES],
631
- exports: [CLR_ALERT_DIRECTIVES],
632
- }]
633
- }], ctorParameters: () => [] });
634
-
635
- /*
636
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
637
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
638
- * This software is released under MIT license.
639
- * The full license information can be found in LICENSE in the root directory of this project.
640
- */
641
-
642
- /*
643
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
644
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
645
- * This software is released under MIT license.
646
- * The full license information can be found in LICENSE in the root directory of this project.
647
- */
648
- var ClrBadgeColors;
649
- (function (ClrBadgeColors) {
650
- ClrBadgeColors["None"] = "";
651
- ClrBadgeColors["Info"] = "info";
652
- ClrBadgeColors["Warning"] = "warning";
653
- ClrBadgeColors["Danger"] = "danger";
654
- ClrBadgeColors["Success"] = "success";
655
- ClrBadgeColors["Gray"] = "gray";
656
- ClrBadgeColors["Blue"] = "blue";
657
- ClrBadgeColors["LightBlue"] = "light-blue";
658
- ClrBadgeColors["Orange"] = "orange";
659
- ClrBadgeColors["Purple"] = "purple";
660
- })(ClrBadgeColors || (ClrBadgeColors = {}));
661
- class ClrBadge {
662
- constructor() {
663
- this.color = ClrBadgeColors.None;
664
- this.type = Type.Solid;
665
- }
666
- get isOutlined() {
667
- return this.type === Type.Outlined;
668
- }
669
- get colorClass() {
670
- return this.color ? `badge-${this.color}` : '';
671
- }
672
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrBadge, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
673
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ClrBadge, isStandalone: true, selector: "clr-badge", inputs: { color: ["clrColor", "color"], type: ["clrType", "type"] }, host: { properties: { "class.outlined": "isOutlined", "class": "colorClass" }, classAttribute: "badge" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
674
- }
675
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrBadge, decorators: [{
676
- type: Component,
677
- args: [{
678
- selector: 'clr-badge',
679
- template: `<ng-content></ng-content>`,
680
- host: {
681
- class: 'badge',
682
- '[class.outlined]': 'isOutlined',
683
- '[class]': 'colorClass',
684
- },
685
- }]
686
- }], propDecorators: { color: [{
687
- type: Input,
688
- args: ['clrColor']
689
- }], type: [{
690
- type: Input,
691
- args: ['clrType']
692
- }] } });
693
-
694
- /*
695
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
696
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
697
- * This software is released under MIT license.
698
- * The full license information can be found in LICENSE in the root directory of this project.
699
- */
700
-
701
- /*
702
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
703
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
704
- * This software is released under MIT license.
705
- * The full license information can be found in LICENSE in the root directory of this project.
706
- */
707
- var ClrLabelColors;
708
- (function (ClrLabelColors) {
709
- ClrLabelColors["None"] = "";
710
- ClrLabelColors["Info"] = "info";
711
- ClrLabelColors["Warning"] = "warning";
712
- ClrLabelColors["Danger"] = "danger";
713
- ClrLabelColors["Success"] = "success";
714
- ClrLabelColors["Gray"] = "gray";
715
- ClrLabelColors["Blue"] = "blue";
716
- ClrLabelColors["LightBlue"] = "light-blue";
717
- ClrLabelColors["Orange"] = "orange";
718
- ClrLabelColors["Purple"] = "purple";
719
- })(ClrLabelColors || (ClrLabelColors = {}));
720
- class ClrLabel {
721
- constructor() {
722
- this.color = ClrLabelColors.None;
723
- this.badgeText = '';
724
- this.textContent = '';
725
- this.clickable = false;
726
- this.disabled = false;
727
- this.type = Type.Outlined;
728
- }
729
- get isSolid() {
730
- return this.type === Type.Solid;
731
- }
732
- get colorClass() {
733
- return this.color ? `label-${this.color}` : '';
734
- }
735
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
736
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: ClrLabel, isStandalone: true, selector: "clr-label", inputs: { color: ["clrColor", "color"], badgeText: ["clrBadgeText", "badgeText"], textContent: ["clrText", "textContent"], clickable: ["clrClickable", "clickable"], disabled: ["clrDisabled", "disabled"], type: ["clrType", "type"] }, host: { properties: { "class.clickable": "clickable", "class.disabled": "disabled", "class.solid": "isSolid", "class": "colorClass" }, classAttribute: "label" }, ngImport: i0, template: `@if (textContent) {
737
- <span class="text">{{ textContent }}</span>
738
- }
739
-
740
- @if (badgeText) {
741
- <clr-badge>{{ badgeText }}</clr-badge>
742
- }
743
-
744
- <ng-content></ng-content>`, isInline: true, dependencies: [{ kind: "component", type: ClrBadge$1, selector: "clr-badge", inputs: ["clrColor", "clrType"] }] }); }
745
- }
746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLabel, decorators: [{
747
- type: Component,
748
- args: [{
749
- selector: 'clr-label',
750
- template: `@if (textContent) {
751
- <span class="text">{{ textContent }}</span>
752
- }
753
-
754
- @if (badgeText) {
755
- <clr-badge>{{ badgeText }}</clr-badge>
756
- }
757
-
758
- <ng-content></ng-content>`,
759
- host: {
760
- class: 'label',
761
- '[class.clickable]': 'clickable',
762
- '[class.disabled]': 'disabled',
763
- '[class.solid]': 'isSolid',
764
- '[class]': 'colorClass',
765
- },
766
- imports: [ClrBadge$1],
767
- }]
768
- }], propDecorators: { color: [{
769
- type: Input,
770
- args: ['clrColor']
771
- }], badgeText: [{
772
- type: Input,
773
- args: ['clrBadgeText']
774
- }], textContent: [{
775
- type: Input,
776
- args: ['clrText']
777
- }], clickable: [{
778
- type: Input,
779
- args: ['clrClickable']
780
- }], disabled: [{
781
- type: Input,
782
- args: ['clrDisabled']
783
- }], type: [{
784
- type: Input,
785
- args: ['clrType']
786
- }] } });
787
-
788
- /*
789
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
790
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
791
- * This software is released under MIT license.
792
- * The full license information can be found in LICENSE in the root directory of this project.
793
- */
794
-
795
29
  /*
796
30
  * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
797
31
  * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
@@ -803,5 +37,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
803
37
  * Generated bundle index. Do not edit.
804
38
  */
805
39
 
806
- export { ALERT_TYPES, CLR_ALERT_DIRECTIVES, ClrAlert, ClrAlertItem, ClrAlertModule, ClrAlertText, ClrAlerts, ClrAlertsPager, ClrBadge, ClrBadgeColors, ClrEmphasisModule, ClrLabel, ClrLabelColors };
40
+ export { ClrEmphasisModule };
807
41
  //# sourceMappingURL=clr-angular-emphasis.mjs.map