@eui/ecl 22.0.0-alpha.16 → 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.
@@ -66045,7 +66045,7 @@
66045
66045
  },
66046
66046
  {
66047
66047
  "name": "EclModalComponent",
66048
- "id": "component-EclModalComponent-783254263040fcbc11e6e1d00661df3b11df436189c8e048dc51d0b889a87d8cd597f2f56892a435b7166c0b4f1f7bd1ee86e4045ae00c9379c3d0e060c349ff",
66048
+ "id": "component-EclModalComponent-1cf92a1dab40108fd3f9998ebb4665501233c834f3b5c448baa91d4789f231a54150d0c01e74aa4ad1fd2d1def62eec79cd7b91f1f74dd26f9786b292f588177",
66049
66049
  "file": "packages/ecl/components/ecl-modal/ecl-modal.component.ts",
66050
66050
  "encapsulation": [],
66051
66051
  "entryComponents": [],
@@ -66246,7 +66246,7 @@
66246
66246
  "optional": false,
66247
66247
  "returnType": "void",
66248
66248
  "typeParameters": [],
66249
- "line": 192,
66249
+ "line": 193,
66250
66250
  "deprecated": false,
66251
66251
  "deprecationMessage": "",
66252
66252
  "rawdescription": "\n\nCloses the modal and emits a `modalClose` event with optional result data.\nIf the event is not prevented, the modal will be hidden.\n",
@@ -66285,7 +66285,7 @@
66285
66285
  "optional": false,
66286
66286
  "returnType": "void",
66287
66287
  "typeParameters": [],
66288
- "line": 153,
66288
+ "line": 154,
66289
66289
  "deprecated": false,
66290
66290
  "deprecationMessage": "",
66291
66291
  "rawdescription": "\n\nHandles ESC key press to close the modal with `cancel` role.\n",
@@ -66298,7 +66298,7 @@
66298
66298
  "optional": false,
66299
66299
  "returnType": "void",
66300
66300
  "typeParameters": [],
66301
- "line": 161,
66301
+ "line": 162,
66302
66302
  "deprecated": false,
66303
66303
  "deprecationMessage": "",
66304
66304
  "rawdescription": "\n\nOpens the modal and emits a `modalOpen` event.\nIf the event is not prevented, the modal will be displayed.\n",
@@ -66358,7 +66358,7 @@
66358
66358
  "description": "",
66359
66359
  "rawdescription": "\n",
66360
66360
  "type": "component",
66361
- "sourceCode": "import {\n AfterContentInit,\n Component,\n contentChild,\n contentChildren,\n forwardRef,\n input,\n output,\n signal,\n inject,\n DOCUMENT,\n PLATFORM_ID,\n} from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclModalCloseDirective } from './ecl-modal-close.directive';\nimport { EclModalHeaderComponent } from './ecl-modal-header.component';\nimport { EclModalResult } from './models/ecl-modal-result.model';\nimport { EclModalCloseEvent } from './events';\nimport { EclModalOpenEvent } from './events';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { uniqueId } from '@eui/core';\nimport { EclModalBodyComponent } from './ecl-modal-body.component';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'dialog[eclModal]',\n templateUrl: './ecl-modal.component.html',\n imports: [A11yModule],\n host: {\n '[attr.open]': 'isModalOpened',\n '[attr.aria-describedby]': 'hostAriaDescribedBy',\n '[class]': 'cssClasses',\n '(document:keydown.escape)': 'onEscapeKeydownHandler()',\n },\n})\n \nexport class EclModalComponent<T = any> extends ECLBaseDirective implements AfterContentInit {\n /**\n * Defines the visual variant of the modal.\n * Possible values: 'information', 'success', 'warning', 'error', or a custom string.\n */\n variant = input<'information' | 'success' | 'warning' | 'error' | string>();\n \n /**\n * Defines the size of the modal.\n * Possible values: 's', 'm', 'l' (default), 'full'.\n */\n size = input<'s' | 'm' | 'l' | 'full' | string>('l');\n \n /**\n * Unique ID for the modal body.\n * Used for accessibility (`aria-describedby` on the modal container).\n */\n eclModalBodyId = `ecl-modal-body-${uniqueId()}`;\n \n /**\n * Controls whether the modal is open.\n */\n isOpen = signal(false);\n \n /**\n * Emits when the modal is closed.\n * Carries an instance of `EclModalCloseEvent`.\n */\n modalClose = output<EclModalCloseEvent<T>>();\n \n /**\n * Emits when the modal is opened.\n * Carries an instance of `EclModalOpenEvent`.\n */\n modalOpen = output<EclModalOpenEvent>();\n \n /**\n * Header component projected into the modal.\n */\n eclModalHeader = contentChild(forwardRef(() => EclModalHeaderComponent));\n \n /**\n * All close directives projected inside the modal.\n */\n eclModalCloseComponents = contentChildren(forwardRef(() => EclModalCloseDirective), { descendants: true });\n \n /**\n * Body component projected into the modal.\n */\n eclModalBody = contentChild(EclModalBodyComponent);\n\n private previousOverflow = '';\n private readonly document = inject<Document>(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Wires the projected header and close directives, and passes the body id to\n * the projected body, once content is initialized. The projected content is\n * static for the modal's lifetime, so a one-time setup is sufficient.\n */\n ngAfterContentInit(): void {\n const header = this.eclModalHeader();\n if (header) {\n header.variant.set(this.variant());\n header.modalClose.subscribe(() => {\n this.closeModal({ eclModalRole: 'cancel' });\n });\n }\n\n // Wire every projected close directive to close the modal with its\n // configured role and result. `modalClose` is an `output()`, so its\n // subscription is cleaned up automatically when this component is destroyed.\n this.eclModalCloseComponents().forEach((closeCmp) => {\n closeCmp.modalClose.subscribe(() => {\n this.closeModal({\n eclModalData: closeCmp.eclModalResult(),\n eclModalRole: closeCmp.eclModalRole(),\n });\n });\n });\n\n // Pass the modal body id to the projected body for aria-describedby wiring.\n this.eclModalBody()?.eclModalBodyId.set(this.eclModalBodyId);\n }\n\n /**\n * Binds the `open` attribute to the modal element.\n * Used by the native `<dialog>` element.\n */\n get isModalOpened(): boolean | null {\n return this.isOpen() || null;\n }\n\n /**\n * Binds the `aria-describedby` attribute to the modal element.\n * Connects the dialog with the modal body via its unique ID for accessibility.\n */\n get hostAriaDescribedBy(): string {\n return this.eclModalBodyId;\n }\n\n /**\n * Applies base and variant CSS classes to the modal element.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-modal'),\n this.variant() ? `ecl-modal--${this.variant()}` : '',\n `ecl-modal--${this.size()}`,\n ].join(' ').trim();\n }\n\n /**\n * Handles ESC key press to close the modal with `cancel` role.\n */\n onEscapeKeydownHandler(): void {\n this.closeModal({ eclModalRole: 'cancel' });\n }\n\n /**\n * Opens the modal and emits a `modalOpen` event.\n * If the event is not prevented, the modal will be displayed.\n */\n openModal(): void {\n // Ignore repeated open calls so the saved overflow value is not overwritten\n // with the already-hidden value while the modal is open.\n if (this.isOpen()) {\n return;\n }\n\n const event = new EclModalOpenEvent();\n this.modalOpen.emit(event);\n\n if (event.defaultPrevented) {\n return;\n }\n\n this.isOpen.set(true);\n\n const header = this.eclModalHeader();\n if (header) {\n setTimeout(() => header.closeButton().el.nativeElement.focus(), 100);\n }\n // To prevent scrolling in main document\n if (isPlatformBrowser(this.platformId)) {\n this.previousOverflow = this.document.body.style.overflow;\n this.document.body.style.overflow = 'hidden';\n }\n }\n\n /**\n * Closes the modal and emits a `modalClose` event with optional result data.\n * If the event is not prevented, the modal will be hidden.\n */\n closeModal(result?: EclModalResult<T>): void {\n if (this.isOpen()) {\n const event = new EclModalCloseEvent({\n eclModalData: result?.eclModalData,\n eclModalRole: result?.eclModalRole,\n });\n this.modalClose.emit(event);\n\n if (!event.defaultPrevented) {\n this.isOpen.set(false);\n }\n\n if (isPlatformBrowser(this.platformId)) {\n this.document.body.style.overflow = this.previousOverflow;\n }\n }\n }\n}\n",
66361
+ "sourceCode": "import {\n AfterContentInit,\n Component,\n contentChild,\n contentChildren,\n forwardRef,\n input,\n output,\n signal,\n inject,\n DOCUMENT,\n PLATFORM_ID,\n} from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclModalCloseDirective } from './ecl-modal-close.directive';\nimport { EclModalHeaderComponent } from './ecl-modal-header.component';\nimport { EclModalResult } from './models/ecl-modal-result.model';\nimport { EclModalCloseEvent } from './events';\nimport { EclModalOpenEvent } from './events';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { uniqueId } from '@eui/core';\nimport { EclModalBodyComponent } from './ecl-modal-body.component';\nimport { isPlatformBrowser } from '@angular/common';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'dialog[eclModal]',\n templateUrl: './ecl-modal.component.html',\n imports: [A11yModule],\n host: {\n '[attr.open]': 'isModalOpened',\n '[attr.aria-describedby]': 'hostAriaDescribedBy',\n '[class]': 'cssClasses',\n '(document:keydown.escape)': 'onEscapeKeydownHandler()',\n },\n})\n \nexport class EclModalComponent<T = any> extends ECLBaseDirective implements AfterContentInit {\n /**\n * Defines the visual variant of the modal.\n * Possible values: 'information', 'success', 'warning', 'error', or a custom string.\n */\n variant = input<'information' | 'success' | 'warning' | 'error' | string>();\n \n /**\n * Defines the size of the modal.\n * Possible values: 's', 'm', 'l' (default), 'full'.\n */\n size = input<'s' | 'm' | 'l' | 'full' | string>('l');\n \n /**\n * Unique ID for the modal body.\n * Used for accessibility (`aria-describedby` on the modal container).\n */\n eclModalBodyId = `ecl-modal-body-${uniqueId()}`;\n \n /**\n * Controls whether the modal is open.\n */\n isOpen = signal(false);\n \n /**\n * Emits when the modal is closed.\n * Carries an instance of `EclModalCloseEvent`.\n */\n modalClose = output<EclModalCloseEvent<T>>();\n \n /**\n * Emits when the modal is opened.\n * Carries an instance of `EclModalOpenEvent`.\n */\n modalOpen = output<EclModalOpenEvent>();\n \n /**\n * Header component projected into the modal.\n */\n eclModalHeader = contentChild(forwardRef(() => EclModalHeaderComponent));\n \n /**\n * All close directives projected inside the modal.\n */\n eclModalCloseComponents = contentChildren(forwardRef(() => EclModalCloseDirective), { descendants: true });\n \n /**\n * Body component projected into the modal.\n */\n eclModalBody = contentChild(EclModalBodyComponent);\n\n private previousOverflow = '';\n private readonly document = inject<Document>(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Wires the projected header and close directives, and passes the body id to\n * the projected body, once content is initialized. The projected content is\n * static for the modal's lifetime, so a one-time setup is sufficient.\n */\n ngAfterContentInit(): void {\n // The header derives its own `variant` reactively from this modal, so no\n // manual sync is needed here. We only wire the close event.\n const header = this.eclModalHeader();\n if (header) {\n header.modalClose.subscribe(() => {\n this.closeModal({ eclModalRole: 'cancel' });\n });\n }\n\n // Wire every projected close directive to close the modal with its\n // configured role and result. `modalClose` is an `output()`, so its\n // subscription is cleaned up automatically when this component is destroyed.\n this.eclModalCloseComponents().forEach((closeCmp) => {\n closeCmp.modalClose.subscribe(() => {\n this.closeModal({\n eclModalData: closeCmp.eclModalResult(),\n eclModalRole: closeCmp.eclModalRole(),\n });\n });\n });\n\n // Pass the modal body id to the projected body for aria-describedby wiring.\n this.eclModalBody()?.eclModalBodyId.set(this.eclModalBodyId);\n }\n\n /**\n * Binds the `open` attribute to the modal element.\n * Used by the native `<dialog>` element.\n */\n get isModalOpened(): boolean | null {\n return this.isOpen() || null;\n }\n\n /**\n * Binds the `aria-describedby` attribute to the modal element.\n * Connects the dialog with the modal body via its unique ID for accessibility.\n */\n get hostAriaDescribedBy(): string {\n return this.eclModalBodyId;\n }\n\n /**\n * Applies base and variant CSS classes to the modal element.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-modal'),\n this.variant() ? `ecl-modal--${this.variant()}` : '',\n `ecl-modal--${this.size()}`,\n ].join(' ').trim();\n }\n\n /**\n * Handles ESC key press to close the modal with `cancel` role.\n */\n onEscapeKeydownHandler(): void {\n this.closeModal({ eclModalRole: 'cancel' });\n }\n\n /**\n * Opens the modal and emits a `modalOpen` event.\n * If the event is not prevented, the modal will be displayed.\n */\n openModal(): void {\n // Ignore repeated open calls so the saved overflow value is not overwritten\n // with the already-hidden value while the modal is open.\n if (this.isOpen()) {\n return;\n }\n\n const event = new EclModalOpenEvent();\n this.modalOpen.emit(event);\n\n if (event.defaultPrevented) {\n return;\n }\n\n this.isOpen.set(true);\n\n const header = this.eclModalHeader();\n if (header) {\n setTimeout(() => header.closeButton().el.nativeElement.focus(), 100);\n }\n // To prevent scrolling in main document\n if (isPlatformBrowser(this.platformId)) {\n this.previousOverflow = this.document.body.style.overflow;\n this.document.body.style.overflow = 'hidden';\n }\n }\n\n /**\n * Closes the modal and emits a `modalClose` event with optional result data.\n * If the event is not prevented, the modal will be hidden.\n */\n closeModal(result?: EclModalResult<T>): void {\n if (this.isOpen()) {\n const event = new EclModalCloseEvent({\n eclModalData: result?.eclModalData,\n eclModalRole: result?.eclModalRole,\n });\n this.modalClose.emit(event);\n\n if (!event.defaultPrevented) {\n this.isOpen.set(false);\n }\n\n if (isPlatformBrowser(this.platformId)) {\n this.document.body.style.overflow = this.previousOverflow;\n }\n }\n }\n}\n",
66362
66362
  "assetsDirs": [],
66363
66363
  "styleUrlsData": "",
66364
66364
  "stylesData": "",
@@ -66375,7 +66375,7 @@
66375
66375
  "name": "isModalOpened",
66376
66376
  "type": "unknown",
66377
66377
  "returnType": "boolean | null",
66378
- "line": 128,
66378
+ "line": 129,
66379
66379
  "rawdescription": "\n\nBinds the `open` attribute to the modal element.\nUsed by the native `<dialog>` element.\n",
66380
66380
  "description": "<p>Binds the <code>open</code> attribute to the modal element.\nUsed by the native <code>&lt;dialog&gt;</code> element.</p>\n"
66381
66381
  }
@@ -66386,7 +66386,7 @@
66386
66386
  "name": "hostAriaDescribedBy",
66387
66387
  "type": "string",
66388
66388
  "returnType": "string",
66389
- "line": 136,
66389
+ "line": 137,
66390
66390
  "rawdescription": "\n\nBinds the `aria-describedby` attribute to the modal element.\nConnects the dialog with the modal body via its unique ID for accessibility.\n",
66391
66391
  "description": "<p>Binds the <code>aria-describedby</code> attribute to the modal element.\nConnects the dialog with the modal body via its unique ID for accessibility.</p>\n"
66392
66392
  }
@@ -66397,7 +66397,7 @@
66397
66397
  "name": "cssClasses",
66398
66398
  "type": "string",
66399
66399
  "returnType": "string",
66400
- "line": 143,
66400
+ "line": 144,
66401
66401
  "rawdescription": "\n\nApplies base and variant CSS classes to the modal element.\n",
66402
66402
  "description": "<p>Applies base and variant CSS classes to the modal element.</p>\n"
66403
66403
  }
@@ -66617,7 +66617,7 @@
66617
66617
  },
66618
66618
  {
66619
66619
  "name": "EclModalHeaderComponent",
66620
- "id": "component-EclModalHeaderComponent-9d18fdce4971234e6815aa2f930d1e35a9238034a1b6f53925b9d7f0c3b5a3b8b53586bb78b92b6c33fc3b897277aed9f777c9fde40c41393ec785c35477097d",
66620
+ "id": "component-EclModalHeaderComponent-6d03b2a86fe5e8353c5a09a0395b1f922e73d023edb7f1ad63b3631ba463fcd16d0680902bed575e92f9378a94c142e7cf987abcc11f2837847cc9ab5bc5f5cb",
66621
66621
  "file": "packages/ecl/components/ecl-modal/ecl-modal-header.component.ts",
66622
66622
  "encapsulation": [],
66623
66623
  "entryComponents": [],
@@ -66689,7 +66689,7 @@
66689
66689
  "indexKey": "",
66690
66690
  "optional": false,
66691
66691
  "description": "<p>Event emitted when the close button is clicked.\nEmits an <code>EclModalCloseEvent</code> object.</p>\n",
66692
- "line": 41,
66692
+ "line": 55,
66693
66693
  "rawdescription": "\n\nEvent emitted when the close button is clicked.\nEmits an `EclModalCloseEvent` object.\n",
66694
66694
  "required": false
66695
66695
  }
@@ -66705,21 +66705,21 @@
66705
66705
  "indexKey": "",
66706
66706
  "optional": false,
66707
66707
  "description": "<p>Reference to the close button component.</p>\n",
66708
- "line": 46,
66708
+ "line": 60,
66709
66709
  "rawdescription": "\n\nReference to the close button component.\n"
66710
66710
  },
66711
66711
  {
66712
66712
  "name": "variant",
66713
66713
  "coverageIgnore": false,
66714
- "defaultValue": "signal<'information' | 'success' | 'warning' | 'error' | string | undefined>(undefined)",
66714
+ "defaultValue": "computed<'information' | 'success' | 'warning' | 'error' | string | undefined>(\n () => this.modal.variant(),\n )",
66715
66715
  "deprecated": false,
66716
66716
  "deprecationMessage": "",
66717
66717
  "type": "unknown",
66718
66718
  "indexKey": "",
66719
66719
  "optional": false,
66720
- "description": "<p>Defines the visual variant of the modal.\nDetermines which icon is shown in the header.\nPossible values: &#39;information&#39;, &#39;success&#39;, &#39;warning&#39;, &#39;error&#39;, or any custom string.</p>\n",
66721
- "line": 35,
66722
- "rawdescription": "\n\nDefines the visual variant of the modal.\nDetermines which icon is shown in the header.\nPossible values: 'information', 'success', 'warning', 'error', or any custom string.\n"
66720
+ "description": "<p>Defines the visual variant of the modal.\nDetermines which icon is shown in the header.\nDerived reactively from the parent modal&#39;s <code>variant</code> input, so the header\nicon updates automatically when the parent variant changes at runtime.\nPossible values: &#39;information&#39;, &#39;success&#39;, &#39;warning&#39;, &#39;error&#39;, or any custom string.</p>\n",
66721
+ "line": 47,
66722
+ "rawdescription": "\n\nDefines the visual variant of the modal.\nDetermines which icon is shown in the header.\nDerived reactively from the parent modal's `variant` input, so the header\nicon updates automatically when the parent variant changes at runtime.\nPossible values: 'information', 'success', 'warning', 'error', or any custom string.\n"
66723
66723
  }
66724
66724
  ],
66725
66725
  "methodsClass": [
@@ -66730,7 +66730,7 @@
66730
66730
  "optional": false,
66731
66731
  "returnType": "\"information\" | \"check-filled\" | \"warning\" | \"error\" | null",
66732
66732
  "typeParameters": [],
66733
- "line": 67,
66733
+ "line": 81,
66734
66734
  "deprecated": false,
66735
66735
  "deprecationMessage": "",
66736
66736
  "rawdescription": "\n\nReturns the name of the icon associated with the current variant.\n",
@@ -66738,8 +66738,8 @@
66738
66738
  "jsdoctags": [
66739
66739
  {
66740
66740
  "tagName": {
66741
- "pos": 2171,
66742
- "end": 2178,
66741
+ "pos": 2877,
66742
+ "end": 2884,
66743
66743
  "kind": 80,
66744
66744
  "id": 0,
66745
66745
  "flags": 16842752,
@@ -66757,7 +66757,7 @@
66757
66757
  "optional": false,
66758
66758
  "returnType": "void",
66759
66759
  "typeParameters": [],
66760
- "line": 59,
66760
+ "line": 73,
66761
66761
  "deprecated": false,
66762
66762
  "deprecationMessage": "",
66763
66763
  "rawdescription": "\n\nHandles the click event on the close button.\nEmits a `modalClose` event with no payload.\n",
@@ -66823,14 +66823,14 @@
66823
66823
  "description": "<p>Header component used within the ECL Modal.</p>\n<p>Displays an icon depending on the modal variant, user-defined content,\nand a close button that emits a close event.</p>\n",
66824
66824
  "rawdescription": "\n\nHeader component used within the ECL Modal.\n\nDisplays an icon depending on the modal variant, user-defined content,\nand a close button that emits a close event.\n",
66825
66825
  "type": "component",
66826
- "sourceCode": "import { Component, output, viewChild, signal } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclModalCloseEvent } from './events';\nimport { EclButtonComponent } from '@eui/ecl/components/ecl-button';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\n\n/**\n * Header component used within the ECL Modal.\n *\n * Displays an icon depending on the modal variant, user-defined content,\n * and a close button that emits a close event.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclModalHeader]',\n templateUrl: './ecl-modal-header.component.html',\n imports: [\n ...EUI_ECL_ICON,\n TranslatePipe,\n ...EUI_ECL_BUTTON,\n ],\n host: {\n '[class]': 'cssClasses',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class EclModalHeaderComponent<T = any> extends ECLBaseDirective {\n /**\n * Defines the visual variant of the modal.\n * Determines which icon is shown in the header.\n * Possible values: 'information', 'success', 'warning', 'error', or any custom string.\n */\n variant = signal<'information' | 'success' | 'warning' | 'error' | string | undefined>(undefined);\n \n /**\n * Event emitted when the close button is clicked.\n * Emits an `EclModalCloseEvent` object.\n */\n modalClose = output<EclModalCloseEvent<T>>();\n \n /**\n * Reference to the close button component.\n */\n closeButton = viewChild.required<EclButtonComponent>('closeButton');\n \n /**\n * Applies the ECL CSS class for modal header container.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-modal__header')].join(' ').trim();\n }\n\n /**\n * Handles the click event on the close button.\n * Emits a `modalClose` event with no payload.\n */\n onCloseClick(): void {\n this.modalClose.emit(new EclModalCloseEvent());\n }\n\n /**\n * Returns the name of the icon associated with the current variant.\n * @returns The icon name, or `null` if no matching variant exists.\n */\n getIcon(): 'information' | 'check-filled' | 'warning' | 'error' | null {\n const v = this.variant();\n if (v === 'information') {\n return 'information';\n } else if (v === 'success') {\n return 'check-filled';\n } else if (v === 'warning') {\n return 'warning';\n } else if (v === 'error') {\n return 'error';\n } else {\n return null;\n }\n }\n}\n",
66826
+ "sourceCode": "import { Component, output, viewChild, computed, inject, forwardRef } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclModalCloseEvent } from './events';\nimport { EclButtonComponent } from '@eui/ecl/components/ecl-button';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { EUI_ECL_BUTTON } from '@eui/ecl/components/ecl-button';\nimport { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';\nimport { EclModalComponent } from './ecl-modal.component';\n\n/**\n * Header component used within the ECL Modal.\n *\n * Displays an icon depending on the modal variant, user-defined content,\n * and a close button that emits a close event.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclModalHeader]',\n templateUrl: './ecl-modal-header.component.html',\n imports: [\n ...EUI_ECL_ICON,\n TranslatePipe,\n ...EUI_ECL_BUTTON,\n ],\n host: {\n '[class]': 'cssClasses',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class EclModalHeaderComponent<T = any> extends ECLBaseDirective {\n /**\n * Reference to the parent modal the header is projected into.\n * Injected with `forwardRef` to avoid a circular module-import issue.\n * A header is only valid inside an `EclModalComponent`, so this is a\n * required injection: using the header outside a modal throws at\n * construction, surfacing the misuse immediately.\n */\n private readonly modal = inject(forwardRef(() => EclModalComponent));\n\n /**\n * Defines the visual variant of the modal.\n * Determines which icon is shown in the header.\n * Derived reactively from the parent modal's `variant` input, so the header\n * icon updates automatically when the parent variant changes at runtime.\n * Possible values: 'information', 'success', 'warning', 'error', or any custom string.\n */\n variant = computed<'information' | 'success' | 'warning' | 'error' | string | undefined>(\n () => this.modal.variant(),\n );\n \n /**\n * Event emitted when the close button is clicked.\n * Emits an `EclModalCloseEvent` object.\n */\n modalClose = output<EclModalCloseEvent<T>>();\n \n /**\n * Reference to the close button component.\n */\n closeButton = viewChild.required<EclButtonComponent>('closeButton');\n \n /**\n * Applies the ECL CSS class for modal header container.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-modal__header')].join(' ').trim();\n }\n\n /**\n * Handles the click event on the close button.\n * Emits a `modalClose` event with no payload.\n */\n onCloseClick(): void {\n this.modalClose.emit(new EclModalCloseEvent());\n }\n\n /**\n * Returns the name of the icon associated with the current variant.\n * @returns The icon name, or `null` if no matching variant exists.\n */\n getIcon(): 'information' | 'check-filled' | 'warning' | 'error' | null {\n const v = this.variant();\n if (v === 'information') {\n return 'information';\n } else if (v === 'success') {\n return 'check-filled';\n } else if (v === 'warning') {\n return 'warning';\n } else if (v === 'error') {\n return 'error';\n } else {\n return null;\n }\n }\n}\n",
66827
66827
  "assetsDirs": [],
66828
66828
  "styleUrlsData": "",
66829
66829
  "stylesData": "",
66830
66830
  "jsdoctags": [
66831
66831
  {
66832
- "pos": 416,
66833
- "end": 595,
66832
+ "pos": 497,
66833
+ "end": 676,
66834
66834
  "kind": 321,
66835
66835
  "id": 0,
66836
66836
  "flags": 16777216,
@@ -66849,7 +66849,7 @@
66849
66849
  "name": "cssClasses",
66850
66850
  "type": "string",
66851
66851
  "returnType": "string",
66852
- "line": 51,
66852
+ "line": 65,
66853
66853
  "rawdescription": "\n\nApplies the ECL CSS class for modal header container.\n",
66854
66854
  "description": "<p>Applies the ECL CSS class for modal header container.</p>\n"
66855
66855
  }
@@ -93885,7 +93885,7 @@
93885
93885
  "name": "ARROW_SIZE",
93886
93886
  "ctype": "miscellaneous",
93887
93887
  "subtype": "variable",
93888
- "file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
93888
+ "file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
93889
93889
  "coverageIgnore": false,
93890
93890
  "deprecated": false,
93891
93891
  "deprecationMessage": "",
@@ -93898,7 +93898,7 @@
93898
93898
  "name": "ARROW_SIZE",
93899
93899
  "ctype": "miscellaneous",
93900
93900
  "subtype": "variable",
93901
- "file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
93901
+ "file": "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts",
93902
93902
  "coverageIgnore": false,
93903
93903
  "deprecated": false,
93904
93904
  "deprecationMessage": "",
@@ -93911,7 +93911,7 @@
93911
93911
  "name": "ARROW_SIZE",
93912
93912
  "ctype": "miscellaneous",
93913
93913
  "subtype": "variable",
93914
- "file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
93914
+ "file": "packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts",
93915
93915
  "coverageIgnore": false,
93916
93916
  "deprecated": false,
93917
93917
  "deprecationMessage": "",
@@ -95355,6 +95355,21 @@
95355
95355
  }
95356
95356
  ],
95357
95357
  "groupedVariables": {
95358
+ "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts": [
95359
+ {
95360
+ "name": "ARROW_SIZE",
95361
+ "ctype": "miscellaneous",
95362
+ "subtype": "variable",
95363
+ "file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
95364
+ "coverageIgnore": false,
95365
+ "deprecated": false,
95366
+ "deprecationMessage": "",
95367
+ "type": "string",
95368
+ "defaultValue": "'0.5rem'",
95369
+ "rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
95370
+ "description": "<p>Half the arrow&#39;s own width, matching ECL&#39;s <code>arrowSize</code>.</p>\n"
95371
+ }
95372
+ ],
95358
95373
  "packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts": [
95359
95374
  {
95360
95375
  "name": "ARROW_SIZE",
@@ -95433,21 +95448,6 @@
95433
95448
  "description": "<p>Debounce for the resize recomputation, matching ECL&#39;s <code>handleResize</code>.</p>\n"
95434
95449
  }
95435
95450
  ],
95436
- "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts": [
95437
- {
95438
- "name": "ARROW_SIZE",
95439
- "ctype": "miscellaneous",
95440
- "subtype": "variable",
95441
- "file": "packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts",
95442
- "coverageIgnore": false,
95443
- "deprecated": false,
95444
- "deprecationMessage": "",
95445
- "type": "string",
95446
- "defaultValue": "'0.5rem'",
95447
- "rawdescription": "Half the arrow's own width, matching ECL's `arrowSize`.",
95448
- "description": "<p>Half the arrow&#39;s own width, matching ECL&#39;s <code>arrowSize</code>.</p>\n"
95449
- }
95450
- ],
95451
95451
  "packages/ecl/core/utils/constants/constants.ts": [
95452
95452
  {
95453
95453
  "name": "AVAILABLE_NON_EU_LOGO_COUNTRY_CODES",
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-23T08:37:30.056Z, 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,7 +1690,7 @@ Outputs:
1690
1690
 
1691
1691
  Properties:
1692
1692
  - `closeButton: unknown = viewChild.required<EclButtonComponent>('closeButton')` — Reference to the close button component.
1693
- - `variant: unknown = signal<'information' | 'success' | 'warning' | 'error' | string | undefined>(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.
1694
1694
 
1695
1695
  Methods:
1696
1696
  - `getIcon(): "information" | "check-filled" | "warning" | "error" | null` — Returns the name of the icon associated with the current variant.
@@ -7564,10 +7564,10 @@ Properties:
7564
7564
 
7565
7565
  ## Public variables
7566
7566
 
7567
- - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7568
- Defined in `packages/ecl/components/ecl-site-header/language/ecl-site-header-language.component.ts`
7569
7567
  - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7570
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`
7571
7571
  - `ARROW_SIZE: string = '0.5rem'` — Half the arrow's own width, matching ECL's arrowSize .
7572
7572
  Defined in `packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts`
7573
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.16</li>
131
+ <b>Version</b> : 22.0.0-alpha.17</li>
132
132
  </ul>
133
133
 
134
134
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, Directive, signal, viewChild, Component, contentChild, forwardRef, contentChildren, inject, DOCUMENT, PLATFORM_ID } from '@angular/core';
2
+ import { input, output, Directive, inject, forwardRef, computed, viewChild, Component, signal, contentChild, contentChildren, DOCUMENT, PLATFORM_ID } from '@angular/core';
3
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';
@@ -73,12 +73,22 @@ class EclModalCloseEvent extends EclBaseEvent {
73
73
  class EclModalHeaderComponent extends ECLBaseDirective {
74
74
  constructor() {
75
75
  super(...arguments);
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));
76
84
  /**
77
85
  * Defines the visual variant of the modal.
78
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.
79
89
  * Possible values: 'information', 'success', 'warning', 'error', or any custom string.
80
90
  */
81
- this.variant = signal(undefined, /* @ts-ignore */
91
+ this.variant = computed(() => this.modal.variant(), /* @ts-ignore */
82
92
  ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
83
93
  /**
84
94
  * Event emitted when the close button is clicked.
@@ -234,9 +244,10 @@ class EclModalComponent extends ECLBaseDirective {
234
244
  * static for the modal's lifetime, so a one-time setup is sufficient.
235
245
  */
236
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.
237
249
  const header = this.eclModalHeader();
238
250
  if (header) {
239
- header.variant.set(this.variant());
240
251
  header.modalClose.subscribe(() => {
241
252
  this.closeModal({ eclModalRole: 'cancel' });
242
253
  });