@assistanz/carbideui 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
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 } 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';
@@ -461,22 +461,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
461
461
  }] } });
462
462
 
463
463
  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(() => {
464
+ href = '';
465
+ target = '_self';
466
+ rel = '';
467
+ disabled = false;
468
+ inline = false;
469
+ size = 'md';
470
+ visited = false;
471
+ iconName = undefined;
472
+ ariaLabel = undefined;
473
+ ariaCurrent = undefined;
474
+ className = '';
475
+ linkClick = new EventEmitter();
476
+ get classes() {
480
477
  const sizeMap = {
481
478
  sm: 'cds--link--sm',
482
479
  md: '',
@@ -484,29 +481,29 @@ class NgccLink {
484
481
  };
485
482
  return [
486
483
  '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(),
484
+ sizeMap[this.size],
485
+ this.inline ? 'cds--link--inline' : '',
486
+ this.visited ? 'cds--link--visited' : '',
487
+ this.disabled ? 'cds--link--disabled' : '',
488
+ this.className,
492
489
  ]
493
490
  .filter(Boolean)
494
491
  .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(' ') : []);
492
+ }
493
+ get resolvedRel() {
494
+ if (this.target === '_blank') {
495
+ const parts = new Set(this.rel ? this.rel.split(' ') : []);
500
496
  parts.add('noopener');
501
497
  parts.add('noreferrer');
502
498
  return Array.from(parts).join(' ');
503
499
  }
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" }] : []));
500
+ return this.rel || null;
501
+ }
502
+ get resolvedTabIndex() {
503
+ return this.disabled ? -1 : 0;
504
+ }
508
505
  onClick(event) {
509
- if (this.disabled()) {
506
+ if (this.disabled) {
510
507
  event.preventDefault();
511
508
  event.stopPropagation();
512
509
  return;
@@ -514,7 +511,7 @@ class NgccLink {
514
511
  this.linkClick.emit(event);
515
512
  }
516
513
  onKeydown(event) {
517
- if (this.disabled()) {
514
+ if (this.disabled) {
518
515
  event.preventDefault();
519
516
  return;
520
517
  }
@@ -524,72 +521,112 @@ class NgccLink {
524
521
  }
525
522
  }
526
523
  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 });
524
+ 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
525
  }
529
526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccLink, decorators: [{
530
527
  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"] }] } });
528
+ 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" }]
529
+ }], propDecorators: { href: [{
530
+ type: Input
531
+ }], target: [{
532
+ type: Input
533
+ }], rel: [{
534
+ type: Input
535
+ }], disabled: [{
536
+ type: Input
537
+ }], inline: [{
538
+ type: Input
539
+ }], size: [{
540
+ type: Input
541
+ }], visited: [{
542
+ type: Input
543
+ }], iconName: [{
544
+ type: Input
545
+ }], ariaLabel: [{
546
+ type: Input
547
+ }], ariaCurrent: [{
548
+ type: Input
549
+ }], className: [{
550
+ type: Input
551
+ }], linkClick: [{
552
+ type: Output
553
+ }] } });
533
554
 
534
555
  class NgccToggle {
535
556
  static idCounter = 0;
536
557
  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();
558
+ toggled = false;
559
+ disabled = false;
560
+ readOnly = false;
561
+ skeleton = false;
562
+ hideLabel = false;
563
+ size = 'md';
564
+ labelText = '';
565
+ labelA = 'Off';
566
+ labelB = 'On';
567
+ ariaLabel = undefined;
568
+ ariaLabelledBy = undefined;
569
+ className = '';
570
+ toggledChange = new EventEmitter();
552
571
  // Internal state — tracks current on/off
553
572
  _isToggled = signal(false, ...(ngDevMode ? [{ debugName: "_isToggled" }] : []));
554
573
  constructor() {
555
- // Sync controlled toggled input → internal state
556
- effect(() => {
557
- this._isToggled.set(this.toggled());
558
- });
574
+ // initial sync handled in ngOnChanges
559
575
  }
560
576
  // Computed: current side label (Off / On)
561
- sideLabel = computed(() => (this._isToggled() ? this.labelB() : this.labelA()), ...(ngDevMode ? [{ debugName: "sideLabel" }] : []));
577
+ get sideLabel() {
578
+ return this._isToggled() ? this.labelB : this.labelA;
579
+ }
562
580
  // Computed: host wrapper classes
563
581
  // 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" }] : []));
582
+ get hostClasses() {
583
+ return [
584
+ this.skeleton ? '' : 'cds--form-item',
585
+ 'cds--toggle',
586
+ this.disabled ? 'cds--toggle--disabled' : '',
587
+ this.readOnly ? 'cds--toggle--readonly' : '',
588
+ this.skeleton ? 'cds--toggle--skeleton' : '',
589
+ this.className,
590
+ ]
591
+ .filter(Boolean)
592
+ .join(' ');
593
+ }
574
594
  // 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" }] : []));
595
+ get appearanceClasses() {
596
+ return ['cds--toggle__appearance', this.size === 'sm' ? 'cds--toggle__appearance--sm' : '']
597
+ .filter(Boolean)
598
+ .join(' ');
599
+ }
578
600
  // Computed: switch classes (knob)
579
- switchClasses = computed(() => ['cds--toggle__switch', this._isToggled() ? 'cds--toggle__switch--checked' : '']
580
- .filter(Boolean)
581
- .join(' '), ...(ngDevMode ? [{ debugName: "switchClasses" }] : []));
601
+ get switchClasses() {
602
+ return ['cds--toggle__switch', this._isToggled() ? 'cds--toggle__switch--checked' : '']
603
+ .filter(Boolean)
604
+ .join(' ');
605
+ }
582
606
  // Computed: aria-checked value for the button
583
- ariaChecked = computed(() => this._isToggled(), ...(ngDevMode ? [{ debugName: "ariaChecked" }] : []));
607
+ get ariaChecked() {
608
+ return this._isToggled();
609
+ }
584
610
  // Computed: tabindex — readOnly stays focusable; disabled is removed
585
- resolvedTabIndex = computed(() => (this.disabled() ? -1 : 0), ...(ngDevMode ? [{ debugName: "resolvedTabIndex" }] : []));
611
+ get resolvedTabIndex() {
612
+ return this.disabled ? -1 : 0;
613
+ }
586
614
  // Computed: effective aria-labelledby — prefer explicit, fallback to generated label id
587
- resolvedAriaLabelledBy = computed(() => this.ariaLabelledBy() ?? `${this.toggleId}-label`, ...(ngDevMode ? [{ debugName: "resolvedAriaLabelledBy" }] : []));
615
+ get resolvedAriaLabelledBy() {
616
+ return this.ariaLabelledBy ?? `${this.toggleId}-label`;
617
+ }
588
618
  // 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" }] : []));
619
+ get showCheckmark() {
620
+ return this.size === 'sm' && this._isToggled() && !this.readOnly;
621
+ }
622
+ ngOnChanges(changes) {
623
+ if (changes['toggled']) {
624
+ this._isToggled.set(!!changes['toggled'].currentValue);
625
+ }
626
+ }
590
627
  // Toggle handler — called by button click
591
628
  onToggle() {
592
- if (this.disabled() || this.readOnly())
629
+ if (this.disabled || this.readOnly)
593
630
  return;
594
631
  const next = !this._isToggled();
595
632
  this._isToggled.set(next);
@@ -597,7 +634,7 @@ class NgccToggle {
597
634
  }
598
635
  // Keyboard handler — Space and Enter both toggle the switch
599
636
  onKeydown(event) {
600
- if (this.disabled() || this.readOnly()) {
637
+ if (this.disabled || this.readOnly) {
601
638
  event.preventDefault();
602
639
  return;
603
640
  }
@@ -607,33 +644,59 @@ class NgccToggle {
607
644
  }
608
645
  }
609
646
  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 });
647
+ 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
648
  }
612
649
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccToggle, decorators: [{
613
650
  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"] }] } });
651
+ args: [{ selector: 'ngcc-toggle', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: {
652
+ '[class]': 'hostClasses',
653
+ }, 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" }]
654
+ }], ctorParameters: () => [], propDecorators: { toggled: [{
655
+ type: Input
656
+ }], disabled: [{
657
+ type: Input
658
+ }], readOnly: [{
659
+ type: Input
660
+ }], skeleton: [{
661
+ type: Input
662
+ }], hideLabel: [{
663
+ type: Input
664
+ }], size: [{
665
+ type: Input
666
+ }], labelText: [{
667
+ type: Input
668
+ }], labelA: [{
669
+ type: Input
670
+ }], labelB: [{
671
+ type: Input
672
+ }], ariaLabel: [{
673
+ type: Input
674
+ }], ariaLabelledBy: [{
675
+ type: Input
676
+ }], className: [{
677
+ type: Input
678
+ }], toggledChange: [{
679
+ type: Output
680
+ }] } });
618
681
 
619
682
  class NgccContainedList {
620
683
  static count = 0;
621
684
  /** A label describing the contained list. */
622
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
685
+ label = '';
623
686
  /** The kind of ContainedList you want to display. */
624
- kind = input('on-page', ...(ngDevMode ? [{ debugName: "kind" }] : []));
687
+ kind = 'on-page';
625
688
  /** Specify the size of the contained list. */
626
- size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : []));
689
+ size = undefined;
627
690
  /** Specify whether the dividing lines in between list items should be inset. */
628
- isInset = input(false, ...(ngDevMode ? [{ debugName: "isInset" }] : []));
691
+ isInset = false;
629
692
  /** Whether a header action element has been projected via [ngccContainedListAction]. */
630
- hasAction = input(false, ...(ngDevMode ? [{ debugName: "hasAction" }] : []));
693
+ hasAction = false;
631
694
  /** Unique ID for the label element used by aria-labelledby. */
632
695
  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();
696
+ get classes() {
697
+ const kind = this.kind;
698
+ const size = this.size;
699
+ const isInset = this.isInset;
637
700
  const cls = ['cds--contained-list', `cds--contained-list--${kind}`];
638
701
  if (isInset)
639
702
  cls.push('cds--contained-list--inset-rulers');
@@ -642,59 +705,79 @@ class NgccContainedList {
642
705
  cls.push(`cds--layout--size-${size}`);
643
706
  }
644
707
  return cls.join(' ');
645
- }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
708
+ }
646
709
  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 });
710
+ 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
711
  }
649
712
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContainedList, decorators: [{
650
713
  type: Component,
651
714
  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 }] }] } });
715
+ '[class]': 'classes',
716
+ }, 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" }]
717
+ }], propDecorators: { label: [{
718
+ type: Input
719
+ }], kind: [{
720
+ type: Input
721
+ }], size: [{
722
+ type: Input
723
+ }], isInset: [{
724
+ type: Input
725
+ }], hasAction: [{
726
+ type: Input
727
+ }] } });
655
728
 
656
729
  class NgccContainedListItem {
657
730
  /** Whether this item is disabled (only applies when clickable). */
658
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
731
+ disabled = false;
659
732
  /** Whether this item is clickable — renders a <button> as the content wrapper. */
660
- clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable" }] : []));
733
+ clickable = false;
661
734
  /** Optional icon name to display before the item content. */
662
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
735
+ iconName;
663
736
  /** Whether an action element has been projected via [ngccContainedListItemAction]. */
664
- hasAction = input(false, ...(ngDevMode ? [{ debugName: "hasAction" }] : []));
737
+ hasAction = false;
665
738
  /** Emits when a clickable item is activated. */
666
- clicked = output();
667
- classes = computed(() => {
739
+ clicked = new EventEmitter();
740
+ get classes() {
668
741
  const cls = ['cds--contained-list-item'];
669
- if (this.clickable())
742
+ if (this.clickable)
670
743
  cls.push('cds--contained-list-item--clickable');
671
- if (this.iconName())
744
+ if (this.iconName)
672
745
  cls.push('cds--contained-list-item--with-icon');
673
- if (this.hasAction())
746
+ if (this.hasAction)
674
747
  cls.push('cds--contained-list-item--with-action');
675
748
  return cls.join(' ');
676
- }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
749
+ }
677
750
  onContentClick() {
678
- if (this.clickable() && !this.disabled()) {
751
+ if (this.clickable && !this.disabled) {
679
752
  this.clicked.emit();
680
753
  }
681
754
  }
682
755
  onKeydown(event) {
683
- if (this.clickable() && !this.disabled()) {
756
+ if (this.clickable && !this.disabled) {
684
757
  event.preventDefault();
685
758
  this.clicked.emit();
686
759
  }
687
760
  }
688
761
  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 });
762
+ 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
763
  }
691
764
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccContainedListItem, decorators: [{
692
765
  type: Component,
693
766
  args: [{ selector: 'ngcc-contained-list-item', standalone: true, imports: [NgccIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
694
- '[class]': 'classes()',
767
+ '[class]': 'classes',
695
768
  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"] }] } });
769
+ }, 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" }]
770
+ }], propDecorators: { disabled: [{
771
+ type: Input
772
+ }], clickable: [{
773
+ type: Input
774
+ }], iconName: [{
775
+ type: Input
776
+ }], hasAction: [{
777
+ type: Input
778
+ }], clicked: [{
779
+ type: Output
780
+ }] } });
698
781
 
699
782
  /**
700
783
  * Marker directive for the list header action slot.
@@ -922,45 +1005,69 @@ let radioIdCounter = 0;
922
1005
  */
923
1006
  class NgccRadio {
924
1007
  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" }] : []));
1008
+ // ── Public inputs (library-friendly) ──────────────────────────────────────
1009
+ value = null;
1010
+ id = `ngcc-radio-${radioIdCounter++}`;
1011
+ name = '';
1012
+ required = false;
1013
+ disabled = false;
1014
+ labelPlacement = 'right';
1015
+ ariaLabel = undefined;
1016
+ ariaLabelledby = undefined;
1017
+ skeleton = false;
1018
+ // ── Internal signals (private state) ────────────────────────────────────
1019
+ _value = signal(this.value, ...(ngDevMode ? [{ debugName: "_value" }] : []));
1020
+ _checked = signal(false, ...(ngDevMode ? [{ debugName: "_checked" }] : []));
1021
+ _disabled = signal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
1022
+ // ── Outputs (library-friendly)
1023
+ change = new EventEmitter();
1024
+ // ── Computed (group values take precedence when inside a group)
1025
+ get effectiveName() {
1026
+ return this.group?.name ?? this.name;
1027
+ }
1028
+ get isDisabled() {
1029
+ return this.disabled || (this.group?.isDisabled ?? false);
1030
+ }
1031
+ get isReadOnly() {
1032
+ return this.group?.readOnly ?? false;
1033
+ }
1034
+ get effectiveLabelPlacement() {
1035
+ return this.group?.labelPlacement ?? this.labelPlacement;
1036
+ }
1037
+ get effectiveSkeleton() {
1038
+ return this.group?.skeleton || this.skeleton;
1039
+ }
1040
+ get effectiveAriaLabelledby() {
1041
+ return this.ariaLabelledby ?? `label-${this.id}`;
1042
+ }
1043
+ get hostClasses() {
1044
+ return [
1045
+ 'cds--radio-button-wrapper',
1046
+ this.effectiveLabelPlacement === 'left' ? 'cds--radio-button-wrapper--label-left' : '',
1047
+ ]
1048
+ .filter(Boolean)
1049
+ .join(' ');
1050
+ }
1051
+ radioInputRef;
954
1052
  constructor() {
955
1053
  // 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.
1054
+ // We use an effect that will run after view init once the ViewChild is available.
958
1055
  effect(() => {
959
- const el = this.radioInputRef()?.nativeElement;
1056
+ const el = this.radioInputRef?.nativeElement;
960
1057
  if (el)
961
- el.checked = this.checked();
1058
+ el.checked = this._checked();
962
1059
  });
963
1060
  }
1061
+ ngOnChanges() {
1062
+ this._value.set(this.value);
1063
+ this._disabled.set(this.disabled);
1064
+ }
1065
+ ngAfterViewInit() {
1066
+ // Ensure the native input reflects initial checked state
1067
+ const el = this.radioInputRef?.nativeElement;
1068
+ if (el)
1069
+ el.checked = this._checked();
1070
+ }
964
1071
  // ── Internal: registered by the parent group ──────────────────────────────
965
1072
  radioChangeHandler = () => { };
966
1073
  registerRadioChangeHandler(fn) {
@@ -968,12 +1075,13 @@ class NgccRadio {
968
1075
  }
969
1076
  // ── Event handlers ────────────────────────────────────────────────────────
970
1077
  onClick(event) {
971
- if (this.isDisabled() || this.isReadOnly()) {
1078
+ if (this.isDisabled || this.isReadOnly) {
972
1079
  event.preventDefault();
973
1080
  return;
974
1081
  }
975
- this.checked.set(event.target.checked);
976
- const radioEvent = { source: this, value: this.value() };
1082
+ const checked = event.target.checked;
1083
+ this._checked.set(checked);
1084
+ const radioEvent = { source: this, value: this._value() };
977
1085
  this.change.emit(radioEvent);
978
1086
  this.radioChangeHandler(radioEvent);
979
1087
  }
@@ -981,13 +1089,50 @@ class NgccRadio {
981
1089
  onChange(event) {
982
1090
  event.stopPropagation();
983
1091
  }
1092
+ // Methods used by NgccRadioGroup internally
1093
+ getValue() {
1094
+ return this._value();
1095
+ }
1096
+ setChecked(v) {
1097
+ this._checked.set(v);
1098
+ }
1099
+ isChecked() {
1100
+ return this._checked();
1101
+ }
1102
+ // Public getter for template binding
1103
+ get checked() {
1104
+ return this._checked();
1105
+ }
984
1106
  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 });
1107
+ 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
1108
  }
987
1109
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccRadio, decorators: [{
988
1110
  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 }] }] } });
1111
+ 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" }]
1112
+ }], ctorParameters: () => [], propDecorators: { value: [{
1113
+ type: Input
1114
+ }], id: [{
1115
+ type: Input
1116
+ }], name: [{
1117
+ type: Input
1118
+ }], required: [{
1119
+ type: Input
1120
+ }], disabled: [{
1121
+ type: Input
1122
+ }], labelPlacement: [{
1123
+ type: Input
1124
+ }], ariaLabel: [{
1125
+ type: Input
1126
+ }], ariaLabelledby: [{
1127
+ type: Input
1128
+ }], skeleton: [{
1129
+ type: Input
1130
+ }], change: [{
1131
+ type: Output
1132
+ }], radioInputRef: [{
1133
+ type: ViewChild,
1134
+ args: ['radioInput', { static: false }]
1135
+ }] } });
991
1136
 
992
1137
  let radioGroupIdCounter = 0;
993
1138
  /**
@@ -1005,69 +1150,64 @@ class NgccRadioGroup {
1005
1150
  // Use constructor injection pattern to avoid NG0200 circular dep that occurs
1006
1151
  // when combining inject(NgControl) with an NG_VALUE_ACCESSOR provider.
1007
1152
  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 ────────────────────────────────────────────────
1153
+ // ── Public @Input properties.
1154
+ name = `ngcc-radio-group-${radioGroupIdCounter++}`;
1155
+ disabled = false;
1156
+ skeleton = false;
1157
+ orientation = 'horizontal';
1158
+ labelPlacement = 'right';
1159
+ legend;
1160
+ ariaLabel;
1161
+ ariaLabelledby;
1162
+ helperText;
1163
+ invalid = false;
1164
+ invalidText;
1165
+ warn = false;
1166
+ warnText;
1167
+ readOnly = false;
1168
+ // ── Output event
1169
+ change = new EventEmitter();
1170
+ // ── Internal mutable state
1026
1171
  _value = signal(null, ...(ngDevMode ? [{ debugName: "_value" }] : []));
1027
1172
  _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" }] : []));
1173
+ // ── NgccRadioGroupContext properties that satisfy the interface.
1174
+ get isDisabled() {
1175
+ return this.disabled || this._disabledByForm();
1176
+ }
1177
+ // ── Computed fieldset classes
1178
+ fieldsetClasses() {
1179
+ return [
1180
+ 'cds--radio-button-group',
1181
+ this.orientation === 'vertical' ? 'cds--radio-button-group--vertical' : '',
1182
+ this.labelPlacement === 'left' ? 'cds--radio-button-group--label-left' : '',
1183
+ this.invalid ? 'cds--radio-button-group--invalid' : '',
1184
+ !this.invalid && this.warn ? 'cds--radio-button-group--warning' : '',
1185
+ this.readOnly ? 'cds--radio-button-group--readonly' : '',
1186
+ ]
1187
+ .filter(Boolean)
1188
+ .join(' ');
1189
+ }
1190
+ // ── content children (projected radios)
1191
+ radios;
1043
1192
  constructor() {
1044
1193
  if (this.ngControl) {
1045
1194
  this.ngControl.valueAccessor = this;
1046
1195
  }
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
1196
  }
1057
1197
  // ── Helpers ───────────────────────────────────────────────────────────────
1058
1198
  syncCheckedState(radios) {
1059
1199
  const current = this._value();
1060
- radios.forEach((radio) => radio.checked.set(radio.value() === current));
1200
+ radios.forEach((radio) => radio.setChecked(radio.getValue() === current));
1061
1201
  }
1062
1202
  bindRadioHandlers(radios) {
1063
1203
  radios.forEach((radio) => {
1064
1204
  radio.registerRadioChangeHandler((event) => {
1065
1205
  if (this._value() === event.value)
1066
1206
  return;
1067
- // Use this.radios() to deselect all other radios at handler time.
1068
- this.radios().forEach((r) => {
1207
+ // Deselect all other radios at handler time.
1208
+ this.radios.toArray().forEach((r) => {
1069
1209
  if (r !== event.source)
1070
- r.checked.set(false);
1210
+ r.setChecked(false);
1071
1211
  });
1072
1212
  this._value.set(event.value);
1073
1213
  this.propagateChange(event.value);
@@ -1079,9 +1219,7 @@ class NgccRadioGroup {
1079
1219
  // ── ControlValueAccessor ──────────────────────────────────────────────────
1080
1220
  writeValue(val) {
1081
1221
  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();
1222
+ const radios = this.radios ? this.radios.toArray() : [];
1085
1223
  if (radios.length > 0) {
1086
1224
  this.syncCheckedState(radios);
1087
1225
  }
@@ -1095,6 +1233,16 @@ class NgccRadioGroup {
1095
1233
  setDisabledState(isDisabled) {
1096
1234
  this._disabledByForm.set(isDisabled);
1097
1235
  }
1236
+ ngAfterContentInit() {
1237
+ // Initial binding
1238
+ this.bindRadioHandlers(this.radios.toArray());
1239
+ this.syncCheckedState(this.radios.toArray());
1240
+ // Re-bind when radios change
1241
+ this.radios.changes.subscribe(() => {
1242
+ this.bindRadioHandlers(this.radios.toArray());
1243
+ this.syncCheckedState(this.radios.toArray());
1244
+ });
1245
+ }
1098
1246
  // ── Focus handler (declared in host binding above) ────────────────────────
1099
1247
  onFocusOut(event) {
1100
1248
  const host = event.currentTarget;
@@ -1106,13 +1254,13 @@ class NgccRadioGroup {
1106
1254
  propagateChange = () => { };
1107
1255
  onTouched = () => { };
1108
1256
  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: [
1257
+ 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
1258
  {
1111
1259
  // Exposes group context to child NgccRadio via token — avoids circular import.
1112
1260
  provide: NGCC_RADIO_GROUP_TOKEN,
1113
1261
  useExisting: forwardRef(() => NgccRadioGroup),
1114
1262
  },
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 });
1263
+ ], 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
1264
  }
1117
1265
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccRadioGroup, decorators: [{
1118
1266
  type: Component,
@@ -1125,8 +1273,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
1125
1273
  ], host: {
1126
1274
  class: 'cds--form-item',
1127
1275
  '(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 }] }] } });
1276
+ }, 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" }]
1277
+ }], ctorParameters: () => [], propDecorators: { name: [{
1278
+ type: Input
1279
+ }], disabled: [{
1280
+ type: Input
1281
+ }], skeleton: [{
1282
+ type: Input
1283
+ }], orientation: [{
1284
+ type: Input
1285
+ }], labelPlacement: [{
1286
+ type: Input
1287
+ }], legend: [{
1288
+ type: Input
1289
+ }], ariaLabel: [{
1290
+ type: Input
1291
+ }], ariaLabelledby: [{
1292
+ type: Input
1293
+ }], helperText: [{
1294
+ type: Input
1295
+ }], invalid: [{
1296
+ type: Input
1297
+ }], invalidText: [{
1298
+ type: Input
1299
+ }], warn: [{
1300
+ type: Input
1301
+ }], warnText: [{
1302
+ type: Input
1303
+ }], readOnly: [{
1304
+ type: Input
1305
+ }], change: [{
1306
+ type: Output
1307
+ }], radios: [{
1308
+ type: ContentChildren,
1309
+ args: [forwardRef(() => NgccRadio)]
1310
+ }] } });
1130
1311
 
1131
1312
  class NgccDatePickerCalendar {
1132
1313
  dateSelected = new EventEmitter();
@@ -7114,24 +7295,36 @@ function provideNgccI18n(config) {
7114
7295
  * ```
7115
7296
  */
7116
7297
  class NgccHeader {
7298
+ ngOnChanges(changes) {
7299
+ if (changes['ariaLabel'])
7300
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? '');
7301
+ if (changes['skipTo'])
7302
+ this._skipTo.set(changes['skipTo'].currentValue ?? 'main-content');
7303
+ }
7117
7304
  /**
7118
7305
  * Accessible label for the <header> landmark.
7119
7306
  * Should match the product name shown in NgccHeaderName.
7120
7307
  */
7121
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7308
+ ariaLabel = '';
7309
+ _ariaLabel = signal('', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7122
7310
  /**
7123
7311
  * ID of the main content element for the skip link.
7124
7312
  * Renders a visually-hidden skip link for keyboard/screen-reader users.
7125
7313
  * Pass an empty string to disable.
7126
7314
  */
7127
- skipTo = input('main-content', ...(ngDevMode ? [{ debugName: "skipTo" }] : []));
7315
+ skipTo = 'main-content';
7316
+ _skipTo = signal('main-content', ...(ngDevMode ? [{ debugName: "_skipTo" }] : []));
7128
7317
  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 });
7318
+ 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
7319
  }
7131
7320
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeader, decorators: [{
7132
7321
  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 }] }] } });
7322
+ 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" }]
7323
+ }], propDecorators: { ariaLabel: [{
7324
+ type: Input
7325
+ }], skipTo: [{
7326
+ type: Input
7327
+ }] } });
7135
7328
 
7136
7329
  /**
7137
7330
  * Brand prefix + product name link in the header.
@@ -7139,21 +7332,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7139
7332
  * <ngcc-header-name brand="CarbideUI" productName="My App" href="/" />
7140
7333
  */
7141
7334
  class NgccHeaderName {
7335
+ ngOnChanges(changes) {
7336
+ if (changes['brand'])
7337
+ this._brand.set(changes['brand'].currentValue ?? 'CarbideUI');
7338
+ if (changes['productName'])
7339
+ this._productName.set(changes['productName'].currentValue ?? '');
7340
+ if (changes['href'])
7341
+ this._href.set(changes['href'].currentValue ?? '/');
7342
+ }
7142
7343
  /** Brand prefix, e.g. "CarbideUI" */
7143
- brand = input('CarbideUI', ...(ngDevMode ? [{ debugName: "brand" }] : []));
7344
+ brand = 'CarbideUI';
7345
+ _brand = signal('CarbideUI', ...(ngDevMode ? [{ debugName: "_brand" }] : []));
7144
7346
  /** Product / suite name shown after the brand */
7145
- productName = input('', ...(ngDevMode ? [{ debugName: "productName" }] : []));
7347
+ productName = '';
7348
+ _productName = signal('', ...(ngDevMode ? [{ debugName: "_productName" }] : []));
7146
7349
  /** Link destination */
7147
- href = input('/', ...(ngDevMode ? [{ debugName: "href" }] : []));
7350
+ href = '/';
7351
+ _href = signal('/', ...(ngDevMode ? [{ debugName: "_href" }] : []));
7148
7352
  /** Combined title attribute for accessibility */
7149
- titleAttr = computed(() => [this.brand(), this.productName()].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "titleAttr" }] : []));
7353
+ titleAttr = computed(() => [this._brand(), this._productName()].filter(Boolean).join(' '), ...(ngDevMode ? [{ debugName: "titleAttr" }] : []));
7150
7354
  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 });
7355
+ 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
7356
  }
7153
7357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderName, decorators: [{
7154
7358
  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 }] }] } });
7359
+ 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"] }]
7360
+ }], propDecorators: { brand: [{
7361
+ type: Input
7362
+ }], productName: [{
7363
+ type: Input
7364
+ }], href: [{
7365
+ type: Input
7366
+ }] } });
7157
7367
 
7158
7368
  /**
7159
7369
  * Horizontal navigation bar inside the header shell.
@@ -7167,15 +7377,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7167
7377
  * </nav>
7168
7378
  */
7169
7379
  class NgccHeaderNavigation {
7380
+ ngOnChanges(changes) {
7381
+ if (changes['ariaLabel'])
7382
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? 'Navigation');
7383
+ }
7170
7384
  /** Accessible label for the <nav> landmark */
7171
- ariaLabel = input('Navigation', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7385
+ ariaLabel = 'Navigation';
7386
+ _ariaLabel = signal('Navigation', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7172
7387
  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 });
7388
+ 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
7389
  }
7175
7390
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderNavigation, decorators: [{
7176
7391
  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 }] }] } });
7392
+ 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"] }]
7393
+ }], propDecorators: { ariaLabel: [{
7394
+ type: Input
7395
+ }] } });
7179
7396
 
7180
7397
  /**
7181
7398
  * A single navigation link inside <ngcc-header-navigation>.
@@ -7184,14 +7401,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7184
7401
  * <ngcc-header-item href="/dashboard" [isCurrentPage]="true">Dashboard</ngcc-header-item>
7185
7402
  */
7186
7403
  class NgccHeaderItem {
7404
+ ngOnChanges(changes) {
7405
+ if (changes['href'])
7406
+ this._href.set(changes['href'].currentValue ?? '/');
7407
+ if (changes['isCurrentPage'])
7408
+ this._isCurrentPage.set(changes['isCurrentPage'].currentValue ?? false);
7409
+ if (changes['tabIndex'])
7410
+ this._tabIndex.set(changes['tabIndex'].currentValue ?? 0);
7411
+ }
7187
7412
  /** Navigation URL */
7188
- href = input('/', ...(ngDevMode ? [{ debugName: "href" }] : []));
7413
+ href = '/';
7414
+ _href = signal('/', ...(ngDevMode ? [{ debugName: "_href" }] : []));
7189
7415
  /** Marks this link as the active / current page */
7190
- isCurrentPage = input(false, ...(ngDevMode ? [{ debugName: "isCurrentPage" }] : []));
7416
+ isCurrentPage = false;
7417
+ _isCurrentPage = signal(false, ...(ngDevMode ? [{ debugName: "_isCurrentPage" }] : []));
7191
7418
  /** 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' : '']
7419
+ tabIndex = 0;
7420
+ _tabIndex = signal(0, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : []));
7421
+ itemClick = new EventEmitter();
7422
+ linkClasses = computed(() => ['cds--header__menu-item', this._isCurrentPage() ? 'cds--header__menu-item--current' : '']
7195
7423
  .filter(Boolean)
7196
7424
  .join(' '), ...(ngDevMode ? [{ debugName: "linkClasses" }] : []));
7197
7425
  onClick(event) {
@@ -7204,12 +7432,20 @@ class NgccHeaderItem {
7204
7432
  }
7205
7433
  }
7206
7434
  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 });
7435
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccHeaderItem, isStandalone: true, selector: "ngcc-header-item", inputs: { href: "href", isCurrentPage: "isCurrentPage", tabIndex: "tabIndex" }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, 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 });
7208
7436
  }
7209
7437
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderItem, decorators: [{
7210
7438
  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"] }] } });
7439
+ 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"] }]
7440
+ }], propDecorators: { href: [{
7441
+ type: Input
7442
+ }], isCurrentPage: [{
7443
+ type: Input
7444
+ }], tabIndex: [{
7445
+ type: Input
7446
+ }], itemClick: [{
7447
+ type: Output
7448
+ }] } });
7213
7449
 
7214
7450
  /**
7215
7451
  * Flyout dropdown navigation menu for the header nav bar.
@@ -7229,11 +7465,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7229
7465
  */
7230
7466
  class NgccHeaderMenu {
7231
7467
  /** Visible label on the trigger button */
7232
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
7468
+ get title() {
7469
+ return this._title();
7470
+ }
7471
+ set title(value) {
7472
+ this._title.set(value);
7473
+ }
7474
+ _title = signal('', ...(ngDevMode ? [{ debugName: "_title" }] : []));
7233
7475
  /** How the menu opens — 'click' (default) or 'mouseover' */
7234
- trigger = input('click', ...(ngDevMode ? [{ debugName: "trigger" }] : []));
7476
+ get trigger() {
7477
+ return this._trigger();
7478
+ }
7479
+ set trigger(value) {
7480
+ this._trigger.set(value);
7481
+ }
7482
+ _trigger = signal('click', ...(ngDevMode ? [{ debugName: "_trigger" }] : []));
7235
7483
  /** Two-way bindable expanded state — use [(expanded)]="myVar" in parent */
7236
- expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
7484
+ get expanded() {
7485
+ return this._expanded();
7486
+ }
7487
+ set expanded(value) {
7488
+ this._expanded.set(value);
7489
+ this.expandedChange.emit(value);
7490
+ }
7491
+ expandedChange = new EventEmitter();
7492
+ _expanded = signal(false, ...(ngDevMode ? [{ debugName: "_expanded" }] : []));
7237
7493
  /**
7238
7494
  * Signal-based view queries (Angular v17.2+).
7239
7495
  * viewChild.required() — refs are unconditionally in the template (not in @if),
@@ -7251,28 +7507,31 @@ class NgccHeaderMenu {
7251
7507
  }
7252
7508
  // ─── Expand / Collapse ─────────────────────────────────────────────────────
7253
7509
  expand() {
7254
- this.expanded.set(true);
7510
+ this._expanded.set(true);
7511
+ this.expandedChange.emit(this._expanded());
7255
7512
  }
7256
7513
  collapse() {
7257
- this.expanded.set(false);
7514
+ this._expanded.set(false);
7515
+ this.expandedChange.emit(this._expanded());
7258
7516
  }
7259
7517
  toggle() {
7260
- this.expanded.update((v) => !v);
7518
+ this._expanded.update((v) => !v);
7519
+ this.expandedChange.emit(this._expanded());
7261
7520
  }
7262
7521
  // ─── Trigger button events ─────────────────────────────────────────────────
7263
7522
  onTriggerClick() {
7264
- if (this.trigger() === 'click')
7523
+ if (this._trigger() === 'click')
7265
7524
  this.toggle();
7266
7525
  }
7267
7526
  onTriggerMouseEnter() {
7268
- if (this.trigger() === 'mouseover') {
7527
+ if (this._trigger() === 'mouseover') {
7269
7528
  if (this._hoverTimeout !== null)
7270
7529
  clearTimeout(this._hoverTimeout);
7271
7530
  this.expand();
7272
7531
  }
7273
7532
  }
7274
7533
  onTriggerMouseLeave() {
7275
- if (this.trigger() === 'mouseover') {
7534
+ if (this._trigger() === 'mouseover') {
7276
7535
  this._hoverTimeout = setTimeout(() => this.collapse(), 150);
7277
7536
  }
7278
7537
  }
@@ -7283,20 +7542,20 @@ class NgccHeaderMenu {
7283
7542
  case ' ':
7284
7543
  event.preventDefault();
7285
7544
  this.toggle();
7286
- if (this.expanded()) {
7545
+ if (this._expanded()) {
7287
7546
  // model() updates synchronously — expanded() reflects the new state here
7288
7547
  requestAnimationFrame(() => this.focusMenuItemAt(0));
7289
7548
  }
7290
7549
  break;
7291
7550
  case 'ArrowDown':
7292
7551
  event.preventDefault();
7293
- if (!this.expanded())
7552
+ if (!this._expanded())
7294
7553
  this.expand();
7295
7554
  requestAnimationFrame(() => this.focusMenuItemAt(0));
7296
7555
  break;
7297
7556
  case 'ArrowUp':
7298
7557
  event.preventDefault();
7299
- if (!this.expanded())
7558
+ if (!this._expanded())
7300
7559
  this.expand();
7301
7560
  requestAnimationFrame(() => this.focusMenuItemAt(-1));
7302
7561
  break;
@@ -7349,12 +7608,12 @@ class NgccHeaderMenu {
7349
7608
  }
7350
7609
  }
7351
7610
  onMenuMouseEnter() {
7352
- if (this.trigger() === 'mouseover' && this._hoverTimeout !== null) {
7611
+ if (this._trigger() === 'mouseover' && this._hoverTimeout !== null) {
7353
7612
  clearTimeout(this._hoverTimeout);
7354
7613
  }
7355
7614
  }
7356
7615
  onMenuMouseLeave() {
7357
- if (this.trigger() === 'mouseover') {
7616
+ if (this._trigger() === 'mouseover') {
7358
7617
  this._hoverTimeout = setTimeout(() => this.collapse(), 150);
7359
7618
  }
7360
7619
  }
@@ -7370,34 +7629,53 @@ class NgccHeaderMenu {
7370
7629
  items[normalized]?.focus();
7371
7630
  }
7372
7631
  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 });
7632
+ 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
7633
  }
7375
7634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderMenu, decorators: [{
7376
7635
  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 }] }] } });
7636
+ 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"] }]
7637
+ }], ctorParameters: () => [], propDecorators: { title: [{
7638
+ type: Input
7639
+ }], trigger: [{
7640
+ type: Input
7641
+ }], expanded: [{
7642
+ type: Input
7643
+ }], expandedChange: [{
7644
+ type: Output
7645
+ }], triggerRef: [{ type: i0.ViewChild, args: ['menuTrigger', { isSignal: true }] }], menuListRef: [{ type: i0.ViewChild, args: ['menuList', { isSignal: true }] }] } });
7379
7646
 
7380
7647
  /**
7381
7648
  * A single item inside an <ngcc-header-menu> dropdown.
7382
7649
  * Renders as <li role="none"><a role="menuitem">…</a></li>
7383
7650
  */
7384
7651
  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' : '']
7652
+ ngOnChanges(changes) {
7653
+ if (changes['href'])
7654
+ this._href.set(changes['href'].currentValue ?? '/');
7655
+ if (changes['isCurrentPage'])
7656
+ this._isCurrentPage.set(changes['isCurrentPage'].currentValue ?? false);
7657
+ if (changes['disabled'])
7658
+ this._disabled.set(changes['disabled'].currentValue ?? false);
7659
+ }
7660
+ href = '/';
7661
+ _href = signal('/', ...(ngDevMode ? [{ debugName: "_href" }] : []));
7662
+ isCurrentPage = false;
7663
+ _isCurrentPage = signal(false, ...(ngDevMode ? [{ debugName: "_isCurrentPage" }] : []));
7664
+ disabled = false;
7665
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
7666
+ itemClick = new EventEmitter();
7667
+ linkClasses = computed(() => ['cds--header__menu-item', this._isCurrentPage() ? 'cds--header__menu-item--current' : '']
7390
7668
  .filter(Boolean)
7391
7669
  .join(' '), ...(ngDevMode ? [{ debugName: "linkClasses" }] : []));
7392
7670
  onClick(event) {
7393
- if (this.disabled()) {
7671
+ if (this._disabled()) {
7394
7672
  event.preventDefault();
7395
7673
  return;
7396
7674
  }
7397
7675
  this.itemClick.emit(event);
7398
7676
  }
7399
7677
  onKeydown(event) {
7400
- if (this.disabled())
7678
+ if (this._disabled())
7401
7679
  return;
7402
7680
  if (event.key === 'Enter' || event.key === ' ') {
7403
7681
  event.preventDefault();
@@ -7405,12 +7683,20 @@ class NgccHeaderMenuItem {
7405
7683
  }
7406
7684
  }
7407
7685
  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 });
7686
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: NgccHeaderMenuItem, isStandalone: true, selector: "ngcc-header-menu-item", inputs: { href: "href", isCurrentPage: "isCurrentPage", disabled: "disabled" }, outputs: { itemClick: "itemClick" }, host: { attributes: { "role": "none" } }, usesOnChanges: true, 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 });
7409
7687
  }
7410
7688
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderMenuItem, decorators: [{
7411
7689
  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"] }] } });
7690
+ 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"] }]
7691
+ }], propDecorators: { href: [{
7692
+ type: Input
7693
+ }], isCurrentPage: [{
7694
+ type: Input
7695
+ }], disabled: [{
7696
+ type: Input
7697
+ }], itemClick: [{
7698
+ type: Output
7699
+ }] } });
7414
7700
 
7415
7701
  /**
7416
7702
  * Container for global header action buttons (right-hand side).
@@ -7438,24 +7724,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7438
7724
  * <ngcc-header-action ariaLabel="Search" iconName="search" [(active)]="searchOpen" />
7439
7725
  */
7440
7726
  class NgccHeaderAction {
7727
+ ngOnChanges(changes) {
7728
+ if (changes['ariaLabel'])
7729
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? '');
7730
+ if (changes['iconName'])
7731
+ this._iconName.set(changes['iconName'].currentValue ?? undefined);
7732
+ if (changes['toggleable'])
7733
+ this._toggleable.set(changes['toggleable'].currentValue ?? true);
7734
+ if (changes['active']) {
7735
+ this._active.set(changes['active'].currentValue ?? false);
7736
+ }
7737
+ }
7441
7738
  elementRef = inject(ElementRef);
7442
7739
  /** Accessible label for the button */
7443
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
7740
+ ariaLabel = '';
7741
+ _ariaLabel = signal('', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7444
7742
  /** Two-way bindable active/panel-open state — use [(active)]="myVar" in parent */
7445
- active = model(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
7743
+ active = false;
7744
+ activeChange = new EventEmitter();
7745
+ _active = signal(false, ...(ngDevMode ? [{ debugName: "_active" }] : []));
7446
7746
  /** Icon to display — any key from the NgccIcon registry */
7447
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
7747
+ iconName = undefined;
7748
+ _iconName = signal(undefined, ...(ngDevMode ? [{ debugName: "_iconName" }] : []));
7448
7749
  /** Set false to make the button fire-and-forget (no toggle behaviour) */
7449
- toggleable = input(true, ...(ngDevMode ? [{ debugName: "toggleable" }] : []));
7450
- actionClick = output();
7750
+ toggleable = true;
7751
+ _toggleable = signal(true, ...(ngDevMode ? [{ debugName: "_toggleable" }] : []));
7752
+ actionClick = new EventEmitter();
7451
7753
  onClick(event) {
7452
7754
  this.actionClick.emit(event);
7453
- if (this.toggleable()) {
7454
- this.active.update((v) => !v);
7755
+ if (this._toggleable()) {
7756
+ this._active.update((v) => !v);
7757
+ this.activeChange.emit(this._active());
7455
7758
  }
7456
7759
  }
7457
7760
  onDocumentClick(event) {
7458
- if (!this.active() || !this.toggleable())
7761
+ if (!this._active() || !this._toggleable())
7459
7762
  return;
7460
7763
  // Evaluate click path to support detached DOM elements
7461
7764
  const path = event.composedPath();
@@ -7463,23 +7766,37 @@ class NgccHeaderAction {
7463
7766
  // If click is inside any panel, we do not close the action so the panel remains usable
7464
7767
  const isInsidePanel = path.some((el) => el.tagName?.toLowerCase() === 'ngcc-header-panel');
7465
7768
  if (!isInsideAction && !isInsidePanel) {
7466
- this.active.set(false);
7769
+ this._active.set(false);
7770
+ this.activeChange.emit(this._active());
7467
7771
  }
7468
7772
  }
7469
7773
  onEscape() {
7470
- if (this.active() && this.toggleable()) {
7471
- this.active.set(false);
7774
+ if (this._active() && this._toggleable()) {
7775
+ this._active.set(false);
7776
+ this.activeChange.emit(this._active());
7472
7777
  // Return focus to the trigger element when closed via Escape key
7473
7778
  this.elementRef.nativeElement.querySelector('button')?.focus();
7474
7779
  }
7475
7780
  }
7476
7781
  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 });
7782
+ 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", iconName: "iconName", toggleable: "toggleable" }, outputs: { activeChange: "activeChange", actionClick: "actionClick" }, host: { attributes: { "role": "none" }, listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" } }, usesOnChanges: true, 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 });
7478
7783
  }
7479
7784
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderAction, decorators: [{
7480
7785
  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: [{
7786
+ 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"] }]
7787
+ }], propDecorators: { ariaLabel: [{
7788
+ type: Input
7789
+ }], active: [{
7790
+ type: Input
7791
+ }], activeChange: [{
7792
+ type: Output
7793
+ }], iconName: [{
7794
+ type: Input
7795
+ }], toggleable: [{
7796
+ type: Input
7797
+ }], actionClick: [{
7798
+ type: Output
7799
+ }], onDocumentClick: [{
7483
7800
  type: HostListener,
7484
7801
  args: ['document:click', ['$event']]
7485
7802
  }], onEscape: [{
@@ -7496,18 +7813,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7496
7813
  * </ngcc-header-panel>
7497
7814
  */
7498
7815
  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" }] : []));
7816
+ ngOnChanges(changes) {
7817
+ if (changes['expanded'])
7818
+ this._expanded.set(changes['expanded'].currentValue ?? false);
7819
+ if (changes['ariaLabel'])
7820
+ this._ariaLabel.set(changes['ariaLabel'].currentValue ?? 'Panel');
7821
+ }
7822
+ expanded = false;
7823
+ _expanded = signal(false, ...(ngDevMode ? [{ debugName: "_expanded" }] : []));
7824
+ ariaLabel = 'Panel';
7825
+ _ariaLabel = signal('Panel', ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
7826
+ get panelClasses() {
7827
+ return ['cds--header-panel', this._expanded() ? 'cds--header-panel--expanded' : '']
7828
+ .filter(Boolean)
7829
+ .join(' ');
7830
+ }
7504
7831
  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 });
7832
+ 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
7833
  }
7507
7834
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHeaderPanel, decorators: [{
7508
7835
  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 }] }] } });
7836
+ 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"] }]
7837
+ }], propDecorators: { expanded: [{
7838
+ type: Input
7839
+ }], ariaLabel: [{
7840
+ type: Input
7841
+ }] } });
7511
7842
 
7512
7843
  /**
7513
7844
  * Hamburger / close toggle button for side-nav.
@@ -7516,61 +7847,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7516
7847
  * <ngcc-hamburger [(active)]="sideNavOpen" />
7517
7848
  */
7518
7849
  class NgccHamburger {
7850
+ ngOnChanges(changes) {
7851
+ if (changes['label'])
7852
+ this._label.set(changes['label'].currentValue ?? 'Open navigation menu');
7853
+ if (changes['labelClose'])
7854
+ this._labelClose.set(changes['labelClose'].currentValue ?? 'Close navigation menu');
7855
+ if (changes['active']) {
7856
+ this._active.set(changes['active'].currentValue ?? false);
7857
+ }
7858
+ }
7519
7859
  /** 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" }] : []));
7860
+ active = false;
7861
+ activeChange = new EventEmitter();
7862
+ _active = signal(false, ...(ngDevMode ? [{ debugName: "_active" }] : []));
7863
+ label = 'Open navigation menu';
7864
+ _label = signal('Open navigation menu', ...(ngDevMode ? [{ debugName: "_label" }] : []));
7865
+ labelClose = 'Close navigation menu';
7866
+ _labelClose = signal('Close navigation menu', ...(ngDevMode ? [{ debugName: "_labelClose" }] : []));
7867
+ currentLabel = computed(() => (this._active() ? this._labelClose() : this._label()), ...(ngDevMode ? [{ debugName: "currentLabel" }] : []));
7524
7868
  toggle() {
7525
- this.active.update((v) => !v);
7869
+ this._active.update((v) => !v);
7870
+ this.activeChange.emit(this._active());
7526
7871
  }
7527
7872
  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 });
7873
+ 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
7874
  }
7530
7875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccHamburger, decorators: [{
7531
7876
  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 }] }] } });
7877
+ 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"] }]
7878
+ }], propDecorators: { active: [{
7879
+ type: Input
7880
+ }], activeChange: [{
7881
+ type: Output
7882
+ }], label: [{
7883
+ type: Input
7884
+ }], labelClose: [{
7885
+ type: Input
7886
+ }] } });
7534
7887
 
7535
7888
  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" }] : []));
7889
+ label = '';
7890
+ href;
7891
+ routerLink;
7892
+ current = false;
7893
+ disabled = false;
7894
+ skeleton = false;
7895
+ target;
7896
+ rel;
7544
7897
  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 });
7898
+ 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
7899
  }
7547
7900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccBreadcrumbItemComponent, decorators: [{
7548
7901
  type: Component,
7549
7902
  args: [{ selector: 'ngcc-breadcrumb-item', standalone: true, imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: {
7550
7903
  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 }] }] } });
7904
+ '[class.cds--breadcrumb-item--disabled]': 'disabled',
7905
+ }, 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" }]
7906
+ }], propDecorators: { label: [{
7907
+ type: Input
7908
+ }], href: [{
7909
+ type: Input
7910
+ }], routerLink: [{
7911
+ type: Input
7912
+ }], current: [{
7913
+ type: Input
7914
+ }], disabled: [{
7915
+ type: Input
7916
+ }], skeleton: [{
7917
+ type: Input
7918
+ }], target: [{
7919
+ type: Input
7920
+ }], rel: [{
7921
+ type: Input
7922
+ }] } });
7554
7923
 
7555
7924
  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" }] : []));
7925
+ items = [];
7926
+ size = 'md';
7927
+ noTrailingSlash = false;
7928
+ skeleton = false;
7929
+ skeletonCount = 3;
7930
+ ariaLabel = 'Breadcrumb';
7931
+ get resolvedItems() {
7932
+ return this.items.map((item, index, arr) => ({
7933
+ ...item,
7934
+ current: item.current ?? index === arr.length - 1,
7935
+ }));
7936
+ }
7937
+ get skeletonItems() {
7938
+ return Array(this.skeletonCount).fill(null);
7939
+ }
7940
+ trackByIndex(_index) {
7941
+ return _index;
7942
+ }
7567
7943
  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 });
7944
+ 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
7945
  }
7570
7946
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccBreadcrumbComponent, decorators: [{
7571
7947
  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 }] }] } });
7948
+ 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" }]
7949
+ }], propDecorators: { items: [{
7950
+ type: Input
7951
+ }], size: [{
7952
+ type: Input
7953
+ }], noTrailingSlash: [{
7954
+ type: Input
7955
+ }], skeleton: [{
7956
+ type: Input
7957
+ }], skeletonCount: [{
7958
+ type: Input
7959
+ }], ariaLabel: [{
7960
+ type: Input
7961
+ }] } });
7574
7962
 
7575
7963
  /** Injection token for the side-nav context. */
7576
7964
  const NGCC_SIDE_NAV_CONTEXT = new InjectionToken('NgccSideNavContext');
@@ -7592,22 +7980,30 @@ const NGCC_SIDE_NAV_CONTEXT = new InjectionToken('NgccSideNavContext');
7592
7980
  */
7593
7981
  class NgccSideNavMenuItem {
7594
7982
  /** Navigation URL */
7595
- href = input('#', ...(ngDevMode ? [{ debugName: "href" }] : []));
7983
+ href = '#';
7596
7984
  /** Marks this link as the active / current page */
7597
- active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
7985
+ active = false;
7598
7986
  /** Optional title attribute for the anchor */
7599
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
7600
- itemClick = output();
7987
+ title = '';
7988
+ itemClick = new EventEmitter();
7601
7989
  onClick(event) {
7602
7990
  this.itemClick.emit(event);
7603
7991
  }
7604
7992
  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 });
7993
+ 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", 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]=\"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 });
7606
7994
  }
7607
7995
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavMenuItem, decorators: [{
7608
7996
  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"] }] } });
7997
+ 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"] }]
7998
+ }], propDecorators: { href: [{
7999
+ type: Input
8000
+ }], active: [{
8001
+ type: Input
8002
+ }], title: [{
8003
+ type: Input
8004
+ }], itemClick: [{
8005
+ type: Output
8006
+ }] } });
7611
8007
 
7612
8008
  /**
7613
8009
  * A collapsible submenu inside <ngcc-side-nav>.
@@ -7640,24 +8036,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7640
8036
  */
7641
8037
  class NgccSideNavMenu {
7642
8038
  /** Title displayed on the submenu trigger button */
7643
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
8039
+ title = '';
7644
8040
  /**
7645
8041
  * Two-way bindable expanded/collapsed state.
7646
8042
  * Use `[(expanded)]="myVar"` in the parent for controlled behaviour.
7647
8043
  */
7648
- expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
8044
+ expanded = false;
8045
+ expandedChange = new EventEmitter();
7649
8046
  /** Optional icon placed before the title */
7650
- iconName = input(undefined, ...(ngDevMode ? [{ debugName: "iconName" }] : []));
8047
+ iconName;
7651
8048
  /**
7652
- * Signal-based content children query (Angular v17.2+).
7653
- * Automatically tracks projected <ngcc-side-nav-menu-item> instances.
8049
+ * Content children query: tracks projected <ngcc-side-nav-menu-item> instances.
7654
8050
  */
7655
- menuItems = contentChildren(NgccSideNavMenuItem, ...(ngDevMode ? [{ debugName: "menuItems" }] : []));
8051
+ menuItems;
7656
8052
  /**
7657
8053
  * True when any projected menu item has `[active]="true"`.
7658
8054
  * Applied as `cds--side-nav__item--active` on the wrapper <li>.
7659
8055
  */
7660
- hasActiveChild = computed(() => this.menuItems().some((item) => item.active()), ...(ngDevMode ? [{ debugName: "hasActiveChild" }] : []));
8056
+ get hasActiveChild() {
8057
+ return this.menuItems?.some((item) => !!item.active) ?? false;
8058
+ }
7661
8059
  /**
7662
8060
  * Optional reference to the parent NgccSideNav provided via NGCC_SIDE_NAV_CONTEXT.
7663
8061
  * `null` when this menu is used outside of a <ngcc-side-nav> (safe-guard).
@@ -7667,18 +8065,30 @@ class NgccSideNavMenu {
7667
8065
  // Rail mode: the nav is collapsed to icon-only width.
7668
8066
  // Sub-items can't be seen in that state — expand the sidenav first so the
7669
8067
  // user can read the full menu before we open/close the submenu.
7670
- if (this._nav?.rail()) {
8068
+ if (this._nav?.rail) {
7671
8069
  this._nav.expand();
7672
8070
  }
7673
- this.expanded.update((v) => !v);
8071
+ this.expanded = !this.expanded;
8072
+ this.expandedChange.emit(this.expanded);
7674
8073
  }
7675
8074
  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 });
8075
+ 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
8076
  }
7678
8077
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavMenu, decorators: [{
7679
8078
  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 }] }] } });
8079
+ 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"] }]
8080
+ }], propDecorators: { title: [{
8081
+ type: Input
8082
+ }], expanded: [{
8083
+ type: Input
8084
+ }], expandedChange: [{
8085
+ type: Output
8086
+ }], iconName: [{
8087
+ type: Input
8088
+ }], menuItems: [{
8089
+ type: ContentChildren,
8090
+ args: [NgccSideNavMenuItem]
8091
+ }] } });
7682
8092
 
7683
8093
  /**
7684
8094
  * Enterprise-grade Carbon Design System side navigation shell.
@@ -7711,73 +8121,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7711
8121
  */
7712
8122
  class NgccSideNav {
7713
8123
  /** Accessible label for the <nav> landmark. */
7714
- ariaLabel = input('Side navigation', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
8124
+ ariaLabel = 'Side navigation';
7715
8125
  /**
7716
8126
  * Two-way bindable expanded/collapsed state.
7717
8127
  * Use `[(expanded)]="sideNavOpen"` in the parent.
7718
8128
  * Defaults to `true` (expanded).
7719
8129
  */
7720
- expanded = model(true, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
8130
+ expanded = true;
8131
+ expandedChange = new EventEmitter();
7721
8132
  /** When `true`, hides the side-nav entirely (e.g. on mobile). */
7722
- hidden = input(false, ...(ngDevMode ? [{ debugName: "hidden" }] : []));
8133
+ hidden = false;
7723
8134
  /**
7724
8135
  * Rail mode: shows only icons when the nav is collapsed.
7725
8136
  * Requires icons on all items/menus for a good visual.
7726
8137
  */
7727
- rail = input(false, ...(ngDevMode ? [{ debugName: "rail" }] : []));
8138
+ rail = false;
7728
8139
  /**
7729
8140
  * When `true`, renders an expand/collapse toggle button in the side-nav footer.
7730
8141
  * Use with `[(expanded)]` for controlled expand/collapse behaviour.
7731
8142
  */
7732
- allowExpansion = input(false, ...(ngDevMode ? [{ debugName: "allowExpansion" }] : []));
8143
+ allowExpansion = false;
7733
8144
  /** Label shown on the expand toggle when collapsed. */
7734
- openLabel = input('Open navigation menu', ...(ngDevMode ? [{ debugName: "openLabel" }] : []));
8145
+ openLabel = 'Open navigation menu';
7735
8146
  /** Label shown on the collapse toggle when expanded. */
7736
- closeLabel = input('Close navigation menu', ...(ngDevMode ? [{ debugName: "closeLabel" }] : []));
8147
+ closeLabel = 'Close navigation menu';
7737
8148
  /**
7738
8149
  * All projected <ngcc-side-nav-menu> instances (direct + nested).
7739
8150
  * Used to auto-close open submenus when the nav collapses or enters rail mode.
7740
8151
  */
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
- });
8152
+ menus;
8153
+ prevRail = false;
8154
+ ngOnChanges(changes) {
8155
+ // Close all open submenus when:
8156
+ // 1. The nav collapses (expanded → false)
8157
+ // 2. The nav enters rail mode for the first time (rail false → true)
8158
+ if (changes['expanded'] && changes['expanded'].currentValue === false) {
8159
+ this.closeAllMenus();
8160
+ }
8161
+ if (changes['rail']) {
8162
+ const newRail = !!changes['rail'].currentValue;
8163
+ if (newRail && !this.prevRail)
8164
+ this.closeAllMenus();
8165
+ this.prevRail = newRail;
8166
+ }
8167
+ }
8168
+ // Ensure we have an initial prevRail value after content init
8169
+ ngAfterContentInit() {
8170
+ this.prevRail = this.rail;
8171
+ }
8172
+ closeAllMenus() {
8173
+ this.menus?.forEach((menu) => (menu.expanded = false));
7759
8174
  }
7760
8175
  // ── NgccSideNavContext implementation ───────────────────────────────────────
7761
8176
  /** Expands the side nav — called by NgccSideNavMenu when clicked in rail mode. */
7762
8177
  expand() {
7763
- this.expanded.set(true);
8178
+ this.setExpanded(true);
7764
8179
  }
7765
8180
  // ── Public helpers ──────────────────────────────────────────────────────────
7766
8181
  toggle() {
7767
- this.expanded.update((v) => !v);
8182
+ this.setExpanded(!this.expanded);
8183
+ }
8184
+ setExpanded(value) {
8185
+ if (this.expanded === value)
8186
+ return;
8187
+ this.expanded = value;
8188
+ this.expandedChange.emit(value);
8189
+ if (!value)
8190
+ this.closeAllMenus();
7768
8191
  }
7769
8192
  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 });
8193
+ 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
8194
  }
7772
8195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNav, decorators: [{
7773
8196
  type: Component,
7774
8197
  args: [{ selector: 'ngcc-side-nav', standalone: true, imports: [NgccButton], changeDetection: ChangeDetectionStrategy.OnPush, host: {
7775
8198
  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 }] }] } });
8199
+ '[class.cds--side-nav--expanded]': 'expanded',
8200
+ '[class.cds--side-nav--hidden]': 'hidden',
8201
+ '[class.cds--side-nav--rail]': 'rail',
8202
+ }, 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" }]
8203
+ }], propDecorators: { ariaLabel: [{
8204
+ type: Input
8205
+ }], expanded: [{
8206
+ type: Input
8207
+ }], expandedChange: [{
8208
+ type: Output
8209
+ }], hidden: [{
8210
+ type: Input
8211
+ }], rail: [{
8212
+ type: Input
8213
+ }], allowExpansion: [{
8214
+ type: Input
8215
+ }], openLabel: [{
8216
+ type: Input
8217
+ }], closeLabel: [{
8218
+ type: Input
8219
+ }], menus: [{
8220
+ type: ContentChildren,
8221
+ args: [NgccSideNavMenu, { descendants: true }]
8222
+ }] } });
7781
8223
 
7782
8224
  /**
7783
8225
  * A single navigable link inside <ngcc-side-nav>.
@@ -7797,28 +8239,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7797
8239
  */
7798
8240
  class NgccSideNavItem {
7799
8241
  /** Navigation URL */
7800
- href = input('#', ...(ngDevMode ? [{ debugName: "href" }] : []));
8242
+ href = '#';
7801
8243
  /** Marks this link as the active / current page */
7802
- active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
8244
+ active = false;
7803
8245
  /** Optional title attribute for the anchor */
7804
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
8246
+ title = '';
7805
8247
  /** 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" }] : []));
8248
+ iconName = undefined;
8249
+ itemClick = new EventEmitter();
8250
+ get itemClasses() {
8251
+ return ['cds--side-nav__item'].filter(Boolean).join(' ');
8252
+ }
8253
+ get linkClasses() {
8254
+ return ['cds--side-nav__link', this.active ? 'cds--side-nav__link--current' : '']
8255
+ .filter(Boolean)
8256
+ .join(' ');
8257
+ }
7812
8258
  onClick(event) {
7813
8259
  this.itemClick.emit(event);
7814
8260
  }
7815
8261
  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 });
8262
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NgccSideNavItem, isStandalone: true, selector: "ngcc-side-nav-item", inputs: { href: "href", 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]=\"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 });
7817
8263
  }
7818
8264
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccSideNavItem, decorators: [{
7819
8265
  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"] }] } });
8266
+ 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"] }]
8267
+ }], propDecorators: { href: [{
8268
+ type: Input
8269
+ }], active: [{
8270
+ type: Input
8271
+ }], title: [{
8272
+ type: Input
8273
+ }], iconName: [{
8274
+ type: Input
8275
+ }], itemClick: [{
8276
+ type: Output
8277
+ }] } });
7822
8278
 
7823
8279
  /**
7824
8280
  * A visual separator between groups of <ngcc-side-nav-item> / <ngcc-side-nav-menu> elements.
@@ -7843,92 +8299,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7843
8299
  const CODE_LINE_HEIGHT_REM = 1.5;
7844
8300
  class NgccCodeSnippetComponent {
7845
8301
  /** Display variant. */
7846
- type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : []));
8302
+ type = 'single';
7847
8303
  /** The code string to display and copy. */
7848
- code = input('', ...(ngDevMode ? [{ debugName: "code" }] : []));
8304
+ code = '';
7849
8305
  /** Disables all interaction (copy, expand). */
7850
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
8306
+ disabled = false;
7851
8307
  /** Hides the copy button. */
7852
- hideCopyButton = input(false, ...(ngDevMode ? [{ debugName: "hideCopyButton" }] : []));
8308
+ hideCopyButton = false;
7853
8309
  /** Enables text wrapping in the multi-line variant. */
7854
- wrapText = input(false, ...(ngDevMode ? [{ debugName: "wrapText" }] : []));
8310
+ wrapText = false;
7855
8311
  /** Applies the light theme background. */
7856
- light = input(false, ...(ngDevMode ? [{ debugName: "light" }] : []));
8312
+ light = false;
7857
8313
  /** Shows skeleton loading placeholders instead of content. */
7858
- skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : []));
8314
+ skeleton = false;
7859
8315
  /** Text shown in the copy-feedback tooltip after a successful copy. */
7860
- feedback = input('Copied!', ...(ngDevMode ? [{ debugName: "feedback" }] : []));
8316
+ feedback = 'Copied!';
7861
8317
  /** Duration in ms before the copy feedback tooltip disappears. */
7862
- feedbackTimeout = input(2000, ...(ngDevMode ? [{ debugName: "feedbackTimeout" }] : []));
8318
+ feedbackTimeout = 2000;
7863
8319
  /** Label for the "Show more" expand button (multi-line). */
7864
- showMoreText = input('Show more', ...(ngDevMode ? [{ debugName: "showMoreText" }] : []));
8320
+ showMoreText = 'Show more';
7865
8321
  /** Label for the "Show less" collapse button (multi-line). */
7866
- showLessText = input('Show less', ...(ngDevMode ? [{ debugName: "showLessText" }] : []));
8322
+ showLessText = 'Show less';
7867
8323
  /** Aria-label for the copy button. */
7868
- copyButtonDescription = input('Copy to clipboard', ...(ngDevMode ? [{ debugName: "copyButtonDescription" }] : []));
8324
+ copyButtonDescription = 'Copy to clipboard';
7869
8325
  /** Aria-label for the scrollable code container (single / multi). */
7870
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
8326
+ ariaLabel = '';
7871
8327
  /**
7872
8328
  * Maximum number of visible rows in the collapsed multi-line state.
7873
8329
  * Set to 0 for unlimited height (no expand button shown).
7874
8330
  */
7875
- maxCollapsedNumberOfRows = input(15, ...(ngDevMode ? [{ debugName: "maxCollapsedNumberOfRows" }] : []));
8331
+ maxCollapsedNumberOfRows = 15;
7876
8332
  /**
7877
8333
  * Maximum number of visible rows in the expanded multi-line state.
7878
8334
  * Set to 0 for unlimited height.
7879
8335
  */
7880
- maxExpandedNumberOfRows = input(0, ...(ngDevMode ? [{ debugName: "maxExpandedNumberOfRows" }] : []));
8336
+ maxExpandedNumberOfRows = 0;
7881
8337
  /** Internal expand state for the multi-line variant. */
7882
8338
  isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
7883
8339
  /** True while the copy-feedback tooltip is animating. */
7884
8340
  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)
8341
+ /** Whether the multi-line code block needs an expand/collapse button. */
8342
+ get needsExpansion() {
8343
+ const max = this.maxCollapsedNumberOfRows;
8344
+ if (this.type !== 'multi' || max <= 0)
7892
8345
  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')
8346
+ return this.code.split('\n').length > max;
8347
+ }
8348
+ /** Inline style max-height applied to the multi-line container to clamp visible rows. */
8349
+ get containerMaxHeight() {
8350
+ if (this.type !== 'multi')
7901
8351
  return null;
7902
- const rows = this.isExpanded()
7903
- ? this.maxExpandedNumberOfRows()
7904
- : this.maxCollapsedNumberOfRows();
8352
+ const rows = this.isExpanded() ? this.maxExpandedNumberOfRows : this.maxCollapsedNumberOfRows;
7905
8353
  return rows > 0 ? `${rows * CODE_LINE_HEIGHT_REM}rem` : null;
7906
- }, ...(ngDevMode ? [{ debugName: "containerMaxHeight" }] : []));
8354
+ }
7907
8355
  feedbackTimer;
7908
8356
  async copyCode() {
7909
- if (this.disabled())
8357
+ if (this.disabled)
7910
8358
  return;
7911
8359
  try {
7912
- await navigator.clipboard.writeText(this.code());
8360
+ await navigator.clipboard.writeText(this.code);
8361
+ this.triggerFeedback();
7913
8362
  }
7914
- catch {
7915
- this.fallbackCopy(this.code());
8363
+ catch (error) {
8364
+ console.error('Clipboard copy failed:', error);
7916
8365
  }
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
8366
  }
7930
8367
  toggleExpand() {
7931
- if (this.disabled())
8368
+ if (this.disabled)
7932
8369
  return;
7933
8370
  this.isExpanded.update((v) => !v);
7934
8371
  }
@@ -7937,15 +8374,45 @@ class NgccCodeSnippetComponent {
7937
8374
  this.isCopying.set(true);
7938
8375
  this.feedbackTimer = setTimeout(() => {
7939
8376
  this.isCopying.set(false);
7940
- }, this.feedbackTimeout());
8377
+ }, this.feedbackTimeout);
7941
8378
  }
7942
8379
  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 });
8380
+ 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
8381
  }
7945
8382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgccCodeSnippetComponent, decorators: [{
7946
8383
  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 }] }] } });
8384
+ 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"] }]
8385
+ }], propDecorators: { type: [{
8386
+ type: Input
8387
+ }], code: [{
8388
+ type: Input
8389
+ }], disabled: [{
8390
+ type: Input
8391
+ }], hideCopyButton: [{
8392
+ type: Input
8393
+ }], wrapText: [{
8394
+ type: Input
8395
+ }], light: [{
8396
+ type: Input
8397
+ }], skeleton: [{
8398
+ type: Input
8399
+ }], feedback: [{
8400
+ type: Input
8401
+ }], feedbackTimeout: [{
8402
+ type: Input
8403
+ }], showMoreText: [{
8404
+ type: Input
8405
+ }], showLessText: [{
8406
+ type: Input
8407
+ }], copyButtonDescription: [{
8408
+ type: Input
8409
+ }], ariaLabel: [{
8410
+ type: Input
8411
+ }], maxCollapsedNumberOfRows: [{
8412
+ type: Input
8413
+ }], maxExpandedNumberOfRows: [{
8414
+ type: Input
8415
+ }] } });
7949
8416
 
7950
8417
  /*
7951
8418
  * Public API Surface of ngcc
@@ -7957,4 +8424,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
7957
8424
  */
7958
8425
 
7959
8426
  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
8427
+ //# sourceMappingURL=assistanz-carbideui.mjs.map