{"version":3,"file":"daffodil-design-notification.mjs","sources":["../../../libs/design/notification/src/notification-actions/notification-actions.directive.ts","../../../libs/design/notification/src/notification/notification.component.ts","../../../libs/design/notification/src/notification/notification.component.html","../../../libs/design/notification/src/notification-message/notification-message.directive.ts","../../../libs/design/notification/src/notification-title/notification-title.directive.ts","../../../libs/design/notification/src/notification.module.ts","../../../libs/design/notification/src/notification.ts","../../../libs/design/notification/src/daffodil-design-notification.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Actions is used to include actionable buttons related to the notification (e.g., dismiss, navigate).\n *\n * @example\n * ```html\n * <div daffNotificationActions>\n *  <button daff-button>Update payment</button>\n *  <button daff-button>Contact support</button>\n * </div>\n * ```\n */\n@Directive({\n  selector: '[daffNotificationActions]',\n  host: {\n    'class': 'daff-notification__actions',\n  },\n})\n\nexport class DaffNotificationActionsDirective {}\n","/* eslint-disable quote-props */\nimport {\n  Component,\n  Input,\n  ContentChild,\n  ViewEncapsulation,\n  ChangeDetectionStrategy,\n  Output,\n  EventEmitter,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\n\nimport {\n  DaffArticleEncapsulatedDirective,\n  DaffOrientableDirective,\n  DaffPrefixDirective,\n  DaffStatusableDirective,\n  DaffStatusEnum,\n} from '@daffodil/design';\n\nimport { DaffNotificationActionsDirective } from '../notification-actions/notification-actions.directive';\n\n/**\n * Notifications provide contextual feedback or information related to user actions within a page's content.\n *\n * Use [Toast](/libs/design/toast/README.md) for app-level alerts.\n *\n * @example\n * ```html\n * <daff-notification>\n *  <fa-icon daffPrefix [icon]=\"faExclamation\"></fa-icon>\n *  <div daffNotificationTitle>Payment Failed</div>\n *  <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>\n *  <div daffNotificationActions>\n *    <button daff-button>Update payment</button>\n *    <button daff-button>Contact support</button>\n *  </div>\n * </daff-notification>\n * ```\n */\n@Component({\n  selector: 'daff-notification',\n  templateUrl: './notification.component.html',\n  styleUrls: ['./notification.component.scss'],\n  hostDirectives: [\n    { directive: DaffArticleEncapsulatedDirective },\n    {\n      directive: DaffStatusableDirective,\n      inputs: ['status'],\n    },\n    {\n      directive: DaffOrientableDirective,\n      inputs: ['orientation'],\n    },\n  ],\n  host: {\n    'class': 'daff-notification',\n    '[class.dismissible]': 'dismissible',\n    'tabindex': '0',\n    '[attr.role]': 'role',\n  },\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    FaIconComponent,\n    DaffPrefixDirective,\n  ],\n})\nexport class DaffNotificationComponent {\n  /**\n   * @docs-private\n   */\n  faTimes = faTimes;\n\n  /**\n   * @docs-private\n   */\n  @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n  /**\n   * @docs-private\n   */\n  @ContentChild(DaffNotificationActionsDirective) _actions: DaffNotificationActionsDirective;\n\n  /**\n   * @docs-private\n   *\n   * Sets role to alert when `status=\"warn\"` or `status=\"critical\"`.\n   * Sets role to status on all other instances.\n   */\n  get role() {\n    return this.statusDirective.status === DaffStatusEnum.Warn || this.statusDirective.status === DaffStatusEnum.Critical ? 'alert' : 'status';\n  };\n\n  /** Whether the notification can be dismissed by the user.\n   * Displays a close icon if `true`.\n   */\n  @Input() dismissible = false;\n\n  constructor(\n    private statusDirective: DaffStatusableDirective,\n    private orientation: DaffOrientableDirective,\n  ) {\n    this.orientation.defaultOrientation = 'vertical';\n  }\n\n  /**\n   * Emits when the notification is closed.\n   */\n  @Output() closeNotification: EventEmitter<void> = new EventEmitter();\n\n  /**\n   * @docs-private\n   *\n   * Internal handler for the close icon click.\n   */\n  onCloseNotification(event: Event) {\n    this.closeNotification.emit();\n  }\n}\n","@if (_prefix) {\n  <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-notification__body\">\n  <div class=\"daff-notification__content\">\n    <ng-content select=\"[daffNotificationTitle]\"></ng-content>\n    <ng-content select=\"[daffNotificationMessage]\"></ng-content>\n  </div>\n  @if (_actions) {\n    <ng-content select=\"[daffNotificationActions]\"></ng-content>\n  }\n</div>\n@if (dismissible) {\n  <button class=\"daff-notification__close-icon\" (click)=\"onCloseNotification($event)\">\n    <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n  </button>\n}","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Message provides additional details or supporting context that supplements\n * the notification title. Keep this brief—ideally one to two short sentences.\n *\n * @example\n * ```html\n * <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>\n * ```\n */\n@Directive({\n  selector: '[daffNotificationMessage]',\n  host: {\n    'class': 'daff-notification__message',\n  },\n})\n\nexport class DaffNotificationMessageDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Title is the primary text summarizing the notification.\n *\n * @example\n * ```html\n * <div daffNotificationTitle>Payment Failed</div>\n * ```\n */\n@Directive({\n  selector: '[daffNotificationTitle]',\n  host: {\n    'class': 'daff-notification__title',\n  },\n})\n\nexport class DaffNotificationTitleDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\nimport { DaffPrefixSuffixModule } from '@daffodil/design';\n\nimport { DaffNotificationComponent } from './notification/notification.component';\nimport { DaffNotificationActionsDirective } from './notification-actions/notification-actions.directive';\nimport { DaffNotificationMessageDirective } from './notification-message/notification-message.directive';\nimport { DaffNotificationTitleDirective } from './notification-title/notification-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_NOTIFICATION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n  imports: [\n    CommonModule,\n    DaffPrefixSuffixModule,\n    FontAwesomeModule,\n    DaffNotificationComponent,\n    DaffNotificationActionsDirective,\n    DaffNotificationMessageDirective,\n    DaffNotificationTitleDirective,\n  ],\n  exports: [\n    DaffNotificationComponent,\n    DaffNotificationActionsDirective,\n    DaffNotificationMessageDirective,\n    DaffNotificationTitleDirective,\n    DaffPrefixSuffixModule,\n  ],\n})\nexport class DaffNotificationModule { }\n","import { DaffPrefixDirective } from '@daffodil/design';\n\nimport { DaffNotificationComponent } from './notification/notification.component';\nimport { DaffNotificationActionsDirective } from './notification-actions/notification-actions.directive';\nimport { DaffNotificationMessageDirective } from './notification-message/notification-message.directive';\nimport { DaffNotificationTitleDirective } from './notification-title/notification-title.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_NOTIFICATION_COMPONENTS = <const> [\n  DaffNotificationComponent,\n  DaffNotificationActionsDirective,\n  DaffNotificationMessageDirective,\n  DaffNotificationTitleDirective,\n  DaffPrefixDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAGA;;;;;;;;;;AAUG;MAQU,gCAAgC,CAAA;iIAAhC,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAAhC,gCAAgC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,4BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAhC,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAP5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,OAAO,EAAE,4BAA4B;AACtC,qBAAA;AACF,iBAAA;;;ACnBD;AAuBA;;;;;;;;;;;;;;;;;AAiBG;MA6BU,yBAAyB,CAAA;AAgBpC;;;;;AAKG;AACH,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,eAA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