@assistanz/carbideui 1.2.0 → 1.3.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.
@@ -1,12 +1,12 @@
1
1
  import * as i1$2 from '@angular/common';
2
2
  import { CommonModule, NgTemplateOutlet, DOCUMENT, isPlatformBrowser } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { signal, computed, Input, ChangeDetectionStrategy, Component, input, output, effect, Directive, EventEmitter, inject, ElementRef, Output, Optional, Self, InjectionToken, model, viewChild, contentChildren, forwardRef, TemplateRef, ViewChild, untracked, Renderer2, afterNextRender, ChangeDetectorRef, DestroyRef, Injector, runInInjectionContext, ViewChildren, ContentChildren, Injectable, PLATFORM_ID, Pipe, makeEnvironmentProviders, HostListener } from '@angular/core';
4
+ import { signal, computed, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, Directive, inject, ElementRef, effect, Optional, Self, InjectionToken, ViewChild, forwardRef, ContentChildren, TemplateRef, untracked, Renderer2, afterNextRender, input, output, ChangeDetectorRef, DestroyRef, Injector, runInInjectionContext, ViewChildren, contentChildren, Injectable, viewChild, PLATFORM_ID, Pipe, makeEnvironmentProviders, HostListener, model, linkedSignal, viewChildren } from '@angular/core';
5
5
  import * as i1 from '@angular/platform-browser';
6
6
  import * as i1$1 from '@angular/forms';
7
7
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
8
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
- import { Router, NavigationEnd, RouterLink } from '@angular/router';
9
+ import { Router, ActivatedRoute, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
10
10
  import { filter, fromEvent } from 'rxjs';
11
11
  import { DonutChart, PieChart, AreaChart, LineChart, StackedBarChart, SimpleBarChart, GaugeChart } from '@carbon/charts';
12
12
  import { map } from 'rxjs/operators';
@@ -193,6 +193,146 @@ const ICONS = {
193
193
  svg: `<circle cx="16" cy="8" r="2"></circle><circle cx="16" cy="16" r="2"></circle><circle cx="16" cy="24" r="2"></circle>`,
194
194
  viewBox: '0 0 32 32',
195
195
  },
196
+ /** Currency symbol — billing, invoices, pricing */
197
+ billing: {
198
+ svg: `<path d="M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z"/><path d="M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z"/>`,
199
+ viewBox: '0 0 32 32',
200
+ },
201
+ /** Bar chart — reports and analytics pages */
202
+ reports: {
203
+ svg: `<path d="M4,2H2V28a2,2,0,0,0,2,2H30V28H4V25H26V17H4V13H18V5H4ZM24,19v4H4V19ZM16,7v4H4V7Z"/>`,
204
+ viewBox: '0 0 32 32',
205
+ },
206
+ /** Shopping catalog — marketplace / product catalog */
207
+ marketplace: {
208
+ svg: `<path d="M17 24H21V28H17z"/><path d="M24 24H28V28H24z"/><path d="M17 17H21V21H17z"/><path d="M24 17H28V21H24z"/><path d="M28,11h-6V7c0-1.7-1.3-3-3-3h-6c-1.7,0-3,1.3-3,3v4H4c-0.6,0-1,0.4-1,1c0,0.1,0,0.1,0,0.2l1.9,12.1c0.1,1,1,1.7,2,1.7H15v-2 H6.9L5.2,13H28V11z M12,7c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1v4h-8V7z"/>`,
209
+ viewBox: '0 0 32 32',
210
+ },
211
+ /** Question mark in circle — support and help */
212
+ support: {
213
+ svg: `<path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"/><circle cx="16" cy="23.5" r="1.5"/><path d="M17,8H15.5A4.49,4.49,0,0,0,11,12.5V13h2v-.5A2.5,2.5,0,0,1,15.5,10H17a2.5,2.5,0,0,1,0,5H15v4.5h2V17a4.5,4.5,0,0,0,0-9Z"/>`,
214
+ viewBox: '0 0 32 32',
215
+ },
216
+ /** Key / certificate — licenses and entitlements */
217
+ license: {
218
+ svg: `<path d="M10 6H22V8H10z"/><path d="M10 10H22V12H10z"/><path d="M10 24H16V26H10z"/><path d="M10 14H16V16H10z"/><path d="M24,30H8a2.0023,2.0023,0,0,1-2-2V4A2.0023,2.0023,0,0,1,8,2H24a2.0023,2.0023,0,0,1,2,2V28A2.0023,2.0023,0,0,1,24,30ZM8,4V28H24V4Z"/>`,
219
+ viewBox: '0 0 32 32',
220
+ },
221
+ /** Pulse line — activity feed, audit log, health */
222
+ activity: {
223
+ svg: `<path d="M12,29a1,1,0,0,1-.92-.62L6.33,17H2V15H7a1,1,0,0,1,.92.62L12,25.28,20.06,3.65A1,1,0,0,1,21,3a1,1,0,0,1,.93.68L25.72,15H30v2H25a1,1,0,0,1-.95-.68L21,7,12.94,28.35A1,1,0,0,1,12,29Z"/>`,
224
+ viewBox: '0 0 32 32',
225
+ },
226
+ /** Globe — language / region selector */
227
+ globe: {
228
+ svg: `<path d="M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm5,3.1055a12.0136,12.0136,0,0,1,2.9158,1.8994L23.5034,8H21ZM13.3784,27.7026A11.9761,11.9761,0,0,1,8.1157,6.9761L9.4648,9h3.3423l-1.5,4H7.2793L5.8967,17.1475,8.4648,21h5l1.4319,2.1475ZM16,28c-.2034,0-.4016-.02-.6025-.03l1.3967-4.19a1.9876,1.9876,0,0,0-.2334-1.7412l-1.4319-2.1475A1.9962,1.9962,0,0,0,13.4648,19h-3.93L8.1033,16.8525,8.7207,15H11v2h2V14.1812l2.9363-7.83-1.8726-.7022L13.5571,7H10.5352L9.728,5.7891A11.7941,11.7941,0,0,1,19,4.395V8a2.0025,2.0025,0,0,0,2,2h2.5857A1.9865,1.9865,0,0,0,25,9.4141l.1406-.1407.2818-.68A11.9813,11.9813,0,0,1,27.3,12H22.5986a1.9927,1.9927,0,0,0-1.9719,1.665L20.03,17.1064a1.99,1.99,0,0,0,.991,2.086l2.1647,1.4638,1.4585,3.646A11.9577,11.9577,0,0,1,16,28Zm8.8145-8.6563L22.1,17.5088l-.1-.06L22.5986,14h5.2207a11.743,11.743,0,0,1-1.7441,8.4951Z"/>`,
229
+ viewBox: '0 0 32 32',
230
+ },
231
+ /** Arrow leaving a door — sign out / log out */
232
+ sign_out: {
233
+ svg: `<path d="M6,30H18a2.0023,2.0023,0,0,0,2-2V25H18v3H6V4H18V7h2V4a2.0023,2.0023,0,0,0-2-2H6A2.0023,2.0023,0,0,0,4,4V28A2.0023,2.0023,0,0,0,6,30Z"/><path d="M20.586 20.586 24.172 17 10 17 10 15 24.172 15 20.586 11.414 22 10 28 16 22 22 20.586 20.586z"/>`,
234
+ viewBox: '0 0 32 32',
235
+ },
236
+ /** Palette — theme / appearance switcher */
237
+ theme: {
238
+ svg: `<circle cx="10" cy="12" r="2"/><circle cx="16" cy="9" r="2"/><circle cx="22" cy="12" r="2"/><circle cx="23" cy="18" r="2"/><circle cx="19" cy="23" r="2"/><path d="M16.54,2A14,14,0,0,0,2,16a4.82,4.82,0,0,0,6.09,4.65l1.12-.31A3,3,0,0,1,13,23.24V27a3,3,0,0,0,3,3A14,14,0,0,0,30,15.46,14.05,14.05,0,0,0,16.54,2Zm8.11,22.31A11.93,11.93,0,0,1,16,28a1,1,0,0,1-1-1V23.24a5,5,0,0,0-5-5,5.07,5.07,0,0,0-1.33.18l-1.12.31A2.82,2.82,0,0,1,4,16,12,12,0,0,1,16.47,4,12.18,12.18,0,0,1,28,15.53,11.89,11.89,0,0,1,24.65,24.32Z"/>`,
239
+ viewBox: '0 0 32 32',
240
+ },
241
+ /** Funnel — filter table or list data */
242
+ filter: {
243
+ svg: `<path d="M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"/>`,
244
+ viewBox: '0 0 32 32',
245
+ },
246
+ /** Arrow into tray — download a file */
247
+ download: {
248
+ svg: `<path d="M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"/><path d="M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z"/>`,
249
+ viewBox: '0 0 32 32',
250
+ },
251
+ /** Arrow out of box — export data / share out */
252
+ export: {
253
+ svg: `<path d="M26,24v4H6V24H4v4l.0076-.0049A1.9977,1.9977,0,0,0,6,30H26a2,2,0,0,0,2-2h0V24Z"/><path d="M6 12 7.411 13.405 15 5.825 15 24 17 24 17 5.825 24.591 13.405 26 12 16 2 6 12z"/>`,
254
+ viewBox: '0 0 32 32',
255
+ },
256
+ /** Arrow up from tray — upload a file */
257
+ upload: {
258
+ svg: `<path d="M6 18 7.41 19.41 15 11.83 15 30 17 30 17 11.83 24.59 19.41 26 18 16 8 6 18z"/><path d="M6,8V4H26V8h2V4a2,2,0,0,0-2-2H6A2,2,0,0,0,4,4V8Z"/>`,
259
+ viewBox: '0 0 32 32',
260
+ },
261
+ /** Sliders — preferences and per-view settings */
262
+ settings_adjust: {
263
+ svg: `<path d="M30,8h-4.1c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2v2h14.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30V8z M21,12c-1.7,0-3-1.3-3-3 s1.3-3,3-3s3,1.3,3,3S22.7,12,21,12z"/><path d="M2,24h4.1c0.5,2.3,2.5,4,4.9,4s4.4-1.7,4.9-4H30v-2H15.9c-0.5-2.3-2.5-4-4.9-4s-4.4,1.7-4.9,4H2V24z M11,20c1.7,0,3,1.3,3,3 s-1.3,3-3,3s-3-1.3-3-3S9.3,20,11,20z"/>`,
264
+ viewBox: '0 0 32 32',
265
+ },
266
+ /** Clock — duration, scheduled, recent */
267
+ time: {
268
+ svg: `<path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"/><path d="M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"/>`,
269
+ viewBox: '0 0 32 32',
270
+ },
271
+ /** Page — documents, files, invoices */
272
+ document: {
273
+ svg: `<path d="M25.7,9.3l-7-7C18.5,2.1,18.3,2,18,2H8C6.9,2,6,2.9,6,4v24c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V10C26,9.7,25.9,9.5,25.7,9.3 z M18,4.4l5.6,5.6H18V4.4z M24,28H8V4h8v6c0,1.1,0.9,2,2,2h6V28z"/><path d="M10 22H22V24H10z"/><path d="M10 16H22V18H10z"/>`,
274
+ viewBox: '0 0 32 32',
275
+ },
276
+ /** Chain link — copy link, external reference */
277
+ link: {
278
+ svg: `<path d="M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"/><path d="M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"/>`,
279
+ viewBox: '0 0 32 32',
280
+ },
281
+ /** Floppy disk — save changes */
282
+ save: {
283
+ svg: `<path d="M27.71,9.29l-5-5A1,1,0,0,0,22,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V10A1,1,0,0,0,27.71,9.29ZM12,6h8v4H12Zm8,20H12V18h8Zm2,0V18a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2v8H6V6h4v4a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V6.41l4,4V26Z"/>`,
284
+ viewBox: '0 0 32 32',
285
+ },
286
+ /** Circular arrow — reload / retry */
287
+ refresh: {
288
+ svg: `<path d="M26,18A10,10,0,1,1,16,8h6.1821l-3.5844,3.5854L20,13l6-6L20,1,18.5977,2.414,22.1851,6H16A12,12,0,1,0,28,18Z"/>`,
289
+ viewBox: '0 0 32 32',
290
+ },
291
+ /** Closed padlock — secured or restricted */
292
+ lock: {
293
+ svg: `<path d="M24,14H22V8A6,6,0,0,0,10,8v6H8a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V16A2,2,0,0,0,24,14ZM12,8a4,4,0,0,1,8,0v6H12ZM24,28H8V16H24Z"/>`,
294
+ viewBox: '0 0 32 32',
295
+ },
296
+ /** Open padlock — unlocked or public */
297
+ unlock: {
298
+ svg: `<path d="M24,14H12V8a4,4,0,0,1,8,0h2A6,6,0,0,0,10,8v6H8a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V16A2,2,0,0,0,24,14Zm0,14H8V16H24Z"/>`,
299
+ viewBox: '0 0 32 32',
300
+ },
301
+ /** Arrow out of square — opens in new tab */
302
+ launch: {
303
+ svg: `<path d="M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z"/><path d="M20 2 20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z"/>`,
304
+ viewBox: '0 0 32 32',
305
+ },
306
+ /** Sun — light theme */
307
+ light: {
308
+ svg: `<path d="M15 2H17V7H15z"/><path d="M21.668 6.854H26.625999999999998V8.854H21.668z" transform="rotate(-45 24.147 7.853)"/><path d="M25 15H30V17H25z"/><path d="M23.147 21.668H25.147V26.625999999999998H23.147z" transform="rotate(-45 24.147 24.146)"/><path d="M15 25H17V30H15z"/><path d="M5.375 23.147H10.333V25.147H5.375z" transform="rotate(-45 7.853 24.146)"/><path d="M2 15H7V17H2z"/><path d="M6.854 5.375H8.854V10.333H6.854z" transform="rotate(-45 7.854 7.853)"/><path d="M16,12a4,4,0,1,1-4,4,4.0045,4.0045,0,0,1,4-4m0-2a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z"/>`,
309
+ viewBox: '0 0 32 32',
310
+ },
311
+ /** Moon — dark theme */
312
+ dark: {
313
+ svg: `<path d="M13.5025,5.4136A15.0755,15.0755,0,0,0,25.096,23.6082a11.1134,11.1134,0,0,1-7.9749,3.3893c-.1385,0-.2782.0051-.4178,0A11.0944,11.0944,0,0,1,13.5025,5.4136M14.98,3a1.0024,1.0024,0,0,0-.1746.0156A13.0959,13.0959,0,0,0,16.63,28.9973c.1641.006.3282,0,.4909,0a13.0724,13.0724,0,0,0,10.702-5.5556,1.0094,1.0094,0,0,0-.7833-1.5644A13.08,13.08,0,0,1,15.8892,4.38,1.0149,1.0149,0,0,0,14.98,3Z"/>`,
314
+ viewBox: '0 0 32 32',
315
+ },
316
+ /** Envelope — email / messages */
317
+ email: {
318
+ svg: `<path d="M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z"/>`,
319
+ viewBox: '0 0 32 32',
320
+ },
321
+ /** Tag — labels and categories */
322
+ tag: {
323
+ svg: `<path d="M10,14a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,10,14Zm0-6a2,2,0,1,0,1.998,2.0044A2.002,2.002,0,0,0,10,8Z"/><path d="M16.6436,29.4145,2.5858,15.3555A2,2,0,0,1,2,13.9414V4A2,2,0,0,1,4,2h9.9413a2,2,0,0,1,1.4142.5858L29.4144,16.6436a2.0005,2.0005,0,0,1,0,2.8285l-9.9424,9.9425a2.0008,2.0008,0,0,1-2.8285,0ZM4,4v9.9417L18.0578,28,28,18.0579,13.9416,4Z"/>`,
324
+ viewBox: '0 0 32 32',
325
+ },
326
+ /** Cloud — cloud resources and hosting */
327
+ cloud: {
328
+ svg: `<path d="M16,7h0a7.66,7.66,0,0,1,1.51.15,8,8,0,0,1,6.35,6.34l.26,1.35,1.35.24a5.5,5.5,0,0,1-1,10.92H7.5a5.5,5.5,0,0,1-1-10.92l1.34-.24.26-1.35A8,8,0,0,1,16,7m0-2a10,10,0,0,0-9.83,8.12A7.5,7.5,0,0,0,7.49,28h17a7.5,7.5,0,0,0,1.32-14.88,10,10,0,0,0-7.94-7.94A10.27,10.27,0,0,0,16,5Z"/>`,
329
+ viewBox: '0 0 32 32',
330
+ },
331
+ /** Server rack — servers and compute */
332
+ server: {
333
+ svg: `<circle cx="9" cy="6" r="1"/><path d="M26,10H6A2.0021,2.0021,0,0,1,4,8V4A2.0021,2.0021,0,0,1,6,2H26a2.0021,2.0021,0,0,1,2,2V8A2.0021,2.0021,0,0,1,26,10ZM6,4V8H26V4Z"/><circle cx="9" cy="16" r="1"/><path d="M26,20H6a2.0021,2.0021,0,0,1-2-2V14a2.0021,2.0021,0,0,1,2-2H26a2.0021,2.0021,0,0,1,2,2v4A2.0021,2.0021,0,0,1,26,20ZM6,14v4H26V14Z"/><circle cx="9" cy="26" r="1"/><path d="M26,30H6a2.0021,2.0021,0,0,1-2-2V24a2.0021,2.0021,0,0,1,2-2H26a2.0021,2.0021,0,0,1,2,2v4A2.0021,2.0021,0,0,1,26,30ZM6,24v4H26V24Z"/>`,
334
+ viewBox: '0 0 32 32',
335
+ },
196
336
  };
197
337
 
198
338
  class NgccIcon {
@@ -461,22 +601,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
461
601
  }] } });
462
602
 
463
603
  class NgccLink {
464
- // Inputs (signal-based — no @Input decorator)
465
- href = input('', ...(ngDevMode ? [{ debugName: "href" }] : []));
466
- target = input('_self', ...(ngDevMode ? [{ debugName: "target" }] : []));
467
- rel = input('', ...(ngDevMode ? [{ debugName: "rel" }] : []));
468
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
469
- inline = input(false, ...(ngDevMode ? [{ debugName: "inline" }] : []));
470
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
471
- visited = input(false, ...(ngDevMode ? [{ debugName: "visited" }] : []));
472
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
473
- ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
474
- ariaCurrent = input(undefined, ...(ngDevMode ? [{ debugName: "ariaCurrent" }] : []));
475
- className = input('', ...(ngDevMode ? [{ debugName: "className" }] : []));
476
- // Output
477
- linkClick = output();
478
- // Computed: all CSS classes
479
- classes = computed(() => {
604
+ href = '';
605
+ target = '_self';
606
+ rel = '';
607
+ disabled = false;
608
+ inline = false;
609
+ size = 'md';
610
+ visited = false;
611
+ iconName = undefined;
612
+ ariaLabel = undefined;
613
+ ariaCurrent = undefined;
614
+ className = '';
615
+ linkClick = new EventEmitter();
616
+ get classes() {
480
617
  const sizeMap = {
481
618
  sm: 'cds--link--sm',
482
619
  md: '',
@@ -484,29 +621,29 @@ class NgccLink {
484
621
  };
485
622
  return [
486
623
  'cds--link',
487
- sizeMap[this.size()],
488
- this.inline() ? 'cds--link--inline' : '',
489
- this.visited() ? 'cds--link--visited' : '',
490
- this.disabled() ? 'cds--link--disabled' : '',
491
- this.className(),
624
+ sizeMap[this.size],
625
+ this.inline ? 'cds--link--inline' : '',
626
+ this.visited ? 'cds--link--visited' : '',
627
+ this.disabled ? 'cds--link--disabled' : '',
628
+ this.className,
492
629
  ]
493
630
  .filter(Boolean)
494
631
  .join(' ');
495
- }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
496
- // Computed: auto-add noopener noreferrer when target="_blank"
497
- resolvedRel = computed(() => {
498
- if (this.target() === '_blank') {
499
- const parts = new Set(this.rel() ? this.rel().split(' ') : []);
632
+ }
633
+ get resolvedRel() {
634
+ if (this.target === '_blank') {
635
+ const parts = new Set(this.rel ? this.rel.split(' ') : []);
500
636
  parts.add('noopener');
501
637
  parts.add('noreferrer');
502
638
  return Array.from(parts).join(' ');
503
639
  }
504
- return this.rel() || null;
505
- }, ...(ngDevMode ? [{ debugName: "resolvedRel" }] : []));
506
- // Computed: tabindex — removed from tab order when disabled
507
- resolvedTabIndex = computed(() => (this.disabled() ? -1 : 0), ...(ngDevMode ? [{ debugName: "resolvedTabIndex" }] : []));
640
+ return this.rel || null;
641
+ }
642
+ get resolvedTabIndex() {
643
+ return this.disabled ? -1 : 0;
644
+ }
508
645
  onClick(event) {
509
- if (this.disabled()) {
646
+ if (this.disabled) {
510
647
  event.preventDefault();
511
648
  event.stopPropagation();
512
649
  return;
@@ -514,7 +651,7 @@ class NgccLink {
514
651
  this.linkClick.emit(event);
515
652
  }
516
653
  onKeydown(event) {
517
- if (this.disabled()) {
654
+ if (this.disabled) {
518
655
  event.preventDefault();
519
656
  return;
520
657
  }
@@ -524,72 +661,112 @@ class NgccLink {
524
661
  }
525
662
  }
526
663
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccLink, isStandalone: true, selector: "ngcc-link", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, visited: { classPropertyName: "visited", publicName: "visited", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { linkClick: "linkClick" }, ngImport: i0, template: "<a\n [attr.href]=\"disabled() ? null : href() || null\"\n [attr.target]=\"target() !== '_self' ? target() : null\"\n [attr.rel]=\"resolvedRel()\"\n [class]=\"classes()\"\n [attr.tabindex]=\"resolvedTabIndex()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <ng-content />\n @if (iconName()) {\n <span\n class=\"cds--link__icon\"\n style=\"vertical-align: middle; display: inline-flex; align-items: center\"\n >\n <ngcc-icon [name]=\"iconName()!\" [size]=\"size()\" [decorative]=\"true\" />\n </span>\n }\n</a>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
664
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccLink, isStandalone: true, selector: "ngcc-link", inputs: { href: "href", target: "target", rel: "rel", disabled: "disabled", inline: "inline", size: "size", visited: "visited", iconName: "iconName", ariaLabel: "ariaLabel", ariaCurrent: "ariaCurrent", className: "className" }, outputs: { linkClick: "linkClick" }, ngImport: i0, template: "<a\n [attr.href]=\"disabled ? null : href || null\"\n [attr.target]=\"target !== '_self' ? target : null\"\n [attr.rel]=\"resolvedRel\"\n [class]=\"classes\"\n [attr.tabindex]=\"resolvedTabIndex\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-current]=\"ariaCurrent ?? null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <ng-content />\n @if (iconName) {\n <span\n class=\"cds--link__icon\"\n style=\"vertical-align: middle; display: inline-flex; align-items: center\"\n >\n <ngcc-icon [name]=\"iconName!\" [size]=\"size\" [decorative]=\"true\" />\n </span>\n }\n</a>\n", dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
528
665
  }
529
666
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccLink, decorators: [{
530
667
  type: Component,
531
- args: [{ selector: 'ngcc-link', standalone: true, imports: [CommonModule, NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n [attr.href]=\"disabled() ? null : href() || null\"\n [attr.target]=\"target() !== '_self' ? target() : null\"\n [attr.rel]=\"resolvedRel()\"\n [class]=\"classes()\"\n [attr.tabindex]=\"resolvedTabIndex()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <ng-content />\n @if (iconName()) {\n <span\n class=\"cds--link__icon\"\n style=\"vertical-align: middle; display: inline-flex; align-items: center\"\n >\n <ngcc-icon [name]=\"iconName()!\" [size]=\"size()\" [decorative]=\"true\" />\n </span>\n }\n</a>\n" }]
532
- }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], visited: [{ type: i0.Input, args: [{ isSignal: true, alias: "visited", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaCurrent", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], linkClick: [{ type: i0.Output, args: ["linkClick"] }] } });
668
+ args: [{ selector: 'ngcc-link', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n [attr.href]=\"disabled ? null : href || null\"\n [attr.target]=\"target !== '_self' ? target : null\"\n [attr.rel]=\"resolvedRel\"\n [class]=\"classes\"\n [attr.tabindex]=\"resolvedTabIndex\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-current]=\"ariaCurrent ?? null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <ng-content />\n @if (iconName) {\n <span\n class=\"cds--link__icon\"\n style=\"vertical-align: middle; display: inline-flex; align-items: center\"\n >\n <ngcc-icon [name]=\"iconName!\" [size]=\"size\" [decorative]=\"true\" />\n </span>\n }\n</a>\n" }]
669
+ }], propDecorators: { href: [{
670
+ type: Input
671
+ }], target: [{
672
+ type: Input
673
+ }], rel: [{
674
+ type: Input
675
+ }], disabled: [{
676
+ type: Input
677
+ }], inline: [{
678
+ type: Input
679
+ }], size: [{
680
+ type: Input
681
+ }], visited: [{
682
+ type: Input
683
+ }], iconName: [{
684
+ type: Input
685
+ }], ariaLabel: [{
686
+ type: Input
687
+ }], ariaCurrent: [{
688
+ type: Input
689
+ }], className: [{
690
+ type: Input
691
+ }], linkClick: [{
692
+ type: Output
693
+ }] } });
533
694
 
534
695
  class NgccToggle {
535
696
  static idCounter = 0;
536
697
  toggleId = `ngcc-toggle-${NgccToggle.idCounter++}`;
537
- // Signal inputs — no @Input() decorator
538
- toggled = input(false, ...(ngDevMode ? [{ debugName: "toggled" }] : []));
539
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
540
- readOnly = input(false, ...(ngDevMode ? [{ debugName: "readOnly" }] : []));
541
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
542
- hideLabel = input(false, ...(ngDevMode ? [{ debugName: "hideLabel" }] : []));
543
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
544
- labelText = input('', ...(ngDevMode ? [{ debugName: "labelText" }] : []));
545
- labelA = input('Off', ...(ngDevMode ? [{ debugName: "labelA" }] : []));
546
- labelB = input('On', ...(ngDevMode ? [{ debugName: "labelB" }] : []));
547
- ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
548
- ariaLabelledBy = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : []));
549
- className = input('', ...(ngDevMode ? [{ debugName: "className" }] : []));
550
- // Output
551
- toggledChange = output();
698
+ toggled = false;
699
+ disabled = false;
700
+ readOnly = false;
701
+ skeleton = false;
702
+ hideLabel = false;
703
+ size = 'md';
704
+ labelText = '';
705
+ labelA = 'Off';
706
+ labelB = 'On';
707
+ ariaLabel = undefined;
708
+ ariaLabelledBy = undefined;
709
+ className = '';
710
+ toggledChange = new EventEmitter();
552
711
  // Internal state — tracks current on/off
553
712
  _isToggled = signal(false, ...(ngDevMode ? [{ debugName: "_isToggled" }] : []));
554
713
  constructor() {
555
- // Sync controlled toggled input → internal state
556
- effect(() => {
557
- this._isToggled.set(this.toggled());
558
- });
714
+ // initial sync handled in ngOnChanges
559
715
  }
560
716
  // Computed: current side label (Off / On)
561
- sideLabel = computed(() => (this._isToggled() ? this.labelB() : this.labelA()), ...(ngDevMode ? [{ debugName: "sideLabel" }] : []));
717
+ get sideLabel() {
718
+ return this._isToggled() ? this.labelB : this.labelA;
719
+ }
562
720
  // Computed: host wrapper classes
563
721
  // cds--form-item is excluded when skeleton=true (matches Carbon Angular behavior)
564
- hostClasses = computed(() => [
565
- this.skeleton() ? '' : 'cds--form-item',
566
- 'cds--toggle',
567
- this.disabled() ? 'cds--toggle--disabled' : '',
568
- this.readOnly() ? 'cds--toggle--readonly' : '',
569
- this.skeleton() ? 'cds--toggle--skeleton' : '',
570
- this.className(),
571
- ]
572
- .filter(Boolean)
573
- .join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
722
+ get hostClasses() {
723
+ return [
724
+ this.skeleton ? '' : 'cds--form-item',
725
+ 'cds--toggle',
726
+ this.disabled ? 'cds--toggle--disabled' : '',
727
+ this.readOnly ? 'cds--toggle--readonly' : '',
728
+ this.skeleton ? 'cds--toggle--skeleton' : '',
729
+ this.className,
730
+ ]
731
+ .filter(Boolean)
732
+ .join(' ');
733
+ }
574
734
  // Computed: appearance classes (track)
575
- appearanceClasses = computed(() => ['cds--toggle__appearance', this.size() === 'sm' ? 'cds--toggle__appearance--sm' : '']
576
- .filter(Boolean)
577
- .join(' '), ...(ngDevMode ? [{ debugName: "appearanceClasses" }] : []));
735
+ get appearanceClasses() {
736
+ return ['cds--toggle__appearance', this.size === 'sm' ? 'cds--toggle__appearance--sm' : '']
737
+ .filter(Boolean)
738
+ .join(' ');
739
+ }
578
740
  // Computed: switch classes (knob)
579
- switchClasses = computed(() => ['cds--toggle__switch', this._isToggled() ? 'cds--toggle__switch--checked' : '']
580
- .filter(Boolean)
581
- .join(' '), ...(ngDevMode ? [{ debugName: "switchClasses" }] : []));
741
+ get switchClasses() {
742
+ return ['cds--toggle__switch', this._isToggled() ? 'cds--toggle__switch--checked' : '']
743
+ .filter(Boolean)
744
+ .join(' ');
745
+ }
582
746
  // Computed: aria-checked value for the button
583
- ariaChecked = computed(() => this._isToggled(), ...(ngDevMode ? [{ debugName: "ariaChecked" }] : []));
747
+ get ariaChecked() {
748
+ return this._isToggled();
749
+ }
584
750
  // Computed: tabindex — readOnly stays focusable; disabled is removed
585
- resolvedTabIndex = computed(() => (this.disabled() ? -1 : 0), ...(ngDevMode ? [{ debugName: "resolvedTabIndex" }] : []));
751
+ get resolvedTabIndex() {
752
+ return this.disabled ? -1 : 0;
753
+ }
586
754
  // Computed: effective aria-labelledby — prefer explicit, fallback to generated label id
587
- resolvedAriaLabelledBy = computed(() => this.ariaLabelledBy() ?? `${this.toggleId}-label`, ...(ngDevMode ? [{ debugName: "resolvedAriaLabelledBy" }] : []));
755
+ get resolvedAriaLabelledBy() {
756
+ return this.ariaLabelledBy ?? `${this.toggleId}-label`;
757
+ }
588
758
  // Computed: show checkmark only for sm size, when on, and not readOnly
589
- showCheckmark = computed(() => this.size() === 'sm' && this._isToggled() && !this.readOnly(), ...(ngDevMode ? [{ debugName: "showCheckmark" }] : []));
759
+ get showCheckmark() {
760
+ return this.size === 'sm' && this._isToggled() && !this.readOnly;
761
+ }
762
+ ngOnChanges(changes) {
763
+ if (changes['toggled']) {
764
+ this._isToggled.set(!!changes['toggled'].currentValue);
765
+ }
766
+ }
590
767
  // Toggle handler — called by button click
591
768
  onToggle() {
592
- if (this.disabled() || this.readOnly())
769
+ if (this.disabled || this.readOnly)
593
770
  return;
594
771
  const next = !this._isToggled();
595
772
  this._isToggled.set(next);
@@ -597,7 +774,7 @@ class NgccToggle {
597
774
  }
598
775
  // Keyboard handler — Space and Enter both toggle the switch
599
776
  onKeydown(event) {
600
- if (this.disabled() || this.readOnly()) {
777
+ if (this.disabled || this.readOnly) {
601
778
  event.preventDefault();
602
779
  return;
603
780
  }
@@ -607,33 +784,59 @@ class NgccToggle {
607
784
  }
608
785
  }
609
786
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
610
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccToggle, isStandalone: true, selector: "ngcc-toggle", inputs: { toggled: { classPropertyName: "toggled", publicName: "toggled", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: true, isRequired: false, transformFunction: null }, labelA: { classPropertyName: "labelA", publicName: "labelA", isSignal: true, isRequired: false, transformFunction: null }, labelB: { classPropertyName: "labelB", publicName: "labelB", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggledChange: "toggledChange" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "@if (!skeleton()) {\n <button\n class=\"cds--toggle__button\"\n [attr.id]=\"toggleId\"\n type=\"button\"\n role=\"switch\"\n [disabled]=\"disabled() || null\"\n [attr.tabindex]=\"resolvedTabIndex()\"\n [attr.aria-checked]=\"ariaChecked()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? resolvedAriaLabelledBy()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n (click)=\"onToggle()\"\n (keydown)=\"onKeydown($event)\"\n ></button>\n <label class=\"cds--toggle__label\" [attr.id]=\"toggleId + '-label'\" [attr.for]=\"toggleId\">\n <span class=\"cds--toggle__label-text\" [class.cds--visually-hidden]=\"hideLabel()\">{{\n labelText()\n }}</span>\n <div [class]=\"appearanceClasses()\">\n <div [class]=\"switchClasses()\">\n @if (showCheckmark()) {\n <svg\n class=\"cds--toggle__check\"\n width=\"6px\"\n height=\"5px\"\n viewBox=\"0 0 6 5\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n </svg>\n }\n </div>\n <span class=\"cds--toggle__text\" aria-hidden=\"true\">{{ sideLabel() }}</span>\n </div>\n </label>\n} @else {\n <div class=\"cds--toggle__skeleton-circle\"></div>\n <div class=\"cds--toggle__skeleton-rectangle\"></div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
787
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccToggle, isStandalone: true, selector: "ngcc-toggle", inputs: { toggled: "toggled", disabled: "disabled", readOnly: "readOnly", skeleton: "skeleton", hideLabel: "hideLabel", size: "size", labelText: "labelText", labelA: "labelA", labelB: "labelB", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", className: "className" }, outputs: { toggledChange: "toggledChange" }, host: { properties: { "class": "hostClasses" } }, usesOnChanges: true, ngImport: i0, template: "@if (!skeleton) {\n <button\n class=\"cds--toggle__button\"\n [id]=\"toggleId\"\n type=\"button\"\n role=\"switch\"\n [disabled]=\"disabled\"\n [attr.tabindex]=\"resolvedTabIndex\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-labelledby]=\"resolvedAriaLabelledBy\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n (click)=\"onToggle()\"\n (keydown)=\"onKeydown($event)\"\n ></button>\n <label class=\"cds--toggle__label\" [attr.id]=\"toggleId + '-label'\" [attr.for]=\"toggleId\">\n <span class=\"cds--toggle__label-text\" [class.cds--visually-hidden]=\"hideLabel\">{{\n labelText\n }}</span>\n <div [class]=\"appearanceClasses\">\n <div [class]=\"switchClasses\">\n @if (showCheckmark) {\n <svg\n class=\"cds--toggle__check\"\n width=\"6px\"\n height=\"5px\"\n viewBox=\"0 0 6 5\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n </svg>\n }\n </div>\n <span class=\"cds--toggle__text\" aria-hidden=\"true\">{{ sideLabel }}</span>\n </div>\n </label>\n} @else {\n <div class=\"cds--toggle__skeleton-circle\"></div>\n <div class=\"cds--toggle__skeleton-rectangle\"></div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
611
788
  }
612
789
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccToggle, decorators: [{
613
790
  type: Component,
614
- args: [{ selector: 'ngcc-toggle', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
615
- '[class]': 'hostClasses()',
616
- }, template: "@if (!skeleton()) {\n <button\n class=\"cds--toggle__button\"\n [attr.id]=\"toggleId\"\n type=\"button\"\n role=\"switch\"\n [disabled]=\"disabled() || null\"\n [attr.tabindex]=\"resolvedTabIndex()\"\n [attr.aria-checked]=\"ariaChecked()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? resolvedAriaLabelledBy()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n (click)=\"onToggle()\"\n (keydown)=\"onKeydown($event)\"\n ></button>\n <label class=\"cds--toggle__label\" [attr.id]=\"toggleId + '-label'\" [attr.for]=\"toggleId\">\n <span class=\"cds--toggle__label-text\" [class.cds--visually-hidden]=\"hideLabel()\">{{\n labelText()\n }}</span>\n <div [class]=\"appearanceClasses()\">\n <div [class]=\"switchClasses()\">\n @if (showCheckmark()) {\n <svg\n class=\"cds--toggle__check\"\n width=\"6px\"\n height=\"5px\"\n viewBox=\"0 0 6 5\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n </svg>\n }\n </div>\n <span class=\"cds--toggle__text\" aria-hidden=\"true\">{{ sideLabel() }}</span>\n </div>\n </label>\n} @else {\n <div class=\"cds--toggle__skeleton-circle\"></div>\n <div class=\"cds--toggle__skeleton-rectangle\"></div>\n}\n" }]
617
- }], ctorParameters: () => [], propDecorators: { toggled: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggled", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], labelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelText", required: false }] }], labelA: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelA", required: false }] }], labelB: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelB", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], toggledChange: [{ type: i0.Output, args: ["toggledChange"] }] } });
791
+ args: [{ selector: 'ngcc-toggle', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: {
792
+ '[class]': 'hostClasses',
793
+ }, template: "@if (!skeleton) {\n <button\n class=\"cds--toggle__button\"\n [id]=\"toggleId\"\n type=\"button\"\n role=\"switch\"\n [disabled]=\"disabled\"\n [attr.tabindex]=\"resolvedTabIndex\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-labelledby]=\"resolvedAriaLabelledBy\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n (click)=\"onToggle()\"\n (keydown)=\"onKeydown($event)\"\n ></button>\n <label class=\"cds--toggle__label\" [attr.id]=\"toggleId + '-label'\" [attr.for]=\"toggleId\">\n <span class=\"cds--toggle__label-text\" [class.cds--visually-hidden]=\"hideLabel\">{{\n labelText\n }}</span>\n <div [class]=\"appearanceClasses\">\n <div [class]=\"switchClasses\">\n @if (showCheckmark) {\n <svg\n class=\"cds--toggle__check\"\n width=\"6px\"\n height=\"5px\"\n viewBox=\"0 0 6 5\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n </svg>\n }\n </div>\n <span class=\"cds--toggle__text\" aria-hidden=\"true\">{{ sideLabel }}</span>\n </div>\n </label>\n} @else {\n <div class=\"cds--toggle__skeleton-circle\"></div>\n <div class=\"cds--toggle__skeleton-rectangle\"></div>\n}\n" }]
794
+ }], ctorParameters: () => [], propDecorators: { toggled: [{
795
+ type: Input
796
+ }], disabled: [{
797
+ type: Input
798
+ }], readOnly: [{
799
+ type: Input
800
+ }], skeleton: [{
801
+ type: Input
802
+ }], hideLabel: [{
803
+ type: Input
804
+ }], size: [{
805
+ type: Input
806
+ }], labelText: [{
807
+ type: Input
808
+ }], labelA: [{
809
+ type: Input
810
+ }], labelB: [{
811
+ type: Input
812
+ }], ariaLabel: [{
813
+ type: Input
814
+ }], ariaLabelledBy: [{
815
+ type: Input
816
+ }], className: [{
817
+ type: Input
818
+ }], toggledChange: [{
819
+ type: Output
820
+ }] } });
618
821
 
619
822
  class NgccContainedList {
620
823
  static count = 0;
621
824
  /** A label describing the contained list. */
622
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
825
+ label = '';
623
826
  /** The kind of ContainedList you want to display. */
624
- kind = input('on-page', ...(ngDevMode ? [{ debugName: "kind" }] : []));
827
+ kind = 'on-page';
625
828
  /** Specify the size of the contained list. */
626
- size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : []));
829
+ size = undefined;
627
830
  /** Specify whether the dividing lines in between list items should be inset. */
628
- isInset = input(false, ...(ngDevMode ? [{ debugName: "isInset" }] : []));
831
+ isInset = false;
629
832
  /** Whether a header action element has been projected via [ngccContainedListAction]. */
630
- hasAction = input(false, ...(ngDevMode ? [{ debugName: "hasAction" }] : []));
833
+ hasAction = false;
631
834
  /** Unique ID for the label element used by aria-labelledby. */
632
835
  labelId = `ngcc-contained-list-${NgccContainedList.count++}-header`;
633
- classes = computed(() => {
634
- const kind = this.kind();
635
- const size = this.size();
636
- const isInset = this.isInset();
836
+ get classes() {
837
+ const kind = this.kind;
838
+ const size = this.size;
839
+ const isInset = this.isInset;
637
840
  const cls = ['cds--contained-list', `cds--contained-list--${kind}`];
638
841
  if (isInset)
639
842
  cls.push('cds--contained-list--inset-rulers');
@@ -642,59 +845,79 @@ class NgccContainedList {
642
845
  cls.push(`cds--layout--size-${size}`);
643
846
  }
644
847
  return cls.join(' ');
645
- }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
848
+ }
646
849
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContainedList, deps: [], target: i0.ɵɵFactoryTarget.Component });
647
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccContainedList, isStandalone: true, selector: "ngcc-contained-list", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, kind: { classPropertyName: "kind", publicName: "kind", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isInset: { classPropertyName: "isInset", publicName: "isInset", isSignal: true, isRequired: false, transformFunction: null }, hasAction: { classPropertyName: "hasAction", publicName: "hasAction", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "@if (label()) {\n <div class=\"cds--contained-list__header\">\n <div [id]=\"labelId\" class=\"cds--contained-list__label\">{{ label() }}</div>\n <div class=\"cds--contained-list__action\">\n <ng-content select=\"[ngccContainedListAction]\" />\n </div>\n </div>\n}\n\n<ul role=\"list\" [attr.aria-labelledby]=\"label() ? labelId : null\">\n <ng-content />\n</ul>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
850
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccContainedList, isStandalone: true, selector: "ngcc-contained-list", inputs: { label: "label", kind: "kind", size: "size", isInset: "isInset", hasAction: "hasAction" }, host: { properties: { "class": "classes" } }, ngImport: i0, template: "@if (label) {\n <div class=\"cds--contained-list__header\">\n <div [id]=\"labelId\" class=\"cds--contained-list__label\">{{ label }}</div>\n <div class=\"cds--contained-list__action\">\n <ng-content select=\"[ngccContainedListAction]\" />\n </div>\n </div>\n}\n\n<ul role=\"list\" [attr.aria-labelledby]=\"label ? labelId : null\">\n <ng-content />\n</ul>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
648
851
  }
649
852
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContainedList, decorators: [{
650
853
  type: Component,
651
854
  args: [{ selector: 'ngcc-contained-list', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: {
652
- '[class]': 'classes()',
653
- }, template: "@if (label()) {\n <div class=\"cds--contained-list__header\">\n <div [id]=\"labelId\" class=\"cds--contained-list__label\">{{ label() }}</div>\n <div class=\"cds--contained-list__action\">\n <ng-content select=\"[ngccContainedListAction]\" />\n </div>\n </div>\n}\n\n<ul role=\"list\" [attr.aria-labelledby]=\"label() ? labelId : null\">\n <ng-content />\n</ul>\n" }]
654
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], kind: [{ type: i0.Input, args: [{ isSignal: true, alias: "kind", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], isInset: [{ type: i0.Input, args: [{ isSignal: true, alias: "isInset", required: false }] }], hasAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasAction", required: false }] }] } });
855
+ '[class]': 'classes',
856
+ }, template: "@if (label) {\n <div class=\"cds--contained-list__header\">\n <div [id]=\"labelId\" class=\"cds--contained-list__label\">{{ label }}</div>\n <div class=\"cds--contained-list__action\">\n <ng-content select=\"[ngccContainedListAction]\" />\n </div>\n </div>\n}\n\n<ul role=\"list\" [attr.aria-labelledby]=\"label ? labelId : null\">\n <ng-content />\n</ul>\n" }]
857
+ }], propDecorators: { label: [{
858
+ type: Input
859
+ }], kind: [{
860
+ type: Input
861
+ }], size: [{
862
+ type: Input
863
+ }], isInset: [{
864
+ type: Input
865
+ }], hasAction: [{
866
+ type: Input
867
+ }] } });
655
868
 
656
869
  class NgccContainedListItem {
657
870
  /** Whether this item is disabled (only applies when clickable). */
658
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
871
+ disabled = false;
659
872
  /** Whether this item is clickable — renders a <button> as the content wrapper. */
660
- clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable" }] : []));
873
+ clickable = false;
661
874
  /** Optional icon name to display before the item content. */
662
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
875
+ iconName;
663
876
  /** Whether an action element has been projected via [ngccContainedListItemAction]. */
664
- hasAction = input(false, ...(ngDevMode ? [{ debugName: "hasAction" }] : []));
877
+ hasAction = false;
665
878
  /** Emits when a clickable item is activated. */
666
- clicked = output();
667
- classes = computed(() => {
879
+ clicked = new EventEmitter();
880
+ get classes() {
668
881
  const cls = ['cds--contained-list-item'];
669
- if (this.clickable())
882
+ if (this.clickable)
670
883
  cls.push('cds--contained-list-item--clickable');
671
- if (this.iconName())
884
+ if (this.iconName)
672
885
  cls.push('cds--contained-list-item--with-icon');
673
- if (this.hasAction())
886
+ if (this.hasAction)
674
887
  cls.push('cds--contained-list-item--with-action');
675
888
  return cls.join(' ');
676
- }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
889
+ }
677
890
  onContentClick() {
678
- if (this.clickable() && !this.disabled()) {
891
+ if (this.clickable && !this.disabled) {
679
892
  this.clicked.emit();
680
893
  }
681
894
  }
682
895
  onKeydown(event) {
683
- if (this.clickable() && !this.disabled()) {
896
+ if (this.clickable && !this.disabled) {
684
897
  event.preventDefault();
685
898
  this.clicked.emit();
686
899
  }
687
900
  }
688
901
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContainedListItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
689
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccContainedListItem, isStandalone: true, selector: "ngcc-contained-list-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, hasAction: { classPropertyName: "hasAction", publicName: "hasAction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { attributes: { "role": "listitem" }, properties: { "class": "classes()" } }, ngImport: i0, template: "<div\n class=\"cds--contained-list-item__content\"\n [attr.role]=\"clickable() ? 'button' : null\"\n [attr.tabindex]=\"clickable() && !disabled() ? '0' : null\"\n [attr.aria-disabled]=\"clickable() && disabled() ? 'true' : null\"\n (click)=\"onContentClick()\"\n (keydown.enter)=\"onKeydown($event)\"\n (keydown.space)=\"onKeydown($event)\"\n>\n @if (iconName()) {\n <div class=\"cds--contained-list-item__icon\">\n <ngcc-icon [name]=\"iconName()!\" size=\"sm\" [decorative]=\"true\" />\n </div>\n }\n <div><ng-content /></div>\n</div>\n\n<div class=\"cds--contained-list-item__action\">\n <ng-content select=\"[ngccContainedListItemAction]\" />\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
902
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccContainedListItem, isStandalone: true, selector: "ngcc-contained-list-item", inputs: { disabled: "disabled", clickable: "clickable", iconName: "iconName", hasAction: "hasAction" }, outputs: { clicked: "clicked" }, host: { attributes: { "role": "listitem" }, properties: { "class": "classes" } }, ngImport: i0, template: "<div\n class=\"cds--contained-list-item__content\"\n [attr.role]=\"clickable ? 'button' : null\"\n [attr.tabindex]=\"clickable && !disabled ? '0' : null\"\n [attr.aria-disabled]=\"clickable && disabled ? 'true' : null\"\n (click)=\"onContentClick()\"\n (keydown.enter)=\"onKeydown($event)\"\n (keydown.space)=\"onKeydown($event)\"\n>\n @if (iconName) {\n <div class=\"cds--contained-list-item__icon\">\n <ngcc-icon [name]=\"iconName!\" size=\"sm\" [decorative]=\"true\" />\n </div>\n }\n <div><ng-content /></div>\n</div>\n\n<div class=\"cds--contained-list-item__action\">\n <ng-content select=\"[ngccContainedListItemAction]\" />\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
690
903
  }
691
904
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContainedListItem, decorators: [{
692
905
  type: Component,
693
906
  args: [{ selector: 'ngcc-contained-list-item', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
694
- '[class]': 'classes()',
907
+ '[class]': 'classes',
695
908
  role: 'listitem',
696
- }, template: "<div\n class=\"cds--contained-list-item__content\"\n [attr.role]=\"clickable() ? 'button' : null\"\n [attr.tabindex]=\"clickable() && !disabled() ? '0' : null\"\n [attr.aria-disabled]=\"clickable() && disabled() ? 'true' : null\"\n (click)=\"onContentClick()\"\n (keydown.enter)=\"onKeydown($event)\"\n (keydown.space)=\"onKeydown($event)\"\n>\n @if (iconName()) {\n <div class=\"cds--contained-list-item__icon\">\n <ngcc-icon [name]=\"iconName()!\" size=\"sm\" [decorative]=\"true\" />\n </div>\n }\n <div><ng-content /></div>\n</div>\n\n<div class=\"cds--contained-list-item__action\">\n <ng-content select=\"[ngccContainedListItemAction]\" />\n</div>\n" }]
697
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], hasAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasAction", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
909
+ }, template: "<div\n class=\"cds--contained-list-item__content\"\n [attr.role]=\"clickable ? 'button' : null\"\n [attr.tabindex]=\"clickable && !disabled ? '0' : null\"\n [attr.aria-disabled]=\"clickable && disabled ? 'true' : null\"\n (click)=\"onContentClick()\"\n (keydown.enter)=\"onKeydown($event)\"\n (keydown.space)=\"onKeydown($event)\"\n>\n @if (iconName) {\n <div class=\"cds--contained-list-item__icon\">\n <ngcc-icon [name]=\"iconName!\" size=\"sm\" [decorative]=\"true\" />\n </div>\n }\n <div><ng-content /></div>\n</div>\n\n<div class=\"cds--contained-list-item__action\">\n <ng-content select=\"[ngccContainedListItemAction]\" />\n</div>\n" }]
910
+ }], propDecorators: { disabled: [{
911
+ type: Input
912
+ }], clickable: [{
913
+ type: Input
914
+ }], iconName: [{
915
+ type: Input
916
+ }], hasAction: [{
917
+ type: Input
918
+ }], clicked: [{
919
+ type: Output
920
+ }] } });
698
921
 
699
922
  /**
700
923
  * Marker directive for the list header action slot.
@@ -922,45 +1145,69 @@ let radioIdCounter = 0;
922
1145
  */
923
1146
  class NgccRadio {
924
1147
  group = inject(NGCC_RADIO_GROUP_TOKEN, { optional: true });
925
- // ── Signal inputs ─────────────────────────────────────────────────────────
926
- value = input(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
927
- id = input(`ngcc-radio-${radioIdCounter++}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
928
- name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
929
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
930
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
931
- labelPlacement = input('right', ...(ngDevMode ? [{ debugName: "labelPlacement" }] : []));
932
- ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
933
- ariaLabelledby = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : []));
934
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
935
- /** Two-way writable signal — group sets this when selection changes. */
936
- checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
937
- // ── Output ────────────────────────────────────────────────────────────────
938
- change = output();
939
- // ── Computed (group values take precedence when inside a group) ───────────
940
- effectiveName = computed(() => this.group?.name() || this.name(), ...(ngDevMode ? [{ debugName: "effectiveName" }] : []));
941
- isDisabled = computed(() => this.disabled() || (this.group?.isDisabled() ?? false), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
942
- isReadOnly = computed(() => this.group?.readOnly() ?? false, ...(ngDevMode ? [{ debugName: "isReadOnly" }] : []));
943
- effectiveLabelPlacement = computed(() => this.group?.labelPlacement() ?? this.labelPlacement(), ...(ngDevMode ? [{ debugName: "effectiveLabelPlacement" }] : []));
944
- effectiveSkeleton = computed(() => this.group?.skeleton() || this.skeleton(), ...(ngDevMode ? [{ debugName: "effectiveSkeleton" }] : []));
945
- effectiveAriaLabelledby = computed(() => this.ariaLabelledby() ?? `label-${this.id()}`, ...(ngDevMode ? [{ debugName: "effectiveAriaLabelledby" }] : []));
946
- hostClasses = computed(() => [
947
- 'cds--radio-button-wrapper',
948
- this.effectiveLabelPlacement() === 'left' ? 'cds--radio-button-wrapper--label-left' : '',
949
- ]
950
- .filter(Boolean)
951
- .join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
952
- // ── ViewChild signal — Angular-native reference, no querySelector needed ──
953
- radioInputRef = viewChild('radioInput', ...(ngDevMode ? [{ debugName: "radioInputRef" }] : []));
1148
+ // ── Public inputs (library-friendly) ──────────────────────────────────────
1149
+ value = null;
1150
+ id = `ngcc-radio-${radioIdCounter++}`;
1151
+ name = '';
1152
+ required = false;
1153
+ disabled = false;
1154
+ labelPlacement = 'right';
1155
+ ariaLabel = undefined;
1156
+ ariaLabelledby = undefined;
1157
+ skeleton = false;
1158
+ // ── Internal signals (private state) ────────────────────────────────────
1159
+ _value = signal(this.value, ...(ngDevMode ? [{ debugName: "_value" }] : []));
1160
+ _checked = signal(false, ...(ngDevMode ? [{ debugName: "_checked" }] : []));
1161
+ _disabled = signal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
1162
+ // ── Outputs (library-friendly)
1163
+ change = new EventEmitter();
1164
+ // ── Computed (group values take precedence when inside a group)
1165
+ get effectiveName() {
1166
+ return this.group?.name ?? this.name;
1167
+ }
1168
+ get isDisabled() {
1169
+ return this.disabled || (this.group?.isDisabled ?? false);
1170
+ }
1171
+ get isReadOnly() {
1172
+ return this.group?.readOnly ?? false;
1173
+ }
1174
+ get effectiveLabelPlacement() {
1175
+ return this.group?.labelPlacement ?? this.labelPlacement;
1176
+ }
1177
+ get effectiveSkeleton() {
1178
+ return this.group?.skeleton || this.skeleton;
1179
+ }
1180
+ get effectiveAriaLabelledby() {
1181
+ return this.ariaLabelledby ?? `label-${this.id}`;
1182
+ }
1183
+ get hostClasses() {
1184
+ return [
1185
+ 'cds--radio-button-wrapper',
1186
+ this.effectiveLabelPlacement === 'left' ? 'cds--radio-button-wrapper--label-left' : '',
1187
+ ]
1188
+ .filter(Boolean)
1189
+ .join(' ');
1190
+ }
1191
+ radioInputRef;
954
1192
  constructor() {
955
1193
  // Imperatively sync the native checked property whenever the signal changes.
956
- // [checked]="checked()" alone does not reliably update the DOM after initial
957
- // render because browsers manage radio checked state natively.
1194
+ // We use an effect that will run after view init once the ViewChild is available.
958
1195
  effect(() => {
959
- const el = this.radioInputRef()?.nativeElement;
1196
+ const el = this.radioInputRef?.nativeElement;
960
1197
  if (el)
961
- el.checked = this.checked();
1198
+ el.checked = this._checked();
962
1199
  });
963
1200
  }
1201
+ ngOnChanges() {
1202
+ this._value.set(this.value);
1203
+ this._disabled.set(this.disabled);
1204
+ }
1205
+ ngAfterViewInit() {
1206
+ // Ensure the native input reflects initial checked state
1207
+ const el = this.radioInputRef?.nativeElement;
1208
+ if (el)
1209
+ el.checked = this._checked();
1210
+ }
964
1211
  // ── Internal: registered by the parent group ──────────────────────────────
965
1212
  radioChangeHandler = () => { };
966
1213
  registerRadioChangeHandler(fn) {
@@ -968,12 +1215,13 @@ class NgccRadio {
968
1215
  }
969
1216
  // ── Event handlers ────────────────────────────────────────────────────────
970
1217
  onClick(event) {
971
- if (this.isDisabled() || this.isReadOnly()) {
1218
+ if (this.isDisabled || this.isReadOnly) {
972
1219
  event.preventDefault();
973
1220
  return;
974
1221
  }
975
- this.checked.set(event.target.checked);
976
- const radioEvent = { source: this, value: this.value() };
1222
+ const checked = event.target.checked;
1223
+ this._checked.set(checked);
1224
+ const radioEvent = { source: this, value: this._value() };
977
1225
  this.change.emit(radioEvent);
978
1226
  this.radioChangeHandler(radioEvent);
979
1227
  }
@@ -981,13 +1229,50 @@ class NgccRadio {
981
1229
  onChange(event) {
982
1230
  event.stopPropagation();
983
1231
  }
1232
+ // Methods used by NgccRadioGroup internally
1233
+ getValue() {
1234
+ return this._value();
1235
+ }
1236
+ setChecked(v) {
1237
+ this._checked.set(v);
1238
+ }
1239
+ isChecked() {
1240
+ return this._checked();
1241
+ }
1242
+ // Public getter for template binding
1243
+ get checked() {
1244
+ return this._checked();
1245
+ }
984
1246
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
985
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccRadio, isStandalone: true, selector: "ngcc-radio", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, labelPlacement: { classPropertyName: "labelPlacement", publicName: "labelPlacement", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", change: "change" }, host: { properties: { "class": "hostClasses()" } }, viewQueries: [{ propertyName: "radioInputRef", first: true, predicate: ["radioInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!effectiveSkeleton()) {\n <input\n #radioInput\n class=\"cds--radio-button\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"effectiveName()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.value]=\"value()\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledby()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n (change)=\"onChange($event)\"\n (click)=\"onClick($event)\"\n />\n} @else {\n <div class=\"cds--radio-button cds--skeleton\"></div>\n}\n\n<label\n class=\"cds--radio-button__label\"\n [class.cds--skeleton]=\"effectiveSkeleton()\"\n [attr.for]=\"id()\"\n [id]=\"'label-' + id()\"\n>\n <span class=\"cds--radio-button__appearance\"></span>\n @if (!effectiveSkeleton()) {\n <ng-content />\n }\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
1247
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccRadio, isStandalone: true, selector: "ngcc-radio", inputs: { value: "value", id: "id", name: "name", required: "required", disabled: "disabled", labelPlacement: "labelPlacement", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", skeleton: "skeleton" }, outputs: { change: "change" }, host: { properties: { "class": "hostClasses" } }, viewQueries: [{ propertyName: "radioInputRef", first: true, predicate: ["radioInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (!effectiveSkeleton) {\n <input\n #radioInput\n class=\"cds--radio-button\"\n type=\"radio\"\n [id]=\"id\"\n [name]=\"effectiveName\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [attr.value]=\"value\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledby\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n (change)=\"onChange($event)\"\n (click)=\"onClick($event)\"\n />\n} @else {\n <div class=\"cds--radio-button cds--skeleton\"></div>\n}\n\n<label\n class=\"cds--radio-button__label\"\n [class.cds--skeleton]=\"effectiveSkeleton\"\n [attr.for]=\"id\"\n [id]=\"'label-' + id\"\n>\n <span class=\"cds--radio-button__appearance\"></span>\n @if (!effectiveSkeleton) {\n <ng-content />\n }\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
986
1248
  }
987
1249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccRadio, decorators: [{
988
1250
  type: Component,
989
- args: [{ selector: 'ngcc-radio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'hostClasses()' }, template: "@if (!effectiveSkeleton()) {\n <input\n #radioInput\n class=\"cds--radio-button\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"effectiveName()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.value]=\"value()\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledby()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n (change)=\"onChange($event)\"\n (click)=\"onClick($event)\"\n />\n} @else {\n <div class=\"cds--radio-button cds--skeleton\"></div>\n}\n\n<label\n class=\"cds--radio-button__label\"\n [class.cds--skeleton]=\"effectiveSkeleton()\"\n [attr.for]=\"id()\"\n [id]=\"'label-' + id()\"\n>\n <span class=\"cds--radio-button__appearance\"></span>\n @if (!effectiveSkeleton()) {\n <ng-content />\n }\n</label>\n" }]
990
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], change: [{ type: i0.Output, args: ["change"] }], radioInputRef: [{ type: i0.ViewChild, args: ['radioInput', { isSignal: true }] }] } });
1251
+ args: [{ selector: 'ngcc-radio', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'hostClasses' }, template: "@if (!effectiveSkeleton) {\n <input\n #radioInput\n class=\"cds--radio-button\"\n type=\"radio\"\n [id]=\"id\"\n [name]=\"effectiveName\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [attr.value]=\"value\"\n [attr.aria-labelledby]=\"effectiveAriaLabelledby\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n (change)=\"onChange($event)\"\n (click)=\"onClick($event)\"\n />\n} @else {\n <div class=\"cds--radio-button cds--skeleton\"></div>\n}\n\n<label\n class=\"cds--radio-button__label\"\n [class.cds--skeleton]=\"effectiveSkeleton\"\n [attr.for]=\"id\"\n [id]=\"'label-' + id\"\n>\n <span class=\"cds--radio-button__appearance\"></span>\n @if (!effectiveSkeleton) {\n <ng-content />\n }\n</label>\n" }]
1252
+ }], ctorParameters: () => [], propDecorators: { value: [{
1253
+ type: Input
1254
+ }], id: [{
1255
+ type: Input
1256
+ }], name: [{
1257
+ type: Input
1258
+ }], required: [{
1259
+ type: Input
1260
+ }], disabled: [{
1261
+ type: Input
1262
+ }], labelPlacement: [{
1263
+ type: Input
1264
+ }], ariaLabel: [{
1265
+ type: Input
1266
+ }], ariaLabelledby: [{
1267
+ type: Input
1268
+ }], skeleton: [{
1269
+ type: Input
1270
+ }], change: [{
1271
+ type: Output
1272
+ }], radioInputRef: [{
1273
+ type: ViewChild,
1274
+ args: ['radioInput', { static: false }]
1275
+ }] } });
991
1276
 
992
1277
  let radioGroupIdCounter = 0;
993
1278
  /**
@@ -1005,69 +1290,64 @@ class NgccRadioGroup {
1005
1290
  // Use constructor injection pattern to avoid NG0200 circular dep that occurs
1006
1291
  // when combining inject(NgControl) with an NG_VALUE_ACCESSOR provider.
1007
1292
  ngControl = inject(NgControl, { optional: true, self: true });
1008
- // ── Signal inputs ─────────────────────────────────────────────────────────
1009
- name = input(`ngcc-radio-group-${radioGroupIdCounter++}`, ...(ngDevMode ? [{ debugName: "name" }] : []));
1010
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
1011
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
1012
- orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
1013
- labelPlacement = input('right', ...(ngDevMode ? [{ debugName: "labelPlacement" }] : []));
1014
- legend = input(undefined, ...(ngDevMode ? [{ debugName: "legend" }] : []));
1015
- ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
1016
- ariaLabelledby = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : []));
1017
- helperText = input(undefined, ...(ngDevMode ? [{ debugName: "helperText" }] : []));
1018
- invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : []));
1019
- invalidText = input(undefined, ...(ngDevMode ? [{ debugName: "invalidText" }] : []));
1020
- warn = input(false, ...(ngDevMode ? [{ debugName: "warn" }] : []));
1021
- warnText = input(undefined, ...(ngDevMode ? [{ debugName: "warnText" }] : []));
1022
- readOnly = input(false, ...(ngDevMode ? [{ debugName: "readOnly" }] : []));
1023
- // ── Output ────────────────────────────────────────────────────────────────
1024
- change = output();
1025
- // ── Internal mutable state ────────────────────────────────────────────────
1293
+ // ── Public @Input properties.
1294
+ name = `ngcc-radio-group-${radioGroupIdCounter++}`;
1295
+ disabled = false;
1296
+ skeleton = false;
1297
+ orientation = 'horizontal';
1298
+ labelPlacement = 'right';
1299
+ legend;
1300
+ ariaLabel;
1301
+ ariaLabelledby;
1302
+ helperText;
1303
+ invalid = false;
1304
+ invalidText;
1305
+ warn = false;
1306
+ warnText;
1307
+ readOnly = false;
1308
+ // ── Output event
1309
+ change = new EventEmitter();
1310
+ // ── Internal mutable state
1026
1311
  _value = signal(null, ...(ngDevMode ? [{ debugName: "_value" }] : []));
1027
1312
  _disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "_disabledByForm" }] : []));
1028
- // ── NgccRadioGroupContext — consumed by child NgccRadio via injection ──────
1029
- isDisabled = computed(() => this.disabled() || this._disabledByForm(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
1030
- // ── Computed fieldset classes ─────────────────────────────────────────────
1031
- fieldsetClasses = computed(() => [
1032
- 'cds--radio-button-group',
1033
- this.orientation() === 'vertical' ? 'cds--radio-button-group--vertical' : '',
1034
- this.labelPlacement() === 'left' ? 'cds--radio-button-group--label-left' : '',
1035
- this.invalid() ? 'cds--radio-button-group--invalid' : '',
1036
- !this.invalid() && this.warn() ? 'cds--radio-button-group--warning' : '',
1037
- this.readOnly() ? 'cds--radio-button-group--readonly' : '',
1038
- ]
1039
- .filter(Boolean)
1040
- .join(' '), ...(ngDevMode ? [{ debugName: "fieldsetClasses" }] : []));
1041
- // ── contentChildren signal — replaces @ContentChildren + QueryList ────────
1042
- radios = contentChildren(forwardRef(() => NgccRadio), ...(ngDevMode ? [{ debugName: "radios" }] : []));
1313
+ // ── NgccRadioGroupContext properties that satisfy the interface.
1314
+ get isDisabled() {
1315
+ return this.disabled || this._disabledByForm();
1316
+ }
1317
+ // ── Computed fieldset classes
1318
+ fieldsetClasses() {
1319
+ return [
1320
+ 'cds--radio-button-group',
1321
+ this.orientation === 'vertical' ? 'cds--radio-button-group--vertical' : '',
1322
+ this.labelPlacement === 'left' ? 'cds--radio-button-group--label-left' : '',
1323
+ this.invalid ? 'cds--radio-button-group--invalid' : '',
1324
+ !this.invalid && this.warn ? 'cds--radio-button-group--warning' : '',
1325
+ this.readOnly ? 'cds--radio-button-group--readonly' : '',
1326
+ ]
1327
+ .filter(Boolean)
1328
+ .join(' ');
1329
+ }
1330
+ // ── content children (projected radios)
1331
+ radios;
1043
1332
  constructor() {
1044
1333
  if (this.ngControl) {
1045
1334
  this.ngControl.valueAccessor = this;
1046
1335
  }
1047
- // Re-bind change handlers whenever the set of radio buttons changes.
1048
- // Effect automatically cleans up — no manual unsubscribe needed.
1049
- effect(() => {
1050
- this.bindRadioHandlers(this.radios());
1051
- });
1052
- // Sync checked state whenever radios or the current value changes.
1053
- effect(() => {
1054
- this.syncCheckedState(this.radios());
1055
- });
1056
1336
  }
1057
1337
  // ── Helpers ───────────────────────────────────────────────────────────────
1058
1338
  syncCheckedState(radios) {
1059
1339
  const current = this._value();
1060
- radios.forEach((radio) => radio.checked.set(radio.value() === current));
1340
+ radios.forEach((radio) => radio.setChecked(radio.getValue() === current));
1061
1341
  }
1062
1342
  bindRadioHandlers(radios) {
1063
1343
  radios.forEach((radio) => {
1064
1344
  radio.registerRadioChangeHandler((event) => {
1065
1345
  if (this._value() === event.value)
1066
1346
  return;
1067
- // Use this.radios() to deselect all other radios at handler time.
1068
- this.radios().forEach((r) => {
1347
+ // Deselect all other radios at handler time.
1348
+ this.radios.toArray().forEach((r) => {
1069
1349
  if (r !== event.source)
1070
- r.checked.set(false);
1350
+ r.setChecked(false);
1071
1351
  });
1072
1352
  this._value.set(event.value);
1073
1353
  this.propagateChange(event.value);
@@ -1079,9 +1359,7 @@ class NgccRadioGroup {
1079
1359
  // ── ControlValueAccessor ──────────────────────────────────────────────────
1080
1360
  writeValue(val) {
1081
1361
  this._value.set(val);
1082
- // If radios are already available sync immediately;
1083
- // otherwise the syncCheckedState effect will handle it.
1084
- const radios = this.radios();
1362
+ const radios = this.radios ? this.radios.toArray() : [];
1085
1363
  if (radios.length > 0) {
1086
1364
  this.syncCheckedState(radios);
1087
1365
  }
@@ -1095,6 +1373,16 @@ class NgccRadioGroup {
1095
1373
  setDisabledState(isDisabled) {
1096
1374
  this._disabledByForm.set(isDisabled);
1097
1375
  }
1376
+ ngAfterContentInit() {
1377
+ // Initial binding
1378
+ this.bindRadioHandlers(this.radios.toArray());
1379
+ this.syncCheckedState(this.radios.toArray());
1380
+ // Re-bind when radios change
1381
+ this.radios.changes.subscribe(() => {
1382
+ this.bindRadioHandlers(this.radios.toArray());
1383
+ this.syncCheckedState(this.radios.toArray());
1384
+ });
1385
+ }
1098
1386
  // ── Focus handler (declared in host binding above) ────────────────────────
1099
1387
  onFocusOut(event) {
1100
1388
  const host = event.currentTarget;
@@ -1106,13 +1394,13 @@ class NgccRadioGroup {
1106
1394
  propagateChange = () => { };
1107
1395
  onTouched = () => { };
1108
1396
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
1109
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccRadioGroup, isStandalone: true, selector: "ngcc-radio-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, labelPlacement: { classPropertyName: "labelPlacement", publicName: "labelPlacement", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, invalidText: { classPropertyName: "invalidText", publicName: "invalidText", isSignal: true, isRequired: false, transformFunction: null }, warn: { classPropertyName: "warn", publicName: "warn", isSignal: true, isRequired: false, transformFunction: null }, warnText: { classPropertyName: "warnText", publicName: "warnText", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { listeners: { "focusout": "onFocusOut($event)" }, classAttribute: "cds--form-item" }, providers: [
1397
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccRadioGroup, isStandalone: true, selector: "ngcc-radio-group", inputs: { name: "name", disabled: "disabled", skeleton: "skeleton", orientation: "orientation", labelPlacement: "labelPlacement", legend: "legend", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", helperText: "helperText", invalid: "invalid", invalidText: "invalidText", warn: "warn", warnText: "warnText", readOnly: "readOnly" }, outputs: { change: "change" }, host: { listeners: { "focusout": "onFocusOut($event)" }, classAttribute: "cds--form-item" }, providers: [
1110
1398
  {
1111
1399
  // Exposes group context to child NgccRadio via token — avoids circular import.
1112
1400
  provide: NGCC_RADIO_GROUP_TOKEN,
1113
1401
  useExisting: forwardRef(() => NgccRadioGroup),
1114
1402
  },
1115
- ], queries: [{ propertyName: "radios", predicate: i0.forwardRef(() => NgccRadio), isSignal: true }], ngImport: i0, template: "<fieldset\n [class]=\"fieldsetClasses()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.data-invalid]=\"invalid() ? true : null\"\n>\n @if (legend()) {\n <legend class=\"cds--label\">{{ legend() }}</legend>\n }\n <ng-content />\n</fieldset>\n\n<!-- Validation messages \u2014 invalid takes priority over warn -->\n<div class=\"cds--radio-button__validation-msg\">\n @if (invalid()) {\n <ngcc-icon\n name=\"error\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon\"\n />\n <div class=\"cds--form-requirement\">{{ invalidText() }}</div>\n } @else if (warn()) {\n <ngcc-icon\n name=\"warn\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon cds--radio-button__invalid-icon--warning\"\n />\n <div class=\"cds--form-requirement\">{{ warnText() }}</div>\n }\n</div>\n\n<!-- Helper text \u2014 hidden when invalid or warn is active -->\n@if (helperText() && !invalid() && !warn()) {\n <div class=\"cds--form__helper-text\" [class.cds--form__helper-text--disabled]=\"isDisabled()\">\n {{ helperText() }}\n </div>\n}\n", dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1403
+ ], queries: [{ propertyName: "radios", predicate: i0.forwardRef(() => NgccRadio) }], ngImport: i0, template: "<fieldset\n [class]=\"fieldsetClasses()\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby ?? null\"\n [attr.data-invalid]=\"invalid ? true : null\"\n>\n @if (legend) {\n <legend class=\"cds--label\">{{ legend }}</legend>\n }\n <ng-content />\n</fieldset>\n\n<!-- Validation messages \u2014 invalid takes priority over warn -->\n<div class=\"cds--radio-button__validation-msg\">\n @if (invalid) {\n <ngcc-icon\n name=\"error\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon\"\n />\n <div class=\"cds--form-requirement\">{{ invalidText }}</div>\n } @else if (warn) {\n <ngcc-icon\n name=\"warn\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon cds--radio-button__invalid-icon--warning\"\n />\n <div class=\"cds--form-requirement\">{{ warnText }}</div>\n }\n</div>\n\n<!-- Helper text \u2014 hidden when invalid or warn is active -->\n@if (helperText && !invalid && !warn) {\n <div class=\"cds--form__helper-text\" [class.cds--form__helper-text--disabled]=\"isDisabled\">\n {{ helperText }}\n </div>\n}\n", dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1116
1404
  }
1117
1405
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccRadioGroup, decorators: [{
1118
1406
  type: Component,
@@ -1125,18 +1413,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
1125
1413
  ], host: {
1126
1414
  class: 'cds--form-item',
1127
1415
  '(focusout)': 'onFocusOut($event)',
1128
- }, template: "<fieldset\n [class]=\"fieldsetClasses()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n [attr.data-invalid]=\"invalid() ? true : null\"\n>\n @if (legend()) {\n <legend class=\"cds--label\">{{ legend() }}</legend>\n }\n <ng-content />\n</fieldset>\n\n<!-- Validation messages \u2014 invalid takes priority over warn -->\n<div class=\"cds--radio-button__validation-msg\">\n @if (invalid()) {\n <ngcc-icon\n name=\"error\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon\"\n />\n <div class=\"cds--form-requirement\">{{ invalidText() }}</div>\n } @else if (warn()) {\n <ngcc-icon\n name=\"warn\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon cds--radio-button__invalid-icon--warning\"\n />\n <div class=\"cds--form-requirement\">{{ warnText() }}</div>\n }\n</div>\n\n<!-- Helper text \u2014 hidden when invalid or warn is active -->\n@if (helperText() && !invalid() && !warn()) {\n <div class=\"cds--form__helper-text\" [class.cds--form__helper-text--disabled]=\"isDisabled()\">\n {{ helperText() }}\n </div>\n}\n" }]
1129
- }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], invalidText: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidText", required: false }] }], warn: [{ type: i0.Input, args: [{ isSignal: true, alias: "warn", required: false }] }], warnText: [{ type: i0.Input, args: [{ isSignal: true, alias: "warnText", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], change: [{ type: i0.Output, args: ["change"] }], radios: [{ type: i0.ContentChildren, args: [forwardRef(() => NgccRadio), { isSignal: true }] }] } });
1130
-
1131
- class NgccDatePickerCalendar {
1132
- dateSelected = new EventEmitter();
1133
- closed = new EventEmitter();
1134
- // @Input properties with private backing signals
1135
- startDate = null;
1136
- endDate = null;
1137
- minDate = null;
1138
- maxDate = null;
1139
- disabledDates = null;
1416
+ }, template: "<fieldset\n [class]=\"fieldsetClasses()\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby ?? null\"\n [attr.data-invalid]=\"invalid ? true : null\"\n>\n @if (legend) {\n <legend class=\"cds--label\">{{ legend }}</legend>\n }\n <ng-content />\n</fieldset>\n\n<!-- Validation messages \u2014 invalid takes priority over warn -->\n<div class=\"cds--radio-button__validation-msg\">\n @if (invalid) {\n <ngcc-icon\n name=\"error\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon\"\n />\n <div class=\"cds--form-requirement\">{{ invalidText }}</div>\n } @else if (warn) {\n <ngcc-icon\n name=\"warn\"\n size=\"sm\"\n [decorative]=\"true\"\n svgClass=\"cds--radio-button__invalid-icon cds--radio-button__invalid-icon--warning\"\n />\n <div class=\"cds--form-requirement\">{{ warnText }}</div>\n }\n</div>\n\n<!-- Helper text \u2014 hidden when invalid or warn is active -->\n@if (helperText && !invalid && !warn) {\n <div class=\"cds--form__helper-text\" [class.cds--form__helper-text--disabled]=\"isDisabled\">\n {{ helperText }}\n </div>\n}\n" }]
1417
+ }], ctorParameters: () => [], propDecorators: { name: [{
1418
+ type: Input
1419
+ }], disabled: [{
1420
+ type: Input
1421
+ }], skeleton: [{
1422
+ type: Input
1423
+ }], orientation: [{
1424
+ type: Input
1425
+ }], labelPlacement: [{
1426
+ type: Input
1427
+ }], legend: [{
1428
+ type: Input
1429
+ }], ariaLabel: [{
1430
+ type: Input
1431
+ }], ariaLabelledby: [{
1432
+ type: Input
1433
+ }], helperText: [{
1434
+ type: Input
1435
+ }], invalid: [{
1436
+ type: Input
1437
+ }], invalidText: [{
1438
+ type: Input
1439
+ }], warn: [{
1440
+ type: Input
1441
+ }], warnText: [{
1442
+ type: Input
1443
+ }], readOnly: [{
1444
+ type: Input
1445
+ }], change: [{
1446
+ type: Output
1447
+ }], radios: [{
1448
+ type: ContentChildren,
1449
+ args: [forwardRef(() => NgccRadio)]
1450
+ }] } });
1451
+
1452
+ class NgccDatePickerCalendar {
1453
+ dateSelected = new EventEmitter();
1454
+ closed = new EventEmitter();
1455
+ // @Input properties with private backing signals
1456
+ startDate = null;
1457
+ endDate = null;
1458
+ minDate = null;
1459
+ maxDate = null;
1460
+ disabledDates = null;
1140
1461
  locale = 'en-US';
1141
1462
  format = 'MM/DD/YYYY';
1142
1463
  emitDateObjects = false;
@@ -3185,6 +3506,8 @@ class NgccTab {
3185
3506
  cacheActive = signal(false, ...(ngDevMode ? [{ debugName: "cacheActive" }] : []));
3186
3507
  tabContent = input(null, ...(ngDevMode ? [{ debugName: "tabContent" }] : []));
3187
3508
  templateContext = input(null, ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
3509
+ queryParamKey = input(null, ...(ngDevMode ? [{ debugName: "queryParamKey" }] : []));
3510
+ queryParamValue = input(null, ...(ngDevMode ? [{ debugName: "queryParamValue" }] : []));
3188
3511
  active = signal(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
3189
3512
  // add:
3190
3513
  setActive(value) {
@@ -3211,7 +3534,7 @@ class NgccTab {
3211
3534
  return value instanceof TemplateRef;
3212
3535
  }
3213
3536
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
3214
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccTab, isStandalone: true, selector: "ngcc-tab", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tabContent: { classPropertyName: "tabContent", publicName: "tabContent", isSignal: true, isRequired: false, transformFunction: null }, templateContext: { classPropertyName: "templateContext", publicName: "templateContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { attributes: { "role": "presentation" }, classAttribute: "cds--tab" }, ngImport: i0, template: "@if (shouldRender()) {\n <div\n class=\"cds--tab-content\"\n role=\"tabpanel\"\n [id]=\"id()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-labelledby]=\"id() + '-header'\"\n aria-live=\"polite\"\n [style.display]=\"active() ? null : 'none'\"\n >\n @if (isTemplate(tabContent())) {\n <ng-template\n [ngTemplateOutlet]=\"tabContent()\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext() }\"\n />\n }\n\n <ng-content />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3537
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccTab, isStandalone: true, selector: "ngcc-tab", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tabContent: { classPropertyName: "tabContent", publicName: "tabContent", isSignal: true, isRequired: false, transformFunction: null }, templateContext: { classPropertyName: "templateContext", publicName: "templateContext", isSignal: true, isRequired: false, transformFunction: null }, queryParamKey: { classPropertyName: "queryParamKey", publicName: "queryParamKey", isSignal: true, isRequired: false, transformFunction: null }, queryParamValue: { classPropertyName: "queryParamValue", publicName: "queryParamValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { attributes: { "role": "presentation" }, classAttribute: "cds--tab" }, ngImport: i0, template: "@if (shouldRender()) {\n <div\n class=\"cds--tab-content\"\n role=\"tabpanel\"\n [id]=\"id()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-labelledby]=\"id() + '-header'\"\n aria-live=\"polite\"\n [style.display]=\"active() ? null : 'none'\"\n >\n @if (isTemplate(tabContent())) {\n <ng-template\n [ngTemplateOutlet]=\"tabContent()\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext() }\"\n />\n }\n\n <ng-content />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3215
3538
  }
3216
3539
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccTab, decorators: [{
3217
3540
  type: Component,
@@ -3219,7 +3542,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
3219
3542
  class: 'cds--tab',
3220
3543
  role: 'presentation',
3221
3544
  }, template: "@if (shouldRender()) {\n <div\n class=\"cds--tab-content\"\n role=\"tabpanel\"\n [id]=\"id()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-labelledby]=\"id() + '-header'\"\n aria-live=\"polite\"\n [style.display]=\"active() ? null : 'none'\"\n >\n @if (isTemplate(tabContent())) {\n <ng-template\n [ngTemplateOutlet]=\"tabContent()\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext() }\"\n />\n }\n\n <ng-content />\n </div>\n}\n" }]
3222
- }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tabContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabContent", required: false }] }], templateContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateContext", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
3545
+ }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tabContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabContent", required: false }] }], templateContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateContext", required: false }] }], queryParamKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamKey", required: false }] }], queryParamValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamValue", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
3223
3546
 
3224
3547
  class NgccBaseTabHeader {
3225
3548
  // =============================
@@ -3362,6 +3685,8 @@ class NgccTabHeaders extends NgccBaseTabHeader {
3362
3685
  injector = inject(Injector);
3363
3686
  // store cleanup handle for the effect
3364
3687
  destroyEffect;
3688
+ // Inject ActivatedRoute optionally, in case routerIntegration is used without Angular Router
3689
+ activatedRoute = inject(ActivatedRoute, { optional: true });
3365
3690
  constructor() {
3366
3691
  super();
3367
3692
  // effect returns a cleanup function; store it for ngOnDestroy
@@ -3424,24 +3749,28 @@ class NgccTabHeaders extends NgccBaseTabHeader {
3424
3749
  return;
3425
3750
  const headers = this.allTabHeaders.toArray();
3426
3751
  const tabs = this.tabsArray;
3427
- headers.forEach((el, i) => {
3428
- const link = el.nativeElement.querySelector('a[routerLink]');
3429
- if (!(link instanceof HTMLAnchorElement))
3430
- return;
3431
- const href = link.getAttribute('href');
3432
- if (href &&
3433
- this.router.isActive(href, {
3752
+ const activeTab = tabs.find((tab, index) => {
3753
+ const routeLink = headers[index]?.nativeElement.querySelector('a[routerLink]');
3754
+ const href = routeLink instanceof HTMLAnchorElement ? routeLink.getAttribute('href') : null;
3755
+ if (href) {
3756
+ return this.router.isActive(href, {
3434
3757
  paths: 'exact',
3435
3758
  queryParams: 'ignored',
3436
3759
  fragment: 'ignored',
3437
3760
  matrixParams: 'ignored',
3438
- })) {
3439
- // Found active route - select this tab
3440
- if (tabs[i] && !tabs[i].disabled()) {
3441
- this.selectTab(tabs[i], i);
3442
- }
3761
+ });
3443
3762
  }
3763
+ const queryParamKey = tab.queryParamKey?.() ?? null;
3764
+ const queryParamValue = tab.queryParamValue?.() ?? null;
3765
+ if (!queryParamKey || !this.activatedRoute)
3766
+ return false;
3767
+ const paramValue = this.activatedRoute.snapshot.queryParamMap.get(queryParamKey);
3768
+ return paramValue !== null && queryParamValue !== null && paramValue === queryParamValue;
3444
3769
  });
3770
+ const targetIndex = activeTab ? tabs.indexOf(activeTab) : -1;
3771
+ if (targetIndex >= 0 && !tabs[targetIndex].disabled()) {
3772
+ this.selectTab(tabs[targetIndex], targetIndex);
3773
+ }
3445
3774
  }
3446
3775
  setFirstTab() {
3447
3776
  const tabs = this.tabsArray;
@@ -7114,24 +7443,36 @@ function provideNgccI18n(config) {
7114
7443
  * ```
7115
7444
  */
7116
7445
  class NgccHeader {
7446
+ ngOnChanges(changes) {
7447
+ if (changes['ariaLabel'])
7448
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? '');
7449
+ if (changes['skipTo'])
7450
+ this._skipTo.set(changes['skipTo'].currentValue ?? 'main-content');
7451
+ }
7117
7452
  /**
7118
7453
  * Accessible label for the <header> landmark.
7119
7454
  * Should match the product name shown in NgccHeaderName.
7120
7455
  */
7121
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7456
+ ariaLabel = '';
7457
+ _ariaLabel = signal('', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7122
7458
  /**
7123
7459
  * ID of the main content element for the skip link.
7124
7460
  * Renders a visually-hidden skip link for keyboard/screen-reader users.
7125
7461
  * Pass an empty string to disable.
7126
7462
  */
7127
- skipTo = input('main-content', ...(ngDevMode ? [{ debugName: "skipTo" }] : []));
7463
+ skipTo = 'main-content';
7464
+ _skipTo = signal('main-content', ...(ngDevMode ? [{ debugName: "_skipTo" }] : []));
7128
7465
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
7129
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccHeader, isStandalone: true, selector: "ngcc-header", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, skipTo: { classPropertyName: "skipTo", publicName: "skipTo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<header class=\"cds--header\" role=\"banner\" [attr.aria-label]=\"ariaLabel() || null\">\n <!-- Skip-to-content link (visually hidden, becomes visible on focus) -->\n @if (skipTo()) {\n <a class=\"cds--skip-to-content\" [attr.href]=\"'#' + skipTo()\" tabindex=\"0\">\n Skip to main content\n </a>\n }\n\n <!--\n Named content slots \u2014 order matches Carbon's flexbox layout:\n 1. ngcc-hamburger far-left mobile nav trigger\n 2. ngcc-header-name brand / product name link\n 3. ngcc-header-navigation horizontal nav bar\n 4. ngcc-header-global right-aligned action buttons\n -->\n <ng-content select=\"ngcc-hamburger\" />\n <ng-content select=\"ngcc-header-name\" />\n <ng-content select=\"ngcc-header-navigation\" />\n <ng-content select=\"ngcc-header-global\" />\n\n <!-- Catch-all slot for any additional projected content -->\n <ng-content />\n</header>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
7466
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccHeader, isStandalone: true, selector: "ngcc-header", inputs: { ariaLabel: "ariaLabel", skipTo: "skipTo" }, usesOnChanges: true, ngImport: i0, template: "<header class=\"cds--header\" role=\"banner\" [attr.aria-label]=\"ariaLabel || null\">\n <!-- Skip-to-content link (visually hidden, becomes visible on focus) -->\n @if (skipTo) {\n <a class=\"cds--skip-to-content\" [attr.href]=\"'#' + skipTo\" tabindex=\"0\">\n Skip to main content\n </a>\n }\n\n <!--\n Named content slots \u2014 order matches Carbon's flexbox layout:\n 1. ngcc-hamburger far-left mobile nav trigger\n 2. ngcc-header-name brand / product name link\n 3. ngcc-header-navigation horizontal nav bar\n 4. ngcc-header-global right-aligned action buttons\n -->\n <ng-content select=\"ngcc-hamburger\" />\n <ng-content select=\"ngcc-header-name\" />\n <ng-content select=\"ngcc-header-navigation\" />\n <ng-content select=\"ngcc-header-global\" />\n\n <!-- Catch-all slot for any additional projected content -->\n <ng-content />\n</header>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
7130
7467
  }
7131
7468
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeader, decorators: [{
7132
7469
  type: Component,
7133
- args: [{ selector: 'ngcc-header', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"cds--header\" role=\"banner\" [attr.aria-label]=\"ariaLabel() || null\">\n <!-- Skip-to-content link (visually hidden, becomes visible on focus) -->\n @if (skipTo()) {\n <a class=\"cds--skip-to-content\" [attr.href]=\"'#' + skipTo()\" tabindex=\"0\">\n Skip to main content\n </a>\n }\n\n <!--\n Named content slots \u2014 order matches Carbon's flexbox layout:\n 1. ngcc-hamburger far-left mobile nav trigger\n 2. ngcc-header-name brand / product name link\n 3. ngcc-header-navigation horizontal nav bar\n 4. ngcc-header-global right-aligned action buttons\n -->\n <ng-content select=\"ngcc-hamburger\" />\n <ng-content select=\"ngcc-header-name\" />\n <ng-content select=\"ngcc-header-navigation\" />\n <ng-content select=\"ngcc-header-global\" />\n\n <!-- Catch-all slot for any additional projected content -->\n <ng-content />\n</header>\n" }]
7134
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], skipTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipTo", required: false }] }] } });
7470
+ args: [{ selector: 'ngcc-header', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"cds--header\" role=\"banner\" [attr.aria-label]=\"ariaLabel || null\">\n <!-- Skip-to-content link (visually hidden, becomes visible on focus) -->\n @if (skipTo) {\n <a class=\"cds--skip-to-content\" [attr.href]=\"'#' + skipTo\" tabindex=\"0\">\n Skip to main content\n </a>\n }\n\n <!--\n Named content slots \u2014 order matches Carbon's flexbox layout:\n 1. ngcc-hamburger far-left mobile nav trigger\n 2. ngcc-header-name brand / product name link\n 3. ngcc-header-navigation horizontal nav bar\n 4. ngcc-header-global right-aligned action buttons\n -->\n <ng-content select=\"ngcc-hamburger\" />\n <ng-content select=\"ngcc-header-name\" />\n <ng-content select=\"ngcc-header-navigation\" />\n <ng-content select=\"ngcc-header-global\" />\n\n <!-- Catch-all slot for any additional projected content -->\n <ng-content />\n</header>\n" }]
7471
+ }], propDecorators: { ariaLabel: [{
7472
+ type: Input
7473
+ }], skipTo: [{
7474
+ type: Input
7475
+ }] } });
7135
7476
 
7136
7477
  /**
7137
7478
  * Brand prefix + product name link in the header.
@@ -7139,21 +7480,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7139
7480
  * <ngcc-header-name brand="CarbideUI" productName="My App" href="/" />
7140
7481
  */
7141
7482
  class NgccHeaderName {
7483
+ ngOnChanges(changes) {
7484
+ if (changes['brand'])
7485
+ this._brand.set(changes['brand'].currentValue ?? 'CarbideUI');
7486
+ if (changes['productName'])
7487
+ this._productName.set(changes['productName'].currentValue ?? '');
7488
+ if (changes['href'])
7489
+ this._href.set(changes['href'].currentValue ?? '/');
7490
+ }
7142
7491
  /** Brand prefix, e.g. "CarbideUI" */
7143
- brand = input('CarbideUI', ...(ngDevMode ? [{ debugName: "brand" }] : []));
7492
+ brand = 'CarbideUI';
7493
+ _brand = signal('CarbideUI', ...(ngDevMode ? [{ debugName: "_brand" }] : []));
7144
7494
  /** Product / suite name shown after the brand */
7145
- productName = input('', ...(ngDevMode ? [{ debugName: "productName" }] : []));
7495
+ productName = '';
7496
+ _productName = signal('', ...(ngDevMode ? [{ debugName: "_productName" }] : []));
7146
7497
  /** Link destination */
7147
- href = input('/', ...(ngDevMode ? [{ debugName: "href" }] : []));
7498
+ href = '/';
7499
+ _href = signal('/', ...(ngDevMode ? [{ debugName: "_href" }] : []));
7148
7500
  /** Combined title attribute for accessibility */
7149
- titleAttr = computed(() => [this.brand(), this.productName()].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "titleAttr" }] : []));
7501
+ titleAttr = computed(() => [this._brand(), this._productName()].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "titleAttr" }] : []));
7150
7502
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderName, deps: [], target: i0.ɵɵFactoryTarget.Component });
7151
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccHeaderName, isStandalone: true, selector: "ngcc-header-name", inputs: { brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, productName: { classPropertyName: "productName", publicName: "productName", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<a class=\"cds--header__name\" [attr.href]=\"href()\" [attr.title]=\"titleAttr()\">\n @if (brand()) {\n <span class=\"cds--header__name--prefix\">{{ brand() }}</span\n >&nbsp;\n }\n @if (productName()) {\n {{ productName() }}\n }\n <!-- Allow fully custom brand content via projection -->\n <ng-content />\n</a>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7503
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccHeaderName, isStandalone: true, selector: "ngcc-header-name", inputs: { brand: "brand", productName: "productName", href: "href" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, ngImport: i0, template: "<a class=\"cds--header__name\" [attr.href]=\"href\" [attr.title]=\"titleAttr()\">\n @if (brand) {\n <span class=\"cds--header__name--prefix\">{{ brand }}</span\n >&nbsp;\n }\n @if (productName) {\n {{ productName }}\n }\n <!-- Allow fully custom brand content via projection -->\n <ng-content />\n</a>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7152
7504
  }
7153
7505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderName, decorators: [{
7154
7506
  type: Component,
7155
- args: [{ selector: 'ngcc-header-name', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<a class=\"cds--header__name\" [attr.href]=\"href()\" [attr.title]=\"titleAttr()\">\n @if (brand()) {\n <span class=\"cds--header__name--prefix\">{{ brand() }}</span\n >&nbsp;\n }\n @if (productName()) {\n {{ productName() }}\n }\n <!-- Allow fully custom brand content via projection -->\n <ng-content />\n</a>\n", styles: [":host{display:contents}\n"] }]
7156
- }], propDecorators: { brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], productName: [{ type: i0.Input, args: [{ isSignal: true, alias: "productName", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }] } });
7507
+ args: [{ selector: 'ngcc-header-name', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<a class=\"cds--header__name\" [attr.href]=\"href\" [attr.title]=\"titleAttr()\">\n @if (brand) {\n <span class=\"cds--header__name--prefix\">{{ brand }}</span\n >&nbsp;\n }\n @if (productName) {\n {{ productName }}\n }\n <!-- Allow fully custom brand content via projection -->\n <ng-content />\n</a>\n", styles: [":host{display:contents}\n"] }]
7508
+ }], propDecorators: { brand: [{
7509
+ type: Input
7510
+ }], productName: [{
7511
+ type: Input
7512
+ }], href: [{
7513
+ type: Input
7514
+ }] } });
7157
7515
 
7158
7516
  /**
7159
7517
  * Horizontal navigation bar inside the header shell.
@@ -7167,15 +7525,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7167
7525
  * </nav>
7168
7526
  */
7169
7527
  class NgccHeaderNavigation {
7528
+ ngOnChanges(changes) {
7529
+ if (changes['ariaLabel'])
7530
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? 'Navigation');
7531
+ }
7170
7532
  /** Accessible label for the <nav> landmark */
7171
- ariaLabel = input('Navigation', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7533
+ ariaLabel = 'Navigation';
7534
+ _ariaLabel = signal('Navigation', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7172
7535
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component });
7173
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccHeaderNavigation, isStandalone: true, selector: "ngcc-header-navigation", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<nav class=\"cds--header__nav\" [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"cds--header__menu-bar\" role=\"menubar\" [attr.aria-label]=\"ariaLabel()\">\n <ng-content />\n </ul>\n</nav>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7536
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccHeaderNavigation, isStandalone: true, selector: "ngcc-header-navigation", inputs: { ariaLabel: "ariaLabel" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, ngImport: i0, template: "<nav class=\"cds--header__nav\" [attr.aria-label]=\"ariaLabel\">\n <ul class=\"cds--header__menu-bar\" role=\"menubar\" [attr.aria-label]=\"ariaLabel\">\n <ng-content />\n </ul>\n</nav>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7174
7537
  }
7175
7538
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderNavigation, decorators: [{
7176
7539
  type: Component,
7177
- args: [{ selector: 'ngcc-header-navigation', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<nav class=\"cds--header__nav\" [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"cds--header__menu-bar\" role=\"menubar\" [attr.aria-label]=\"ariaLabel()\">\n <ng-content />\n </ul>\n</nav>\n", styles: [":host{display:contents}\n"] }]
7178
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
7540
+ args: [{ selector: 'ngcc-header-navigation', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<nav class=\"cds--header__nav\" [attr.aria-label]=\"ariaLabel\">\n <ul class=\"cds--header__menu-bar\" role=\"menubar\" [attr.aria-label]=\"ariaLabel\">\n <ng-content />\n </ul>\n</nav>\n", styles: [":host{display:contents}\n"] }]
7541
+ }], propDecorators: { ariaLabel: [{
7542
+ type: Input
7543
+ }] } });
7179
7544
 
7180
7545
  /**
7181
7546
  * A single navigation link inside <ngcc-header-navigation>.
@@ -7184,16 +7549,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7184
7549
  * <ngcc-header-item href="/dashboard" [isCurrentPage]="true">Dashboard</ngcc-header-item>
7185
7550
  */
7186
7551
  class NgccHeaderItem {
7552
+ ngOnChanges(changes) {
7553
+ if (changes['href'])
7554
+ this._href.set(changes['href'].currentValue ?? '/');
7555
+ if (changes['routerLink'])
7556
+ this._routerLink.set(changes['routerLink'].currentValue ?? null);
7557
+ if (changes['isCurrentPage'])
7558
+ this._isCurrentPage.set(changes['isCurrentPage'].currentValue ?? false);
7559
+ if (changes['tabIndex'])
7560
+ this._tabIndex.set(changes['tabIndex'].currentValue ?? 0);
7561
+ }
7187
7562
  /** Navigation URL */
7188
- href = input('/', ...(ngDevMode ? [{ debugName: "href" }] : []));
7563
+ href = '/';
7564
+ _href = signal('/', ...(ngDevMode ? [{ debugName: "_href" }] : []));
7565
+ /** Angular Router route target. When provided, it takes precedence over href. */
7566
+ routerLink = null;
7567
+ _routerLink = signal(null, ...(ngDevMode ? [{ debugName: "_routerLink" }] : []));
7189
7568
  /** Marks this link as the active / current page */
7190
- isCurrentPage = input(false, ...(ngDevMode ? [{ debugName: "isCurrentPage" }] : []));
7569
+ isCurrentPage = false;
7570
+ _isCurrentPage = signal(false, ...(ngDevMode ? [{ debugName: "_isCurrentPage" }] : []));
7191
7571
  /** Tab index override */
7192
- tabIndex = input(0, ...(ngDevMode ? [{ debugName: "tabIndex" }] : []));
7193
- itemClick = output();
7194
- linkClasses = computed(() => ['cds--header__menu-item', this.isCurrentPage() ? 'cds--header__menu-item--current' : '']
7572
+ tabIndex = 0;
7573
+ _tabIndex = signal(0, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : []));
7574
+ itemClick = new EventEmitter();
7575
+ linkClasses = computed(() => ['cds--header__menu-item', this._isCurrentPage() ? 'cds--header__menu-item--current' : '']
7195
7576
  .filter(Boolean)
7196
7577
  .join(' '), ...(ngDevMode ? [{ debugName: "linkClasses" }] : []));
7578
+ resolvedHref = computed(() => {
7579
+ if (this._routerLink())
7580
+ return this._routerLink();
7581
+ return this._href();
7582
+ }, ...(ngDevMode ? [{ debugName: "resolvedHref" }] : []));
7197
7583
  onClick(event) {
7198
7584
  this.itemClick.emit(event);
7199
7585
  }
@@ -7204,12 +7590,22 @@ class NgccHeaderItem {
7204
7590
  }
7205
7591
  }
7206
7592
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
7207
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccHeaderItem, isStandalone: true, selector: "ngcc-header-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, isCurrentPage: { classPropertyName: "isCurrentPage", publicName: "isCurrentPage", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<li role=\"none\">\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"href()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-current]=\"isCurrentPage() ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n</li>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7593
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccHeaderItem, isStandalone: true, selector: "ngcc-header-item", inputs: { href: "href", routerLink: "routerLink", isCurrentPage: "isCurrentPage", tabIndex: "tabIndex" }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, ngImport: i0, template: "<li role=\"none\">\n @if (routerLink) {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [routerLink]=\"resolvedHref()\"\n [attr.tabindex]=\"tabIndex\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n } @else {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [href]=\"resolvedHref()\"\n [attr.tabindex]=\"tabIndex\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n }\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7208
7594
  }
7209
7595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderItem, decorators: [{
7210
7596
  type: Component,
7211
- args: [{ selector: 'ngcc-header-item', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li role=\"none\">\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"href()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-current]=\"isCurrentPage() ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n</li>\n", styles: [":host{display:contents}\n"] }]
7212
- }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], isCurrentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCurrentPage", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
7597
+ args: [{ selector: 'ngcc-header-item', standalone: true, imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li role=\"none\">\n @if (routerLink) {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [routerLink]=\"resolvedHref()\"\n [attr.tabindex]=\"tabIndex\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n } @else {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [href]=\"resolvedHref()\"\n [attr.tabindex]=\"tabIndex\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n }\n</li>\n", styles: [":host{display:contents}\n"] }]
7598
+ }], propDecorators: { href: [{
7599
+ type: Input
7600
+ }], routerLink: [{
7601
+ type: Input
7602
+ }], isCurrentPage: [{
7603
+ type: Input
7604
+ }], tabIndex: [{
7605
+ type: Input
7606
+ }], itemClick: [{
7607
+ type: Output
7608
+ }] } });
7213
7609
 
7214
7610
  /**
7215
7611
  * Flyout dropdown navigation menu for the header nav bar.
@@ -7229,11 +7625,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7229
7625
  */
7230
7626
  class NgccHeaderMenu {
7231
7627
  /** Visible label on the trigger button */
7232
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
7628
+ get title() {
7629
+ return this._title();
7630
+ }
7631
+ set title(value) {
7632
+ this._title.set(value);
7633
+ }
7634
+ _title = signal('', ...(ngDevMode ? [{ debugName: "_title" }] : []));
7233
7635
  /** How the menu opens — 'click' (default) or 'mouseover' */
7234
- trigger = input('click', ...(ngDevMode ? [{ debugName: "trigger" }] : []));
7636
+ get trigger() {
7637
+ return this._trigger();
7638
+ }
7639
+ set trigger(value) {
7640
+ this._trigger.set(value);
7641
+ }
7642
+ _trigger = signal('click', ...(ngDevMode ? [{ debugName: "_trigger" }] : []));
7235
7643
  /** Two-way bindable expanded state — use [(expanded)]="myVar" in parent */
7236
- expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
7644
+ get expanded() {
7645
+ return this._expanded();
7646
+ }
7647
+ set expanded(value) {
7648
+ this._expanded.set(value);
7649
+ this.expandedChange.emit(value);
7650
+ }
7651
+ expandedChange = new EventEmitter();
7652
+ _expanded = signal(false, ...(ngDevMode ? [{ debugName: "_expanded" }] : []));
7237
7653
  /**
7238
7654
  * Signal-based view queries (Angular v17.2+).
7239
7655
  * viewChild.required() — refs are unconditionally in the template (not in @if),
@@ -7251,28 +7667,31 @@ class NgccHeaderMenu {
7251
7667
  }
7252
7668
  // ─── Expand / Collapse ─────────────────────────────────────────────────────
7253
7669
  expand() {
7254
- this.expanded.set(true);
7670
+ this._expanded.set(true);
7671
+ this.expandedChange.emit(this._expanded());
7255
7672
  }
7256
7673
  collapse() {
7257
- this.expanded.set(false);
7674
+ this._expanded.set(false);
7675
+ this.expandedChange.emit(this._expanded());
7258
7676
  }
7259
7677
  toggle() {
7260
- this.expanded.update((v) => !v);
7678
+ this._expanded.update((v) => !v);
7679
+ this.expandedChange.emit(this._expanded());
7261
7680
  }
7262
7681
  // ─── Trigger button events ─────────────────────────────────────────────────
7263
7682
  onTriggerClick() {
7264
- if (this.trigger() === 'click')
7683
+ if (this._trigger() === 'click')
7265
7684
  this.toggle();
7266
7685
  }
7267
7686
  onTriggerMouseEnter() {
7268
- if (this.trigger() === 'mouseover') {
7687
+ if (this._trigger() === 'mouseover') {
7269
7688
  if (this._hoverTimeout !== null)
7270
7689
  clearTimeout(this._hoverTimeout);
7271
7690
  this.expand();
7272
7691
  }
7273
7692
  }
7274
7693
  onTriggerMouseLeave() {
7275
- if (this.trigger() === 'mouseover') {
7694
+ if (this._trigger() === 'mouseover') {
7276
7695
  this._hoverTimeout = setTimeout(() => this.collapse(), 150);
7277
7696
  }
7278
7697
  }
@@ -7283,20 +7702,20 @@ class NgccHeaderMenu {
7283
7702
  case ' ':
7284
7703
  event.preventDefault();
7285
7704
  this.toggle();
7286
- if (this.expanded()) {
7705
+ if (this._expanded()) {
7287
7706
  // model() updates synchronously — expanded() reflects the new state here
7288
7707
  requestAnimationFrame(() => this.focusMenuItemAt(0));
7289
7708
  }
7290
7709
  break;
7291
7710
  case 'ArrowDown':
7292
7711
  event.preventDefault();
7293
- if (!this.expanded())
7712
+ if (!this._expanded())
7294
7713
  this.expand();
7295
7714
  requestAnimationFrame(() => this.focusMenuItemAt(0));
7296
7715
  break;
7297
7716
  case 'ArrowUp':
7298
7717
  event.preventDefault();
7299
- if (!this.expanded())
7718
+ if (!this._expanded())
7300
7719
  this.expand();
7301
7720
  requestAnimationFrame(() => this.focusMenuItemAt(-1));
7302
7721
  break;
@@ -7349,12 +7768,12 @@ class NgccHeaderMenu {
7349
7768
  }
7350
7769
  }
7351
7770
  onMenuMouseEnter() {
7352
- if (this.trigger() === 'mouseover' && this._hoverTimeout !== null) {
7771
+ if (this._trigger() === 'mouseover' && this._hoverTimeout !== null) {
7353
7772
  clearTimeout(this._hoverTimeout);
7354
7773
  }
7355
7774
  }
7356
7775
  onMenuMouseLeave() {
7357
- if (this.trigger() === 'mouseover') {
7776
+ if (this._trigger() === 'mouseover') {
7358
7777
  this._hoverTimeout = setTimeout(() => this.collapse(), 150);
7359
7778
  }
7360
7779
  }
@@ -7370,34 +7789,62 @@ class NgccHeaderMenu {
7370
7789
  items[normalized]?.focus();
7371
7790
  }
7372
7791
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
7373
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.18", type: NgccHeaderMenu, isStandalone: true, selector: "ngcc-header-menu", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { attributes: { "role": "none" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["menuTrigger"], descendants: true, isSignal: true }, { propertyName: "menuListRef", first: true, predicate: ["menuList"], descendants: true, isSignal: true }], ngImport: i0, template: "<li class=\"cds--header__submenu\" role=\"none\">\n <!-- Trigger button -->\n <a\n #menuTrigger\n class=\"cds--header__menu-item cds--header__menu-title\"\n tabindex=\"0\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"onTriggerClick()\"\n (mouseenter)=\"onTriggerMouseEnter()\"\n (mouseleave)=\"onTriggerMouseLeave()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n {{ title() }}\n <ngcc-icon\n name=\"chevron_down\"\n [decorative]=\"true\"\n size=\"sm\"\n svgClass=\"cds--header__menu-arrow\"\n />\n </a>\n\n <!-- Dropdown list\n Carbon CSS shows this via:\n .cds--header__menu-title[aria-expanded=\"true\"] + .cds--header__menu { display: block }\n -->\n <ul\n #menuList\n class=\"cds--header__menu\"\n role=\"menu\"\n tabindex=\"0\"\n [attr.aria-label]=\"title()\"\n (keydown)=\"onMenuKeydown($event)\"\n (focusout)=\"onMenuFocusOut($event)\"\n (mouseenter)=\"onMenuMouseEnter()\"\n (mouseleave)=\"onMenuMouseLeave()\"\n >\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7792
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.18", type: NgccHeaderMenu, isStandalone: true, selector: "ngcc-header-menu", inputs: { title: "title", trigger: "trigger", expanded: "expanded" }, outputs: { expandedChange: "expandedChange" }, host: { attributes: { "role": "none" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["menuTrigger"], descendants: true, isSignal: true }, { propertyName: "menuListRef", first: true, predicate: ["menuList"], descendants: true, isSignal: true }], ngImport: i0, template: "<li class=\"cds--header__submenu\" role=\"none\">\n <!-- Trigger button -->\n <a\n #menuTrigger\n class=\"cds--header__menu-item cds--header__menu-title\"\n tabindex=\"0\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"onTriggerClick()\"\n (mouseenter)=\"onTriggerMouseEnter()\"\n (mouseleave)=\"onTriggerMouseLeave()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n {{ title }}\n <ngcc-icon\n name=\"chevron_down\"\n [decorative]=\"true\"\n size=\"sm\"\n svgClass=\"cds--header__menu-arrow\"\n />\n </a>\n\n <!-- Dropdown list\n Carbon CSS shows this via:\n .cds--header__menu-title[aria-expanded=\"true\"] + .cds--header__menu { display: block }\n -->\n <ul\n #menuList\n class=\"cds--header__menu\"\n role=\"menu\"\n tabindex=\"0\"\n [attr.aria-label]=\"title\"\n (keydown)=\"onMenuKeydown($event)\"\n (focusout)=\"onMenuFocusOut($event)\"\n (mouseenter)=\"onMenuMouseEnter()\"\n (mouseleave)=\"onMenuMouseLeave()\"\n >\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7374
7793
  }
7375
7794
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderMenu, decorators: [{
7376
7795
  type: Component,
7377
- args: [{ selector: 'ngcc-header-menu', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li class=\"cds--header__submenu\" role=\"none\">\n <!-- Trigger button -->\n <a\n #menuTrigger\n class=\"cds--header__menu-item cds--header__menu-title\"\n tabindex=\"0\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"onTriggerClick()\"\n (mouseenter)=\"onTriggerMouseEnter()\"\n (mouseleave)=\"onTriggerMouseLeave()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n {{ title() }}\n <ngcc-icon\n name=\"chevron_down\"\n [decorative]=\"true\"\n size=\"sm\"\n svgClass=\"cds--header__menu-arrow\"\n />\n </a>\n\n <!-- Dropdown list\n Carbon CSS shows this via:\n .cds--header__menu-title[aria-expanded=\"true\"] + .cds--header__menu { display: block }\n -->\n <ul\n #menuList\n class=\"cds--header__menu\"\n role=\"menu\"\n tabindex=\"0\"\n [attr.aria-label]=\"title()\"\n (keydown)=\"onMenuKeydown($event)\"\n (focusout)=\"onMenuFocusOut($event)\"\n (mouseenter)=\"onMenuMouseEnter()\"\n (mouseleave)=\"onMenuMouseLeave()\"\n >\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"] }]
7378
- }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['menuTrigger', { isSignal: true }] }], menuListRef: [{ type: i0.ViewChild, args: ['menuList', { isSignal: true }] }] } });
7796
+ args: [{ selector: 'ngcc-header-menu', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li class=\"cds--header__submenu\" role=\"none\">\n <!-- Trigger button -->\n <a\n #menuTrigger\n class=\"cds--header__menu-item cds--header__menu-title\"\n tabindex=\"0\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"onTriggerClick()\"\n (mouseenter)=\"onTriggerMouseEnter()\"\n (mouseleave)=\"onTriggerMouseLeave()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n {{ title }}\n <ngcc-icon\n name=\"chevron_down\"\n [decorative]=\"true\"\n size=\"sm\"\n svgClass=\"cds--header__menu-arrow\"\n />\n </a>\n\n <!-- Dropdown list\n Carbon CSS shows this via:\n .cds--header__menu-title[aria-expanded=\"true\"] + .cds--header__menu { display: block }\n -->\n <ul\n #menuList\n class=\"cds--header__menu\"\n role=\"menu\"\n tabindex=\"0\"\n [attr.aria-label]=\"title\"\n (keydown)=\"onMenuKeydown($event)\"\n (focusout)=\"onMenuFocusOut($event)\"\n (mouseenter)=\"onMenuMouseEnter()\"\n (mouseleave)=\"onMenuMouseLeave()\"\n >\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"] }]
7797
+ }], ctorParameters: () => [], propDecorators: { title: [{
7798
+ type: Input
7799
+ }], trigger: [{
7800
+ type: Input
7801
+ }], expanded: [{
7802
+ type: Input
7803
+ }], expandedChange: [{
7804
+ type: Output
7805
+ }], triggerRef: [{ type: i0.ViewChild, args: ['menuTrigger', { isSignal: true }] }], menuListRef: [{ type: i0.ViewChild, args: ['menuList', { isSignal: true }] }] } });
7379
7806
 
7380
7807
  /**
7381
7808
  * A single item inside an <ngcc-header-menu> dropdown.
7382
7809
  * Renders as <li role="none"><a role="menuitem">…</a></li>
7383
7810
  */
7384
7811
  class NgccHeaderMenuItem {
7385
- href = input('/', ...(ngDevMode ? [{ debugName: "href" }] : []));
7386
- isCurrentPage = input(false, ...(ngDevMode ? [{ debugName: "isCurrentPage" }] : []));
7387
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
7388
- itemClick = output();
7389
- linkClasses = computed(() => ['cds--header__menu-item', this.isCurrentPage() ? 'cds--header__menu-item--current' : '']
7812
+ ngOnChanges(changes) {
7813
+ if (changes['href'])
7814
+ this._href.set(changes['href'].currentValue ?? '/');
7815
+ if (changes['routerLink'])
7816
+ this._routerLink.set(changes['routerLink'].currentValue ?? null);
7817
+ if (changes['isCurrentPage'])
7818
+ this._isCurrentPage.set(changes['isCurrentPage'].currentValue ?? false);
7819
+ if (changes['disabled'])
7820
+ this._disabled.set(changes['disabled'].currentValue ?? false);
7821
+ }
7822
+ href = '/';
7823
+ _href = signal('/', ...(ngDevMode ? [{ debugName: "_href" }] : []));
7824
+ routerLink = null;
7825
+ _routerLink = signal(null, ...(ngDevMode ? [{ debugName: "_routerLink" }] : []));
7826
+ isCurrentPage = false;
7827
+ _isCurrentPage = signal(false, ...(ngDevMode ? [{ debugName: "_isCurrentPage" }] : []));
7828
+ disabled = false;
7829
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
7830
+ itemClick = new EventEmitter();
7831
+ linkClasses = computed(() => ['cds--header__menu-item', this._isCurrentPage() ? 'cds--header__menu-item--current' : '']
7390
7832
  .filter(Boolean)
7391
7833
  .join(' '), ...(ngDevMode ? [{ debugName: "linkClasses" }] : []));
7834
+ resolvedHref = computed(() => {
7835
+ if (this._routerLink())
7836
+ return this._routerLink();
7837
+ return this._href();
7838
+ }, ...(ngDevMode ? [{ debugName: "resolvedHref" }] : []));
7392
7839
  onClick(event) {
7393
- if (this.disabled()) {
7840
+ if (this._disabled()) {
7394
7841
  event.preventDefault();
7395
7842
  return;
7396
7843
  }
7397
7844
  this.itemClick.emit(event);
7398
7845
  }
7399
7846
  onKeydown(event) {
7400
- if (this.disabled())
7847
+ if (this._disabled())
7401
7848
  return;
7402
7849
  if (event.key === 'Enter' || event.key === ' ') {
7403
7850
  event.preventDefault();
@@ -7405,12 +7852,22 @@ class NgccHeaderMenuItem {
7405
7852
  }
7406
7853
  }
7407
7854
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
7408
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccHeaderMenuItem, isStandalone: true, selector: "ngcc-header-menu-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, isCurrentPage: { classPropertyName: "isCurrentPage", publicName: "isCurrentPage", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<li role=\"none\">\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-current]=\"isCurrentPage() ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n</li>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7855
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccHeaderMenuItem, isStandalone: true, selector: "ngcc-header-menu-item", inputs: { href: "href", routerLink: "routerLink", isCurrentPage: "isCurrentPage", disabled: "disabled" }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, ngImport: i0, template: "<li role=\"none\">\n @if (routerLink) {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"disabled ? null : null\"\n [routerLink]=\"disabled ? null : resolvedHref()\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n } @else {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"disabled ? null : resolvedHref()\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n }\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7409
7856
  }
7410
7857
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderMenuItem, decorators: [{
7411
7858
  type: Component,
7412
- args: [{ selector: 'ngcc-header-menu-item', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li role=\"none\">\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-current]=\"isCurrentPage() ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n</li>\n", styles: [":host{display:contents}\n"] }]
7413
- }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], isCurrentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCurrentPage", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
7859
+ args: [{ selector: 'ngcc-header-menu-item', standalone: true, imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li role=\"none\">\n @if (routerLink) {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"disabled ? null : null\"\n [routerLink]=\"disabled ? null : resolvedHref()\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n } @else {\n <a\n [class]=\"linkClasses()\"\n role=\"menuitem\"\n [attr.href]=\"disabled ? null : resolvedHref()\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-current]=\"isCurrentPage ? 'page' : null\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </a>\n }\n</li>\n", styles: [":host{display:contents}\n"] }]
7860
+ }], propDecorators: { href: [{
7861
+ type: Input
7862
+ }], routerLink: [{
7863
+ type: Input
7864
+ }], isCurrentPage: [{
7865
+ type: Input
7866
+ }], disabled: [{
7867
+ type: Input
7868
+ }], itemClick: [{
7869
+ type: Output
7870
+ }] } });
7414
7871
 
7415
7872
  /**
7416
7873
  * Container for global header action buttons (right-hand side).
@@ -7438,24 +7895,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7438
7895
  * <ngcc-header-action ariaLabel="Search" iconName="search" [(active)]="searchOpen" />
7439
7896
  */
7440
7897
  class NgccHeaderAction {
7898
+ ngOnChanges(changes) {
7899
+ if (changes['ariaLabel'])
7900
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? '');
7901
+ if (changes['iconName'])
7902
+ this._iconName.set(changes['iconName'].currentValue ?? undefined);
7903
+ if (changes['toggleable'])
7904
+ this._toggleable.set(changes['toggleable'].currentValue ?? true);
7905
+ if (changes['active']) {
7906
+ this._active.set(changes['active'].currentValue ?? false);
7907
+ }
7908
+ if (changes['href']) {
7909
+ this._href.set(changes['href'].currentValue ?? undefined);
7910
+ }
7911
+ }
7441
7912
  elementRef = inject(ElementRef);
7442
7913
  /** Accessible label for the button */
7443
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7914
+ ariaLabel = '';
7915
+ _ariaLabel = signal('', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7444
7916
  /** Two-way bindable active/panel-open state — use [(active)]="myVar" in parent */
7445
- active = model(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
7917
+ active = false;
7918
+ activeChange = new EventEmitter();
7919
+ _active = signal(false, ...(ngDevMode ? [{ debugName: "_active" }] : []));
7920
+ /** Optional link target for actions that behave like anchors, e.g. “Switch to Legacy”. */
7921
+ href = null;
7922
+ _href = signal(null, ...(ngDevMode ? [{ debugName: "_href" }] : []));
7446
7923
  /** Icon to display — any key from the NgccIcon registry */
7447
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
7924
+ iconName = undefined;
7925
+ _iconName = signal(undefined, ...(ngDevMode ? [{ debugName: "_iconName" }] : []));
7448
7926
  /** Set false to make the button fire-and-forget (no toggle behaviour) */
7449
- toggleable = input(true, ...(ngDevMode ? [{ debugName: "toggleable" }] : []));
7450
- actionClick = output();
7927
+ toggleable = true;
7928
+ _toggleable = signal(true, ...(ngDevMode ? [{ debugName: "_toggleable" }] : []));
7929
+ actionClick = new EventEmitter();
7930
+ linkClick = new EventEmitter();
7451
7931
  onClick(event) {
7932
+ if (this._href()) {
7933
+ this.linkClick.emit(event);
7934
+ return;
7935
+ }
7452
7936
  this.actionClick.emit(event);
7453
- if (this.toggleable()) {
7454
- this.active.update((v) => !v);
7937
+ if (this._toggleable()) {
7938
+ this._active.update((v) => !v);
7939
+ this.activeChange.emit(this._active());
7455
7940
  }
7456
7941
  }
7457
7942
  onDocumentClick(event) {
7458
- if (!this.active() || !this.toggleable())
7943
+ if (!this._active() || !this._toggleable())
7459
7944
  return;
7460
7945
  // Evaluate click path to support detached DOM elements
7461
7946
  const path = event.composedPath();
@@ -7463,23 +7948,41 @@ class NgccHeaderAction {
7463
7948
  // If click is inside any panel, we do not close the action so the panel remains usable
7464
7949
  const isInsidePanel = path.some((el) => el.tagName?.toLowerCase() === 'ngcc-header-panel');
7465
7950
  if (!isInsideAction && !isInsidePanel) {
7466
- this.active.set(false);
7951
+ this._active.set(false);
7952
+ this.activeChange.emit(this._active());
7467
7953
  }
7468
7954
  }
7469
7955
  onEscape() {
7470
- if (this.active() && this.toggleable()) {
7471
- this.active.set(false);
7956
+ if (this._active() && this._toggleable()) {
7957
+ this._active.set(false);
7958
+ this.activeChange.emit(this._active());
7472
7959
  // Return focus to the trigger element when closed via Escape key
7473
7960
  this.elementRef.nativeElement.querySelector('button')?.focus();
7474
7961
  }
7475
7962
  }
7476
7963
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderAction, deps: [], target: i0.ɵɵFactoryTarget.Component });
7477
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccHeaderAction, isStandalone: true, selector: "ngcc-header-action", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", actionClick: "actionClick" }, host: { attributes: { "role": "none" }, listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: "<ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"iconName()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaExpanded]=\"active()\"\n [className]=\"'cds--header__action' + (active() ? ' cds--header__action--active' : '')\"\n (click)=\"onClick($event)\"\n/>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccButton, selector: "ngcc-button", inputs: ["label", "variant", "size", "disabled", "expressive", "className", "skeleton", "type", "ariaLabel", "ariaExpanded", "iconName", "iconOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7964
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccHeaderAction, isStandalone: true, selector: "ngcc-header-action", inputs: { ariaLabel: "ariaLabel", active: "active", href: "href", iconName: "iconName", toggleable: "toggleable" }, outputs: { activeChange: "activeChange", actionClick: "actionClick", linkClick: "linkClick" }, host: { attributes: { "role": "none" }, listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"href; else buttonTemplate\">\n <a\n class=\"cds--header__action\"\n [href]=\"href\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-expanded]=\"active ? 'true' : 'false'\"\n (click)=\"onClick($event)\"\n >\n <ngcc-icon [name]=\"iconName ?? 'add'\" [decorative]=\"true\" />\n </a>\n</ng-container>\n<ng-template #buttonTemplate>\n <ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"iconName\"\n [ariaLabel]=\"ariaLabel\"\n [ariaExpanded]=\"active\"\n [className]=\"'cds--header__action' + (active ? ' cds--header__action--active' : '')\"\n (click)=\"onClick($event)\"\n />\n</ng-template>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgccButton, selector: "ngcc-button", inputs: ["label", "variant", "size", "disabled", "expressive", "className", "skeleton", "type", "ariaLabel", "ariaExpanded", "iconName", "iconOnly"] }, { kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7478
7965
  }
7479
7966
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderAction, decorators: [{
7480
7967
  type: Component,
7481
- args: [{ selector: 'ngcc-header-action', standalone: true, imports: [NgccButton], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"iconName()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaExpanded]=\"active()\"\n [className]=\"'cds--header__action' + (active() ? ' cds--header__action--active' : '')\"\n (click)=\"onClick($event)\"\n/>\n", styles: [":host{display:contents}\n"] }]
7482
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], onDocumentClick: [{
7968
+ args: [{ selector: 'ngcc-header-action', standalone: true, imports: [CommonModule, NgccButton, NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<ng-container *ngIf=\"href; else buttonTemplate\">\n <a\n class=\"cds--header__action\"\n [href]=\"href\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-expanded]=\"active ? 'true' : 'false'\"\n (click)=\"onClick($event)\"\n >\n <ngcc-icon [name]=\"iconName ?? 'add'\" [decorative]=\"true\" />\n </a>\n</ng-container>\n<ng-template #buttonTemplate>\n <ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"iconName\"\n [ariaLabel]=\"ariaLabel\"\n [ariaExpanded]=\"active\"\n [className]=\"'cds--header__action' + (active ? ' cds--header__action--active' : '')\"\n (click)=\"onClick($event)\"\n />\n</ng-template>\n", styles: [":host{display:contents}\n"] }]
7969
+ }], propDecorators: { ariaLabel: [{
7970
+ type: Input
7971
+ }], active: [{
7972
+ type: Input
7973
+ }], activeChange: [{
7974
+ type: Output
7975
+ }], href: [{
7976
+ type: Input
7977
+ }], iconName: [{
7978
+ type: Input
7979
+ }], toggleable: [{
7980
+ type: Input
7981
+ }], actionClick: [{
7982
+ type: Output
7983
+ }], linkClick: [{
7984
+ type: Output
7985
+ }], onDocumentClick: [{
7483
7986
  type: HostListener,
7484
7987
  args: ['document:click', ['$event']]
7485
7988
  }], onEscape: [{
@@ -7496,18 +7999,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7496
7999
  * </ngcc-header-panel>
7497
8000
  */
7498
8001
  class NgccHeaderPanel {
7499
- expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
7500
- ariaLabel = input('Panel', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7501
- panelClasses = computed(() => ['cds--header-panel', this.expanded() ? 'cds--header-panel--expanded' : '']
7502
- .filter(Boolean)
7503
- .join(' '), ...(ngDevMode ? [{ debugName: "panelClasses" }] : []));
8002
+ ngOnChanges(changes) {
8003
+ if (changes['expanded'])
8004
+ this._expanded.set(changes['expanded'].currentValue ?? false);
8005
+ if (changes['ariaLabel'])
8006
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? 'Panel');
8007
+ }
8008
+ expanded = false;
8009
+ _expanded = signal(false, ...(ngDevMode ? [{ debugName: "_expanded" }] : []));
8010
+ ariaLabel = 'Panel';
8011
+ _ariaLabel = signal('Panel', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
8012
+ get panelClasses() {
8013
+ return ['cds--header-panel', this._expanded() ? 'cds--header-panel--expanded' : '']
8014
+ .filter(Boolean)
8015
+ .join(' ');
8016
+ }
7504
8017
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
7505
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccHeaderPanel, isStandalone: true, selector: "ngcc-header-panel", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [class]=\"panelClasses()\"\n role=\"complementary\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-hidden]=\"!expanded()\"\n>\n <ng-content />\n</div>\n", styles: [":host{display:block}.cds--header-panel{position:fixed;inset-block-start:var(--cds-spacing-09, 3rem);inset-inline-end:0;z-index:var(--cds-layer-overlay, 8000);block-size:calc(100vh - var(--cds-spacing-09, 3rem));overflow-y:auto;background-color:var(--cds-layer-01, #f4f4f4);color:var(--cds-text-primary, #161616);width:16rem;border-inline-start:1px solid var(--cds-border-subtle-01, #e0e0e0);transform:translate(100%);transition:transform var(--cds-motion-moderate-01, .15s) var(--cds-motion-standard, cubic-bezier(.2, 0, .38, .9))}.cds--header-panel.cds--header-panel--expanded{transform:translate(0)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8018
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccHeaderPanel, isStandalone: true, selector: "ngcc-header-panel", inputs: { expanded: "expanded", ariaLabel: "ariaLabel" }, usesOnChanges: true, ngImport: i0, template: "<div\n [class]=\"panelClasses\"\n role=\"complementary\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-hidden]=\"!expanded\"\n>\n <ng-content />\n</div>\n", styles: [":host{display:block}.cds--header-panel{position:fixed;inset-block-start:var(--cds-spacing-09, 3rem);inset-inline-end:0;z-index:var(--cds-layer-overlay, 8000);block-size:calc(100vh - var(--cds-spacing-09, 3rem));overflow-y:auto;background-color:var(--cds-layer-01, #f4f4f4);color:var(--cds-text-primary, #161616);width:16rem;border-inline-start:1px solid var(--cds-border-subtle-01, #e0e0e0);transform:translate(100%);transition:transform var(--cds-motion-moderate-01, .15s) var(--cds-motion-standard, cubic-bezier(.2, 0, .38, .9))}.cds--header-panel.cds--header-panel--expanded{transform:translate(0)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7506
8019
  }
7507
8020
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderPanel, decorators: [{
7508
8021
  type: Component,
7509
- args: [{ selector: 'ngcc-header-panel', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [class]=\"panelClasses()\"\n role=\"complementary\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-hidden]=\"!expanded()\"\n>\n <ng-content />\n</div>\n", styles: [":host{display:block}.cds--header-panel{position:fixed;inset-block-start:var(--cds-spacing-09, 3rem);inset-inline-end:0;z-index:var(--cds-layer-overlay, 8000);block-size:calc(100vh - var(--cds-spacing-09, 3rem));overflow-y:auto;background-color:var(--cds-layer-01, #f4f4f4);color:var(--cds-text-primary, #161616);width:16rem;border-inline-start:1px solid var(--cds-border-subtle-01, #e0e0e0);transform:translate(100%);transition:transform var(--cds-motion-moderate-01, .15s) var(--cds-motion-standard, cubic-bezier(.2, 0, .38, .9))}.cds--header-panel.cds--header-panel--expanded{transform:translate(0)}\n"] }]
7510
- }], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
8022
+ args: [{ selector: 'ngcc-header-panel', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [class]=\"panelClasses\"\n role=\"complementary\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-hidden]=\"!expanded\"\n>\n <ng-content />\n</div>\n", styles: [":host{display:block}.cds--header-panel{position:fixed;inset-block-start:var(--cds-spacing-09, 3rem);inset-inline-end:0;z-index:var(--cds-layer-overlay, 8000);block-size:calc(100vh - var(--cds-spacing-09, 3rem));overflow-y:auto;background-color:var(--cds-layer-01, #f4f4f4);color:var(--cds-text-primary, #161616);width:16rem;border-inline-start:1px solid var(--cds-border-subtle-01, #e0e0e0);transform:translate(100%);transition:transform var(--cds-motion-moderate-01, .15s) var(--cds-motion-standard, cubic-bezier(.2, 0, .38, .9))}.cds--header-panel.cds--header-panel--expanded{transform:translate(0)}\n"] }]
8023
+ }], propDecorators: { expanded: [{
8024
+ type: Input
8025
+ }], ariaLabel: [{
8026
+ type: Input
8027
+ }] } });
7511
8028
 
7512
8029
  /**
7513
8030
  * Hamburger / close toggle button for side-nav.
@@ -7516,61 +8033,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7516
8033
  * <ngcc-hamburger [(active)]="sideNavOpen" />
7517
8034
  */
7518
8035
  class NgccHamburger {
8036
+ ngOnChanges(changes) {
8037
+ if (changes['label'])
8038
+ this._label.set(changes['label'].currentValue ?? 'Open navigation menu');
8039
+ if (changes['labelClose'])
8040
+ this._labelClose.set(changes['labelClose'].currentValue ?? 'Close navigation menu');
8041
+ if (changes['active']) {
8042
+ this._active.set(changes['active'].currentValue ?? false);
8043
+ }
8044
+ }
7519
8045
  /** Two-way bindable open/close state — use [(active)]="myVar" in parent */
7520
- active = model(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
7521
- label = input('Open navigation menu', ...(ngDevMode ? [{ debugName: "label" }] : []));
7522
- labelClose = input('Close navigation menu', ...(ngDevMode ? [{ debugName: "labelClose" }] : []));
7523
- currentLabel = computed(() => (this.active() ? this.labelClose() : this.label()), ...(ngDevMode ? [{ debugName: "currentLabel" }] : []));
8046
+ active = false;
8047
+ activeChange = new EventEmitter();
8048
+ _active = signal(false, ...(ngDevMode ? [{ debugName: "_active" }] : []));
8049
+ label = 'Open navigation menu';
8050
+ _label = signal('Open navigation menu', ...(ngDevMode ? [{ debugName: "_label" }] : []));
8051
+ labelClose = 'Close navigation menu';
8052
+ _labelClose = signal('Close navigation menu', ...(ngDevMode ? [{ debugName: "_labelClose" }] : []));
8053
+ currentLabel = computed(() => (this._active() ? this._labelClose() : this._label()), ...(ngDevMode ? [{ debugName: "currentLabel" }] : []));
7524
8054
  toggle() {
7525
- this.active.update((v) => !v);
8055
+ this._active.update((v) => !v);
8056
+ this.activeChange.emit(this._active());
7526
8057
  }
7527
8058
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHamburger, deps: [], target: i0.ɵɵFactoryTarget.Component });
7528
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccHamburger, isStandalone: true, selector: "ngcc-hamburger", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelClose: { classPropertyName: "labelClose", publicName: "labelClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n iconName=\"menu\"\n [ariaLabel]=\"currentLabel()\"\n [ariaExpanded]=\"active()\"\n [className]=\"\n 'cds--header__action cds--header__menu-trigger' +\n (active() ? ' cds--header__action--active' : '')\n \"\n (click)=\"toggle()\"\n/>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccButton, selector: "ngcc-button", inputs: ["label", "variant", "size", "disabled", "expressive", "className", "skeleton", "type", "ariaLabel", "ariaExpanded", "iconName", "iconOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8059
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccHamburger, isStandalone: true, selector: "ngcc-hamburger", inputs: { active: "active", label: "label", labelClose: "labelClose" }, outputs: { activeChange: "activeChange" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, ngImport: i0, template: "<ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n iconName=\"menu\"\n [ariaLabel]=\"currentLabel()\"\n [ariaExpanded]=\"active\"\n [className]=\"\n 'cds--header__action cds--header__menu-trigger' + (active ? ' cds--header__action--active' : '')\n \"\n (click)=\"toggle()\"\n/>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccButton, selector: "ngcc-button", inputs: ["label", "variant", "size", "disabled", "expressive", "className", "skeleton", "type", "ariaLabel", "ariaExpanded", "iconName", "iconOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7529
8060
  }
7530
8061
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHamburger, decorators: [{
7531
8062
  type: Component,
7532
- args: [{ selector: 'ngcc-hamburger', standalone: true, imports: [NgccButton], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n iconName=\"menu\"\n [ariaLabel]=\"currentLabel()\"\n [ariaExpanded]=\"active()\"\n [className]=\"\n 'cds--header__action cds--header__menu-trigger' +\n (active() ? ' cds--header__action--active' : '')\n \"\n (click)=\"toggle()\"\n/>\n", styles: [":host{display:contents}\n"] }]
7533
- }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClose", required: false }] }] } });
8063
+ args: [{ selector: 'ngcc-hamburger', standalone: true, imports: [NgccButton], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<ngcc-button\n variant=\"ghost\"\n [iconOnly]=\"true\"\n iconName=\"menu\"\n [ariaLabel]=\"currentLabel()\"\n [ariaExpanded]=\"active\"\n [className]=\"\n 'cds--header__action cds--header__menu-trigger' + (active ? ' cds--header__action--active' : '')\n \"\n (click)=\"toggle()\"\n/>\n", styles: [":host{display:contents}\n"] }]
8064
+ }], propDecorators: { active: [{
8065
+ type: Input
8066
+ }], activeChange: [{
8067
+ type: Output
8068
+ }], label: [{
8069
+ type: Input
8070
+ }], labelClose: [{
8071
+ type: Input
8072
+ }] } });
7534
8073
 
7535
8074
  class NgccBreadcrumbItemComponent {
7536
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
7537
- href = input(...(ngDevMode ? [undefined, { debugName: "href" }] : []));
7538
- routerLink = input(...(ngDevMode ? [undefined, { debugName: "routerLink" }] : []));
7539
- current = input(false, ...(ngDevMode ? [{ debugName: "current" }] : []));
7540
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
7541
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
7542
- target = input(...(ngDevMode ? [undefined, { debugName: "target" }] : []));
7543
- rel = input(...(ngDevMode ? [undefined, { debugName: "rel" }] : []));
8075
+ label = '';
8076
+ href;
8077
+ routerLink;
8078
+ current = false;
8079
+ disabled = false;
8080
+ skeleton = false;
8081
+ target;
8082
+ rel;
7544
8083
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccBreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7545
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccBreadcrumbItemComponent, isStandalone: true, selector: "ngcc-breadcrumb-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cds--breadcrumb-item--disabled": "disabled()" }, classAttribute: "cds--breadcrumb-item" }, ngImport: i0, template: "@if (skeleton()) {\n <span class=\"cds--link\"></span>\n} @else if (current()) {\n <span aria-current=\"page\">{{ label() }}<ng-content /></span>\n} @else if (routerLink()) {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target() ?? null\"\n [attr.rel]=\"rel() ?? null\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n >{{ label() }}<ng-content\n /></a>\n} @else {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled()\"\n [attr.href]=\"disabled() ? null : (href() ?? null)\"\n [attr.target]=\"target() ?? null\"\n [attr.rel]=\"rel() ?? null\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n >{{ label() }}<ng-content\n /></a>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8084
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccBreadcrumbItemComponent, isStandalone: true, selector: "ngcc-breadcrumb-item", inputs: { label: "label", href: "href", routerLink: "routerLink", current: "current", disabled: "disabled", skeleton: "skeleton", target: "target", rel: "rel" }, host: { properties: { "class.cds--breadcrumb-item--disabled": "disabled" }, classAttribute: "cds--breadcrumb-item" }, ngImport: i0, template: "@if (skeleton) {\n <span class=\"cds--link\"></span>\n} @else if (current) {\n <span aria-current=\"page\">{{ label }}<ng-content /></span>\n} @else if (routerLink) {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled\"\n [routerLink]=\"disabled ? null : routerLink\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"rel ?? null\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n >{{ label }}<ng-content\n /></a>\n} @else {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled\"\n [attr.href]=\"disabled ? null : (href ?? null)\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"rel ?? null\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n >{{ label }}<ng-content\n /></a>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7546
8085
  }
7547
8086
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccBreadcrumbItemComponent, decorators: [{
7548
8087
  type: Component,
7549
8088
  args: [{ selector: 'ngcc-breadcrumb-item', standalone: true, imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: {
7550
8089
  class: 'cds--breadcrumb-item',
7551
- '[class.cds--breadcrumb-item--disabled]': 'disabled()',
7552
- }, template: "@if (skeleton()) {\n <span class=\"cds--link\"></span>\n} @else if (current()) {\n <span aria-current=\"page\">{{ label() }}<ng-content /></span>\n} @else if (routerLink()) {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target() ?? null\"\n [attr.rel]=\"rel() ?? null\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n >{{ label() }}<ng-content\n /></a>\n} @else {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled()\"\n [attr.href]=\"disabled() ? null : (href() ?? null)\"\n [attr.target]=\"target() ?? null\"\n [attr.rel]=\"rel() ?? null\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n >{{ label() }}<ng-content\n /></a>\n}\n" }]
7553
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }] } });
8090
+ '[class.cds--breadcrumb-item--disabled]': 'disabled',
8091
+ }, template: "@if (skeleton) {\n <span class=\"cds--link\"></span>\n} @else if (current) {\n <span aria-current=\"page\">{{ label }}<ng-content /></span>\n} @else if (routerLink) {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled\"\n [routerLink]=\"disabled ? null : routerLink\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"rel ?? null\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n >{{ label }}<ng-content\n /></a>\n} @else {\n <a\n class=\"cds--link\"\n [class.cds--link--disabled]=\"disabled\"\n [attr.href]=\"disabled ? null : (href ?? null)\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"rel ?? null\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n >{{ label }}<ng-content\n /></a>\n}\n" }]
8092
+ }], propDecorators: { label: [{
8093
+ type: Input
8094
+ }], href: [{
8095
+ type: Input
8096
+ }], routerLink: [{
8097
+ type: Input
8098
+ }], current: [{
8099
+ type: Input
8100
+ }], disabled: [{
8101
+ type: Input
8102
+ }], skeleton: [{
8103
+ type: Input
8104
+ }], target: [{
8105
+ type: Input
8106
+ }], rel: [{
8107
+ type: Input
8108
+ }] } });
7554
8109
 
7555
8110
  class NgccBreadcrumbComponent {
7556
- items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
7557
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
7558
- noTrailingSlash = input(false, ...(ngDevMode ? [{ debugName: "noTrailingSlash" }] : []));
7559
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
7560
- skeletonCount = input(3, ...(ngDevMode ? [{ debugName: "skeletonCount" }] : []));
7561
- ariaLabel = input('Breadcrumb', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7562
- resolvedItems = computed(() => this.items().map((item, index, arr) => ({
7563
- ...item,
7564
- current: item.current ?? index === arr.length - 1,
7565
- })), ...(ngDevMode ? [{ debugName: "resolvedItems" }] : []));
7566
- skeletonItems = computed(() => Array(this.skeletonCount()).fill(null), ...(ngDevMode ? [{ debugName: "skeletonItems" }] : []));
8111
+ items = [];
8112
+ size = 'md';
8113
+ noTrailingSlash = false;
8114
+ skeleton = false;
8115
+ skeletonCount = 3;
8116
+ ariaLabel = 'Breadcrumb';
8117
+ get resolvedItems() {
8118
+ return this.items.map((item, index, arr) => ({
8119
+ ...item,
8120
+ current: item.current ?? index === arr.length - 1,
8121
+ }));
8122
+ }
8123
+ get skeletonItems() {
8124
+ return Array(this.skeletonCount).fill(null);
8125
+ }
8126
+ trackByIndex(_index) {
8127
+ return _index;
8128
+ }
7567
8129
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7568
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccBreadcrumbComponent, isStandalone: true, selector: "ngcc-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, noTrailingSlash: { classPropertyName: "noTrailingSlash", publicName: "noTrailingSlash", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null }, skeletonCount: { classPropertyName: "skeletonCount", publicName: "skeletonCount", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<nav\n class=\"cds--breadcrumb\"\n [class.cds--breadcrumb--sm]=\"size() === 'sm'\"\n [class.cds--skeleton]=\"skeleton()\"\n [class.cds--breadcrumb--no-trailing-slash]=\"noTrailingSlash()\"\n [attr.aria-label]=\"ariaLabel()\"\n>\n @if (skeleton()) {\n @for (item of skeletonItems(); track $index) {\n <ngcc-breadcrumb-item [skeleton]=\"true\" />\n }\n } @else {\n @for (item of resolvedItems(); track $index) {\n <ngcc-breadcrumb-item\n [label]=\"item.label\"\n [href]=\"item.href\"\n [routerLink]=\"item.routerLink\"\n [current]=\"item.current\"\n [disabled]=\"item.disabled || false\"\n [target]=\"item.target\"\n [rel]=\"item.rel\"\n />\n }\n }\n</nav>\n", styles: [""], dependencies: [{ kind: "component", type: NgccBreadcrumbItemComponent, selector: "ngcc-breadcrumb-item", inputs: ["label", "href", "routerLink", "current", "disabled", "skeleton", "target", "rel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccBreadcrumbComponent, isStandalone: true, selector: "ngcc-breadcrumb", inputs: { items: "items", size: "size", noTrailingSlash: "noTrailingSlash", skeleton: "skeleton", skeletonCount: "skeletonCount", ariaLabel: "ariaLabel" }, ngImport: i0, template: "<nav\n class=\"cds--breadcrumb\"\n [class.cds--breadcrumb--sm]=\"size === 'sm'\"\n [class.cds--skeleton]=\"skeleton\"\n [class.cds--breadcrumb--no-trailing-slash]=\"noTrailingSlash\"\n [attr.aria-label]=\"ariaLabel\"\n>\n @if (skeleton) {\n @for (item of skeletonItems; track $index) {\n <ngcc-breadcrumb-item [skeleton]=\"true\" />\n }\n } @else {\n @for (item of resolvedItems; track $index) {\n <ngcc-breadcrumb-item\n [label]=\"item.label\"\n [href]=\"item.href\"\n [routerLink]=\"item.routerLink\"\n [current]=\"!!item.current\"\n [disabled]=\"item.disabled || false\"\n [target]=\"item.target\"\n [rel]=\"item.rel\"\n />\n }\n }\n</nav>\n", styles: [""], dependencies: [{ kind: "component", type: NgccBreadcrumbItemComponent, selector: "ngcc-breadcrumb-item", inputs: ["label", "href", "routerLink", "current", "disabled", "skeleton", "target", "rel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7569
8131
  }
7570
8132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccBreadcrumbComponent, decorators: [{
7571
8133
  type: Component,
7572
- args: [{ selector: 'ngcc-breadcrumb', standalone: true, imports: [NgccBreadcrumbItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav\n class=\"cds--breadcrumb\"\n [class.cds--breadcrumb--sm]=\"size() === 'sm'\"\n [class.cds--skeleton]=\"skeleton()\"\n [class.cds--breadcrumb--no-trailing-slash]=\"noTrailingSlash()\"\n [attr.aria-label]=\"ariaLabel()\"\n>\n @if (skeleton()) {\n @for (item of skeletonItems(); track $index) {\n <ngcc-breadcrumb-item [skeleton]=\"true\" />\n }\n } @else {\n @for (item of resolvedItems(); track $index) {\n <ngcc-breadcrumb-item\n [label]=\"item.label\"\n [href]=\"item.href\"\n [routerLink]=\"item.routerLink\"\n [current]=\"item.current\"\n [disabled]=\"item.disabled || false\"\n [target]=\"item.target\"\n [rel]=\"item.rel\"\n />\n }\n }\n</nav>\n" }]
7573
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], noTrailingSlash: [{ type: i0.Input, args: [{ isSignal: true, alias: "noTrailingSlash", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], skeletonCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonCount", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
8134
+ args: [{ selector: 'ngcc-breadcrumb', standalone: true, imports: [NgccBreadcrumbItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav\n class=\"cds--breadcrumb\"\n [class.cds--breadcrumb--sm]=\"size === 'sm'\"\n [class.cds--skeleton]=\"skeleton\"\n [class.cds--breadcrumb--no-trailing-slash]=\"noTrailingSlash\"\n [attr.aria-label]=\"ariaLabel\"\n>\n @if (skeleton) {\n @for (item of skeletonItems; track $index) {\n <ngcc-breadcrumb-item [skeleton]=\"true\" />\n }\n } @else {\n @for (item of resolvedItems; track $index) {\n <ngcc-breadcrumb-item\n [label]=\"item.label\"\n [href]=\"item.href\"\n [routerLink]=\"item.routerLink\"\n [current]=\"!!item.current\"\n [disabled]=\"item.disabled || false\"\n [target]=\"item.target\"\n [rel]=\"item.rel\"\n />\n }\n }\n</nav>\n" }]
8135
+ }], propDecorators: { items: [{
8136
+ type: Input
8137
+ }], size: [{
8138
+ type: Input
8139
+ }], noTrailingSlash: [{
8140
+ type: Input
8141
+ }], skeleton: [{
8142
+ type: Input
8143
+ }], skeletonCount: [{
8144
+ type: Input
8145
+ }], ariaLabel: [{
8146
+ type: Input
8147
+ }] } });
7574
8148
 
7575
8149
  /** Injection token for the side-nav context. */
7576
8150
  const NGCC_SIDE_NAV_CONTEXT = new InjectionToken('NgccSideNavContext');
@@ -7592,22 +8166,40 @@ const NGCC_SIDE_NAV_CONTEXT = new InjectionToken('NgccSideNavContext');
7592
8166
  */
7593
8167
  class NgccSideNavMenuItem {
7594
8168
  /** Navigation URL */
7595
- href = input('#', ...(ngDevMode ? [{ debugName: "href" }] : []));
8169
+ href = '#';
8170
+ /** Angular Router route target. When provided, it takes precedence over href. */
8171
+ routerLink = null;
7596
8172
  /** Marks this link as the active / current page */
7597
- active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
8173
+ active = false;
7598
8174
  /** Optional title attribute for the anchor */
7599
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
7600
- itemClick = output();
8175
+ title = '';
8176
+ itemClick = new EventEmitter();
8177
+ linkHref = () => {
8178
+ if (this.routerLink) {
8179
+ return Array.isArray(this.routerLink) ? this.routerLink.join('/') : this.routerLink;
8180
+ }
8181
+ return this.href ?? '#';
8182
+ };
7601
8183
  onClick(event) {
7602
8184
  this.itemClick.emit(event);
7603
8185
  }
7604
8186
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
7605
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccSideNavMenuItem, isStandalone: true, selector: "ngcc-side-nav-menu-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<li class=\"cds--side-nav__menu-item\">\n <a\n [class]=\"active() ? 'cds--side-nav__link cds--side-nav__link--current' : 'cds--side-nav__link'\"\n [href]=\"href()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.title]=\"title() || null\"\n (click)=\"onClick($event)\"\n >\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8187
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccSideNavMenuItem, isStandalone: true, selector: "ngcc-side-nav-menu-item", inputs: { href: "href", routerLink: "routerLink", active: "active", title: "title" }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<li class=\"cds--side-nav__menu-item\">\n <a\n [class]=\"active ? 'cds--side-nav__link cds--side-nav__link--current' : 'cds--side-nav__link'\"\n [href]=\"routerLink ? null : href\"\n [routerLink]=\"routerLink ? linkHref() : null\"\n [attr.aria-current]=\"active ? 'page' : null\"\n [attr.title]=\"title || null\"\n (click)=\"onClick($event)\"\n >\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7606
8188
  }
7607
8189
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavMenuItem, decorators: [{
7608
8190
  type: Component,
7609
- args: [{ selector: 'ngcc-side-nav-menu-item', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li class=\"cds--side-nav__menu-item\">\n <a\n [class]=\"active() ? 'cds--side-nav__link cds--side-nav__link--current' : 'cds--side-nav__link'\"\n [href]=\"href()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.title]=\"title() || null\"\n (click)=\"onClick($event)\"\n >\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"] }]
7610
- }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
8191
+ args: [{ selector: 'ngcc-side-nav-menu-item', standalone: true, imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li class=\"cds--side-nav__menu-item\">\n <a\n [class]=\"active ? 'cds--side-nav__link cds--side-nav__link--current' : 'cds--side-nav__link'\"\n [href]=\"routerLink ? null : href\"\n [routerLink]=\"routerLink ? linkHref() : null\"\n [attr.aria-current]=\"active ? 'page' : null\"\n [attr.title]=\"title || null\"\n (click)=\"onClick($event)\"\n >\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"] }]
8192
+ }], propDecorators: { href: [{
8193
+ type: Input
8194
+ }], routerLink: [{
8195
+ type: Input
8196
+ }], active: [{
8197
+ type: Input
8198
+ }], title: [{
8199
+ type: Input
8200
+ }], itemClick: [{
8201
+ type: Output
8202
+ }] } });
7611
8203
 
7612
8204
  /**
7613
8205
  * A collapsible submenu inside <ngcc-side-nav>.
@@ -7640,24 +8232,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7640
8232
  */
7641
8233
  class NgccSideNavMenu {
7642
8234
  /** Title displayed on the submenu trigger button */
7643
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
8235
+ title = '';
7644
8236
  /**
7645
8237
  * Two-way bindable expanded/collapsed state.
7646
8238
  * Use `[(expanded)]="myVar"` in the parent for controlled behaviour.
7647
8239
  */
7648
- expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
8240
+ expanded = false;
8241
+ expandedChange = new EventEmitter();
7649
8242
  /** Optional icon placed before the title */
7650
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
8243
+ iconName;
7651
8244
  /**
7652
- * Signal-based content children query (Angular v17.2+).
7653
- * Automatically tracks projected <ngcc-side-nav-menu-item> instances.
8245
+ * Content children query: tracks projected <ngcc-side-nav-menu-item> instances.
7654
8246
  */
7655
- menuItems = contentChildren(NgccSideNavMenuItem, ...(ngDevMode ? [{ debugName: "menuItems" }] : []));
8247
+ menuItems;
7656
8248
  /**
7657
8249
  * True when any projected menu item has `[active]="true"`.
7658
8250
  * Applied as `cds--side-nav__item--active` on the wrapper <li>.
7659
8251
  */
7660
- hasActiveChild = computed(() => this.menuItems().some((item) => item.active()), ...(ngDevMode ? [{ debugName: "hasActiveChild" }] : []));
8252
+ get hasActiveChild() {
8253
+ return this.menuItems?.some((item) => !!item.active) ?? false;
8254
+ }
7661
8255
  /**
7662
8256
  * Optional reference to the parent NgccSideNav provided via NGCC_SIDE_NAV_CONTEXT.
7663
8257
  * `null` when this menu is used outside of a <ngcc-side-nav> (safe-guard).
@@ -7667,18 +8261,30 @@ class NgccSideNavMenu {
7667
8261
  // Rail mode: the nav is collapsed to icon-only width.
7668
8262
  // Sub-items can't be seen in that state — expand the sidenav first so the
7669
8263
  // user can read the full menu before we open/close the submenu.
7670
- if (this._nav?.rail()) {
8264
+ if (this._nav?.rail) {
7671
8265
  this._nav.expand();
7672
8266
  }
7673
- this.expanded.update((v) => !v);
8267
+ this.expanded = !this.expanded;
8268
+ this.expandedChange.emit(this.expanded);
7674
8269
  }
7675
8270
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
7676
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNavMenu, isStandalone: true, selector: "ngcc-side-nav-menu", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { attributes: { "role": "none" } }, queries: [{ propertyName: "menuItems", predicate: NgccSideNavMenuItem, isSignal: true }], ngImport: i0, template: "<li\n class=\"cds--side-nav__item cds--side-nav__item--icon\"\n [class.cds--side-nav__item--active]=\"hasActiveChild()\"\n>\n <!-- Submenu trigger button -->\n <button\n class=\"cds--side-nav__submenu\"\n type=\"button\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\"\n >\n @if (iconName()) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName()!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n\n <span class=\"cds--side-nav__submenu-title\">{{ title() }}</span>\n\n <!-- Chevron rotates via Carbon CSS when aria-expanded=\"true\" -->\n <div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n <ngcc-icon name=\"chevron_down\" [decorative]=\"true\" size=\"md\" />\n </div>\n </button>\n\n <!-- Submenu item list \u2014 shown/hidden by Carbon CSS via aria-expanded -->\n <ul class=\"cds--side-nav__menu\" role=\"list\">\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8271
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNavMenu, isStandalone: true, selector: "ngcc-side-nav-menu", inputs: { title: "title", expanded: "expanded", iconName: "iconName" }, outputs: { expandedChange: "expandedChange" }, host: { attributes: { "role": "none" } }, queries: [{ propertyName: "menuItems", predicate: NgccSideNavMenuItem }], ngImport: i0, template: "<li\n class=\"cds--side-nav__item cds--side-nav__item--icon\"\n [class.cds--side-nav__item--active]=\"hasActiveChild\"\n>\n <!-- Submenu trigger button -->\n <button\n class=\"cds--side-nav__submenu\"\n type=\"button\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"toggle()\"\n >\n @if (iconName) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n\n <span class=\"cds--side-nav__submenu-title\">{{ title }}</span>\n\n <!-- Chevron rotates via Carbon CSS when aria-expanded=\"true\" -->\n <div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n <ngcc-icon name=\"chevron_down\" [decorative]=\"true\" size=\"md\" />\n </div>\n </button>\n\n <!-- Submenu item list \u2014 shown/hidden by Carbon CSS via aria-expanded -->\n <ul class=\"cds--side-nav__menu\" role=\"list\">\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7677
8272
  }
7678
8273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavMenu, decorators: [{
7679
8274
  type: Component,
7680
- args: [{ selector: 'ngcc-side-nav-menu', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li\n class=\"cds--side-nav__item cds--side-nav__item--icon\"\n [class.cds--side-nav__item--active]=\"hasActiveChild()\"\n>\n <!-- Submenu trigger button -->\n <button\n class=\"cds--side-nav__submenu\"\n type=\"button\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\"\n >\n @if (iconName()) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName()!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n\n <span class=\"cds--side-nav__submenu-title\">{{ title() }}</span>\n\n <!-- Chevron rotates via Carbon CSS when aria-expanded=\"true\" -->\n <div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n <ngcc-icon name=\"chevron_down\" [decorative]=\"true\" size=\"md\" />\n </div>\n </button>\n\n <!-- Submenu item list \u2014 shown/hidden by Carbon CSS via aria-expanded -->\n <ul class=\"cds--side-nav__menu\" role=\"list\">\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"] }]
7681
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], menuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgccSideNavMenuItem), { isSignal: true }] }] } });
8275
+ args: [{ selector: 'ngcc-side-nav-menu', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li\n class=\"cds--side-nav__item cds--side-nav__item--icon\"\n [class.cds--side-nav__item--active]=\"hasActiveChild\"\n>\n <!-- Submenu trigger button -->\n <button\n class=\"cds--side-nav__submenu\"\n type=\"button\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"toggle()\"\n >\n @if (iconName) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n\n <span class=\"cds--side-nav__submenu-title\">{{ title }}</span>\n\n <!-- Chevron rotates via Carbon CSS when aria-expanded=\"true\" -->\n <div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n <ngcc-icon name=\"chevron_down\" [decorative]=\"true\" size=\"md\" />\n </div>\n </button>\n\n <!-- Submenu item list \u2014 shown/hidden by Carbon CSS via aria-expanded -->\n <ul class=\"cds--side-nav__menu\" role=\"list\">\n <ng-content />\n </ul>\n</li>\n", styles: [":host{display:contents}\n"] }]
8276
+ }], propDecorators: { title: [{
8277
+ type: Input
8278
+ }], expanded: [{
8279
+ type: Input
8280
+ }], expandedChange: [{
8281
+ type: Output
8282
+ }], iconName: [{
8283
+ type: Input
8284
+ }], menuItems: [{
8285
+ type: ContentChildren,
8286
+ args: [NgccSideNavMenuItem]
8287
+ }] } });
7682
8288
 
7683
8289
  /**
7684
8290
  * Enterprise-grade Carbon Design System side navigation shell.
@@ -7711,73 +8317,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7711
8317
  */
7712
8318
  class NgccSideNav {
7713
8319
  /** Accessible label for the <nav> landmark. */
7714
- ariaLabel = input('Side navigation', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
8320
+ ariaLabel = 'Side navigation';
7715
8321
  /**
7716
8322
  * Two-way bindable expanded/collapsed state.
7717
8323
  * Use `[(expanded)]="sideNavOpen"` in the parent.
7718
8324
  * Defaults to `true` (expanded).
7719
8325
  */
7720
- expanded = model(true, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
8326
+ expanded = true;
8327
+ expandedChange = new EventEmitter();
7721
8328
  /** When `true`, hides the side-nav entirely (e.g. on mobile). */
7722
- hidden = input(false, ...(ngDevMode ? [{ debugName: "hidden" }] : []));
8329
+ hidden = false;
7723
8330
  /**
7724
8331
  * Rail mode: shows only icons when the nav is collapsed.
7725
8332
  * Requires icons on all items/menus for a good visual.
7726
8333
  */
7727
- rail = input(false, ...(ngDevMode ? [{ debugName: "rail" }] : []));
8334
+ rail = false;
7728
8335
  /**
7729
8336
  * When `true`, renders an expand/collapse toggle button in the side-nav footer.
7730
8337
  * Use with `[(expanded)]` for controlled expand/collapse behaviour.
7731
8338
  */
7732
- allowExpansion = input(false, ...(ngDevMode ? [{ debugName: "allowExpansion" }] : []));
8339
+ allowExpansion = false;
7733
8340
  /** Label shown on the expand toggle when collapsed. */
7734
- openLabel = input('Open navigation menu', ...(ngDevMode ? [{ debugName: "openLabel" }] : []));
8341
+ openLabel = 'Open navigation menu';
7735
8342
  /** Label shown on the collapse toggle when expanded. */
7736
- closeLabel = input('Close navigation menu', ...(ngDevMode ? [{ debugName: "closeLabel" }] : []));
8343
+ closeLabel = 'Close navigation menu';
7737
8344
  /**
7738
8345
  * All projected <ngcc-side-nav-menu> instances (direct + nested).
7739
8346
  * Used to auto-close open submenus when the nav collapses or enters rail mode.
7740
8347
  */
7741
- menus = contentChildren(NgccSideNavMenu, ...(ngDevMode ? [{ debugName: "menus", descendants: true }] : [{ descendants: true }]));
7742
- constructor() {
7743
- // Track previous rail state so we can detect TRANSITIONS rather than reacting
7744
- // to the current value on every change — this lets NgccSideNavMenu expand the
7745
- // nav while in rail mode without immediately closing the menu it just opened.
7746
- let prevRail = false;
7747
- effect(() => {
7748
- const expanded = this.expanded();
7749
- const rail = this.rail();
7750
- // Close all open submenus when:
7751
- // 1. The nav collapses (expanded → false)
7752
- // 2. The nav enters rail mode for the first time (rail false → true)
7753
- // But NOT when: already in rail and the nav re-expands because a submenu was clicked
7754
- if (!expanded || (rail && !prevRail)) {
7755
- this.menus().forEach((menu) => menu.expanded.set(false));
7756
- }
7757
- prevRail = rail;
7758
- });
8348
+ menus;
8349
+ prevRail = false;
8350
+ ngOnChanges(changes) {
8351
+ // Close all open submenus when:
8352
+ // 1. The nav collapses (expanded → false)
8353
+ // 2. The nav enters rail mode for the first time (rail false → true)
8354
+ if (changes['expanded'] && changes['expanded'].currentValue === false) {
8355
+ this.closeAllMenus();
8356
+ }
8357
+ if (changes['rail']) {
8358
+ const newRail = !!changes['rail'].currentValue;
8359
+ if (newRail && !this.prevRail)
8360
+ this.closeAllMenus();
8361
+ this.prevRail = newRail;
8362
+ }
8363
+ }
8364
+ // Ensure we have an initial prevRail value after content init
8365
+ ngAfterContentInit() {
8366
+ this.prevRail = this.rail;
8367
+ }
8368
+ closeAllMenus() {
8369
+ this.menus?.forEach((menu) => (menu.expanded = false));
7759
8370
  }
7760
8371
  // ── NgccSideNavContext implementation ───────────────────────────────────────
7761
8372
  /** Expands the side nav — called by NgccSideNavMenu when clicked in rail mode. */
7762
8373
  expand() {
7763
- this.expanded.set(true);
8374
+ this.setExpanded(true);
7764
8375
  }
7765
8376
  // ── Public helpers ──────────────────────────────────────────────────────────
7766
8377
  toggle() {
7767
- this.expanded.update((v) => !v);
8378
+ this.setExpanded(!this.expanded);
8379
+ }
8380
+ setExpanded(value) {
8381
+ if (this.expanded === value)
8382
+ return;
8383
+ this.expanded = value;
8384
+ this.expandedChange.emit(value);
8385
+ if (!value)
8386
+ this.closeAllMenus();
7768
8387
  }
7769
8388
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
7770
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNav, isStandalone: true, selector: "ngcc-side-nav", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, rail: { classPropertyName: "rail", publicName: "rail", isSignal: true, isRequired: false, transformFunction: null }, allowExpansion: { classPropertyName: "allowExpansion", publicName: "allowExpansion", isSignal: true, isRequired: false, transformFunction: null }, openLabel: { classPropertyName: "openLabel", publicName: "openLabel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "class.cds--side-nav--expanded": "expanded()", "class.cds--side-nav--hidden": "hidden()", "class.cds--side-nav--rail": "rail()" }, classAttribute: "cds--side-nav" }, providers: [{ provide: NGCC_SIDE_NAV_CONTEXT, useExisting: NgccSideNav }], queries: [{ propertyName: "menus", predicate: NgccSideNavMenu, descendants: true, isSignal: true }], ngImport: i0, template: "<nav class=\"cds--side-nav__navigation\" [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"cds--side-nav__items\">\n <ng-content />\n </ul>\n\n @if (allowExpansion()) {\n <footer class=\"cds--side-nav__footer\">\n <ngcc-button\n class=\"cds--side-nav__toggle\"\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"expanded() ? 'chevron_left' : 'chevron_right'\"\n (click)=\"toggle()\"\n />\n </footer>\n }\n</nav>\n", styles: [""], dependencies: [{ kind: "component", type: NgccButton, selector: "ngcc-button", inputs: ["label", "variant", "size", "disabled", "expressive", "className", "skeleton", "type", "ariaLabel", "ariaExpanded", "iconName", "iconOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8389
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNav, isStandalone: true, selector: "ngcc-side-nav", inputs: { ariaLabel: "ariaLabel", expanded: "expanded", hidden: "hidden", rail: "rail", allowExpansion: "allowExpansion", openLabel: "openLabel", closeLabel: "closeLabel" }, outputs: { expandedChange: "expandedChange" }, host: { properties: { "class.cds--side-nav--expanded": "expanded", "class.cds--side-nav--hidden": "hidden", "class.cds--side-nav--rail": "rail" }, classAttribute: "cds--side-nav" }, providers: [{ provide: NGCC_SIDE_NAV_CONTEXT, useExisting: NgccSideNav }], queries: [{ propertyName: "menus", predicate: NgccSideNavMenu, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<nav class=\"cds--side-nav__navigation\" [attr.aria-label]=\"ariaLabel\">\n <ul class=\"cds--side-nav__items\">\n <ng-content />\n </ul>\n\n @if (allowExpansion) {\n <footer class=\"cds--side-nav__footer\">\n <ngcc-button\n class=\"cds--side-nav__toggle\"\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"expanded ? 'chevron_left' : 'chevron_right'\"\n (click)=\"toggle()\"\n />\n </footer>\n }\n</nav>\n", styles: [""], dependencies: [{ kind: "component", type: NgccButton, selector: "ngcc-button", inputs: ["label", "variant", "size", "disabled", "expressive", "className", "skeleton", "type", "ariaLabel", "ariaExpanded", "iconName", "iconOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7771
8390
  }
7772
8391
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNav, decorators: [{
7773
8392
  type: Component,
7774
8393
  args: [{ selector: 'ngcc-side-nav', standalone: true, imports: [NgccButton], changeDetection: ChangeDetectionStrategy.OnPush, host: {
7775
8394
  class: 'cds--side-nav',
7776
- '[class.cds--side-nav--expanded]': 'expanded()',
7777
- '[class.cds--side-nav--hidden]': 'hidden()',
7778
- '[class.cds--side-nav--rail]': 'rail()',
7779
- }, providers: [{ provide: NGCC_SIDE_NAV_CONTEXT, useExisting: NgccSideNav }], template: "<nav class=\"cds--side-nav__navigation\" [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"cds--side-nav__items\">\n <ng-content />\n </ul>\n\n @if (allowExpansion()) {\n <footer class=\"cds--side-nav__footer\">\n <ngcc-button\n class=\"cds--side-nav__toggle\"\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"expanded() ? 'chevron_left' : 'chevron_right'\"\n (click)=\"toggle()\"\n />\n </footer>\n }\n</nav>\n" }]
7780
- }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], rail: [{ type: i0.Input, args: [{ isSignal: true, alias: "rail", required: false }] }], allowExpansion: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowExpansion", required: false }] }], openLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openLabel", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], menus: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgccSideNavMenu), { ...{ descendants: true }, isSignal: true }] }] } });
8395
+ '[class.cds--side-nav--expanded]': 'expanded',
8396
+ '[class.cds--side-nav--hidden]': 'hidden',
8397
+ '[class.cds--side-nav--rail]': 'rail',
8398
+ }, providers: [{ provide: NGCC_SIDE_NAV_CONTEXT, useExisting: NgccSideNav }], template: "<nav class=\"cds--side-nav__navigation\" [attr.aria-label]=\"ariaLabel\">\n <ul class=\"cds--side-nav__items\">\n <ng-content />\n </ul>\n\n @if (allowExpansion) {\n <footer class=\"cds--side-nav__footer\">\n <ngcc-button\n class=\"cds--side-nav__toggle\"\n variant=\"ghost\"\n [iconOnly]=\"true\"\n [iconName]=\"expanded ? 'chevron_left' : 'chevron_right'\"\n (click)=\"toggle()\"\n />\n </footer>\n }\n</nav>\n" }]
8399
+ }], propDecorators: { ariaLabel: [{
8400
+ type: Input
8401
+ }], expanded: [{
8402
+ type: Input
8403
+ }], expandedChange: [{
8404
+ type: Output
8405
+ }], hidden: [{
8406
+ type: Input
8407
+ }], rail: [{
8408
+ type: Input
8409
+ }], allowExpansion: [{
8410
+ type: Input
8411
+ }], openLabel: [{
8412
+ type: Input
8413
+ }], closeLabel: [{
8414
+ type: Input
8415
+ }], menus: [{
8416
+ type: ContentChildren,
8417
+ args: [NgccSideNavMenu, { descendants: true }]
8418
+ }] } });
7781
8419
 
7782
8420
  /**
7783
8421
  * A single navigable link inside <ngcc-side-nav>.
@@ -7797,28 +8435,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7797
8435
  */
7798
8436
  class NgccSideNavItem {
7799
8437
  /** Navigation URL */
7800
- href = input('#', ...(ngDevMode ? [{ debugName: "href" }] : []));
8438
+ href = '#';
8439
+ /** Angular Router route target. When provided, it takes precedence over href. */
8440
+ routerLink = null;
7801
8441
  /** Marks this link as the active / current page */
7802
- active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
8442
+ active = false;
7803
8443
  /** Optional title attribute for the anchor */
7804
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
8444
+ title = '';
7805
8445
  /** Optional icon placed before the link text */
7806
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
7807
- itemClick = output();
7808
- itemClasses = computed(() => ['cds--side-nav__item'].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "itemClasses" }] : []));
7809
- linkClasses = computed(() => ['cds--side-nav__link', this.active() ? 'cds--side-nav__link--current' : '']
7810
- .filter(Boolean)
7811
- .join(' '), ...(ngDevMode ? [{ debugName: "linkClasses" }] : []));
8446
+ iconName = undefined;
8447
+ itemClick = new EventEmitter();
8448
+ itemClasses = computed(() => 'cds--side-nav__item', ...(ngDevMode ? [{ debugName: "itemClasses" }] : []));
8449
+ linkClasses = computed(() => {
8450
+ const isCurrent = this.active || false;
8451
+ return ['cds--side-nav__link', isCurrent ? 'cds--side-nav__link--current' : '']
8452
+ .filter(Boolean)
8453
+ .join(' ');
8454
+ }, ...(ngDevMode ? [{ debugName: "linkClasses" }] : []));
8455
+ linkHref = computed(() => {
8456
+ if (this.routerLink) {
8457
+ return Array.isArray(this.routerLink) ? this.routerLink.join('/') : this.routerLink;
8458
+ }
8459
+ return this.href ?? '#';
8460
+ }, ...(ngDevMode ? [{ debugName: "linkHref" }] : []));
7812
8461
  onClick(event) {
7813
8462
  this.itemClick.emit(event);
7814
8463
  }
7815
8464
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
7816
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNavItem, isStandalone: true, selector: "ngcc-side-nav-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<li [class]=\"itemClasses()\">\n <a\n [class]=\"linkClasses()\"\n [href]=\"href()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.title]=\"title() || null\"\n (click)=\"onClick($event)\"\n >\n @if (iconName()) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName()!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8465
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNavItem, isStandalone: true, selector: "ngcc-side-nav-item", inputs: { href: "href", routerLink: "routerLink", active: "active", title: "title", iconName: "iconName" }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: "<li [class]=\"itemClasses()\">\n <a\n [class]=\"linkClasses()\"\n [href]=\"routerLink ? null : linkHref()\"\n [routerLink]=\"routerLink ? linkHref() : null\"\n [routerLinkActive]=\"\n routerLink ? 'cds--side-nav__link--current' : 'cds--side-nav__link--current'\n \"\n [routerLinkActiveOptions]=\"{ exact: false }\"\n [attr.aria-current]=\"active ? 'page' : null\"\n [attr.title]=\"title || null\"\n (click)=\"onClick($event)\"\n >\n @if (iconName) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7817
8466
  }
7818
8467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavItem, decorators: [{
7819
8468
  type: Component,
7820
- args: [{ selector: 'ngcc-side-nav-item', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li [class]=\"itemClasses()\">\n <a\n [class]=\"linkClasses()\"\n [href]=\"href()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.title]=\"title() || null\"\n (click)=\"onClick($event)\"\n >\n @if (iconName()) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName()!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"] }]
7821
- }], propDecorators: { href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
8469
+ args: [{ selector: 'ngcc-side-nav-item', standalone: true, imports: [NgccIcon, RouterLink, RouterLinkActive], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, template: "<li [class]=\"itemClasses()\">\n <a\n [class]=\"linkClasses()\"\n [href]=\"routerLink ? null : linkHref()\"\n [routerLink]=\"routerLink ? linkHref() : null\"\n [routerLinkActive]=\"\n routerLink ? 'cds--side-nav__link--current' : 'cds--side-nav__link--current'\n \"\n [routerLinkActiveOptions]=\"{ exact: false }\"\n [attr.aria-current]=\"active ? 'page' : null\"\n [attr.title]=\"title || null\"\n (click)=\"onClick($event)\"\n >\n @if (iconName) {\n <div class=\"cds--side-nav__icon\">\n <ngcc-icon [name]=\"iconName!\" [decorative]=\"true\" size=\"md\" />\n </div>\n }\n <span class=\"cds--side-nav__link-text\">\n <ng-content />\n </span>\n </a>\n</li>\n", styles: [":host{display:contents}\n"] }]
8470
+ }], propDecorators: { href: [{
8471
+ type: Input
8472
+ }], routerLink: [{
8473
+ type: Input
8474
+ }], active: [{
8475
+ type: Input
8476
+ }], title: [{
8477
+ type: Input
8478
+ }], iconName: [{
8479
+ type: Input
8480
+ }], itemClick: [{
8481
+ type: Output
8482
+ }] } });
7822
8483
 
7823
8484
  /**
7824
8485
  * A visual separator between groups of <ngcc-side-nav-item> / <ngcc-side-nav-menu> elements.
@@ -7839,96 +8500,103 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7839
8500
  args: [{ selector: 'ngcc-side-nav-divider', standalone: true, imports: [], template: '<li class="cds--side-nav__divider" role="separator" aria-hidden="true"></li>', changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, styles: [":host{display:contents}\n"] }]
7840
8501
  }] });
7841
8502
 
8503
+ /**
8504
+ * A simple labeled section within <ngcc-side-nav>.
8505
+ *
8506
+ * This is used for admin shell groupings like "BSS" / "OSS" where a divider is not enough,
8507
+ * but a labeled heading helps users understand the grouping.
8508
+ */
8509
+ class NgccSideNavSection {
8510
+ label = '';
8511
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
8512
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccSideNavSection, isStandalone: true, selector: "ngcc-side-nav-section", inputs: { label: "label" }, host: { attributes: { "role": "none" } }, ngImport: i0, template: `
8513
+ <li class="cds--side-nav__section" role="presentation">
8514
+ <span class="cds--side-nav__section-title">{{ label }}</span>
8515
+ </li>
8516
+ `, isInline: true, styles: [":host{display:contents}\n", ".cds--side-nav__section{display:flex;align-items:center;min-height:2rem;padding:.5rem 1rem .25rem}\n", ".cds--side-nav__section-title{color:var(--cds-text-secondary, #525252);font-size:.625rem;font-weight:600;letter-spacing:.08em;line-height:1.25rem;text-transform:uppercase}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8517
+ }
8518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavSection, decorators: [{
8519
+ type: Component,
8520
+ args: [{ selector: 'ngcc-side-nav-section', standalone: true, template: `
8521
+ <li class="cds--side-nav__section" role="presentation">
8522
+ <span class="cds--side-nav__section-title">{{ label }}</span>
8523
+ </li>
8524
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'none' }, styles: [":host{display:contents}\n", ".cds--side-nav__section{display:flex;align-items:center;min-height:2rem;padding:.5rem 1rem .25rem}\n", ".cds--side-nav__section-title{color:var(--cds-text-secondary, #525252);font-size:.625rem;font-weight:600;letter-spacing:.08em;line-height:1.25rem;text-transform:uppercase}\n"] }]
8525
+ }], propDecorators: { label: [{
8526
+ type: Input
8527
+ }] } });
8528
+
7842
8529
  /** Line height for code-01 typography token (1.5rem per row). */
7843
8530
  const CODE_LINE_HEIGHT_REM = 1.5;
7844
8531
  class NgccCodeSnippetComponent {
7845
8532
  /** Display variant. */
7846
- type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : []));
8533
+ type = 'single';
7847
8534
  /** The code string to display and copy. */
7848
- code = input('', ...(ngDevMode ? [{ debugName: "code" }] : []));
8535
+ code = '';
7849
8536
  /** Disables all interaction (copy, expand). */
7850
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
8537
+ disabled = false;
7851
8538
  /** Hides the copy button. */
7852
- hideCopyButton = input(false, ...(ngDevMode ? [{ debugName: "hideCopyButton" }] : []));
8539
+ hideCopyButton = false;
7853
8540
  /** Enables text wrapping in the multi-line variant. */
7854
- wrapText = input(false, ...(ngDevMode ? [{ debugName: "wrapText" }] : []));
8541
+ wrapText = false;
7855
8542
  /** Applies the light theme background. */
7856
- light = input(false, ...(ngDevMode ? [{ debugName: "light" }] : []));
8543
+ light = false;
7857
8544
  /** Shows skeleton loading placeholders instead of content. */
7858
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
8545
+ skeleton = false;
7859
8546
  /** Text shown in the copy-feedback tooltip after a successful copy. */
7860
- feedback = input('Copied!', ...(ngDevMode ? [{ debugName: "feedback" }] : []));
8547
+ feedback = 'Copied!';
7861
8548
  /** Duration in ms before the copy feedback tooltip disappears. */
7862
- feedbackTimeout = input(2000, ...(ngDevMode ? [{ debugName: "feedbackTimeout" }] : []));
8549
+ feedbackTimeout = 2000;
7863
8550
  /** Label for the "Show more" expand button (multi-line). */
7864
- showMoreText = input('Show more', ...(ngDevMode ? [{ debugName: "showMoreText" }] : []));
8551
+ showMoreText = 'Show more';
7865
8552
  /** Label for the "Show less" collapse button (multi-line). */
7866
- showLessText = input('Show less', ...(ngDevMode ? [{ debugName: "showLessText" }] : []));
8553
+ showLessText = 'Show less';
7867
8554
  /** Aria-label for the copy button. */
7868
- copyButtonDescription = input('Copy to clipboard', ...(ngDevMode ? [{ debugName: "copyButtonDescription" }] : []));
8555
+ copyButtonDescription = 'Copy to clipboard';
7869
8556
  /** Aria-label for the scrollable code container (single / multi). */
7870
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
8557
+ ariaLabel = '';
7871
8558
  /**
7872
8559
  * Maximum number of visible rows in the collapsed multi-line state.
7873
8560
  * Set to 0 for unlimited height (no expand button shown).
7874
8561
  */
7875
- maxCollapsedNumberOfRows = input(15, ...(ngDevMode ? [{ debugName: "maxCollapsedNumberOfRows" }] : []));
8562
+ maxCollapsedNumberOfRows = 15;
7876
8563
  /**
7877
8564
  * Maximum number of visible rows in the expanded multi-line state.
7878
8565
  * Set to 0 for unlimited height.
7879
8566
  */
7880
- maxExpandedNumberOfRows = input(0, ...(ngDevMode ? [{ debugName: "maxExpandedNumberOfRows" }] : []));
8567
+ maxExpandedNumberOfRows = 0;
7881
8568
  /** Internal expand state for the multi-line variant. */
7882
8569
  isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
7883
8570
  /** True while the copy-feedback tooltip is animating. */
7884
8571
  isCopying = signal(false, ...(ngDevMode ? [{ debugName: "isCopying" }] : []));
7885
- /**
7886
- * Whether the multi-line code block needs an expand/collapse button.
7887
- * Derived from line count vs maxCollapsedNumberOfRows.
7888
- */
7889
- needsExpansion = computed(() => {
7890
- const max = this.maxCollapsedNumberOfRows();
7891
- if (this.type() !== 'multi' || max <= 0)
8572
+ /** Whether the multi-line code block needs an expand/collapse button. */
8573
+ get needsExpansion() {
8574
+ const max = this.maxCollapsedNumberOfRows;
8575
+ if (this.type !== 'multi' || max <= 0)
7892
8576
  return false;
7893
- return this.code().split('\n').length > max;
7894
- }, ...(ngDevMode ? [{ debugName: "needsExpansion" }] : []));
7895
- /**
7896
- * Inline style max-height applied to the multi-line container
7897
- * to clamp visible rows. Drives the CSS transition.
7898
- */
7899
- containerMaxHeight = computed(() => {
7900
- if (this.type() !== 'multi')
8577
+ return this.code.split('\n').length > max;
8578
+ }
8579
+ /** Inline style max-height applied to the multi-line container to clamp visible rows. */
8580
+ get containerMaxHeight() {
8581
+ if (this.type !== 'multi')
7901
8582
  return null;
7902
- const rows = this.isExpanded()
7903
- ? this.maxExpandedNumberOfRows()
7904
- : this.maxCollapsedNumberOfRows();
8583
+ const rows = this.isExpanded() ? this.maxExpandedNumberOfRows : this.maxCollapsedNumberOfRows;
7905
8584
  return rows > 0 ? `${rows * CODE_LINE_HEIGHT_REM}rem` : null;
7906
- }, ...(ngDevMode ? [{ debugName: "containerMaxHeight" }] : []));
8585
+ }
7907
8586
  feedbackTimer;
7908
8587
  async copyCode() {
7909
- if (this.disabled())
8588
+ if (this.disabled)
7910
8589
  return;
7911
8590
  try {
7912
- await navigator.clipboard.writeText(this.code());
8591
+ await navigator.clipboard.writeText(this.code);
8592
+ this.triggerFeedback();
7913
8593
  }
7914
- catch {
7915
- this.fallbackCopy(this.code());
8594
+ catch (error) {
8595
+ console.error('Clipboard copy failed:', error);
7916
8596
  }
7917
- this.triggerFeedback();
7918
- }
7919
- fallbackCopy(text) {
7920
- const textarea = document.createElement('textarea');
7921
- textarea.value = text;
7922
- textarea.style.cssText = 'position:fixed;top:0;left:0;opacity:0';
7923
- document.body.appendChild(textarea);
7924
- textarea.focus();
7925
- textarea.select();
7926
- // eslint-disable-next-line @typescript-eslint/no-deprecated
7927
- document.execCommand('copy');
7928
- document.body.removeChild(textarea);
7929
8597
  }
7930
8598
  toggleExpand() {
7931
- if (this.disabled())
8599
+ if (this.disabled)
7932
8600
  return;
7933
8601
  this.isExpanded.update((v) => !v);
7934
8602
  }
@@ -7937,15 +8605,1764 @@ class NgccCodeSnippetComponent {
7937
8605
  this.isCopying.set(true);
7938
8606
  this.feedbackTimer = setTimeout(() => {
7939
8607
  this.isCopying.set(false);
7940
- }, this.feedbackTimeout());
8608
+ }, this.feedbackTimeout);
7941
8609
  }
7942
8610
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccCodeSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7943
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccCodeSnippetComponent, isStandalone: true, selector: "ngcc-code-snippet", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hideCopyButton: { classPropertyName: "hideCopyButton", publicName: "hideCopyButton", isSignal: true, isRequired: false, transformFunction: null }, wrapText: { classPropertyName: "wrapText", publicName: "wrapText", isSignal: true, isRequired: false, transformFunction: null }, light: { classPropertyName: "light", publicName: "light", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null }, feedback: { classPropertyName: "feedback", publicName: "feedback", isSignal: true, isRequired: false, transformFunction: null }, feedbackTimeout: { classPropertyName: "feedbackTimeout", publicName: "feedbackTimeout", isSignal: true, isRequired: false, transformFunction: null }, showMoreText: { classPropertyName: "showMoreText", publicName: "showMoreText", isSignal: true, isRequired: false, transformFunction: null }, showLessText: { classPropertyName: "showLessText", publicName: "showLessText", isSignal: true, isRequired: false, transformFunction: null }, copyButtonDescription: { classPropertyName: "copyButtonDescription", publicName: "copyButtonDescription", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, maxCollapsedNumberOfRows: { classPropertyName: "maxCollapsedNumberOfRows", publicName: "maxCollapsedNumberOfRows", isSignal: true, isRequired: false, transformFunction: null }, maxExpandedNumberOfRows: { classPropertyName: "maxExpandedNumberOfRows", publicName: "maxExpandedNumberOfRows", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- \u2500\u2500\u2500 Skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (skeleton()) {\n @if (type() === 'inline') {\n <span class=\"cds--snippet cds--snippet--inline cds--skeleton\">\n <span></span>\n </span>\n } @else if (type() === 'multi') {\n <div class=\"cds--snippet cds--snippet--multi cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n } @else {\n <div class=\"cds--snippet cds--snippet--single cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n </div>\n </div>\n }\n\n <!-- \u2500\u2500\u2500 Inline variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n} @else if (type() === 'inline') {\n <span\n class=\"cds--popover-container cds--tooltip cds--popover--caret cds--popover--high-contrast cds--popover--top\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--snippet cds--snippet--inline\"\n [class.cds--snippet--disabled]=\"disabled()\"\n [class.cds--snippet--light]=\"light()\"\n [attr.aria-label]=\"copyButtonDescription()\"\n [attr.disabled]=\"disabled() ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <code>{{ code() }}</code>\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">{{ feedback() }}</span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n\n <!-- \u2500\u2500\u2500 Single-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n} @else if (type() === 'single') {\n <div\n class=\"cds--snippet cds--snippet--single\"\n [class.cds--snippet--no-copy]=\"hideCopyButton()\"\n [class.cds--snippet--light]=\"light()\"\n [class.cds--snippet--disabled]=\"disabled()\"\n >\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel() || code()\"\n >\n <pre><code>{{ code() }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton()) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription()\"\n [attr.disabled]=\"disabled() ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback() : copyButtonDescription() }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n </div>\n\n <!-- \u2500\u2500\u2500 Multi-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n} @else {\n <div\n class=\"cds--snippet cds--snippet--multi\"\n [class.cds--snippet--expand]=\"isExpanded()\"\n [class.cds--snippet--wraptext]=\"wrapText()\"\n [class.cds--snippet--light]=\"light()\"\n [class.cds--snippet--disabled]=\"disabled()\"\n [class.cds--snippet--no-copy]=\"hideCopyButton()\"\n >\n <!-- Code container -->\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-multiline=\"true\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel() || code()\"\n [style.max-height]=\"containerMaxHeight()\"\n >\n <pre><code>{{ code() }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton()) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription()\"\n [attr.disabled]=\"disabled() ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback() : copyButtonDescription() }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n\n <!-- Expand / collapse \u2014 always rendered, hidden via class when not needed -->\n <button\n type=\"button\"\n class=\"cds--btn cds--snippet-btn--expand cds--btn--ghost\"\n [class.cds--snippet-btn--expand--hide]=\"!needsExpansion()\"\n [class.cds--btn--disabled]=\"disabled()\"\n [attr.disabled]=\"disabled() ? true : null\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggleExpand()\"\n >\n <span class=\"cds--snippet-btn--text\">\n {{ isExpanded() ? showLessText() : showMoreText() }}\n </span>\n <ngcc-icon\n class=\"cds--icon-chevron--down\"\n name=\"chevron_down\"\n size=\"sm\"\n [decorative]=\"true\"\n />\n </button>\n </div>\n}\n", styles: [".cds--snippet.cds--skeleton,.cds--snippet.cds--skeleton span{border-radius:4px}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8611
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccCodeSnippetComponent, isStandalone: true, selector: "ngcc-code-snippet", inputs: { type: "type", code: "code", disabled: "disabled", hideCopyButton: "hideCopyButton", wrapText: "wrapText", light: "light", skeleton: "skeleton", feedback: "feedback", feedbackTimeout: "feedbackTimeout", showMoreText: "showMoreText", showLessText: "showLessText", copyButtonDescription: "copyButtonDescription", ariaLabel: "ariaLabel", maxCollapsedNumberOfRows: "maxCollapsedNumberOfRows", maxExpandedNumberOfRows: "maxExpandedNumberOfRows" }, ngImport: i0, template: "<!-- \u2500\u2500\u2500 Skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (skeleton) {\n @if (type === 'inline') {\n <span class=\"cds--snippet cds--snippet--inline cds--skeleton\">\n <span></span>\n </span>\n } @else if (type === 'multi') {\n <div class=\"cds--snippet cds--snippet--multi cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n } @else if (type === 'single') {\n <div class=\"cds--snippet cds--snippet--single cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n </div>\n </div>\n }\n}\n\n<!-- \u2500\u2500\u2500 Inline variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!skeleton && type === 'inline') {\n <span\n class=\"cds--popover-container cds--tooltip cds--popover--caret cds--popover--high-contrast cds--popover--top\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--snippet cds--snippet--inline\"\n [class.cds--snippet--disabled]=\"disabled\"\n [class.cds--snippet--light]=\"light\"\n [attr.aria-label]=\"copyButtonDescription\"\n [attr.disabled]=\"disabled ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <code>{{ code }}</code>\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">{{ feedback }}</span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n}\n\n<!-- \u2500\u2500\u2500 Single-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!skeleton && type === 'single') {\n <div\n class=\"cds--snippet cds--snippet--single\"\n [class.cds--snippet--no-copy]=\"hideCopyButton\"\n [class.cds--snippet--light]=\"light\"\n [class.cds--snippet--disabled]=\"disabled\"\n >\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel || code\"\n >\n <pre><code>{{ code }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription\"\n [attr.disabled]=\"disabled ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback : copyButtonDescription }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n </div>\n}\n\n<!-- \u2500\u2500\u2500 Multi-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!skeleton && type === 'multi') {\n <div\n class=\"cds--snippet cds--snippet--multi\"\n [class.cds--snippet--expand]=\"isExpanded()\"\n [class.cds--snippet--wraptext]=\"wrapText\"\n [class.cds--snippet--light]=\"light\"\n [class.cds--snippet--disabled]=\"disabled\"\n [class.cds--snippet--no-copy]=\"hideCopyButton\"\n >\n <!-- Code container -->\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-multiline=\"true\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel || code\"\n [style.max-height]=\"containerMaxHeight\"\n >\n <pre><code>{{ code }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription\"\n [attr.disabled]=\"disabled ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback : copyButtonDescription }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n\n <!-- Expand / collapse \u2014 always rendered, hidden via class when not needed -->\n <button\n type=\"button\"\n class=\"cds--btn cds--snippet-btn--expand cds--btn--ghost\"\n [class.cds--snippet-btn--expand--hide]=\"!needsExpansion\"\n [class.cds--btn--disabled]=\"disabled\"\n [attr.disabled]=\"disabled ? true : null\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggleExpand()\"\n >\n <span class=\"cds--snippet-btn--text\">\n {{ isExpanded() ? showLessText : showMoreText }}\n </span>\n <ngcc-icon\n class=\"cds--icon-chevron--down\"\n name=\"chevron_down\"\n size=\"sm\"\n [decorative]=\"true\"\n />\n </button>\n </div>\n}\n", styles: [".cds--snippet.cds--skeleton,.cds--snippet.cds--skeleton span{border-radius:4px}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7944
8612
  }
7945
8613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccCodeSnippetComponent, decorators: [{
7946
8614
  type: Component,
7947
- args: [{ selector: 'ngcc-code-snippet', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- \u2500\u2500\u2500 Skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (skeleton()) {\n @if (type() === 'inline') {\n <span class=\"cds--snippet cds--snippet--inline cds--skeleton\">\n <span></span>\n </span>\n } @else if (type() === 'multi') {\n <div class=\"cds--snippet cds--snippet--multi cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n } @else {\n <div class=\"cds--snippet cds--snippet--single cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n </div>\n </div>\n }\n\n <!-- \u2500\u2500\u2500 Inline variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n} @else if (type() === 'inline') {\n <span\n class=\"cds--popover-container cds--tooltip cds--popover--caret cds--popover--high-contrast cds--popover--top\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--snippet cds--snippet--inline\"\n [class.cds--snippet--disabled]=\"disabled()\"\n [class.cds--snippet--light]=\"light()\"\n [attr.aria-label]=\"copyButtonDescription()\"\n [attr.disabled]=\"disabled() ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <code>{{ code() }}</code>\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">{{ feedback() }}</span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n\n <!-- \u2500\u2500\u2500 Single-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n} @else if (type() === 'single') {\n <div\n class=\"cds--snippet cds--snippet--single\"\n [class.cds--snippet--no-copy]=\"hideCopyButton()\"\n [class.cds--snippet--light]=\"light()\"\n [class.cds--snippet--disabled]=\"disabled()\"\n >\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel() || code()\"\n >\n <pre><code>{{ code() }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton()) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription()\"\n [attr.disabled]=\"disabled() ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback() : copyButtonDescription() }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n </div>\n\n <!-- \u2500\u2500\u2500 Multi-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n} @else {\n <div\n class=\"cds--snippet cds--snippet--multi\"\n [class.cds--snippet--expand]=\"isExpanded()\"\n [class.cds--snippet--wraptext]=\"wrapText()\"\n [class.cds--snippet--light]=\"light()\"\n [class.cds--snippet--disabled]=\"disabled()\"\n [class.cds--snippet--no-copy]=\"hideCopyButton()\"\n >\n <!-- Code container -->\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-multiline=\"true\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel() || code()\"\n [style.max-height]=\"containerMaxHeight()\"\n >\n <pre><code>{{ code() }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton()) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription()\"\n [attr.disabled]=\"disabled() ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback() : copyButtonDescription() }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n\n <!-- Expand / collapse \u2014 always rendered, hidden via class when not needed -->\n <button\n type=\"button\"\n class=\"cds--btn cds--snippet-btn--expand cds--btn--ghost\"\n [class.cds--snippet-btn--expand--hide]=\"!needsExpansion()\"\n [class.cds--btn--disabled]=\"disabled()\"\n [attr.disabled]=\"disabled() ? true : null\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggleExpand()\"\n >\n <span class=\"cds--snippet-btn--text\">\n {{ isExpanded() ? showLessText() : showMoreText() }}\n </span>\n <ngcc-icon\n class=\"cds--icon-chevron--down\"\n name=\"chevron_down\"\n size=\"sm\"\n [decorative]=\"true\"\n />\n </button>\n </div>\n}\n", styles: [".cds--snippet.cds--skeleton,.cds--snippet.cds--skeleton span{border-radius:4px}\n"] }]
7948
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], code: [{ type: i0.Input, args: [{ isSignal: true, alias: "code", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hideCopyButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCopyButton", required: false }] }], wrapText: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapText", required: false }] }], light: [{ type: i0.Input, args: [{ isSignal: true, alias: "light", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], feedback: [{ type: i0.Input, args: [{ isSignal: true, alias: "feedback", required: false }] }], feedbackTimeout: [{ type: i0.Input, args: [{ isSignal: true, alias: "feedbackTimeout", required: false }] }], showMoreText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMoreText", required: false }] }], showLessText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLessText", required: false }] }], copyButtonDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyButtonDescription", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxCollapsedNumberOfRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCollapsedNumberOfRows", required: false }] }], maxExpandedNumberOfRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxExpandedNumberOfRows", required: false }] }] } });
8615
+ args: [{ selector: 'ngcc-code-snippet', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- \u2500\u2500\u2500 Skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (skeleton) {\n @if (type === 'inline') {\n <span class=\"cds--snippet cds--snippet--inline cds--skeleton\">\n <span></span>\n </span>\n } @else if (type === 'multi') {\n <div class=\"cds--snippet cds--snippet--multi cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n } @else if (type === 'single') {\n <div class=\"cds--snippet cds--snippet--single cds--skeleton\">\n <div class=\"cds--snippet-container\">\n <span></span>\n </div>\n </div>\n }\n}\n\n<!-- \u2500\u2500\u2500 Inline variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!skeleton && type === 'inline') {\n <span\n class=\"cds--popover-container cds--tooltip cds--popover--caret cds--popover--high-contrast cds--popover--top\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--snippet cds--snippet--inline\"\n [class.cds--snippet--disabled]=\"disabled\"\n [class.cds--snippet--light]=\"light\"\n [attr.aria-label]=\"copyButtonDescription\"\n [attr.disabled]=\"disabled ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <code>{{ code }}</code>\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">{{ feedback }}</span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n}\n\n<!-- \u2500\u2500\u2500 Single-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!skeleton && type === 'single') {\n <div\n class=\"cds--snippet cds--snippet--single\"\n [class.cds--snippet--no-copy]=\"hideCopyButton\"\n [class.cds--snippet--light]=\"light\"\n [class.cds--snippet--disabled]=\"disabled\"\n >\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel || code\"\n >\n <pre><code>{{ code }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription\"\n [attr.disabled]=\"disabled ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback : copyButtonDescription }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n </div>\n}\n\n<!-- \u2500\u2500\u2500 Multi-line variant \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!skeleton && type === 'multi') {\n <div\n class=\"cds--snippet cds--snippet--multi\"\n [class.cds--snippet--expand]=\"isExpanded()\"\n [class.cds--snippet--wraptext]=\"wrapText\"\n [class.cds--snippet--light]=\"light\"\n [class.cds--snippet--disabled]=\"disabled\"\n [class.cds--snippet--no-copy]=\"hideCopyButton\"\n >\n <!-- Code container -->\n <div\n class=\"cds--snippet-container\"\n role=\"textbox\"\n aria-multiline=\"true\"\n aria-readonly=\"true\"\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabel || code\"\n [style.max-height]=\"containerMaxHeight\"\n >\n <pre><code>{{ code }}</code></pre>\n </div>\n\n <!-- Copy button: popover-triggered tooltip shows \"Copied!\" on click -->\n @if (!hideCopyButton) {\n <span\n class=\"cds--popover-container cds--tooltip cds--icon-tooltip cds--popover--caret cds--popover--high-contrast cds--popover--bottom\"\n [class.cds--popover--open]=\"isCopying()\"\n >\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--icon-only cds--btn--ghost cds--btn--md cds--layout--size-md cds--copy-btn cds--snippet cds--copy\"\n [attr.aria-label]=\"copyButtonDescription\"\n [attr.disabled]=\"disabled ? true : null\"\n aria-live=\"polite\"\n (click)=\"copyCode()\"\n >\n <ngcc-icon name=\"copy\" size=\"sm\" svgClass=\"cds--snippet__icon\" [decorative]=\"true\" />\n </button>\n <span aria-hidden=\"true\" class=\"cds--popover\">\n <span class=\"cds--popover-content cds--tooltip-content\">\n {{ isCopying() ? feedback : copyButtonDescription }}\n </span>\n <span class=\"cds--popover-caret\"></span>\n </span>\n </span>\n }\n\n <!-- Expand / collapse \u2014 always rendered, hidden via class when not needed -->\n <button\n type=\"button\"\n class=\"cds--btn cds--snippet-btn--expand cds--btn--ghost\"\n [class.cds--snippet-btn--expand--hide]=\"!needsExpansion\"\n [class.cds--btn--disabled]=\"disabled\"\n [attr.disabled]=\"disabled ? true : null\"\n [attr.aria-expanded]=\"isExpanded()\"\n (click)=\"toggleExpand()\"\n >\n <span class=\"cds--snippet-btn--text\">\n {{ isExpanded() ? showLessText : showMoreText }}\n </span>\n <ngcc-icon\n class=\"cds--icon-chevron--down\"\n name=\"chevron_down\"\n size=\"sm\"\n [decorative]=\"true\"\n />\n </button>\n </div>\n}\n", styles: [".cds--snippet.cds--skeleton,.cds--snippet.cds--skeleton span{border-radius:4px}\n"] }]
8616
+ }], propDecorators: { type: [{
8617
+ type: Input
8618
+ }], code: [{
8619
+ type: Input
8620
+ }], disabled: [{
8621
+ type: Input
8622
+ }], hideCopyButton: [{
8623
+ type: Input
8624
+ }], wrapText: [{
8625
+ type: Input
8626
+ }], light: [{
8627
+ type: Input
8628
+ }], skeleton: [{
8629
+ type: Input
8630
+ }], feedback: [{
8631
+ type: Input
8632
+ }], feedbackTimeout: [{
8633
+ type: Input
8634
+ }], showMoreText: [{
8635
+ type: Input
8636
+ }], showLessText: [{
8637
+ type: Input
8638
+ }], copyButtonDescription: [{
8639
+ type: Input
8640
+ }], ariaLabel: [{
8641
+ type: Input
8642
+ }], maxCollapsedNumberOfRows: [{
8643
+ type: Input
8644
+ }], maxExpandedNumberOfRows: [{
8645
+ type: Input
8646
+ }] } });
8647
+
8648
+ const NGCC_CONTENT_SWITCHER = new InjectionToken('NGCC_CONTENT_SWITCHER');
8649
+
8650
+ class NgccContentSwitcherOption {
8651
+ name = input('option', ...(ngDevMode ? [{ debugName: "name" }] : []));
8652
+ active = signal(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
8653
+ selectionMode = signal('automatic', ...(ngDevMode ? [{ debugName: "selectionMode" }] : []));
8654
+ selected = output();
8655
+ clicked = output();
8656
+ focused = output();
8657
+ switcher = inject(NGCC_CONTENT_SWITCHER, { optional: true });
8658
+ handleClick(event) {
8659
+ this.clicked.emit(event);
8660
+ if (this.active())
8661
+ return;
8662
+ if (this.switcher) {
8663
+ this.switcher.selectOption(this);
8664
+ }
8665
+ else {
8666
+ this.active.set(true);
8667
+ }
8668
+ this.selected.emit(true);
8669
+ }
8670
+ handleFocus(event) {
8671
+ this.focused.emit(event);
8672
+ if (this.active())
8673
+ return;
8674
+ if (this.selectionMode() === 'manual')
8675
+ return;
8676
+ if (this.switcher) {
8677
+ this.switcher.selectOption(this);
8678
+ }
8679
+ else {
8680
+ this.active.set(true);
8681
+ }
8682
+ this.selected.emit(true);
8683
+ }
8684
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContentSwitcherOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
8685
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: NgccContentSwitcherOption, isStandalone: true, selector: "ngcc-content-switcher-option", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected", clicked: "clicked", focused: "focused" }, ngImport: i0, template: `<button
8686
+ class="cds--content-switcher-btn"
8687
+ [class.cds--content-switcher--selected]="active()"
8688
+ role="tab"
8689
+ [attr.aria-selected]="active()"
8690
+ [attr.tabindex]="active() ? 0 : -1"
8691
+ (click)="handleClick($event)"
8692
+ (focus)="handleFocus($event)"
8693
+ >
8694
+ <span class="cds--content-switcher__label"><ng-content></ng-content></span>
8695
+ </button>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8696
+ }
8697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContentSwitcherOption, decorators: [{
8698
+ type: Component,
8699
+ args: [{
8700
+ selector: 'ngcc-content-switcher-option',
8701
+ standalone: true,
8702
+ changeDetection: ChangeDetectionStrategy.OnPush,
8703
+ template: `<button
8704
+ class="cds--content-switcher-btn"
8705
+ [class.cds--content-switcher--selected]="active()"
8706
+ role="tab"
8707
+ [attr.aria-selected]="active()"
8708
+ [attr.tabindex]="active() ? 0 : -1"
8709
+ (click)="handleClick($event)"
8710
+ (focus)="handleFocus($event)"
8711
+ >
8712
+ <span class="cds--content-switcher__label"><ng-content></ng-content></span>
8713
+ </button>`,
8714
+ }]
8715
+ }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], clicked: [{ type: i0.Output, args: ["clicked"] }], focused: [{ type: i0.Output, args: ["focused"] }] } });
8716
+
8717
+ class NgccContentSwitcher {
8718
+ ariaLabel = input('content switcher', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
8719
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
8720
+ lowContrast = input(false, ...(ngDevMode ? [{ debugName: "lowContrast" }] : []));
8721
+ selectionMode = input('automatic', ...(ngDevMode ? [{ debugName: "selectionMode" }] : []));
8722
+ selectedIndex = model(undefined, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
8723
+ selected = output();
8724
+ options = contentChildren(NgccContentSwitcherOption, ...(ngDevMode ? [{ debugName: "options" }] : []));
8725
+ hostRef = inject((ElementRef));
8726
+ switcherClasses = computed(() => {
8727
+ const s = this.size();
8728
+ return [
8729
+ 'cds--content-switcher',
8730
+ s === 'sm' ? 'cds--content-switcher--sm' : '',
8731
+ s === 'md' ? 'cds--content-switcher--md' : '',
8732
+ s === 'lg' ? 'cds--content-switcher--lg' : '',
8733
+ this.lowContrast() ? 'cds--content-switcher--low-contrast' : '',
8734
+ ]
8735
+ .filter(Boolean)
8736
+ .join(' ');
8737
+ }, ...(ngDevMode ? [{ debugName: "switcherClasses" }] : []));
8738
+ constructor() {
8739
+ // Sync selectionMode to children
8740
+ effect(() => {
8741
+ const mode = this.selectionMode();
8742
+ untracked(() => {
8743
+ this.options().forEach((option) => option.selectionMode.set(mode));
8744
+ });
8745
+ });
8746
+ // Handle selectedIndex or options changes
8747
+ effect(() => {
8748
+ const index = this.selectedIndex();
8749
+ const opts = this.options();
8750
+ if (opts.length === 0)
8751
+ return;
8752
+ untracked(() => {
8753
+ if (index !== undefined && index >= 0 && index < opts.length) {
8754
+ opts.forEach((opt, i) => {
8755
+ opt.active.set(i === index);
8756
+ });
8757
+ }
8758
+ else {
8759
+ const hasActive = opts.some((opt) => opt.active());
8760
+ if (!hasActive) {
8761
+ opts[0].active.set(true);
8762
+ }
8763
+ }
8764
+ });
8765
+ });
8766
+ }
8767
+ selectOption(option) {
8768
+ const opt = option;
8769
+ const opts = this.options();
8770
+ const index = opts.indexOf(opt);
8771
+ opts.forEach((o) => {
8772
+ if (o !== opt)
8773
+ o.active.set(false);
8774
+ });
8775
+ opt.active.set(true);
8776
+ if (index !== -1) {
8777
+ this.selectedIndex.set(index);
8778
+ }
8779
+ this.selected.emit(opt);
8780
+ }
8781
+ onKeydown(event) {
8782
+ const buttonList = Array.from(this.hostRef.nativeElement.querySelectorAll('ngcc-content-switcher-option'));
8783
+ if (!buttonList.length)
8784
+ return;
8785
+ switch (event.key) {
8786
+ case 'ArrowRight': {
8787
+ event.preventDefault();
8788
+ const index = buttonList.findIndex((item) => item === event.target);
8789
+ if (index < buttonList.length - 1) {
8790
+ buttonList[index + 1].focus();
8791
+ }
8792
+ else {
8793
+ buttonList[0].focus();
8794
+ }
8795
+ break;
8796
+ }
8797
+ case 'ArrowLeft': {
8798
+ event.preventDefault();
8799
+ const index = buttonList.findIndex((item) => item === event.target);
8800
+ if (index > 0) {
8801
+ buttonList[index - 1].focus();
8802
+ }
8803
+ else {
8804
+ buttonList[buttonList.length - 1].focus();
8805
+ }
8806
+ break;
8807
+ }
8808
+ case 'Home': {
8809
+ event.preventDefault();
8810
+ buttonList[0].focus();
8811
+ break;
8812
+ }
8813
+ case 'End': {
8814
+ event.preventDefault();
8815
+ buttonList[buttonList.length - 1].focus();
8816
+ break;
8817
+ }
8818
+ }
8819
+ }
8820
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContentSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component });
8821
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.18", type: NgccContentSwitcher, isStandalone: true, selector: "ngcc-content-switcher", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, lowContrast: { classPropertyName: "lowContrast", publicName: "lowContrast", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIndex: "selectedIndexChange", selected: "selected" }, providers: [
8822
+ {
8823
+ provide: NGCC_CONTENT_SWITCHER,
8824
+ useExisting: forwardRef(() => NgccContentSwitcher),
8825
+ },
8826
+ ], queries: [{ propertyName: "options", predicate: NgccContentSwitcherOption, isSignal: true }], ngImport: i0, template: `
8827
+ <div
8828
+ [attr.aria-label]="ariaLabel()"
8829
+ [class]="switcherClasses()"
8830
+ role="tablist"
8831
+ (keydown)="onKeydown($event)"
8832
+ >
8833
+ <ng-content></ng-content>
8834
+ </div>
8835
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
8836
+ }
8837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContentSwitcher, decorators: [{
8838
+ type: Component,
8839
+ args: [{
8840
+ selector: 'ngcc-content-switcher',
8841
+ standalone: true,
8842
+ changeDetection: ChangeDetectionStrategy.OnPush,
8843
+ providers: [
8844
+ {
8845
+ provide: NGCC_CONTENT_SWITCHER,
8846
+ useExisting: forwardRef(() => NgccContentSwitcher),
8847
+ },
8848
+ ],
8849
+ template: `
8850
+ <div
8851
+ [attr.aria-label]="ariaLabel()"
8852
+ [class]="switcherClasses()"
8853
+ role="tablist"
8854
+ (keydown)="onKeydown($event)"
8855
+ >
8856
+ <ng-content></ng-content>
8857
+ </div>
8858
+ `,
8859
+ }]
8860
+ }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], lowContrast: [{ type: i0.Input, args: [{ isSignal: true, alias: "lowContrast", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }, { type: i0.Output, args: ["selectedIndexChange"] }], selected: [{ type: i0.Output, args: ["selected"] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgccContentSwitcherOption), { isSignal: true }] }] } });
8861
+
8862
+ /**
8863
+ * Tile / card with optional header, body, footer and action slots.
8864
+ *
8865
+ * Slots (content projection):
8866
+ * - `[ngccTileHeader]` — header content (or use the `heading` input)
8867
+ * - default — body
8868
+ * - `[ngccTileAction]` — action area in the header (e.g. an icon button)
8869
+ * - `[ngccTileFooter]` — footer content
8870
+ *
8871
+ * Set `href` to render the whole tile as a link, or `clickable` to make it a button.
8872
+ */
8873
+ class NgccTile {
8874
+ heading = input('', ...(ngDevMode ? [{ debugName: "heading" }] : []));
8875
+ /** Renders the tile as an anchor. */
8876
+ href = input(undefined, ...(ngDevMode ? [{ debugName: "href" }] : []));
8877
+ /** Renders the tile as a button. */
8878
+ clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable" }] : []));
8879
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
8880
+ /** Use on layers that already have a `$layer` background. */
8881
+ light = input(false, ...(ngDevMode ? [{ debugName: "light" }] : []));
8882
+ activated = output();
8883
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccTile, deps: [], target: i0.ɵɵFactoryTarget.Component });
8884
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccTile, isStandalone: true, selector: "ngcc-tile", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, light: { classPropertyName: "light", publicName: "light", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activated: "activated" }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
8885
+ @if (href(); as link) {
8886
+ <a
8887
+ class="cds--tile cds--tile--clickable"
8888
+ [class.cds--tile--light]="light()"
8889
+ [attr.href]="link"
8890
+ (click)="activated.emit($event)"
8891
+ >
8892
+ <ng-container *ngTemplateOutlet="content" />
8893
+ </a>
8894
+ } @else if (clickable()) {
8895
+ <button
8896
+ type="button"
8897
+ class="cds--tile cds--tile--clickable"
8898
+ [class.cds--tile--light]="light()"
8899
+ [disabled]="disabled()"
8900
+ (click)="activated.emit($event)"
8901
+ >
8902
+ <ng-container *ngTemplateOutlet="content" />
8903
+ </button>
8904
+ } @else {
8905
+ <div class="cds--tile" [class.cds--tile--light]="light()">
8906
+ <ng-container *ngTemplateOutlet="content" />
8907
+ </div>
8908
+ }
8909
+
8910
+ <ng-template #content>
8911
+ <div class="ngcc-tile__header">
8912
+ @if (heading()) {
8913
+ <h3 class="ngcc-tile__heading">{{ heading() }}</h3>
8914
+ }
8915
+ <ng-content select="[ngccTileHeader]" />
8916
+ <ng-content select="[ngccTileAction]" />
8917
+ </div>
8918
+ <div class="ngcc-tile__body"><ng-content /></div>
8919
+ <div class="ngcc-tile__footer"><ng-content select="[ngccTileFooter]" /></div>
8920
+ </ng-template>
8921
+ `, isInline: true, styles: [".ngcc-tile__header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.ngcc-tile__heading{margin:0;font-size:var(--cds-heading-compact-01-font-size, .875rem);font-weight:600}.ngcc-tile__footer{margin-top:1rem;padding-top:.75rem;border-top:1px solid var(--cds-border-subtle)}.ngcc-tile__header:not(:has(*)){display:none}.ngcc-tile__footer:not(:has(*)){display:none}.cds--tile--clickable{width:100%;text-align:start}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8922
+ }
8923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccTile, decorators: [{
8924
+ type: Component,
8925
+ args: [{ selector: 'ngcc-tile', standalone: true, imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block' }, template: `
8926
+ @if (href(); as link) {
8927
+ <a
8928
+ class="cds--tile cds--tile--clickable"
8929
+ [class.cds--tile--light]="light()"
8930
+ [attr.href]="link"
8931
+ (click)="activated.emit($event)"
8932
+ >
8933
+ <ng-container *ngTemplateOutlet="content" />
8934
+ </a>
8935
+ } @else if (clickable()) {
8936
+ <button
8937
+ type="button"
8938
+ class="cds--tile cds--tile--clickable"
8939
+ [class.cds--tile--light]="light()"
8940
+ [disabled]="disabled()"
8941
+ (click)="activated.emit($event)"
8942
+ >
8943
+ <ng-container *ngTemplateOutlet="content" />
8944
+ </button>
8945
+ } @else {
8946
+ <div class="cds--tile" [class.cds--tile--light]="light()">
8947
+ <ng-container *ngTemplateOutlet="content" />
8948
+ </div>
8949
+ }
8950
+
8951
+ <ng-template #content>
8952
+ <div class="ngcc-tile__header">
8953
+ @if (heading()) {
8954
+ <h3 class="ngcc-tile__heading">{{ heading() }}</h3>
8955
+ }
8956
+ <ng-content select="[ngccTileHeader]" />
8957
+ <ng-content select="[ngccTileAction]" />
8958
+ </div>
8959
+ <div class="ngcc-tile__body"><ng-content /></div>
8960
+ <div class="ngcc-tile__footer"><ng-content select="[ngccTileFooter]" /></div>
8961
+ </ng-template>
8962
+ `, styles: [".ngcc-tile__header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.ngcc-tile__heading{margin:0;font-size:var(--cds-heading-compact-01-font-size, .875rem);font-weight:600}.ngcc-tile__footer{margin-top:1rem;padding-top:.75rem;border-top:1px solid var(--cds-border-subtle)}.ngcc-tile__header:not(:has(*)){display:none}.ngcc-tile__footer:not(:has(*)){display:none}.cds--tile--clickable{width:100%;text-align:start}\n"] }]
8963
+ }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], light: [{ type: i0.Input, args: [{ isSignal: true, alias: "light", required: false }] }], activated: [{ type: i0.Output, args: ["activated"] }] } });
8964
+
8965
+ /**
8966
+ * KPI tile: label, value, optional delta with trend arrow, and a status accent bar.
8967
+ * If `trend` is omitted it is derived from the sign of a numeric `delta`.
8968
+ */
8969
+ class NgccStatTile {
8970
+ label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
8971
+ value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
8972
+ unit = input('', ...(ngDevMode ? [{ debugName: "unit" }] : []));
8973
+ /** Displayed as-is; numbers get a leading + / − and are used to infer the trend. */
8974
+ delta = input(undefined, ...(ngDevMode ? [{ debugName: "delta" }] : []));
8975
+ deltaCaption = input('', ...(ngDevMode ? [{ debugName: "deltaCaption" }] : []));
8976
+ trend = input(undefined, ...(ngDevMode ? [{ debugName: "trend" }] : []));
8977
+ trendSentiment = input('positive-up', ...(ngDevMode ? [{ debugName: "trendSentiment" }] : []));
8978
+ status = input('none', ...(ngDevMode ? [{ debugName: "status" }] : []));
8979
+ hasDelta = computed(() => this.delta() !== undefined && this.delta() !== '', ...(ngDevMode ? [{ debugName: "hasDelta" }] : []));
8980
+ resolvedTrend = computed(() => {
8981
+ const explicit = this.trend();
8982
+ if (explicit)
8983
+ return explicit;
8984
+ const d = this.delta();
8985
+ const n = typeof d === 'number' ? d : parseFloat(String(d ?? ''));
8986
+ if (Number.isNaN(n) || n === 0)
8987
+ return 'flat';
8988
+ return n > 0 ? 'up' : 'down';
8989
+ }, ...(ngDevMode ? [{ debugName: "resolvedTrend" }] : []));
8990
+ accentColor = computed(() => {
8991
+ const s = this.status();
8992
+ return s === 'none' ? null : `var(--cds-support-${s})`;
8993
+ }, ...(ngDevMode ? [{ debugName: "accentColor" }] : []));
8994
+ deltaColor = computed(() => {
8995
+ const t = this.resolvedTrend();
8996
+ const sentiment = this.trendSentiment();
8997
+ if (t === 'flat' || sentiment === 'neutral')
8998
+ return null;
8999
+ const good = (t === 'up') === (sentiment === 'positive-up');
9000
+ return good ? 'var(--cds-support-success)' : 'var(--cds-support-error)';
9001
+ }, ...(ngDevMode ? [{ debugName: "deltaColor" }] : []));
9002
+ deltaAriaLabel = computed(() => {
9003
+ const t = this.resolvedTrend();
9004
+ const dir = t === 'up' ? 'Up' : t === 'down' ? 'Down' : 'Unchanged';
9005
+ return `${dir} ${this.delta()} ${this.deltaCaption()}`.trim();
9006
+ }, ...(ngDevMode ? [{ debugName: "deltaAriaLabel" }] : []));
9007
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccStatTile, deps: [], target: i0.ɵɵFactoryTarget.Component });
9008
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccStatTile, isStandalone: true, selector: "ngcc-stat-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaCaption: { classPropertyName: "deltaCaption", publicName: "deltaCaption", isSignal: true, isRequired: false, transformFunction: null }, trend: { classPropertyName: "trend", publicName: "trend", isSignal: true, isRequired: false, transformFunction: null }, trendSentiment: { classPropertyName: "trendSentiment", publicName: "trendSentiment", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9009
+ <div
9010
+ class="cds--tile ngcc-stat"
9011
+ [style.--ngcc-stat-accent]="accentColor()"
9012
+ [style.--ngcc-stat-delta]="deltaColor()"
9013
+ >
9014
+ <p class="ngcc-stat__label">{{ label() }}</p>
9015
+ <p class="ngcc-stat__value">
9016
+ {{ value() }}
9017
+ @if (unit()) {
9018
+ <span class="ngcc-stat__unit">{{ unit() }}</span>
9019
+ }
9020
+ </p>
9021
+ @if (hasDelta()) {
9022
+ <p class="ngcc-stat__delta" [attr.aria-label]="deltaAriaLabel()">
9023
+ @if (resolvedTrend() !== 'flat') {
9024
+ <ngcc-icon
9025
+ [name]="resolvedTrend() === 'up' ? 'arrow_up' : 'arrow_down'"
9026
+ size="sm"
9027
+ [decorative]="true"
9028
+ />
9029
+ }
9030
+ <span>{{ delta() }}</span>
9031
+ @if (deltaCaption()) {
9032
+ <span class="ngcc-stat__caption">{{ deltaCaption() }}</span>
9033
+ }
9034
+ </p>
9035
+ }
9036
+ </div>
9037
+ `, isInline: true, styles: [".ngcc-stat{border-inline-start:4px solid var(--ngcc-stat-accent, transparent)}.ngcc-stat__label{margin:0;color:var(--cds-text-secondary);font-size:var(--cds-label-01-font-size, .75rem)}.ngcc-stat__value{margin:.5rem 0 0;font-size:2rem;line-height:1.2;font-weight:300;color:var(--cds-text-primary)}.ngcc-stat__unit{font-size:1rem;margin-inline-start:.25rem;color:var(--cds-text-secondary)}.ngcc-stat__delta{display:inline-flex;align-items:center;gap:.25rem;margin-top:.5rem;font-size:.875rem;color:var(--ngcc-stat-delta, var(--cds-text-secondary))}.ngcc-stat__delta ngcc-icon{fill:currentColor}.ngcc-stat__caption{margin-inline-start:.25rem;color:var(--cds-text-secondary)}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9038
+ }
9039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccStatTile, decorators: [{
9040
+ type: Component,
9041
+ args: [{ selector: 'ngcc-stat-tile', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block' }, template: `
9042
+ <div
9043
+ class="cds--tile ngcc-stat"
9044
+ [style.--ngcc-stat-accent]="accentColor()"
9045
+ [style.--ngcc-stat-delta]="deltaColor()"
9046
+ >
9047
+ <p class="ngcc-stat__label">{{ label() }}</p>
9048
+ <p class="ngcc-stat__value">
9049
+ {{ value() }}
9050
+ @if (unit()) {
9051
+ <span class="ngcc-stat__unit">{{ unit() }}</span>
9052
+ }
9053
+ </p>
9054
+ @if (hasDelta()) {
9055
+ <p class="ngcc-stat__delta" [attr.aria-label]="deltaAriaLabel()">
9056
+ @if (resolvedTrend() !== 'flat') {
9057
+ <ngcc-icon
9058
+ [name]="resolvedTrend() === 'up' ? 'arrow_up' : 'arrow_down'"
9059
+ size="sm"
9060
+ [decorative]="true"
9061
+ />
9062
+ }
9063
+ <span>{{ delta() }}</span>
9064
+ @if (deltaCaption()) {
9065
+ <span class="ngcc-stat__caption">{{ deltaCaption() }}</span>
9066
+ }
9067
+ </p>
9068
+ }
9069
+ </div>
9070
+ `, styles: [".ngcc-stat{border-inline-start:4px solid var(--ngcc-stat-accent, transparent)}.ngcc-stat__label{margin:0;color:var(--cds-text-secondary);font-size:var(--cds-label-01-font-size, .75rem)}.ngcc-stat__value{margin:.5rem 0 0;font-size:2rem;line-height:1.2;font-weight:300;color:var(--cds-text-primary)}.ngcc-stat__unit{font-size:1rem;margin-inline-start:.25rem;color:var(--cds-text-secondary)}.ngcc-stat__delta{display:inline-flex;align-items:center;gap:.25rem;margin-top:.5rem;font-size:.875rem;color:var(--ngcc-stat-delta, var(--cds-text-secondary))}.ngcc-stat__delta ngcc-icon{fill:currentColor}.ngcc-stat__caption{margin-inline-start:.25rem;color:var(--cds-text-secondary)}\n"] }]
9071
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], deltaCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaCaption", required: false }] }], trend: [{ type: i0.Input, args: [{ isSignal: true, alias: "trend", required: false }] }], trendSentiment: [{ type: i0.Input, args: [{ isSignal: true, alias: "trendSentiment", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
9072
+
9073
+ /** Convenience map for status badges: `<ngcc-tag [type]="NGCC_STATUS_TAG.running">`. */
9074
+ const NGCC_STATUS_TAG = {
9075
+ running: 'green',
9076
+ success: 'green',
9077
+ pending: 'blue',
9078
+ warning: 'purple',
9079
+ error: 'red',
9080
+ stopped: 'gray',
9081
+ unknown: 'cool-gray',
9082
+ };
9083
+ /**
9084
+ * Tag / status badge. `dot` adds a leading status dot (status-badge look).
9085
+ * `dismissible` shows a close button and emits `dismissed`.
9086
+ */
9087
+ class NgccTag {
9088
+ type = input('gray', ...(ngDevMode ? [{ debugName: "type" }] : []));
9089
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
9090
+ dot = input(false, ...(ngDevMode ? [{ debugName: "dot" }] : []));
9091
+ dismissible = input(false, ...(ngDevMode ? [{ debugName: "dismissible" }] : []));
9092
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
9093
+ dismissLabel = input('Clear filter', ...(ngDevMode ? [{ debugName: "dismissLabel" }] : []));
9094
+ dismissed = output();
9095
+ classes = computed(() => [
9096
+ 'cds--tag',
9097
+ `cds--tag--${this.type()}`,
9098
+ this.size() !== 'md' ? `cds--tag--${this.size()}` : '',
9099
+ this.dismissible() ? 'cds--tag--filter' : '',
9100
+ this.disabled() ? 'cds--tag--disabled' : '',
9101
+ ]
9102
+ .filter(Boolean)
9103
+ .join(' '), ...(ngDevMode ? [{ debugName: "classes" }] : []));
9104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccTag, deps: [], target: i0.ɵɵFactoryTarget.Component });
9105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccTag, isStandalone: true, selector: "ngcc-tag", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, dot: { classPropertyName: "dot", publicName: "dot", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dismissLabel: { classPropertyName: "dismissLabel", publicName: "dismissLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, host: { styleAttribute: "display: inline-flex" }, ngImport: i0, template: `
9106
+ <span [class]="classes()" [attr.aria-disabled]="disabled() || null">
9107
+ @if (dot()) {
9108
+ <span class="ngcc-tag__dot" aria-hidden="true"></span>
9109
+ }
9110
+ <span class="cds--tag__label"><ng-content /></span>
9111
+ @if (dismissible()) {
9112
+ <button
9113
+ type="button"
9114
+ class="cds--tag__close-icon"
9115
+ [disabled]="disabled()"
9116
+ [attr.aria-label]="dismissLabel()"
9117
+ (click)="dismissed.emit()"
9118
+ >
9119
+ <svg width="16" height="16" viewBox="0 0 32 32" fill="currentColor" aria-hidden="true">
9120
+ <path
9121
+ d="M24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16z"
9122
+ ></path>
9123
+ </svg>
9124
+ </button>
9125
+ }
9126
+ </span>
9127
+ `, isInline: true, styles: [".ngcc-tag__dot{width:.5rem;height:.5rem;border-radius:50%;background:currentColor;margin-inline-end:.375rem;flex:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9128
+ }
9129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccTag, decorators: [{
9130
+ type: Component,
9131
+ args: [{ selector: 'ngcc-tag', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: inline-flex' }, template: `
9132
+ <span [class]="classes()" [attr.aria-disabled]="disabled() || null">
9133
+ @if (dot()) {
9134
+ <span class="ngcc-tag__dot" aria-hidden="true"></span>
9135
+ }
9136
+ <span class="cds--tag__label"><ng-content /></span>
9137
+ @if (dismissible()) {
9138
+ <button
9139
+ type="button"
9140
+ class="cds--tag__close-icon"
9141
+ [disabled]="disabled()"
9142
+ [attr.aria-label]="dismissLabel()"
9143
+ (click)="dismissed.emit()"
9144
+ >
9145
+ <svg width="16" height="16" viewBox="0 0 32 32" fill="currentColor" aria-hidden="true">
9146
+ <path
9147
+ d="M24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16z"
9148
+ ></path>
9149
+ </svg>
9150
+ </button>
9151
+ }
9152
+ </span>
9153
+ `, styles: [".ngcc-tag__dot{width:.5rem;height:.5rem;border-radius:50%;background:currentColor;margin-inline-end:.375rem;flex:none}\n"] }]
9154
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], dot: [{ type: i0.Input, args: [{ isSignal: true, alias: "dot", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dismissLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissLabel", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
9155
+
9156
+ let nextId = 0;
9157
+ /**
9158
+ * Progress / meter bar. The bar changes color once the value crosses
9159
+ * `warningThreshold` and `criticalThreshold` (percent of `max`), which suits
9160
+ * usage meters (CPU, disk, quota). Set `finishAtMax` for task progress, where
9161
+ * 100% means "done" rather than "critical".
9162
+ */
9163
+ class NgccProgressBar {
9164
+ value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
9165
+ max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
9166
+ label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
9167
+ helperText = input('', ...(ngDevMode ? [{ debugName: "helperText" }] : []));
9168
+ size = input('big', ...(ngDevMode ? [{ debugName: "size" }] : []));
9169
+ showValue = input(true, ...(ngDevMode ? [{ debugName: "showValue" }] : []));
9170
+ /** Percent at which the bar turns to the warning color. */
9171
+ warningThreshold = input(75, ...(ngDevMode ? [{ debugName: "warningThreshold" }] : []));
9172
+ /** Percent at which the bar turns to the critical (error) color. */
9173
+ criticalThreshold = input(90, ...(ngDevMode ? [{ debugName: "criticalThreshold" }] : []));
9174
+ /** Treat 100% as finished (success) instead of critical; thresholds are ignored. */
9175
+ finishAtMax = input(false, ...(ngDevMode ? [{ debugName: "finishAtMax" }] : []));
9176
+ labelId = `ngcc-progress-bar-${nextId++}`;
9177
+ clampedValue = computed(() => Math.min(Math.max(this.value(), 0), this.max()), ...(ngDevMode ? [{ debugName: "clampedValue" }] : []));
9178
+ percent = computed(() => {
9179
+ const max = this.max();
9180
+ return max > 0 ? Math.round((this.clampedValue() / max) * 100) : 0;
9181
+ }, ...(ngDevMode ? [{ debugName: "percent" }] : []));
9182
+ level = computed(() => {
9183
+ const p = this.percent();
9184
+ if (this.finishAtMax())
9185
+ return p >= 100 ? 'finished' : 'normal';
9186
+ if (p >= this.criticalThreshold())
9187
+ return 'critical';
9188
+ if (p >= this.warningThreshold())
9189
+ return 'warning';
9190
+ return 'normal';
9191
+ }, ...(ngDevMode ? [{ debugName: "level" }] : []));
9192
+ valueText = computed(() => `${this.percent()}%${this.level() === 'normal' || this.level() === 'finished' ? '' : ` (${this.level()})`}`, ...(ngDevMode ? [{ debugName: "valueText" }] : []));
9193
+ barColor = computed(() => {
9194
+ switch (this.level()) {
9195
+ case 'warning':
9196
+ return 'var(--cds-support-warning)';
9197
+ case 'critical':
9198
+ return 'var(--cds-support-error)';
9199
+ default:
9200
+ return null;
9201
+ }
9202
+ }, ...(ngDevMode ? [{ debugName: "barColor" }] : []));
9203
+ classes = computed(() => [
9204
+ 'cds--progress-bar',
9205
+ this.size() === 'big' ? 'cds--progress-bar--big' : 'cds--progress-bar--small',
9206
+ this.level() === 'critical' ? 'cds--progress-bar--error' : '',
9207
+ this.level() === 'finished' ? 'cds--progress-bar--finished' : '',
9208
+ ]
9209
+ .filter(Boolean)
9210
+ .join(' '), ...(ngDevMode ? [{ debugName: "classes" }] : []));
9211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
9212
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccProgressBar, isStandalone: true, selector: "ngcc-progress-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, warningThreshold: { classPropertyName: "warningThreshold", publicName: "warningThreshold", isSignal: true, isRequired: false, transformFunction: null }, criticalThreshold: { classPropertyName: "criticalThreshold", publicName: "criticalThreshold", isSignal: true, isRequired: false, transformFunction: null }, finishAtMax: { classPropertyName: "finishAtMax", publicName: "finishAtMax", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9213
+ <div [class]="classes()">
9214
+ <div class="cds--progress-bar__label" [id]="labelId">
9215
+ <span>{{ label() }}</span>
9216
+ @if (showValue()) {
9217
+ <span>{{ percent() }}%</span>
9218
+ }
9219
+ </div>
9220
+ <div
9221
+ class="cds--progress-bar__track"
9222
+ role="progressbar"
9223
+ [attr.aria-labelledby]="labelId"
9224
+ [attr.aria-valuemin]="0"
9225
+ [attr.aria-valuemax]="max()"
9226
+ [attr.aria-valuenow]="clampedValue()"
9227
+ [attr.aria-valuetext]="valueText()"
9228
+ >
9229
+ <div
9230
+ class="cds--progress-bar__bar"
9231
+ [style.transform]="'scaleX(' + percent() / 100 + ')'"
9232
+ [style.background-color]="barColor()"
9233
+ ></div>
9234
+ </div>
9235
+ @if (helperText()) {
9236
+ <div class="cds--progress-bar__helper-text">{{ helperText() }}</div>
9237
+ }
9238
+ </div>
9239
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9240
+ }
9241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccProgressBar, decorators: [{
9242
+ type: Component,
9243
+ args: [{
9244
+ selector: 'ngcc-progress-bar',
9245
+ standalone: true,
9246
+ changeDetection: ChangeDetectionStrategy.OnPush,
9247
+ host: { style: 'display: block' },
9248
+ template: `
9249
+ <div [class]="classes()">
9250
+ <div class="cds--progress-bar__label" [id]="labelId">
9251
+ <span>{{ label() }}</span>
9252
+ @if (showValue()) {
9253
+ <span>{{ percent() }}%</span>
9254
+ }
9255
+ </div>
9256
+ <div
9257
+ class="cds--progress-bar__track"
9258
+ role="progressbar"
9259
+ [attr.aria-labelledby]="labelId"
9260
+ [attr.aria-valuemin]="0"
9261
+ [attr.aria-valuemax]="max()"
9262
+ [attr.aria-valuenow]="clampedValue()"
9263
+ [attr.aria-valuetext]="valueText()"
9264
+ >
9265
+ <div
9266
+ class="cds--progress-bar__bar"
9267
+ [style.transform]="'scaleX(' + percent() / 100 + ')'"
9268
+ [style.background-color]="barColor()"
9269
+ ></div>
9270
+ </div>
9271
+ @if (helperText()) {
9272
+ <div class="cds--progress-bar__helper-text">{{ helperText() }}</div>
9273
+ }
9274
+ </div>
9275
+ `,
9276
+ }]
9277
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], warningThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "warningThreshold", required: false }] }], criticalThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "criticalThreshold", required: false }] }], finishAtMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "finishAtMax", required: false }] }] } });
9278
+
9279
+ /**
9280
+ * Empty state: icon, title, description and action.
9281
+ * - `icon` uses the icon registry; project `[ngccEmptyIcon]` for a custom illustration.
9282
+ * - Project buttons/links into `[ngccEmptyAction]` for the call to action.
9283
+ */
9284
+ class NgccEmptyState {
9285
+ title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
9286
+ description = input('', ...(ngDevMode ? [{ debugName: "description" }] : []));
9287
+ icon = input(undefined, ...(ngDevMode ? [{ debugName: "icon" }] : []));
9288
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
9289
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccEmptyState, deps: [], target: i0.ɵɵFactoryTarget.Component });
9290
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccEmptyState, isStandalone: true, selector: "ngcc-empty-state", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9291
+ <div [class]="'ngcc-empty ngcc-empty--' + size()">
9292
+ <div class="ngcc-empty__icon">
9293
+ <ng-content select="[ngccEmptyIcon]">
9294
+ @if (icon(); as name) {
9295
+ <ngcc-icon [name]="name" [size]="size() === 'sm' ? 'lg' : 'xl'" [decorative]="true" />
9296
+ }
9297
+ </ng-content>
9298
+ </div>
9299
+ <h3 class="ngcc-empty__title">{{ title() }}</h3>
9300
+ @if (description()) {
9301
+ <p class="ngcc-empty__description">{{ description() }}</p>
9302
+ }
9303
+ <div class="ngcc-empty__action"><ng-content select="[ngccEmptyAction]" /></div>
9304
+ </div>
9305
+ `, isInline: true, styles: [".ngcc-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--ngcc-empty-padding, 3rem 1rem);color:var(--cds-text-secondary)}.ngcc-empty--sm{--ngcc-empty-padding: 1.5rem 1rem}.ngcc-empty--lg{--ngcc-empty-padding: 5rem 1rem}.ngcc-empty__icon{margin-block-end:1rem;color:var(--cds-icon-secondary)}.ngcc-empty__title{margin:0;font-size:1.25rem;font-weight:400;color:var(--cds-text-primary)}.ngcc-empty--sm .ngcc-empty__title{font-size:1rem}.ngcc-empty__description{margin:.5rem 0 0;max-inline-size:24rem;font-size:.875rem;line-height:1.43}.ngcc-empty__action{margin-block-start:1.5rem;display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}.ngcc-empty__action:empty{display:none}\n"], dependencies: [{ kind: "component", type: NgccIcon, selector: "ngcc-icon", inputs: ["name", "size", "color", "ariaLabel", "decorative", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9306
+ }
9307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccEmptyState, decorators: [{
9308
+ type: Component,
9309
+ args: [{ selector: 'ngcc-empty-state', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block' }, template: `
9310
+ <div [class]="'ngcc-empty ngcc-empty--' + size()">
9311
+ <div class="ngcc-empty__icon">
9312
+ <ng-content select="[ngccEmptyIcon]">
9313
+ @if (icon(); as name) {
9314
+ <ngcc-icon [name]="name" [size]="size() === 'sm' ? 'lg' : 'xl'" [decorative]="true" />
9315
+ }
9316
+ </ng-content>
9317
+ </div>
9318
+ <h3 class="ngcc-empty__title">{{ title() }}</h3>
9319
+ @if (description()) {
9320
+ <p class="ngcc-empty__description">{{ description() }}</p>
9321
+ }
9322
+ <div class="ngcc-empty__action"><ng-content select="[ngccEmptyAction]" /></div>
9323
+ </div>
9324
+ `, styles: [".ngcc-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--ngcc-empty-padding, 3rem 1rem);color:var(--cds-text-secondary)}.ngcc-empty--sm{--ngcc-empty-padding: 1.5rem 1rem}.ngcc-empty--lg{--ngcc-empty-padding: 5rem 1rem}.ngcc-empty__icon{margin-block-end:1rem;color:var(--cds-icon-secondary)}.ngcc-empty__title{margin:0;font-size:1.25rem;font-weight:400;color:var(--cds-text-primary)}.ngcc-empty--sm .ngcc-empty__title{font-size:1rem}.ngcc-empty__description{margin:.5rem 0 0;max-inline-size:24rem;font-size:.875rem;line-height:1.43}.ngcc-empty__action{margin-block-start:1.5rem;display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}.ngcc-empty__action:empty{display:none}\n"] }]
9325
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
9326
+
9327
+ /**
9328
+ * Activity feed / timeline. `feed` is a compact list with status dots;
9329
+ * `timeline` adds a connecting vertical line between entries.
9330
+ */
9331
+ class NgccActivityFeed {
9332
+ items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
9333
+ variant = input('feed', ...(ngDevMode ? [{ debugName: "variant" }] : []));
9334
+ ariaLabel = input('Activity', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
9335
+ emptyText = input('No recent activity', ...(ngDevMode ? [{ debugName: "emptyText" }] : []));
9336
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccActivityFeed, deps: [], target: i0.ɵɵFactoryTarget.Component });
9337
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccActivityFeed, isStandalone: true, selector: "ngcc-activity-feed", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9338
+ @if (items().length) {
9339
+ <ol [class]="'ngcc-feed ngcc-feed--' + variant()" [attr.aria-label]="ariaLabel()">
9340
+ @for (item of items(); track item.id) {
9341
+ <li [class]="'ngcc-feed__item ngcc-feed__item--' + (item.status ?? 'info')">
9342
+ <span class="ngcc-feed__marker" aria-hidden="true"
9343
+ ><span class="ngcc-feed__dot"></span
9344
+ ></span>
9345
+ <div class="ngcc-feed__body">
9346
+ <p class="ngcc-feed__title">
9347
+ @if (item.actor) {
9348
+ <span class="ngcc-feed__actor">{{ item.actor }}</span>
9349
+ }
9350
+ {{ item.title }}
9351
+ </p>
9352
+ @if (item.description) {
9353
+ <p class="ngcc-feed__description">{{ item.description }}</p>
9354
+ }
9355
+ @if (item.timestamp) {
9356
+ <time class="ngcc-feed__time" [attr.datetime]="item.datetime ?? null">{{
9357
+ item.timestamp
9358
+ }}</time>
9359
+ }
9360
+ </div>
9361
+ </li>
9362
+ }
9363
+ </ol>
9364
+ } @else {
9365
+ <p class="ngcc-feed__empty">{{ emptyText() }}</p>
9366
+ }
9367
+ `, isInline: true, styles: [".ngcc-feed{list-style:none;margin:0;padding:0}.ngcc-feed__item{position:relative;display:flex;gap:1rem;padding-block:.75rem}.ngcc-feed--feed .ngcc-feed__item:not(:last-child){border-block-end:1px solid var(--cds-border-subtle-01)}.ngcc-feed__marker{position:relative;flex:none;inline-size:.75rem;padding-block-start:.3rem}.ngcc-feed__dot{display:block;inline-size:.75rem;block-size:.75rem;border-radius:50%;background:var(--ngcc-feed-color, var(--cds-support-info))}.ngcc-feed--timeline .ngcc-feed__item:not(:last-child) .ngcc-feed__marker:after{content:\"\";position:absolute;inset-block:1.35rem -1.05rem;inset-inline-start:calc(50% - 1px);inline-size:2px;background:var(--cds-border-subtle-01)}.ngcc-feed__item--success{--ngcc-feed-color: var(--cds-support-success)}.ngcc-feed__item--warning{--ngcc-feed-color: var(--cds-support-warning)}.ngcc-feed__item--error{--ngcc-feed-color: var(--cds-support-error)}.ngcc-feed__item--neutral{--ngcc-feed-color: var(--cds-icon-secondary)}.ngcc-feed__body{flex:1;min-inline-size:0}.ngcc-feed__title{margin:0;font-size:.875rem;color:var(--cds-text-primary)}.ngcc-feed__actor{font-weight:600}.ngcc-feed__description{margin:.25rem 0 0;font-size:.875rem;color:var(--cds-text-secondary)}.ngcc-feed__time{display:block;margin-block-start:.25rem;font-size:.75rem;color:var(--cds-text-helper)}.ngcc-feed__empty{margin:0;padding:1rem 0;font-size:.875rem;color:var(--cds-text-secondary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9368
+ }
9369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccActivityFeed, decorators: [{
9370
+ type: Component,
9371
+ args: [{ selector: 'ngcc-activity-feed', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block' }, template: `
9372
+ @if (items().length) {
9373
+ <ol [class]="'ngcc-feed ngcc-feed--' + variant()" [attr.aria-label]="ariaLabel()">
9374
+ @for (item of items(); track item.id) {
9375
+ <li [class]="'ngcc-feed__item ngcc-feed__item--' + (item.status ?? 'info')">
9376
+ <span class="ngcc-feed__marker" aria-hidden="true"
9377
+ ><span class="ngcc-feed__dot"></span
9378
+ ></span>
9379
+ <div class="ngcc-feed__body">
9380
+ <p class="ngcc-feed__title">
9381
+ @if (item.actor) {
9382
+ <span class="ngcc-feed__actor">{{ item.actor }}</span>
9383
+ }
9384
+ {{ item.title }}
9385
+ </p>
9386
+ @if (item.description) {
9387
+ <p class="ngcc-feed__description">{{ item.description }}</p>
9388
+ }
9389
+ @if (item.timestamp) {
9390
+ <time class="ngcc-feed__time" [attr.datetime]="item.datetime ?? null">{{
9391
+ item.timestamp
9392
+ }}</time>
9393
+ }
9394
+ </div>
9395
+ </li>
9396
+ }
9397
+ </ol>
9398
+ } @else {
9399
+ <p class="ngcc-feed__empty">{{ emptyText() }}</p>
9400
+ }
9401
+ `, styles: [".ngcc-feed{list-style:none;margin:0;padding:0}.ngcc-feed__item{position:relative;display:flex;gap:1rem;padding-block:.75rem}.ngcc-feed--feed .ngcc-feed__item:not(:last-child){border-block-end:1px solid var(--cds-border-subtle-01)}.ngcc-feed__marker{position:relative;flex:none;inline-size:.75rem;padding-block-start:.3rem}.ngcc-feed__dot{display:block;inline-size:.75rem;block-size:.75rem;border-radius:50%;background:var(--ngcc-feed-color, var(--cds-support-info))}.ngcc-feed--timeline .ngcc-feed__item:not(:last-child) .ngcc-feed__marker:after{content:\"\";position:absolute;inset-block:1.35rem -1.05rem;inset-inline-start:calc(50% - 1px);inline-size:2px;background:var(--cds-border-subtle-01)}.ngcc-feed__item--success{--ngcc-feed-color: var(--cds-support-success)}.ngcc-feed__item--warning{--ngcc-feed-color: var(--cds-support-warning)}.ngcc-feed__item--error{--ngcc-feed-color: var(--cds-support-error)}.ngcc-feed__item--neutral{--ngcc-feed-color: var(--cds-icon-secondary)}.ngcc-feed__body{flex:1;min-inline-size:0}.ngcc-feed__title{margin:0;font-size:.875rem;color:var(--cds-text-primary)}.ngcc-feed__actor{font-weight:600}.ngcc-feed__description{margin:.25rem 0 0;font-size:.875rem;color:var(--cds-text-secondary)}.ngcc-feed__time{display:block;margin-block-start:.25rem;font-size:.75rem;color:var(--cds-text-helper)}.ngcc-feed__empty{margin:0;padding:1rem 0;font-size:.875rem;color:var(--cds-text-secondary)}\n"] }]
9402
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }] } });
9403
+
9404
+ /** Data-driven Carbon structured list (read-only, key/value style rows). */
9405
+ class NgccStructuredList {
9406
+ columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
9407
+ rows = input([], ...(ngDevMode ? [{ debugName: "rows" }] : []));
9408
+ condensed = input(false, ...(ngDevMode ? [{ debugName: "condensed" }] : []));
9409
+ ariaLabel = input('Structured list', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
9410
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccStructuredList, deps: [], target: i0.ɵɵFactoryTarget.Component });
9411
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccStructuredList, isStandalone: true, selector: "ngcc-structured-list", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, condensed: { classPropertyName: "condensed", publicName: "condensed", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9412
+ <div
9413
+ [class]="'cds--structured-list' + (condensed() ? ' cds--structured-list--condensed' : '')"
9414
+ role="table"
9415
+ [attr.aria-label]="ariaLabel()"
9416
+ >
9417
+ <div class="cds--structured-list-thead" role="rowgroup">
9418
+ <div class="cds--structured-list-row cds--structured-list-row--header-row" role="row">
9419
+ @for (col of columns(); track col.key) {
9420
+ <div class="cds--structured-list-th" role="columnheader">{{ col.header }}</div>
9421
+ }
9422
+ </div>
9423
+ </div>
9424
+ <div class="cds--structured-list-tbody" role="rowgroup">
9425
+ @for (row of rows(); track row.id ?? $index) {
9426
+ <div class="cds--structured-list-row" role="row">
9427
+ @for (col of columns(); track col.key) {
9428
+ <div class="cds--structured-list-td" role="cell">{{ row[col.key] ?? '' }}</div>
9429
+ }
9430
+ </div>
9431
+ }
9432
+ </div>
9433
+ </div>
9434
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
9435
+ }
9436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccStructuredList, decorators: [{
9437
+ type: Component,
9438
+ args: [{
9439
+ selector: 'ngcc-structured-list',
9440
+ standalone: true,
9441
+ changeDetection: ChangeDetectionStrategy.OnPush,
9442
+ host: { style: 'display: block' },
9443
+ template: `
9444
+ <div
9445
+ [class]="'cds--structured-list' + (condensed() ? ' cds--structured-list--condensed' : '')"
9446
+ role="table"
9447
+ [attr.aria-label]="ariaLabel()"
9448
+ >
9449
+ <div class="cds--structured-list-thead" role="rowgroup">
9450
+ <div class="cds--structured-list-row cds--structured-list-row--header-row" role="row">
9451
+ @for (col of columns(); track col.key) {
9452
+ <div class="cds--structured-list-th" role="columnheader">{{ col.header }}</div>
9453
+ }
9454
+ </div>
9455
+ </div>
9456
+ <div class="cds--structured-list-tbody" role="rowgroup">
9457
+ @for (row of rows(); track row.id ?? $index) {
9458
+ <div class="cds--structured-list-row" role="row">
9459
+ @for (col of columns(); track col.key) {
9460
+ <div class="cds--structured-list-td" role="cell">{{ row[col.key] ?? '' }}</div>
9461
+ }
9462
+ </div>
9463
+ }
9464
+ </div>
9465
+ </div>
9466
+ `,
9467
+ }]
9468
+ }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], condensed: [{ type: i0.Input, args: [{ isSignal: true, alias: "condensed", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
9469
+
9470
+ /**
9471
+ * Notification list sized for `ngcc-header-panel` (fills its width).
9472
+ * Stateless: the parent owns `items` and updates them in response to
9473
+ * `markRead`, `markAllRead`, `clear` and `dismissed`.
9474
+ */
9475
+ class NgccNotificationList {
9476
+ items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
9477
+ heading = input('Notifications', ...(ngDevMode ? [{ debugName: "heading" }] : []));
9478
+ emptyText = input("You're all caught up", ...(ngDevMode ? [{ debugName: "emptyText" }] : []));
9479
+ itemClicked = output();
9480
+ dismissed = output();
9481
+ markAllRead = output();
9482
+ clear = output();
9483
+ unreadCount = computed(() => this.items().filter((i) => !i.read).length, ...(ngDevMode ? [{ debugName: "unreadCount" }] : []));
9484
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccNotificationList, deps: [], target: i0.ɵɵFactoryTarget.Component });
9485
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccNotificationList, isStandalone: true, selector: "ngcc-notification-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClicked: "itemClicked", dismissed: "dismissed", markAllRead: "markAllRead", clear: "clear" }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9486
+ <div class="ngcc-notif__header">
9487
+ <h2 class="ngcc-notif__heading">
9488
+ {{ heading() }}
9489
+ @if (unreadCount() > 0) {
9490
+ <span class="ngcc-notif__count" [attr.aria-label]="unreadCount() + ' unread'">{{
9491
+ unreadCount()
9492
+ }}</span>
9493
+ }
9494
+ </h2>
9495
+ <div class="ngcc-notif__actions">
9496
+ <button
9497
+ type="button"
9498
+ class="ngcc-notif__link"
9499
+ [disabled]="unreadCount() === 0"
9500
+ (click)="markAllRead.emit()"
9501
+ >
9502
+ Mark all read
9503
+ </button>
9504
+ <button
9505
+ type="button"
9506
+ class="ngcc-notif__link"
9507
+ [disabled]="items().length === 0"
9508
+ (click)="clear.emit()"
9509
+ >
9510
+ Clear all
9511
+ </button>
9512
+ </div>
9513
+ </div>
9514
+ @if (items().length) {
9515
+ <ul class="ngcc-notif__list">
9516
+ @for (item of items(); track item.id) {
9517
+ <li
9518
+ [class]="
9519
+ 'ngcc-notif__item ngcc-notif__item--' +
9520
+ (item.severity ?? 'info') +
9521
+ (item.read ? ' ngcc-notif__item--read' : '')
9522
+ "
9523
+ >
9524
+ <button type="button" class="ngcc-notif__main" (click)="itemClicked.emit(item)">
9525
+ @if (!item.read) {
9526
+ <span class="cds--visually-hidden">Unread: </span>
9527
+ }
9528
+ <span class="ngcc-notif__title">{{ item.title }}</span>
9529
+ @if (item.message) {
9530
+ <span class="ngcc-notif__message">{{ item.message }}</span>
9531
+ }
9532
+ @if (item.timestamp) {
9533
+ <span class="ngcc-notif__time">{{ item.timestamp }}</span>
9534
+ }
9535
+ </button>
9536
+ <button
9537
+ type="button"
9538
+ class="ngcc-notif__dismiss"
9539
+ [attr.aria-label]="'Dismiss ' + item.title"
9540
+ (click)="dismissed.emit(item)"
9541
+ >
9542
+ <svg
9543
+ width="16"
9544
+ height="16"
9545
+ viewBox="0 0 32 32"
9546
+ fill="currentColor"
9547
+ aria-hidden="true"
9548
+ >
9549
+ <path
9550
+ d="M24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16z"
9551
+ ></path>
9552
+ </svg>
9553
+ </button>
9554
+ </li>
9555
+ }
9556
+ </ul>
9557
+ } @else {
9558
+ <p class="ngcc-notif__empty">{{ emptyText() }}</p>
9559
+ }
9560
+ `, isInline: true, styles: [".ngcc-notif__header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-block-end:1px solid var(--cds-border-subtle-01)}.ngcc-notif__heading{margin:0;font-size:1rem;font-weight:600;color:var(--cds-text-primary)}.ngcc-notif__count{margin-inline-start:.5rem;padding:0 .5rem;border-radius:1rem;font-size:.75rem;font-weight:400;color:var(--cds-text-on-color);background:var(--cds-support-error)}.ngcc-notif__actions{display:flex;gap:.25rem}.ngcc-notif__link{padding:.25rem .5rem;border:0;background:none;font:inherit;font-size:.75rem;color:var(--cds-link-primary);cursor:pointer}.ngcc-notif__link:hover:not(:disabled){text-decoration:underline}.ngcc-notif__link:disabled{color:var(--cds-text-disabled);cursor:not-allowed}.ngcc-notif__link:focus-visible,.ngcc-notif__main:focus-visible,.ngcc-notif__dismiss:focus-visible{outline:2px solid var(--cds-focus);outline-offset:-2px}.ngcc-notif__list{list-style:none;margin:0;padding:0}.ngcc-notif__item{display:flex;align-items:flex-start;border-block-end:1px solid var(--cds-border-subtle-01);border-inline-start:3px solid var(--ngcc-notif-color, transparent)}.ngcc-notif__item--info{--ngcc-notif-color: var(--cds-support-info)}.ngcc-notif__item--success{--ngcc-notif-color: var(--cds-support-success)}.ngcc-notif__item--warning{--ngcc-notif-color: var(--cds-support-warning)}.ngcc-notif__item--error{--ngcc-notif-color: var(--cds-support-error)}.ngcc-notif__item--read{--ngcc-notif-color: transparent}.ngcc-notif__main{flex:1;min-inline-size:0;padding:.75rem .5rem .75rem 1rem;border:0;background:none;text-align:start;font:inherit;color:var(--cds-text-primary);cursor:pointer}.ngcc-notif__main:hover{background:var(--cds-layer-hover-01)}.ngcc-notif__title{display:block;font-size:.875rem;font-weight:600}.ngcc-notif__item--read .ngcc-notif__title{font-weight:400}.ngcc-notif__message{display:block;margin-block-start:.25rem;font-size:.875rem;color:var(--cds-text-secondary)}.ngcc-notif__time{display:block;margin-block-start:.25rem;font-size:.75rem;color:var(--cds-text-helper)}.ngcc-notif__dismiss{flex:none;margin:.5rem .5rem 0 0;padding:.25rem;border:0;background:none;color:var(--cds-icon-secondary);cursor:pointer;line-height:0}.ngcc-notif__empty{margin:0;padding:2rem 1rem;text-align:center;font-size:.875rem;color:var(--cds-text-secondary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9561
+ }
9562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccNotificationList, decorators: [{
9563
+ type: Component,
9564
+ args: [{ selector: 'ngcc-notification-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block' }, template: `
9565
+ <div class="ngcc-notif__header">
9566
+ <h2 class="ngcc-notif__heading">
9567
+ {{ heading() }}
9568
+ @if (unreadCount() > 0) {
9569
+ <span class="ngcc-notif__count" [attr.aria-label]="unreadCount() + ' unread'">{{
9570
+ unreadCount()
9571
+ }}</span>
9572
+ }
9573
+ </h2>
9574
+ <div class="ngcc-notif__actions">
9575
+ <button
9576
+ type="button"
9577
+ class="ngcc-notif__link"
9578
+ [disabled]="unreadCount() === 0"
9579
+ (click)="markAllRead.emit()"
9580
+ >
9581
+ Mark all read
9582
+ </button>
9583
+ <button
9584
+ type="button"
9585
+ class="ngcc-notif__link"
9586
+ [disabled]="items().length === 0"
9587
+ (click)="clear.emit()"
9588
+ >
9589
+ Clear all
9590
+ </button>
9591
+ </div>
9592
+ </div>
9593
+ @if (items().length) {
9594
+ <ul class="ngcc-notif__list">
9595
+ @for (item of items(); track item.id) {
9596
+ <li
9597
+ [class]="
9598
+ 'ngcc-notif__item ngcc-notif__item--' +
9599
+ (item.severity ?? 'info') +
9600
+ (item.read ? ' ngcc-notif__item--read' : '')
9601
+ "
9602
+ >
9603
+ <button type="button" class="ngcc-notif__main" (click)="itemClicked.emit(item)">
9604
+ @if (!item.read) {
9605
+ <span class="cds--visually-hidden">Unread: </span>
9606
+ }
9607
+ <span class="ngcc-notif__title">{{ item.title }}</span>
9608
+ @if (item.message) {
9609
+ <span class="ngcc-notif__message">{{ item.message }}</span>
9610
+ }
9611
+ @if (item.timestamp) {
9612
+ <span class="ngcc-notif__time">{{ item.timestamp }}</span>
9613
+ }
9614
+ </button>
9615
+ <button
9616
+ type="button"
9617
+ class="ngcc-notif__dismiss"
9618
+ [attr.aria-label]="'Dismiss ' + item.title"
9619
+ (click)="dismissed.emit(item)"
9620
+ >
9621
+ <svg
9622
+ width="16"
9623
+ height="16"
9624
+ viewBox="0 0 32 32"
9625
+ fill="currentColor"
9626
+ aria-hidden="true"
9627
+ >
9628
+ <path
9629
+ d="M24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16z"
9630
+ ></path>
9631
+ </svg>
9632
+ </button>
9633
+ </li>
9634
+ }
9635
+ </ul>
9636
+ } @else {
9637
+ <p class="ngcc-notif__empty">{{ emptyText() }}</p>
9638
+ }
9639
+ `, styles: [".ngcc-notif__header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-block-end:1px solid var(--cds-border-subtle-01)}.ngcc-notif__heading{margin:0;font-size:1rem;font-weight:600;color:var(--cds-text-primary)}.ngcc-notif__count{margin-inline-start:.5rem;padding:0 .5rem;border-radius:1rem;font-size:.75rem;font-weight:400;color:var(--cds-text-on-color);background:var(--cds-support-error)}.ngcc-notif__actions{display:flex;gap:.25rem}.ngcc-notif__link{padding:.25rem .5rem;border:0;background:none;font:inherit;font-size:.75rem;color:var(--cds-link-primary);cursor:pointer}.ngcc-notif__link:hover:not(:disabled){text-decoration:underline}.ngcc-notif__link:disabled{color:var(--cds-text-disabled);cursor:not-allowed}.ngcc-notif__link:focus-visible,.ngcc-notif__main:focus-visible,.ngcc-notif__dismiss:focus-visible{outline:2px solid var(--cds-focus);outline-offset:-2px}.ngcc-notif__list{list-style:none;margin:0;padding:0}.ngcc-notif__item{display:flex;align-items:flex-start;border-block-end:1px solid var(--cds-border-subtle-01);border-inline-start:3px solid var(--ngcc-notif-color, transparent)}.ngcc-notif__item--info{--ngcc-notif-color: var(--cds-support-info)}.ngcc-notif__item--success{--ngcc-notif-color: var(--cds-support-success)}.ngcc-notif__item--warning{--ngcc-notif-color: var(--cds-support-warning)}.ngcc-notif__item--error{--ngcc-notif-color: var(--cds-support-error)}.ngcc-notif__item--read{--ngcc-notif-color: transparent}.ngcc-notif__main{flex:1;min-inline-size:0;padding:.75rem .5rem .75rem 1rem;border:0;background:none;text-align:start;font:inherit;color:var(--cds-text-primary);cursor:pointer}.ngcc-notif__main:hover{background:var(--cds-layer-hover-01)}.ngcc-notif__title{display:block;font-size:.875rem;font-weight:600}.ngcc-notif__item--read .ngcc-notif__title{font-weight:400}.ngcc-notif__message{display:block;margin-block-start:.25rem;font-size:.875rem;color:var(--cds-text-secondary)}.ngcc-notif__time{display:block;margin-block-start:.25rem;font-size:.75rem;color:var(--cds-text-helper)}.ngcc-notif__dismiss{flex:none;margin:.5rem .5rem 0 0;padding:.25rem;border:0;background:none;color:var(--cds-icon-secondary);cursor:pointer;line-height:0}.ngcc-notif__empty{margin:0;padding:2rem 1rem;text-align:center;font-size:.875rem;color:var(--cds-text-secondary)}\n"] }]
9640
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], markAllRead: [{ type: i0.Output, args: ["markAllRead"] }], clear: [{ type: i0.Output, args: ["clear"] }] } });
9641
+
9642
+ const day = (d, offset = 0) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + offset);
9643
+ const NGCC_DEFAULT_DATE_PRESETS = [
9644
+ { key: 'today', label: 'Today', range: (t) => ({ start: day(t), end: day(t) }) },
9645
+ { key: 'last-7-days', label: 'Last 7 days', range: (t) => ({ start: day(t, -6), end: day(t) }) },
9646
+ {
9647
+ key: 'last-30-days',
9648
+ label: 'Last 30 days',
9649
+ range: (t) => ({ start: day(t, -29), end: day(t) }),
9650
+ },
9651
+ {
9652
+ key: 'this-month',
9653
+ label: 'This month',
9654
+ range: (t) => ({
9655
+ start: new Date(t.getFullYear(), t.getMonth(), 1),
9656
+ end: new Date(t.getFullYear(), t.getMonth() + 1, 0),
9657
+ }),
9658
+ },
9659
+ {
9660
+ key: 'last-month',
9661
+ label: 'Last month',
9662
+ range: (t) => ({
9663
+ start: new Date(t.getFullYear(), t.getMonth() - 1, 1),
9664
+ end: new Date(t.getFullYear(), t.getMonth(), 0),
9665
+ }),
9666
+ },
9667
+ { key: 'custom', label: 'Custom range' },
9668
+ ];
9669
+ /** Resolves a preset key to a concrete range, e.g. to seed `[(value)]`. */
9670
+ function ngccResolveDatePreset(key, today = new Date(), presets = NGCC_DEFAULT_DATE_PRESETS) {
9671
+ const range = presets.find((p) => p.key === key)?.range?.(today);
9672
+ return { start: range?.start ?? null, end: range?.end ?? null, preset: key };
9673
+ }
9674
+ const toIso = (d) => d
9675
+ ? `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`
9676
+ : '';
9677
+ const fromIso = (s) => {
9678
+ const [y, m, d] = s.split('-').map(Number);
9679
+ return y && m && d ? new Date(y, m - 1, d) : null;
9680
+ };
9681
+ /**
9682
+ * Date-range picker with presets. Choosing "Custom range" reveals start/end date
9683
+ * inputs; the model only updates once both dates are set and start <= end.
9684
+ */
9685
+ class NgccDateRangePicker {
9686
+ static nextId = 0;
9687
+ id = `ngcc-drp-${NgccDateRangePicker.nextId++}`;
9688
+ value = model({ start: null, end: null, preset: '' }, ...(ngDevMode ? [{ debugName: "value" }] : []));
9689
+ presets = input(NGCC_DEFAULT_DATE_PRESETS, ...(ngDevMode ? [{ debugName: "presets" }] : []));
9690
+ label = input('Date range', ...(ngDevMode ? [{ debugName: "label" }] : []));
9691
+ placeholder = input('Select a range', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
9692
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
9693
+ minDate = input(null, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
9694
+ maxDate = input(null, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
9695
+ /** "Today" used to resolve presets; override for tests/SSR. */
9696
+ today = input(undefined, ...(ngDevMode ? [{ debugName: "today" }] : []));
9697
+ min = computed(() => toIso(this.minDate()) || null, ...(ngDevMode ? [{ debugName: "min" }] : []));
9698
+ max = computed(() => toIso(this.maxDate()) || null, ...(ngDevMode ? [{ debugName: "max" }] : []));
9699
+ isCustom = computed(() => {
9700
+ const preset = this.presets().find((p) => p.key === this.value().preset);
9701
+ return !!preset && !preset.range;
9702
+ }, ...(ngDevMode ? [{ debugName: "isCustom" }] : []));
9703
+ startText = linkedSignal(() => toIso(this.value().start), ...(ngDevMode ? [{ debugName: "startText" }] : []));
9704
+ endText = linkedSignal(() => toIso(this.value().end), ...(ngDevMode ? [{ debugName: "endText" }] : []));
9705
+ invalid = computed(() => !!this.startText() && !!this.endText() && this.endText() < this.startText(), ...(ngDevMode ? [{ debugName: "invalid" }] : []));
9706
+ onPreset(key) {
9707
+ const preset = this.presets().find((p) => p.key === key);
9708
+ if (!preset)
9709
+ return;
9710
+ if (preset.range) {
9711
+ this.value.set({ ...preset.range(this.today() ?? new Date()), preset: key });
9712
+ }
9713
+ else {
9714
+ this.value.update((v) => ({ ...v, preset: key }));
9715
+ }
9716
+ }
9717
+ onCustom(which, text) {
9718
+ (which === 'start' ? this.startText : this.endText).set(text);
9719
+ const start = fromIso(this.startText());
9720
+ const end = fromIso(this.endText());
9721
+ if (start && end && !this.invalid()) {
9722
+ this.value.set({ start, end, preset: this.value().preset });
9723
+ }
9724
+ }
9725
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccDateRangePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
9726
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccDateRangePicker, isStandalone: true, selector: "ngcc-date-range-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, today: { classPropertyName: "today", publicName: "today", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
9727
+ <fieldset class="ngcc-drp" [disabled]="disabled()">
9728
+ @if (label()) {
9729
+ <legend class="cds--label">{{ label() }}</legend>
9730
+ }
9731
+ <div class="cds--select">
9732
+ <div class="cds--select-input__wrapper">
9733
+ <select
9734
+ class="cds--select-input"
9735
+ [attr.aria-label]="label() || 'Date range'"
9736
+ (change)="onPreset($any($event.target).value)"
9737
+ >
9738
+ @if (!value().preset) {
9739
+ <option value="" selected disabled hidden>{{ placeholder() }}</option>
9740
+ }
9741
+ @for (p of presets(); track p.key) {
9742
+ <option [value]="p.key" [selected]="p.key === value().preset">{{ p.label }}</option>
9743
+ }
9744
+ </select>
9745
+ <svg
9746
+ class="cds--select__arrow"
9747
+ width="16"
9748
+ height="16"
9749
+ viewBox="0 0 16 16"
9750
+ fill="currentColor"
9751
+ aria-hidden="true"
9752
+ >
9753
+ <path d="M8 11 3 6l.7-.7L8 9.6l4.3-4.3.7.7z"></path>
9754
+ </svg>
9755
+ </div>
9756
+ </div>
9757
+ @if (isCustom()) {
9758
+ <div class="ngcc-drp__custom">
9759
+ <div class="cds--form-item ngcc-drp__field">
9760
+ <label class="cds--label" [attr.for]="id + '-start'">Start date</label>
9761
+ <input
9762
+ type="date"
9763
+ class="cds--text-input"
9764
+ [id]="id + '-start'"
9765
+ [value]="startText()"
9766
+ [attr.min]="min()"
9767
+ [attr.max]="max()"
9768
+ [attr.aria-invalid]="invalid() || null"
9769
+ (change)="onCustom('start', $any($event.target).value)"
9770
+ />
9771
+ </div>
9772
+ <div class="cds--form-item ngcc-drp__field">
9773
+ <label class="cds--label" [attr.for]="id + '-end'">End date</label>
9774
+ <input
9775
+ type="date"
9776
+ class="cds--text-input"
9777
+ [id]="id + '-end'"
9778
+ [value]="endText()"
9779
+ [attr.min]="startText() || min()"
9780
+ [attr.max]="max()"
9781
+ [attr.aria-invalid]="invalid() || null"
9782
+ (change)="onCustom('end', $any($event.target).value)"
9783
+ />
9784
+ </div>
9785
+ </div>
9786
+ @if (invalid()) {
9787
+ <div class="cds--form-requirement" role="alert" style="display: block; max-height: none">
9788
+ End date must be on or after the start date.
9789
+ </div>
9790
+ }
9791
+ }
9792
+ </fieldset>
9793
+ `, isInline: true, styles: [".ngcc-drp{border:0;margin:0;padding:0}.ngcc-drp__custom{display:flex;flex-wrap:wrap;gap:1rem;margin-block-start:1rem}.ngcc-drp__field{flex:1 1 10rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9794
+ }
9795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccDateRangePicker, decorators: [{
9796
+ type: Component,
9797
+ args: [{ selector: 'ngcc-date-range-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block' }, template: `
9798
+ <fieldset class="ngcc-drp" [disabled]="disabled()">
9799
+ @if (label()) {
9800
+ <legend class="cds--label">{{ label() }}</legend>
9801
+ }
9802
+ <div class="cds--select">
9803
+ <div class="cds--select-input__wrapper">
9804
+ <select
9805
+ class="cds--select-input"
9806
+ [attr.aria-label]="label() || 'Date range'"
9807
+ (change)="onPreset($any($event.target).value)"
9808
+ >
9809
+ @if (!value().preset) {
9810
+ <option value="" selected disabled hidden>{{ placeholder() }}</option>
9811
+ }
9812
+ @for (p of presets(); track p.key) {
9813
+ <option [value]="p.key" [selected]="p.key === value().preset">{{ p.label }}</option>
9814
+ }
9815
+ </select>
9816
+ <svg
9817
+ class="cds--select__arrow"
9818
+ width="16"
9819
+ height="16"
9820
+ viewBox="0 0 16 16"
9821
+ fill="currentColor"
9822
+ aria-hidden="true"
9823
+ >
9824
+ <path d="M8 11 3 6l.7-.7L8 9.6l4.3-4.3.7.7z"></path>
9825
+ </svg>
9826
+ </div>
9827
+ </div>
9828
+ @if (isCustom()) {
9829
+ <div class="ngcc-drp__custom">
9830
+ <div class="cds--form-item ngcc-drp__field">
9831
+ <label class="cds--label" [attr.for]="id + '-start'">Start date</label>
9832
+ <input
9833
+ type="date"
9834
+ class="cds--text-input"
9835
+ [id]="id + '-start'"
9836
+ [value]="startText()"
9837
+ [attr.min]="min()"
9838
+ [attr.max]="max()"
9839
+ [attr.aria-invalid]="invalid() || null"
9840
+ (change)="onCustom('start', $any($event.target).value)"
9841
+ />
9842
+ </div>
9843
+ <div class="cds--form-item ngcc-drp__field">
9844
+ <label class="cds--label" [attr.for]="id + '-end'">End date</label>
9845
+ <input
9846
+ type="date"
9847
+ class="cds--text-input"
9848
+ [id]="id + '-end'"
9849
+ [value]="endText()"
9850
+ [attr.min]="startText() || min()"
9851
+ [attr.max]="max()"
9852
+ [attr.aria-invalid]="invalid() || null"
9853
+ (change)="onCustom('end', $any($event.target).value)"
9854
+ />
9855
+ </div>
9856
+ </div>
9857
+ @if (invalid()) {
9858
+ <div class="cds--form-requirement" role="alert" style="display: block; max-height: none">
9859
+ End date must be on or after the start date.
9860
+ </div>
9861
+ }
9862
+ }
9863
+ </fieldset>
9864
+ `, styles: [".ngcc-drp{border:0;margin:0;padding:0}.ngcc-drp__custom{display:flex;flex-wrap:wrap;gap:1rem;margin-block-start:1rem}.ngcc-drp__field{flex:1 1 10rem}\n"] }]
9865
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], today: [{ type: i0.Input, args: [{ isSignal: true, alias: "today", required: false }] }] } });
9866
+
9867
+ /**
9868
+ * Filter bar: a search input that is also a combobox. Typing narrows a list of
9869
+ * `Field: Option` suggestions; picking one adds a dismissible chip. The free-text
9870
+ * `query` and the chips are both part of the two-way `value`.
9871
+ */
9872
+ class NgccFilterBar {
9873
+ static nextId = 0;
9874
+ listId = `ngcc-fb-list-${NgccFilterBar.nextId++}`;
9875
+ value = model({ query: '', filters: {} }, ...(ngDevMode ? [{ debugName: "value" }] : []));
9876
+ fields = input([], ...(ngDevMode ? [{ debugName: "fields" }] : []));
9877
+ placeholder = input('Search or filter', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
9878
+ ariaLabel = input('Search and filter', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
9879
+ maxSuggestions = input(8, ...(ngDevMode ? [{ debugName: "maxSuggestions" }] : []));
9880
+ open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
9881
+ active = signal(-1, ...(ngDevMode ? [{ debugName: "active" }] : []));
9882
+ chips = computed(() => this.fields().flatMap((field) => (this.value().filters[field.key] ?? [])
9883
+ .map((v) => field.options.find((o) => o.value === v))
9884
+ .filter((o) => !!o)
9885
+ .map((option) => ({ field, option }))), ...(ngDevMode ? [{ debugName: "chips" }] : []));
9886
+ suggestions = computed(() => {
9887
+ const q = this.value().query.trim().toLowerCase();
9888
+ const selected = this.value().filters;
9889
+ return this.fields()
9890
+ .flatMap((field) => field.options
9891
+ .filter((o) => !selected[field.key]?.includes(o.value))
9892
+ .map((option) => ({ field, option })))
9893
+ .filter((s) => !q || `${s.field.label} ${s.option.label}`.toLowerCase().includes(q))
9894
+ .slice(0, this.maxSuggestions());
9895
+ }, ...(ngDevMode ? [{ debugName: "suggestions" }] : []));
9896
+ showList = computed(() => this.open() && this.suggestions().length > 0, ...(ngDevMode ? [{ debugName: "showList" }] : []));
9897
+ hasAny = computed(() => !!this.value().query || this.chips().length > 0, ...(ngDevMode ? [{ debugName: "hasAny" }] : []));
9898
+ activeId = computed(() => this.showList() && this.active() >= 0 ? this.optionId(this.active()) : null, ...(ngDevMode ? [{ debugName: "activeId" }] : []));
9899
+ optionId(i) {
9900
+ return `${this.listId}-opt-${i}`;
9901
+ }
9902
+ onInput(query) {
9903
+ this.value.update((v) => ({ ...v, query }));
9904
+ this.open.set(true);
9905
+ this.active.set(-1);
9906
+ }
9907
+ add(s) {
9908
+ this.value.update((v) => ({
9909
+ query: '',
9910
+ filters: { ...v.filters, [s.field.key]: [...(v.filters[s.field.key] ?? []), s.option.value] },
9911
+ }));
9912
+ this.active.set(-1);
9913
+ }
9914
+ remove(s) {
9915
+ this.value.update((v) => {
9916
+ const left = (v.filters[s.field.key] ?? []).filter((x) => x !== s.option.value);
9917
+ const filters = { ...v.filters };
9918
+ if (left.length)
9919
+ filters[s.field.key] = left;
9920
+ else
9921
+ delete filters[s.field.key];
9922
+ return { ...v, filters };
9923
+ });
9924
+ }
9925
+ clearAll() {
9926
+ this.value.set({ query: '', filters: {} });
9927
+ this.active.set(-1);
9928
+ }
9929
+ onKeydown(ev) {
9930
+ const n = this.suggestions().length;
9931
+ switch (ev.key) {
9932
+ case 'ArrowDown':
9933
+ case 'ArrowUp': {
9934
+ if (!n)
9935
+ return;
9936
+ ev.preventDefault();
9937
+ this.open.set(true);
9938
+ const step = ev.key === 'ArrowDown' ? 1 : -1;
9939
+ this.active.update((i) => (i < 0 ? (step > 0 ? 0 : n - 1) : (i + step + n) % n));
9940
+ break;
9941
+ }
9942
+ case 'Enter': {
9943
+ const s = this.showList() ? this.suggestions()[this.active()] : undefined;
9944
+ if (s) {
9945
+ ev.preventDefault();
9946
+ this.add(s);
9947
+ }
9948
+ break;
9949
+ }
9950
+ case 'Escape':
9951
+ if (this.open()) {
9952
+ this.open.set(false);
9953
+ ev.preventDefault();
9954
+ }
9955
+ else if (this.value().query) {
9956
+ this.onInput('');
9957
+ this.open.set(false);
9958
+ }
9959
+ break;
9960
+ case 'Backspace': {
9961
+ const chips = this.chips();
9962
+ if (!this.value().query && chips.length)
9963
+ this.remove(chips[chips.length - 1]);
9964
+ break;
9965
+ }
9966
+ }
9967
+ }
9968
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccFilterBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
9969
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccFilterBar, isStandalone: true, selector: "ngcc-filter-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, maxSuggestions: { classPropertyName: "maxSuggestions", publicName: "maxSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { styleAttribute: "display: block; position: relative" }, ngImport: i0, template: `
9970
+ <div class="ngcc-fb">
9971
+ <div class="ngcc-fb__box">
9972
+ @for (chip of chips(); track chip.field.key + chip.option.value) {
9973
+ <ngcc-tag
9974
+ type="gray"
9975
+ [dismissible]="true"
9976
+ [dismissLabel]="'Remove filter ' + chip.field.label + ': ' + chip.option.label"
9977
+ (dismissed)="remove(chip)"
9978
+ >{{ chip.field.label }}: {{ chip.option.label }}</ngcc-tag
9979
+ >
9980
+ }
9981
+ <input
9982
+ type="text"
9983
+ class="ngcc-fb__input"
9984
+ role="combobox"
9985
+ aria-autocomplete="list"
9986
+ autocomplete="off"
9987
+ [attr.aria-label]="ariaLabel()"
9988
+ [attr.aria-expanded]="showList()"
9989
+ [attr.aria-controls]="listId"
9990
+ [attr.aria-activedescendant]="activeId()"
9991
+ [placeholder]="placeholder()"
9992
+ [value]="value().query"
9993
+ (input)="onInput($any($event.target).value)"
9994
+ (focus)="open.set(true)"
9995
+ (blur)="open.set(false)"
9996
+ (keydown)="onKeydown($event)"
9997
+ />
9998
+ </div>
9999
+ @if (hasAny()) {
10000
+ <button type="button" class="ngcc-fb__clear" (click)="clearAll()">Clear all</button>
10001
+ }
10002
+ </div>
10003
+ <ul
10004
+ class="ngcc-fb__list"
10005
+ role="listbox"
10006
+ [id]="listId"
10007
+ [attr.aria-label]="'Filter suggestions'"
10008
+ [hidden]="!showList()"
10009
+ >
10010
+ @for (s of suggestions(); track s.field.key + s.option.value; let i = $index) {
10011
+ <li
10012
+ role="option"
10013
+ [id]="optionId(i)"
10014
+ [class]="'ngcc-fb__option' + (i === active() ? ' ngcc-fb__option--active' : '')"
10015
+ [attr.aria-selected]="i === active()"
10016
+ (mousedown)="$event.preventDefault(); add(s)"
10017
+ >
10018
+ <span class="ngcc-fb__field">{{ s.field.label }}:</span> {{ s.option.label }}
10019
+ </li>
10020
+ }
10021
+ </ul>
10022
+ `, isInline: true, styles: [".ngcc-fb{display:flex;align-items:center;gap:.5rem}.ngcc-fb__box{flex:1;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;min-block-size:2.5rem;padding:0 1rem;background:var(--cds-field);border-block-end:1px solid var(--cds-border-strong);color:var(--cds-text-primary)}.ngcc-fb__box:focus-within{outline:2px solid var(--cds-focus);outline-offset:-2px}.ngcc-fb__input{flex:1;min-inline-size:8rem;block-size:2.5rem;padding:0;border:0;background:none;font:inherit;font-size:.875rem;color:inherit;outline:none}.ngcc-fb__input::placeholder{color:var(--cds-text-placeholder)}.ngcc-fb__clear{padding:.5rem;border:0;background:none;font:inherit;font-size:.875rem;color:var(--cds-link-primary);cursor:pointer}.ngcc-fb__clear:focus-visible{outline:2px solid var(--cds-focus)}.ngcc-fb__list{position:absolute;inset-inline:0;z-index:var(--cds-layer-overlay, 9000);max-block-size:15rem;margin:0;padding:0;overflow-y:auto;list-style:none;background:var(--cds-layer-01);box-shadow:0 2px 6px #0000004d}.ngcc-fb__option{padding:.75rem 1rem;font-size:.875rem;color:var(--cds-text-primary);cursor:pointer}.ngcc-fb__option--active,.ngcc-fb__option:hover{background:var(--cds-layer-hover-01)}.ngcc-fb__field{color:var(--cds-text-secondary)}\n"], dependencies: [{ kind: "component", type: NgccTag, selector: "ngcc-tag", inputs: ["type", "size", "dot", "dismissible", "disabled", "dismissLabel"], outputs: ["dismissed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10023
+ }
10024
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccFilterBar, decorators: [{
10025
+ type: Component,
10026
+ args: [{ selector: 'ngcc-filter-bar', standalone: true, imports: [NgccTag], changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display: block; position: relative' }, template: `
10027
+ <div class="ngcc-fb">
10028
+ <div class="ngcc-fb__box">
10029
+ @for (chip of chips(); track chip.field.key + chip.option.value) {
10030
+ <ngcc-tag
10031
+ type="gray"
10032
+ [dismissible]="true"
10033
+ [dismissLabel]="'Remove filter ' + chip.field.label + ': ' + chip.option.label"
10034
+ (dismissed)="remove(chip)"
10035
+ >{{ chip.field.label }}: {{ chip.option.label }}</ngcc-tag
10036
+ >
10037
+ }
10038
+ <input
10039
+ type="text"
10040
+ class="ngcc-fb__input"
10041
+ role="combobox"
10042
+ aria-autocomplete="list"
10043
+ autocomplete="off"
10044
+ [attr.aria-label]="ariaLabel()"
10045
+ [attr.aria-expanded]="showList()"
10046
+ [attr.aria-controls]="listId"
10047
+ [attr.aria-activedescendant]="activeId()"
10048
+ [placeholder]="placeholder()"
10049
+ [value]="value().query"
10050
+ (input)="onInput($any($event.target).value)"
10051
+ (focus)="open.set(true)"
10052
+ (blur)="open.set(false)"
10053
+ (keydown)="onKeydown($event)"
10054
+ />
10055
+ </div>
10056
+ @if (hasAny()) {
10057
+ <button type="button" class="ngcc-fb__clear" (click)="clearAll()">Clear all</button>
10058
+ }
10059
+ </div>
10060
+ <ul
10061
+ class="ngcc-fb__list"
10062
+ role="listbox"
10063
+ [id]="listId"
10064
+ [attr.aria-label]="'Filter suggestions'"
10065
+ [hidden]="!showList()"
10066
+ >
10067
+ @for (s of suggestions(); track s.field.key + s.option.value; let i = $index) {
10068
+ <li
10069
+ role="option"
10070
+ [id]="optionId(i)"
10071
+ [class]="'ngcc-fb__option' + (i === active() ? ' ngcc-fb__option--active' : '')"
10072
+ [attr.aria-selected]="i === active()"
10073
+ (mousedown)="$event.preventDefault(); add(s)"
10074
+ >
10075
+ <span class="ngcc-fb__field">{{ s.field.label }}:</span> {{ s.option.label }}
10076
+ </li>
10077
+ }
10078
+ </ul>
10079
+ `, styles: [".ngcc-fb{display:flex;align-items:center;gap:.5rem}.ngcc-fb__box{flex:1;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;min-block-size:2.5rem;padding:0 1rem;background:var(--cds-field);border-block-end:1px solid var(--cds-border-strong);color:var(--cds-text-primary)}.ngcc-fb__box:focus-within{outline:2px solid var(--cds-focus);outline-offset:-2px}.ngcc-fb__input{flex:1;min-inline-size:8rem;block-size:2.5rem;padding:0;border:0;background:none;font:inherit;font-size:.875rem;color:inherit;outline:none}.ngcc-fb__input::placeholder{color:var(--cds-text-placeholder)}.ngcc-fb__clear{padding:.5rem;border:0;background:none;font:inherit;font-size:.875rem;color:var(--cds-link-primary);cursor:pointer}.ngcc-fb__clear:focus-visible{outline:2px solid var(--cds-focus)}.ngcc-fb__list{position:absolute;inset-inline:0;z-index:var(--cds-layer-overlay, 9000);max-block-size:15rem;margin:0;padding:0;overflow-y:auto;list-style:none;background:var(--cds-layer-01);box-shadow:0 2px 6px #0000004d}.ngcc-fb__option{padding:.75rem 1rem;font-size:.875rem;color:var(--cds-text-primary);cursor:pointer}.ngcc-fb__option--active,.ngcc-fb__option:hover{background:var(--cds-layer-hover-01)}.ngcc-fb__field{color:var(--cds-text-secondary)}\n"] }]
10080
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSuggestions", required: false }] }] } });
10081
+
10082
+ /**
10083
+ * Overflow (row action) menu. The menu is `position: fixed`, so it is not clipped by
10084
+ * table or scroll containers. Keyboard: Enter/Space/ArrowDown open, arrows/Home/End move,
10085
+ * Escape closes and returns focus to the trigger.
10086
+ */
10087
+ class NgccOverflowMenu {
10088
+ host = inject(ElementRef);
10089
+ injector = inject(Injector);
10090
+ options = viewChildren('option', ...(ngDevMode ? [{ debugName: "options" }] : []));
10091
+ items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
10092
+ ariaLabel = input('Actions', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
10093
+ /** Which edge of the trigger the menu lines up with. */
10094
+ align = input('end', ...(ngDevMode ? [{ debugName: "align" }] : []));
10095
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
10096
+ orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
10097
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
10098
+ itemSelected = output();
10099
+ open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
10100
+ pos = signal({ top: null, bottom: null, left: null, right: null }, ...(ngDevMode ? [{ debugName: "pos" }] : []));
10101
+ constructor() {
10102
+ // Fixed positioning would detach the menu from its trigger on scroll, so close instead.
10103
+ effect((onCleanup) => {
10104
+ if (!this.open())
10105
+ return;
10106
+ const close = () => this.close();
10107
+ document.addEventListener('scroll', close, true);
10108
+ onCleanup(() => document.removeEventListener('scroll', close, true));
10109
+ });
10110
+ }
10111
+ toggle() {
10112
+ if (this.open())
10113
+ this.close();
10114
+ else
10115
+ this.show(0);
10116
+ }
10117
+ close(returnFocus = false) {
10118
+ if (!this.open())
10119
+ return;
10120
+ this.open.set(false);
10121
+ if (returnFocus)
10122
+ this.trigger()?.focus();
10123
+ }
10124
+ trigger() {
10125
+ return this.host.nativeElement.querySelector('button.cds--overflow-menu');
10126
+ }
10127
+ show(focusFrom) {
10128
+ const trigger = this.trigger();
10129
+ if (!trigger)
10130
+ return;
10131
+ const rect = trigger.getBoundingClientRect();
10132
+ const estimate = this.items().length * 40;
10133
+ const flip = rect.bottom + estimate > window.innerHeight && rect.top > estimate;
10134
+ const end = this.align() === 'end';
10135
+ this.pos.set({
10136
+ top: flip ? null : rect.bottom,
10137
+ bottom: flip ? window.innerHeight - rect.top : null,
10138
+ left: end ? null : rect.left,
10139
+ right: end ? document.documentElement.clientWidth - rect.right : null,
10140
+ });
10141
+ this.open.set(true);
10142
+ afterNextRender(() => this.focusOption(focusFrom === 'last' ? this.enabledIndexes().length - 1 : focusFrom, true), {
10143
+ injector: this.injector,
10144
+ });
10145
+ }
10146
+ enabledIndexes() {
10147
+ return this.options()
10148
+ .map((o, i) => (o.nativeElement.disabled ? -1 : i))
10149
+ .filter((i) => i >= 0);
10150
+ }
10151
+ /** `n` indexes into the enabled options; wraps around when `wrap`. */
10152
+ focusOption(n, wrap = false) {
10153
+ const enabled = this.enabledIndexes();
10154
+ if (!enabled.length)
10155
+ return;
10156
+ const i = wrap
10157
+ ? (n + enabled.length) % enabled.length
10158
+ : Math.min(Math.max(n, 0), enabled.length - 1);
10159
+ this.options()[enabled[i]].nativeElement.focus();
10160
+ }
10161
+ select(item) {
10162
+ if (item.disabled)
10163
+ return;
10164
+ this.close(true);
10165
+ this.itemSelected.emit(item);
10166
+ }
10167
+ onTriggerKeydown(ev) {
10168
+ if (this.open())
10169
+ return;
10170
+ if (ev.key === 'ArrowDown') {
10171
+ ev.preventDefault();
10172
+ this.show(0);
10173
+ }
10174
+ else if (ev.key === 'ArrowUp') {
10175
+ ev.preventDefault();
10176
+ this.show('last');
10177
+ }
10178
+ }
10179
+ onMenuKeydown(ev) {
10180
+ const enabled = this.enabledIndexes();
10181
+ const current = enabled.indexOf(this.options().findIndex((o) => o.nativeElement === document.activeElement));
10182
+ switch (ev.key) {
10183
+ case 'ArrowDown':
10184
+ this.focusOption(current + 1, true);
10185
+ break;
10186
+ case 'ArrowUp':
10187
+ this.focusOption(current - 1, true);
10188
+ break;
10189
+ case 'Home':
10190
+ this.focusOption(0);
10191
+ break;
10192
+ case 'End':
10193
+ this.focusOption(enabled.length - 1);
10194
+ break;
10195
+ case 'Escape':
10196
+ this.close(true);
10197
+ break;
10198
+ case 'Tab':
10199
+ this.close();
10200
+ return;
10201
+ default:
10202
+ return;
10203
+ }
10204
+ ev.preventDefault();
10205
+ }
10206
+ onDocumentClick(ev) {
10207
+ if (this.open() && !this.host.nativeElement.contains(ev.target))
10208
+ this.close();
10209
+ }
10210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccOverflowMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
10211
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccOverflowMenu, isStandalone: true, selector: "ngcc-overflow-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelected: "itemSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)", "window:resize": "close()", "window:blur": "close()" }, styleAttribute: "display: inline-block" }, viewQueries: [{ propertyName: "options", predicate: ["option"], descendants: true, isSignal: true }], ngImport: i0, template: `
10212
+ <button
10213
+ #trigger
10214
+ type="button"
10215
+ [class]="
10216
+ 'cds--overflow-menu' +
10217
+ (size() !== 'md' ? ' cds--overflow-menu--' + size() : '') +
10218
+ (open() ? ' cds--overflow-menu--open' : '')
10219
+ "
10220
+ aria-haspopup="menu"
10221
+ [attr.aria-expanded]="open()"
10222
+ [attr.aria-label]="ariaLabel()"
10223
+ [disabled]="disabled()"
10224
+ (click)="toggle()"
10225
+ (keydown)="onTriggerKeydown($event)"
10226
+ >
10227
+ <svg
10228
+ class="cds--overflow-menu__icon"
10229
+ width="16"
10230
+ height="16"
10231
+ viewBox="0 0 32 32"
10232
+ fill="currentColor"
10233
+ aria-hidden="true"
10234
+ focusable="false"
10235
+ >
10236
+ @if (orientation() === 'vertical') {
10237
+ <circle cx="16" cy="8" r="2"></circle>
10238
+ <circle cx="16" cy="16" r="2"></circle>
10239
+ <circle cx="16" cy="24" r="2"></circle>
10240
+ } @else {
10241
+ <circle cx="8" cy="16" r="2"></circle>
10242
+ <circle cx="16" cy="16" r="2"></circle>
10243
+ <circle cx="24" cy="16" r="2"></circle>
10244
+ }
10245
+ </svg>
10246
+ </button>
10247
+ @if (open()) {
10248
+ <ul
10249
+ class="cds--overflow-menu-options cds--overflow-menu-options--open ngcc-overflow__menu"
10250
+ role="menu"
10251
+ [attr.aria-label]="ariaLabel()"
10252
+ [style.--ngcc-overflow-top.px]="pos().top"
10253
+ [style.--ngcc-overflow-bottom.px]="pos().bottom"
10254
+ [style.--ngcc-overflow-left.px]="pos().left"
10255
+ [style.--ngcc-overflow-right.px]="pos().right"
10256
+ (keydown)="onMenuKeydown($event)"
10257
+ >
10258
+ @for (item of items(); track item.id) {
10259
+ <li
10260
+ role="none"
10261
+ [class]="
10262
+ 'cds--overflow-menu-options__option' +
10263
+ (item.danger ? ' cds--overflow-menu-options__option--danger' : '') +
10264
+ (item.disabled ? ' cds--overflow-menu-options__option--disabled' : '') +
10265
+ (item.divider ? ' ngcc-overflow__divider' : '')
10266
+ "
10267
+ >
10268
+ <button
10269
+ #option
10270
+ type="button"
10271
+ role="menuitem"
10272
+ class="cds--overflow-menu-options__btn"
10273
+ tabindex="-1"
10274
+ [disabled]="item.disabled"
10275
+ (click)="select(item)"
10276
+ >
10277
+ <span class="cds--overflow-menu-options__option-content">{{ item.label }}</span>
10278
+ </button>
10279
+ </li>
10280
+ }
10281
+ </ul>
10282
+ }
10283
+ `, isInline: true, styles: [".ngcc-overflow__menu{position:fixed;inset-block-start:var(--ngcc-overflow-top, auto);inset-block-end:var(--ngcc-overflow-bottom, auto);inset-inline-start:var(--ngcc-overflow-left, auto);inset-inline-end:var(--ngcc-overflow-right, auto);z-index:var(--cds-layer-overlay, 9000);margin:0;padding:0;list-style:none}.ngcc-overflow__divider{border-block-start:1px solid var(--cds-border-subtle)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10284
+ }
10285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccOverflowMenu, decorators: [{
10286
+ type: Component,
10287
+ args: [{ selector: 'ngcc-overflow-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
10288
+ style: 'display: inline-block',
10289
+ '(document:click)': 'onDocumentClick($event)',
10290
+ '(window:resize)': 'close()',
10291
+ '(window:blur)': 'close()',
10292
+ }, template: `
10293
+ <button
10294
+ #trigger
10295
+ type="button"
10296
+ [class]="
10297
+ 'cds--overflow-menu' +
10298
+ (size() !== 'md' ? ' cds--overflow-menu--' + size() : '') +
10299
+ (open() ? ' cds--overflow-menu--open' : '')
10300
+ "
10301
+ aria-haspopup="menu"
10302
+ [attr.aria-expanded]="open()"
10303
+ [attr.aria-label]="ariaLabel()"
10304
+ [disabled]="disabled()"
10305
+ (click)="toggle()"
10306
+ (keydown)="onTriggerKeydown($event)"
10307
+ >
10308
+ <svg
10309
+ class="cds--overflow-menu__icon"
10310
+ width="16"
10311
+ height="16"
10312
+ viewBox="0 0 32 32"
10313
+ fill="currentColor"
10314
+ aria-hidden="true"
10315
+ focusable="false"
10316
+ >
10317
+ @if (orientation() === 'vertical') {
10318
+ <circle cx="16" cy="8" r="2"></circle>
10319
+ <circle cx="16" cy="16" r="2"></circle>
10320
+ <circle cx="16" cy="24" r="2"></circle>
10321
+ } @else {
10322
+ <circle cx="8" cy="16" r="2"></circle>
10323
+ <circle cx="16" cy="16" r="2"></circle>
10324
+ <circle cx="24" cy="16" r="2"></circle>
10325
+ }
10326
+ </svg>
10327
+ </button>
10328
+ @if (open()) {
10329
+ <ul
10330
+ class="cds--overflow-menu-options cds--overflow-menu-options--open ngcc-overflow__menu"
10331
+ role="menu"
10332
+ [attr.aria-label]="ariaLabel()"
10333
+ [style.--ngcc-overflow-top.px]="pos().top"
10334
+ [style.--ngcc-overflow-bottom.px]="pos().bottom"
10335
+ [style.--ngcc-overflow-left.px]="pos().left"
10336
+ [style.--ngcc-overflow-right.px]="pos().right"
10337
+ (keydown)="onMenuKeydown($event)"
10338
+ >
10339
+ @for (item of items(); track item.id) {
10340
+ <li
10341
+ role="none"
10342
+ [class]="
10343
+ 'cds--overflow-menu-options__option' +
10344
+ (item.danger ? ' cds--overflow-menu-options__option--danger' : '') +
10345
+ (item.disabled ? ' cds--overflow-menu-options__option--disabled' : '') +
10346
+ (item.divider ? ' ngcc-overflow__divider' : '')
10347
+ "
10348
+ >
10349
+ <button
10350
+ #option
10351
+ type="button"
10352
+ role="menuitem"
10353
+ class="cds--overflow-menu-options__btn"
10354
+ tabindex="-1"
10355
+ [disabled]="item.disabled"
10356
+ (click)="select(item)"
10357
+ >
10358
+ <span class="cds--overflow-menu-options__option-content">{{ item.label }}</span>
10359
+ </button>
10360
+ </li>
10361
+ }
10362
+ </ul>
10363
+ }
10364
+ `, styles: [".ngcc-overflow__menu{position:fixed;inset-block-start:var(--ngcc-overflow-top, auto);inset-block-end:var(--ngcc-overflow-bottom, auto);inset-inline-start:var(--ngcc-overflow-left, auto);inset-inline-end:var(--ngcc-overflow-right, auto);z-index:var(--cds-layer-overlay, 9000);margin:0;padding:0;list-style:none}.ngcc-overflow__divider{border-block-start:1px solid var(--cds-border-subtle)}\n"] }]
10365
+ }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.ViewChildren, args: ['option', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
7949
10366
 
7950
10367
  /*
7951
10368
  * Public API Surface of ngcc
@@ -7956,5 +10373,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7956
10373
  * Generated bundle index. Do not edit.
7957
10374
  */
7958
10375
 
7959
- export { HttpNgccI18nLoader, NGCC_ACCORDION_ALIGN, NGCC_I18N_CONFIG, NGCC_RADIO_GROUP_TOKEN, NGCC_SIDE_NAV_CONTEXT, NgccAccordion, NgccAccordionItem, NgccBreadcrumbComponent, NgccBreadcrumbItemComponent, NgccButton, NgccCharts, NgccCheckbox, NgccCodeSnippetComponent, NgccColorThemeService, NgccColorThemeSwitcher, NgccContainedList, NgccContainedListActionDirective, NgccContainedListItem, NgccContainedListItemActionDirective, NgccDatePicker, NgccDatePickerCalendar, NgccDropdown, NgccGaugeChart, NgccHamburger, NgccHeader, NgccHeaderAction, NgccHeaderGlobal, NgccHeaderItem, NgccHeaderMenu, NgccHeaderMenuItem, NgccHeaderName, NgccHeaderNavigation, NgccHeaderPanel, NgccI18nPipe, NgccI18nService, NgccIcon, NgccInput, NgccLink, NgccModal, NgccNotification, NgccNotificationContainer, NgccPagination, NgccRadio, NgccRadioGroup, NgccSideNav, NgccSideNavDivider, NgccSideNavItem, NgccSideNavMenu, NgccSideNavMenuItem, NgccSkeleton, NgccTab, NgccTabHeaders, NgccTable, NgccTableSearchDirective, NgccTableSearchService, NgccTableService, NgccTableSkeleton, NgccTableToolbar, NgccTabs, NgccTabsSkeleton, NgccTextAreaComponent, NgccToast, NgccToastContainer, NgccToggle, NgccTooltip, NotificationService, ToastService, WCAG_CONTRAST, adjustColorForContrast, checkContrast, createAccessibleColorPair, derivePaletteFromBrand, generateColorScale, generateInteractiveStates, getAccessibleTextColor, getAvailableThemes, getContrastRatio, getFocusIndicatorColor, getRelativeLuminance, getThemeBackground, getThemeSecondaryButtonBg, hexToHsl, hexToRgb, hslToHex, hslToRgb, initNgccTheme, isThemeDark, provideNgccI18n, rgbToHex, rgbToHsl, themeMetadata, validateColorToken };
7960
- //# sourceMappingURL=carbideui.mjs.map
10376
+ export { HttpNgccI18nLoader, ICONS, NGCC_ACCORDION_ALIGN, NGCC_CONTENT_SWITCHER, NGCC_DEFAULT_DATE_PRESETS, NGCC_I18N_CONFIG, NGCC_RADIO_GROUP_TOKEN, NGCC_SIDE_NAV_CONTEXT, NGCC_STATUS_TAG, NgccAccordion, NgccAccordionItem, NgccActivityFeed, NgccBreadcrumbComponent, NgccBreadcrumbItemComponent, NgccButton, NgccCharts, NgccCheckbox, NgccCodeSnippetComponent, NgccColorThemeService, NgccColorThemeSwitcher, NgccContainedList, NgccContainedListActionDirective, NgccContainedListItem, NgccContainedListItemActionDirective, NgccContentSwitcher, NgccContentSwitcherOption, NgccDatePicker, NgccDatePickerCalendar, NgccDateRangePicker, NgccDropdown, NgccEmptyState, NgccFilterBar, NgccGaugeChart, NgccHamburger, NgccHeader, NgccHeaderAction, NgccHeaderGlobal, NgccHeaderItem, NgccHeaderMenu, NgccHeaderMenuItem, NgccHeaderName, NgccHeaderNavigation, NgccHeaderPanel, NgccI18nPipe, NgccI18nService, NgccIcon, NgccInput, NgccLink, NgccModal, NgccNotification, NgccNotificationContainer, NgccNotificationList, NgccOverflowMenu, NgccPagination, NgccProgressBar, NgccRadio, NgccRadioGroup, NgccSideNav, NgccSideNavDivider, NgccSideNavItem, NgccSideNavMenu, NgccSideNavMenuItem, NgccSideNavSection, NgccSkeleton, NgccStatTile, NgccStructuredList, NgccTab, NgccTabHeaders, NgccTable, NgccTableSearchDirective, NgccTableSearchService, NgccTableService, NgccTableSkeleton, NgccTableToolbar, NgccTabs, NgccTabsSkeleton, NgccTag, NgccTextAreaComponent, NgccTile, NgccToast, NgccToastContainer, NgccToggle, NgccTooltip, NotificationService, ToastService, WCAG_CONTRAST, adjustColorForContrast, checkContrast, createAccessibleColorPair, derivePaletteFromBrand, generateColorScale, generateInteractiveStates, getAccessibleTextColor, getAvailableThemes, getContrastRatio, getFocusIndicatorColor, getRelativeLuminance, getThemeBackground, getThemeSecondaryButtonBg, hexToHsl, hexToRgb, hslToHex, hslToRgb, initNgccTheme, isThemeDark, ngccResolveDatePreset, provideNgccI18n, rgbToHex, rgbToHsl, themeMetadata, validateColorToken };
10377
+ //# sourceMappingURL=assistanz-carbideui.mjs.map