import * as _angular_core from '@angular/core'; import { OnInit, QueryList } from '@angular/core'; import * as i1 from '@eui/components/shared'; import { BaseStatesDirective } from '@eui/components/shared'; /** * @description * Title subcomponent for eui-alert that displays a prominent heading above the alert message. * Provides semantic structure and visual hierarchy within alert messages. * Content is projected via ng-content, allowing text or inline elements as title content. * Automatically styled to match the parent alert's variant and visual design. * Must be used as a direct child of eui-alert component for proper styling and structure. * * @usageNotes * #### Alert with title * ```html * * Success * Your operation completed successfully. * * ``` * * #### Alert with title and multiple variants * ```html * * Warning * Please review the following issues before proceeding. * * ``` * * ### Accessibility * - Provides semantic structure that helps screen readers distinguish title from content * - Title is announced first, giving context before the main message * - Visual hierarchy aids users with cognitive disabilities in understanding message importance * * ### Notes * - Must be used within eui-alert component * - Should be placed before the main alert content * - Only one title per alert is recommended for clarity * - Title styling automatically inherits from parent alert variant * - Keep titles concise - typically 1-3 words for quick comprehension */ declare class EuiAlertTitleComponent { /** * @description * Computes and returns the CSS classes for the label title component based on its current state. * * @default 'eui-alert-title' * @returns {string} Space-separated string of CSS class names */ class: string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @description * Alert component for displaying short, important messages that attract user attention without interrupting tasks. * Provides semantic variants (success, info, warning, danger) with corresponding visual styling and icons. * Supports optional title section, close button, and keyboard focus for accessibility. * Visibility can be controlled programmatically or by user dismissal via close button. * Includes ARIA attributes for screen reader support and unique ID generation for content association. * * @structure * - Supports four semantic variants: success, info, warning, and danger (via BaseStatesDirective) * - Optional title section via `` content projection * - Main content area for alert message (projected via ng-content) * - Optional close button when `isCloseable` is true * - Icon state indicator matching the alert variant * * @features * - Closeable: Can be dismissed by user via close button * - Focusable: Can receive keyboard focus for accessibility * - Visibility control: Can be shown/hidden via `isVisible` model * - Accessibility: Includes ARIA attributes (role="alert", aria-describedby) * - Unique ID generation for content association * * @usageNotes * #### Basic alert (defaults to info variant) * ```html * * Important message for the user * * ``` * * #### Alert with title and variant * ```html * * Success * Your changes have been saved successfully. * * ``` * * #### Closeable alert with visibility control * ```html * * This is a dismissible warning message. * * ``` * * #### Focusable alert for keyboard navigation * ```html * * Critical error that requires attention. * * ``` * * ### Accessibility * - Uses role="alert" for immediate screen reader announcement of important messages * - aria-describedby links alert to its content for proper association * - Keyboard focusable when isFocusable is true (tabindex="0") * - Close button is keyboard accessible with Enter/Space keys * - Semantic variants provide visual and contextual meaning for all users * - Icon state indicators supplement color for users with color vision deficiencies * * ### Notes * - Defaults to info variant if no variant is specified * - isVisible is a two-way bindable model for programmatic control * - closeAlert event emits false when alert is dismissed * - Alert remains in DOM when hidden (display: none), use *ngIf for removal * - Use sparingly to avoid alert fatigue - reserve for truly important messages * - Consider toast notifications for less critical, temporary messages */ declare class EuiAlertComponent implements OnInit { baseStatesDirective: BaseStatesDirective; /** * @description * Computes and returns the CSS classes for the component based on its current state. * * @returns {string} Space-separated string of CSS class names */ get cssClasses(): string; /** * Sets the `role` attribute for the host element. * * @default 'alert' */ role: string; /** * Sets the `aria-describedby` attribute for the host element. * * @default `alertContent-${uniqueId}` * @returns The ID of the element associated with the alert. */ get ariaDescribedBy(): string; /** * Sets the `tabindex` attribute for the host element. * * @returns '0' if defined as focusable else '1' as string. */ get tabindex(): string; /** * Sets the `data-e2e` attribute for the host element. It is used for end-to-end testing. * * @default 'eui-alert' */ get e2eAttribute(): string; /** * Data attribute value for end-to-end testing identification. * Applied as data-e2e attribute on the host element. * @default 'eui-alert' */ e2eAttr: _angular_core.InputSignal; /** * Enables a close button allowing users to dismiss the alert. * When true, displays a close icon button that hides the alert and emits closeAlert event. * @default false */ isCloseable: _angular_core.InputSignalWithTransform; /** * Makes the alert focusable via keyboard navigation. * When true, sets tabindex to 0 enabling keyboard focus for accessibility. * @default false */ isFocusable: _angular_core.InputSignalWithTransform; /** * Controls the visibility state of the alert. * Two-way bindable model that can be programmatically controlled or updated by user dismissal. * @default true */ isVisible: _angular_core.ModelSignal; /** * Emitted when the alert is closed via the close button. * Payload: boolean - always emits false to indicate alert is hidden * Triggered when user clicks the close button (when isCloseable is true). */ closeAlert: _angular_core.OutputEmitterRef; /** * Content for the alert title given by ``. */ alertTitle: QueryList; /** * @description * Unique identifier for the alert component. * This ID is used to associate the alert with its content for accessibility purposes. * It is generated using the `crypto` API to ensure uniqueness. */ private uniqueId; /** * Initializes the component. * Generates a unique ID for the alert on component initialization. */ ngOnInit(): void; /** * Hide the alert and emits the `closeAlert` event when the close button is clicked. */ onCloseClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare const EUI_ALERT: readonly [typeof EuiAlertComponent, typeof EuiAlertTitleComponent]; export { EUI_ALERT, EuiAlertComponent, EuiAlertTitleComponent }; //# sourceMappingURL=eui-components-eui-alert.d.ts.map