@eui/ecl 22.0.0-alpha.15 → 22.0.0-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # eui documentation
2
2
 
3
- > Generated by compodoc 2.0.0 at 2026-09-23T02:10:36.663Z, llm-md export.
3
+ > Generated by compodoc 2.0.0 at 2026-09-23T15:12:15.510Z, llm-md export.
4
4
 
5
5
  ## Modules
6
6
 
@@ -1690,8 +1690,7 @@ Outputs:
1690
1690
 
1691
1691
  Properties:
1692
1692
  - `closeButton: unknown = viewChild.required<EclButtonComponent>('closeButton')` — Reference to the close button component.
1693
- - `eclThemeService: unknown = inject(EclThemeService)`
1694
- - `variant: unknown = signal<'information' | 'success' | 'warning' | 'error' | string>(undefined)` — Defines the visual variant of the modal. Determines which icon is shown in the header. Possible values: 'information', 'success', 'warning', 'error', or any custom string.
1693
+ - `variant: unknown = computed<'information' | 'success' | 'warning' | 'error' | string | undefined>( () => this.modal.variant(), )` — Defines the visual variant of the modal. Determines which icon is shown in the header. Derived reactively from the parent modal's variant input, so the header icon updates automatically when the parent variant changes at runtime. Possible values: 'information', 'success', 'warning', 'error', or any custom string.
1695
1694
 
1696
1695
  Methods:
1697
1696
  - `getIcon(): "information" | "check-filled" | "warning" | "error" | null` — Returns the name of the icon associated with the current variant.
@@ -5104,7 +5103,7 @@ Outputs:
5104
5103
  - `modalClose` — Event emitted when the element is clicked and the modal should be closed.
5105
5104
 
5106
5105
  Methods:
5107
- - `onClick(evt: MouseEvent): void` — Handles click events and emits the modalClose event.
5106
+ - `onClick(): void` — Handles click events and emits the modalClose event.
5108
5107
  - `getCssClasses(rootClass: string): string`
5109
5108
 
5110
5109
  ### EclModalTriggerDirective
@@ -5121,7 +5120,7 @@ Inputs:
5121
5120
  - `tabindex: number`
5122
5121
 
5123
5122
  Methods:
5124
- - `onClick(evt: MouseEvent): void` — Handles click event and opens the target modal.
5123
+ - `onClick(): void` — Handles click event and opens the target modal.
5125
5124
  - `getCssClasses(rootClass: string): string`
5126
5125
 
5127
5126
  ### EclMultiselectOptionDirective
@@ -7565,10 +7564,10 @@ Properties:
7565
7564
 
7566
7565
  ## Public variables
7567
7566
 
7568
- - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7569
- Defined in `packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts`
7570
7567
  - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7571
7568
  Defined in `packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts`
7569
+ - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7570
+ Defined in `packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts`
7572
7571
  - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7573
7572
  Defined in `packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts`
7574
7573
  - `AVAILABLE_NON_EU_LOGO_COUNTRY_CODES: string[] = ['ar', 'ca', 'is', 'jp', 'lb', 'no', 'ru', 'sw', 'tr', 'uk', 'zh'] as const`
@@ -138,10 +138,10 @@
138
138
  <td class="col-md-4">
139
139
  <ul class="index-list">
140
140
  <li>
141
- <a href="#ARROW_SIZE" title="packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts" class="reference-link "><span class="reference-badge reference-badge--variable" aria-hidden="true">V</span><span class="reference-link-label"><b>ARROW_SIZE</b>&nbsp;&nbsp;&nbsp;(packages/.../ecl-site-header-language.component.ts)</span></a>
141
+ <a href="#ARROW_SIZE" title="packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts" class="reference-link "><span class="reference-badge reference-badge--variable" aria-hidden="true">V</span><span class="reference-link-label"><b>ARROW_SIZE</b>&nbsp;&nbsp;&nbsp;(packages/.../ecl-site-header-login.component.ts)</span></a>
142
142
  </li>
143
143
  <li>
144
- <a href="#ARROW_SIZE" title="packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts" class="reference-link "><span class="reference-badge reference-badge--variable" aria-hidden="true">V</span><span class="reference-link-label"><b>ARROW_SIZE</b>&nbsp;&nbsp;&nbsp;(packages/.../ecl-site-header-login.component.ts)</span></a>
144
+ <a href="#ARROW_SIZE" title="packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts" class="reference-link "><span class="reference-badge reference-badge--variable" aria-hidden="true">V</span><span class="reference-link-label"><b>ARROW_SIZE</b>&nbsp;&nbsp;&nbsp;(packages/.../ecl-site-header-language.component.ts)</span></a>
145
145
  </li>
146
146
  <li>
147
147
  <a href="#ARROW_SIZE" title="packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts" class="reference-link "><span class="reference-badge reference-badge--variable" aria-hidden="true">V</span><span class="reference-link-label"><b>ARROW_SIZE</b>&nbsp;&nbsp;&nbsp;(packages/.../ecl-site-header-search.component.ts)</span></a>
@@ -411,7 +411,7 @@
411
411
  </table>
412
412
  </section>
413
413
 
414
- <h3>packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts</h3>
414
+ <h3>packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts</h3>
415
415
  <section data-compodoc="block-properties">
416
416
  <h3></h3> <table class="table table-sm table-bordered">
417
417
  <tbody>
@@ -445,67 +445,67 @@
445
445
 
446
446
  </tbody>
447
447
  </table>
448
- </section>
449
- <h3>packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts</h3>
450
- <section data-compodoc="block-properties">
451
- <h3></h3> <table class="table table-sm table-bordered">
448
+ <table class="table table-sm table-bordered">
452
449
  <tbody>
453
450
  <tr>
454
451
  <td class="col-md-4">
455
- <a name="ARROW_SIZE"></a>
452
+ <a name="RESIZE_DEBOUNCE"></a>
456
453
  <span class="name">
457
- <span ><b>ARROW_SIZE</b></span>
458
- <a href="#ARROW_SIZE"><span class="icon ion-ios-link"></span></a>
454
+ <span ><b>RESIZE_DEBOUNCE</b></span>
455
+ <a href="#RESIZE_DEBOUNCE"><span class="icon ion-ios-link"></span></a>
459
456
  </span>
460
457
  </td>
461
458
  </tr>
462
459
  <tr>
463
460
  <td class="col-md-4">
464
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
461
+ <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank" >number</a></code>
465
462
 
466
463
  </td>
467
464
  </tr>
468
465
  <tr>
469
466
  <td class="col-md-4">
470
- <i>Default value : </i><code>&#x27;0.5rem&#x27;</code>
467
+ <i>Default value : </i><code>200</code>
471
468
  </td>
472
469
  </tr>
473
470
 
474
471
  <tr>
475
472
  <td class="col-md-4">
476
- <div class="io-description"><p>Half the arrow&#39;s own width, matching ECL&#39;s <code>arrowSize</code>.</p>
473
+ <div class="io-description"><p>Debounce for the resize recomputation, matching ECL&#39;s <code>handleResize</code>.</p>
477
474
  </div>
478
475
  </td>
479
476
  </tr>
480
477
 
481
478
  </tbody>
482
479
  </table>
483
- <table class="table table-sm table-bordered">
480
+ </section>
481
+ <h3>packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts</h3>
482
+ <section data-compodoc="block-properties">
483
+ <h3></h3> <table class="table table-sm table-bordered">
484
484
  <tbody>
485
485
  <tr>
486
486
  <td class="col-md-4">
487
- <a name="RESIZE_DEBOUNCE"></a>
487
+ <a name="ARROW_SIZE"></a>
488
488
  <span class="name">
489
- <span ><b>RESIZE_DEBOUNCE</b></span>
490
- <a href="#RESIZE_DEBOUNCE"><span class="icon ion-ios-link"></span></a>
489
+ <span ><b>ARROW_SIZE</b></span>
490
+ <a href="#ARROW_SIZE"><span class="icon ion-ios-link"></span></a>
491
491
  </span>
492
492
  </td>
493
493
  </tr>
494
494
  <tr>
495
495
  <td class="col-md-4">
496
- <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank" >number</a></code>
496
+ <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
497
497
 
498
498
  </td>
499
499
  </tr>
500
500
  <tr>
501
501
  <td class="col-md-4">
502
- <i>Default value : </i><code>200</code>
502
+ <i>Default value : </i><code>&#x27;0.5rem&#x27;</code>
503
503
  </td>
504
504
  </tr>
505
505
 
506
506
  <tr>
507
507
  <td class="col-md-4">
508
- <div class="io-description"><p>Debounce for the resize recomputation, matching ECL&#39;s <code>handleResize</code>.</p>
508
+ <div class="io-description"><p>Half the arrow&#39;s own width, matching ECL&#39;s <code>arrowSize</code>.</p>
509
509
  </div>
510
510
  </td>
511
511
  </tr>
@@ -128,7 +128,7 @@
128
128
  </ol>
129
129
  <ul class="properties-list">
130
130
  <li>
131
- <b>Version</b> : 22.0.0-alpha.15</li>
131
+ <b>Version</b> : 22.0.0-alpha.17</li>
132
132
  </ul>
133
133
 
134
134
 
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, HostListener, Directive, inject, signal, viewChild, HostBinding, Component, contentChild, forwardRef, contentChildren, DOCUMENT, PLATFORM_ID, effect } from '@angular/core';
3
- import { ECLBaseDirective, EclBaseEvent, EclThemeService } from '@eui/ecl/core';
2
+ import { input, output, Directive, inject, forwardRef, computed, viewChild, Component, signal, contentChild, contentChildren, DOCUMENT, PLATFORM_ID } from '@angular/core';
3
+ import { ECLBaseDirective, EclBaseEvent } from '@eui/ecl/core';
4
4
  import { TranslatePipe } from '@ngx-translate/core';
5
5
  import * as i2 from '@eui/ecl/components/ecl-button';
6
6
  import { EUI_ECL_BUTTON, EclButtonComponent } from '@eui/ecl/components/ecl-button';
@@ -36,21 +36,21 @@ class EclModalCloseDirective extends ECLBaseDirective {
36
36
  /**
37
37
  * Handles click events and emits the `modalClose` event.
38
38
  */
39
- onClick(evt) {
39
+ onClick() {
40
40
  this.modalClose.emit(null);
41
41
  }
42
42
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalCloseDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
43
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: EclModalCloseDirective, isStandalone: true, selector: "[eclModalClose]", inputs: { eclModalResult: { classPropertyName: "eclModalResult", publicName: "eclModalClose", isSignal: true, isRequired: false, transformFunction: null }, eclModalRole: { classPropertyName: "eclModalRole", publicName: "eclModalRole", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modalClose: "modalClose" }, host: { listeners: { "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0 }); }
43
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: EclModalCloseDirective, isStandalone: true, selector: "[eclModalClose]", inputs: { eclModalResult: { classPropertyName: "eclModalResult", publicName: "eclModalClose", isSignal: true, isRequired: false, transformFunction: null }, eclModalRole: { classPropertyName: "eclModalRole", publicName: "eclModalRole", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modalClose: "modalClose" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0 }); }
44
44
  }
45
45
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalCloseDirective, decorators: [{
46
46
  type: Directive,
47
47
  args: [{
48
48
  selector: '[eclModalClose]',
49
+ host: {
50
+ '(click)': 'onClick()',
51
+ },
49
52
  }]
50
- }], propDecorators: { eclModalResult: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclModalClose", required: false }] }], eclModalRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclModalRole", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }], onClick: [{
51
- type: HostListener,
52
- args: ['click', ['$event']]
53
- }] } });
53
+ }], propDecorators: { eclModalResult: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclModalClose", required: false }] }], eclModalRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclModalRole", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }] } });
54
54
 
55
55
  class EclModalOpenEvent extends EclBaseEvent {
56
56
  }
@@ -73,13 +73,22 @@ class EclModalCloseEvent extends EclBaseEvent {
73
73
  class EclModalHeaderComponent extends ECLBaseDirective {
74
74
  constructor() {
75
75
  super(...arguments);
76
- this.eclThemeService = inject(EclThemeService);
76
+ /**
77
+ * Reference to the parent modal the header is projected into.
78
+ * Injected with `forwardRef` to avoid a circular module-import issue.
79
+ * A header is only valid inside an `EclModalComponent`, so this is a
80
+ * required injection: using the header outside a modal throws at
81
+ * construction, surfacing the misuse immediately.
82
+ */
83
+ this.modal = inject(forwardRef(() => EclModalComponent));
77
84
  /**
78
85
  * Defines the visual variant of the modal.
79
86
  * Determines which icon is shown in the header.
87
+ * Derived reactively from the parent modal's `variant` input, so the header
88
+ * icon updates automatically when the parent variant changes at runtime.
80
89
  * Possible values: 'information', 'success', 'warning', 'error', or any custom string.
81
90
  */
82
- this.variant = signal(undefined, /* @ts-ignore */
91
+ this.variant = computed(() => this.modal.variant(), /* @ts-ignore */
83
92
  ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
84
93
  /**
85
94
  * Event emitted when the close button is clicked.
@@ -128,7 +137,7 @@ class EclModalHeaderComponent extends ECLBaseDirective {
128
137
  }
129
138
  }
130
139
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EclModalHeaderComponent, isStandalone: true, selector: "[eclModalHeader]", outputs: { modalClose: "modalClose" }, host: { properties: { "class": "this.cssClasses" } }, viewQueries: [{ propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__header-content\">\n @if(getIcon()) {\n @if(variant() === 'warning') {\n <span class=\"ecl-modal__icon-background\"></span>\n }\n <ecl-icon [icon]=\"getIcon()\" size=\"l\" class=\"ecl-modal__icon\" [title]=\"variant()\"></ecl-icon>\n }\n <ng-content></ng-content>\n</div>\n<button #closeButton eclButton variant=\"tertiary\" size=\"m\" eclStyle=\"neutral\" isIconOnly class=\"ecl-modal__close\" type=\"button\"\n (click)=\"onCloseClick()\">\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n</button>", dependencies: [{ kind: "component", type: i1.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "component", type: i2.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "directive", type: i2.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
140
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EclModalHeaderComponent, isStandalone: true, selector: "[eclModalHeader]", outputs: { modalClose: "modalClose" }, host: { properties: { "class": "cssClasses" } }, viewQueries: [{ propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__header-content\">\n @if(getIcon()) {\n @if(variant() === 'warning') {\n <span class=\"ecl-modal__icon-background\"></span>\n }\n <ecl-icon [icon]=\"getIcon()\" size=\"l\" class=\"ecl-modal__icon\" [title]=\"variant()\"></ecl-icon>\n }\n <ng-content></ng-content>\n</div>\n<button #closeButton eclButton variant=\"tertiary\" size=\"m\" eclStyle=\"neutral\" isIconOnly class=\"ecl-modal__close\" type=\"button\"\n (click)=\"onCloseClick()\">\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n</button>", dependencies: [{ kind: "component", type: i1.EclIconComponent, selector: "ecl-icon", inputs: ["iconSet", "icon", "size", "color", "transform", "ariaLabelledby", "role", "title", "ariaHidden", "focusable", "isFlipHorizontal"] }, { kind: "component", type: i2.EclButtonComponent, selector: "button[eclButton], button[ecl-button], a[eclButton]", inputs: ["isIconOnly", "variant", "eclStyle", "size", "containerStyleClass"] }, { kind: "directive", type: i2.EclButtonLabelDirective, selector: "[eclButtonLabel]" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
132
141
  }
133
142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalHeaderComponent, decorators: [{
134
143
  type: Component,
@@ -136,11 +145,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
136
145
  ...EUI_ECL_ICON,
137
146
  TranslatePipe,
138
147
  ...EUI_ECL_BUTTON,
139
- ], template: "<div class=\"ecl-modal__header-content\">\n @if(getIcon()) {\n @if(variant() === 'warning') {\n <span class=\"ecl-modal__icon-background\"></span>\n }\n <ecl-icon [icon]=\"getIcon()\" size=\"l\" class=\"ecl-modal__icon\" [title]=\"variant()\"></ecl-icon>\n }\n <ng-content></ng-content>\n</div>\n<button #closeButton eclButton variant=\"tertiary\" size=\"m\" eclStyle=\"neutral\" isIconOnly class=\"ecl-modal__close\" type=\"button\"\n (click)=\"onCloseClick()\">\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n</button>" }]
140
- }], propDecorators: { modalClose: [{ type: i0.Output, args: ["modalClose"] }], closeButton: [{ type: i0.ViewChild, args: ['closeButton', { isSignal: true }] }], cssClasses: [{
141
- type: HostBinding,
142
- args: ['class']
143
- }] } });
148
+ ], host: {
149
+ '[class]': 'cssClasses',
150
+ }, template: "<div class=\"ecl-modal__header-content\">\n @if(getIcon()) {\n @if(variant() === 'warning') {\n <span class=\"ecl-modal__icon-background\"></span>\n }\n <ecl-icon [icon]=\"getIcon()\" size=\"l\" class=\"ecl-modal__icon\" [title]=\"variant()\"></ecl-icon>\n }\n <ng-content></ng-content>\n</div>\n<button #closeButton eclButton variant=\"tertiary\" size=\"m\" eclStyle=\"neutral\" isIconOnly class=\"ecl-modal__close\" type=\"button\"\n (click)=\"onCloseClick()\">\n <span eclButtonLabel>{{ 'ecl.common.CLOSE' | translate }}</span>\n <ecl-icon icon=\"close\" size=\"m\"></ecl-icon>\n</button>" }]
151
+ }], propDecorators: { modalClose: [{ type: i0.Output, args: ["modalClose"] }], closeButton: [{ type: i0.ViewChild, args: ['closeButton', { isSignal: true }] }] } });
144
152
 
145
153
  /**
146
154
  * Body component used inside the ECL Modal.
@@ -167,20 +175,19 @@ class EclModalBodyComponent extends ECLBaseDirective {
167
175
  ].join(' ').trim();
168
176
  }
169
177
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalBodyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
170
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.2", type: EclModalBodyComponent, isStandalone: true, selector: "[eclModalBody]", host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__body-scroll\" [id]=\"eclModalBodyId()\">\n <ng-content></ng-content>\n</div>\n<div class=\"ecl-modal__body-overflow\" aria-hidden=\"true\"></div>\n<ng-content select=\"[eclModalBodyFixedContent]\"></ng-content>" }); }
178
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.2", type: EclModalBodyComponent, isStandalone: true, selector: "[eclModalBody]", host: { properties: { "class": "cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__body-scroll\" [id]=\"eclModalBodyId()\">\n <ng-content></ng-content>\n</div>\n<div class=\"ecl-modal__body-overflow\" aria-hidden=\"true\"></div>\n<ng-content select=\"[eclModalBodyFixedContent]\"></ng-content>" }); }
171
179
  }
172
180
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalBodyComponent, decorators: [{
173
181
  type: Component,
174
- args: [{ selector: '[eclModalBody]', template: "<div class=\"ecl-modal__body-scroll\" [id]=\"eclModalBodyId()\">\n <ng-content></ng-content>\n</div>\n<div class=\"ecl-modal__body-overflow\" aria-hidden=\"true\"></div>\n<ng-content select=\"[eclModalBodyFixedContent]\"></ng-content>" }]
175
- }], propDecorators: { cssClasses: [{
176
- type: HostBinding,
177
- args: ['class']
178
- }] } });
182
+ args: [{ selector: '[eclModalBody]', host: {
183
+ '[class]': 'cssClasses',
184
+ }, template: "<div class=\"ecl-modal__body-scroll\" [id]=\"eclModalBodyId()\">\n <ng-content></ng-content>\n</div>\n<div class=\"ecl-modal__body-overflow\" aria-hidden=\"true\"></div>\n<ng-content select=\"[eclModalBodyFixedContent]\"></ng-content>" }]
185
+ }] });
179
186
 
180
187
  /* eslint-disable @typescript-eslint/no-explicit-any */
181
188
  class EclModalComponent extends ECLBaseDirective {
182
189
  constructor() {
183
- super();
190
+ super(...arguments);
184
191
  /**
185
192
  * Defines the visual variant of the modal.
186
193
  * Possible values: 'information', 'success', 'warning', 'error', or a custom string.
@@ -227,15 +234,37 @@ class EclModalComponent extends ECLBaseDirective {
227
234
  */
228
235
  this.eclModalBody = contentChild(EclModalBodyComponent, /* @ts-ignore */
229
236
  ...(ngDevMode ? [{ debugName: "eclModalBody" }] : /* istanbul ignore next */ []));
230
- this.previousOverflow = null;
237
+ this.previousOverflow = '';
231
238
  this.document = inject(DOCUMENT);
232
239
  this.platformId = inject(PLATFORM_ID);
233
- effect(() => {
234
- const header = this.eclModalHeader();
235
- if (header) {
236
- header.variant.set(this.variant());
237
- }
240
+ }
241
+ /**
242
+ * Wires the projected header and close directives, and passes the body id to
243
+ * the projected body, once content is initialized. The projected content is
244
+ * static for the modal's lifetime, so a one-time setup is sufficient.
245
+ */
246
+ ngAfterContentInit() {
247
+ // The header derives its own `variant` reactively from this modal, so no
248
+ // manual sync is needed here. We only wire the close event.
249
+ const header = this.eclModalHeader();
250
+ if (header) {
251
+ header.modalClose.subscribe(() => {
252
+ this.closeModal({ eclModalRole: 'cancel' });
253
+ });
254
+ }
255
+ // Wire every projected close directive to close the modal with its
256
+ // configured role and result. `modalClose` is an `output()`, so its
257
+ // subscription is cleaned up automatically when this component is destroyed.
258
+ this.eclModalCloseComponents().forEach((closeCmp) => {
259
+ closeCmp.modalClose.subscribe(() => {
260
+ this.closeModal({
261
+ eclModalData: closeCmp.eclModalResult(),
262
+ eclModalRole: closeCmp.eclModalRole(),
263
+ });
264
+ });
238
265
  });
266
+ // Pass the modal body id to the projected body for aria-describedby wiring.
267
+ this.eclModalBody()?.eclModalBodyId.set(this.eclModalBodyId);
239
268
  }
240
269
  /**
241
270
  * Binds the `open` attribute to the modal element.
@@ -266,45 +295,30 @@ class EclModalComponent extends ECLBaseDirective {
266
295
  onEscapeKeydownHandler() {
267
296
  this.closeModal({ eclModalRole: 'cancel' });
268
297
  }
269
- /**
270
- * Subscribes to close events from header and close directives after content is initialized.
271
- */
272
- ngAfterContentInit() {
273
- const header = this.eclModalHeader();
274
- if (header) {
275
- header.variant.set(this.variant());
276
- header.modalClose.subscribe(() => {
277
- this.closeModal({ eclModalRole: 'cancel' });
278
- });
279
- }
280
- this.eclModalCloseComponents()?.forEach((eclModalCloseCmp) => {
281
- eclModalCloseCmp.modalClose.subscribe(() => {
282
- this.closeModal({
283
- eclModalData: eclModalCloseCmp.eclModalResult(),
284
- eclModalRole: eclModalCloseCmp.eclModalRole(),
285
- });
286
- });
287
- });
288
- this.eclModalBody().eclModalBodyId.set(this.eclModalBodyId);
289
- }
290
298
  /**
291
299
  * Opens the modal and emits a `modalOpen` event.
292
300
  * If the event is not prevented, the modal will be displayed.
293
301
  */
294
302
  openModal() {
303
+ // Ignore repeated open calls so the saved overflow value is not overwritten
304
+ // with the already-hidden value while the modal is open.
305
+ if (this.isOpen()) {
306
+ return;
307
+ }
295
308
  const event = new EclModalOpenEvent();
296
309
  this.modalOpen.emit(event);
297
- if (!event.defaultPrevented) {
298
- this.isOpen.set(true);
310
+ if (event.defaultPrevented) {
311
+ return;
299
312
  }
313
+ this.isOpen.set(true);
300
314
  const header = this.eclModalHeader();
301
315
  if (header) {
302
316
  setTimeout(() => header.closeButton().el.nativeElement.focus(), 100);
303
317
  }
304
318
  // To prevent scrolling in main document
305
319
  if (isPlatformBrowser(this.platformId)) {
306
- this.previousOverflow = document.body.style.overflow;
307
- document.body.style.overflow = 'hidden';
320
+ this.previousOverflow = this.document.body.style.overflow;
321
+ this.document.body.style.overflow = 'hidden';
308
322
  }
309
323
  }
310
324
  /**
@@ -322,29 +336,22 @@ class EclModalComponent extends ECLBaseDirective {
322
336
  this.isOpen.set(false);
323
337
  }
324
338
  if (isPlatformBrowser(this.platformId)) {
325
- document.body.style.overflow = this.previousOverflow;
339
+ this.document.body.style.overflow = this.previousOverflow;
326
340
  }
327
341
  }
328
342
  }
329
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
330
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclModalComponent, isStandalone: true, selector: "dialog[eclModal]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modalClose: "modalClose", modalOpen: "modalOpen" }, host: { listeners: { "document:keydown.escape": "onEscapeKeydownHandler()" }, properties: { "attr.open": "this.isModalOpened", "attr.aria-describedby": "this.hostAriaDescribedBy", "class": "this.cssClasses" } }, queries: [{ propertyName: "eclModalHeader", first: true, predicate: i0.forwardRef(() => EclModalHeaderComponent), descendants: true, isSignal: true }, { propertyName: "eclModalCloseComponents", predicate: i0.forwardRef(() => EclModalCloseDirective), descendants: true, isSignal: true }, { propertyName: "eclModalBody", first: true, predicate: EclModalBodyComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__container\">\n <div class=\"ecl-modal__content ecl-container\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
344
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclModalComponent, isStandalone: true, selector: "dialog[eclModal]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modalClose: "modalClose", modalOpen: "modalOpen" }, host: { listeners: { "document:keydown.escape": "onEscapeKeydownHandler()" }, properties: { "attr.open": "isModalOpened", "attr.aria-describedby": "hostAriaDescribedBy", "class": "cssClasses" } }, queries: [{ propertyName: "eclModalHeader", first: true, predicate: i0.forwardRef(() => EclModalHeaderComponent), descendants: true, isSignal: true }, { propertyName: "eclModalCloseComponents", predicate: i0.forwardRef(() => EclModalCloseDirective), descendants: true, isSignal: true }, { propertyName: "eclModalBody", first: true, predicate: EclModalBodyComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__container\">\n <div class=\"ecl-modal__content ecl-container\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
331
345
  }
332
346
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalComponent, decorators: [{
333
347
  type: Component,
334
- args: [{ selector: 'dialog[eclModal]', imports: [A11yModule], template: "<div class=\"ecl-modal__container\">\n <div class=\"ecl-modal__content ecl-container\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
335
- }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }], modalOpen: [{ type: i0.Output, args: ["modalOpen"] }], eclModalHeader: [{ type: i0.ContentChild, args: [forwardRef(() => EclModalHeaderComponent), { isSignal: true }] }], eclModalCloseComponents: [{ type: i0.ContentChildren, args: [forwardRef(() => EclModalCloseDirective), { ...{ descendants: true }, isSignal: true }] }], eclModalBody: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EclModalBodyComponent), { isSignal: true }] }], isModalOpened: [{
336
- type: HostBinding,
337
- args: ['attr.open']
338
- }], hostAriaDescribedBy: [{
339
- type: HostBinding,
340
- args: ['attr.aria-describedby']
341
- }], cssClasses: [{
342
- type: HostBinding,
343
- args: ['class']
344
- }], onEscapeKeydownHandler: [{
345
- type: HostListener,
346
- args: ['document:keydown.escape']
347
- }] } });
348
+ args: [{ selector: 'dialog[eclModal]', imports: [A11yModule], host: {
349
+ '[attr.open]': 'isModalOpened',
350
+ '[attr.aria-describedby]': 'hostAriaDescribedBy',
351
+ '[class]': 'cssClasses',
352
+ '(document:keydown.escape)': 'onEscapeKeydownHandler()',
353
+ }, template: "<div class=\"ecl-modal__container\">\n <div class=\"ecl-modal__content ecl-container\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
354
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }], modalOpen: [{ type: i0.Output, args: ["modalOpen"] }], eclModalHeader: [{ type: i0.ContentChild, args: [forwardRef(() => EclModalHeaderComponent), { isSignal: true }] }], eclModalCloseComponents: [{ type: i0.ContentChildren, args: [forwardRef(() => EclModalCloseDirective), { ...{ descendants: true }, isSignal: true }] }], eclModalBody: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EclModalBodyComponent), { isSignal: true }] }] } });
348
355
 
349
356
  /**
350
357
  * Footer component used within the ECL Modal.
@@ -380,15 +387,14 @@ class EclModalFooterComponent extends ECLBaseDirective {
380
387
  }
381
388
  }
382
389
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
383
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclModalFooterComponent, isStandalone: true, selector: "[eclModalFooter]", host: { properties: { "class": "this.cssClasses" } }, queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(() => EclButtonComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__footer-content\">\n <ng-content></ng-content>\n</div>\n" }); }
390
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EclModalFooterComponent, isStandalone: true, selector: "[eclModalFooter]", host: { properties: { "class": "cssClasses" } }, queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(() => EclButtonComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ecl-modal__footer-content\">\n <ng-content></ng-content>\n</div>\n" }); }
384
391
  }
385
392
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalFooterComponent, decorators: [{
386
393
  type: Component,
387
- args: [{ selector: '[eclModalFooter]', template: "<div class=\"ecl-modal__footer-content\">\n <ng-content></ng-content>\n</div>\n" }]
388
- }], propDecorators: { buttonComponents: [{ type: i0.ContentChildren, args: [forwardRef(() => EclButtonComponent), { ...{ descendants: true }, isSignal: true }] }], cssClasses: [{
389
- type: HostBinding,
390
- args: ['class']
391
- }] } });
394
+ args: [{ selector: '[eclModalFooter]', host: {
395
+ '[class]': 'cssClasses',
396
+ }, template: "<div class=\"ecl-modal__footer-content\">\n <ng-content></ng-content>\n</div>\n" }]
397
+ }], propDecorators: { buttonComponents: [{ type: i0.ContentChildren, args: [forwardRef(() => EclButtonComponent), { ...{ descendants: true }, isSignal: true }] }] } });
392
398
 
393
399
  /**
394
400
  * Directive for styling fixed content inside the modal body.
@@ -404,17 +410,17 @@ class EclModalBodyFixedContentDirective extends ECLBaseDirective {
404
410
  this.className = true;
405
411
  }
406
412
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalBodyFixedContentDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
407
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclModalBodyFixedContentDirective, isStandalone: true, selector: "[eclModalBodyFixedContent]", host: { properties: { "class.ecl-modal__body-fixed": "this.className" } }, usesInheritance: true, ngImport: i0 }); }
413
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclModalBodyFixedContentDirective, isStandalone: true, selector: "[eclModalBodyFixedContent]", host: { properties: { "class.ecl-modal__body-fixed": "className" } }, usesInheritance: true, ngImport: i0 }); }
408
414
  }
409
415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalBodyFixedContentDirective, decorators: [{
410
416
  type: Directive,
411
417
  args: [{
412
418
  selector: '[eclModalBodyFixedContent]',
419
+ host: {
420
+ '[class.ecl-modal__body-fixed]': 'className',
421
+ },
413
422
  }]
414
- }], propDecorators: { className: [{
415
- type: HostBinding,
416
- args: ['class.ecl-modal__body-fixed']
417
- }] } });
423
+ }] });
418
424
 
419
425
  /**
420
426
  * Directive used to trigger opening of a target ECL modal on click.
@@ -432,21 +438,21 @@ class EclModalTriggerDirective extends ECLBaseDirective {
432
438
  /**
433
439
  * Handles click event and opens the target modal.
434
440
  */
435
- onClick(evt) {
441
+ onClick() {
436
442
  this.eclModalTriggerFor()?.openModal();
437
443
  }
438
444
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalTriggerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
439
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: EclModalTriggerDirective, isStandalone: true, selector: "[eclModalTriggerFor]", inputs: { eclModalTriggerFor: { classPropertyName: "eclModalTriggerFor", publicName: "eclModalTriggerFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0 }); }
445
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: EclModalTriggerDirective, isStandalone: true, selector: "[eclModalTriggerFor]", inputs: { eclModalTriggerFor: { classPropertyName: "eclModalTriggerFor", publicName: "eclModalTriggerFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0 }); }
440
446
  }
441
447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclModalTriggerDirective, decorators: [{
442
448
  type: Directive,
443
449
  args: [{
444
450
  selector: '[eclModalTriggerFor]',
451
+ host: {
452
+ '(click)': 'onClick()',
453
+ },
445
454
  }]
446
- }], propDecorators: { eclModalTriggerFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclModalTriggerFor", required: false }] }], onClick: [{
447
- type: HostListener,
448
- args: ['click', ['$event']]
449
- }] } });
455
+ }], propDecorators: { eclModalTriggerFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "eclModalTriggerFor", required: false }] }] } });
450
456
 
451
457
  const EUI_ECL_MODAL = [
452
458
  EclModalComponent,