{"version":3,"file":"daffodil-design-notification.mjs","names":[],"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"],"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","import {\n  Component,\n  ViewEncapsulation,\n  ChangeDetectionStrategy,\n  input,\n  output,\n  contentChild,\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  styleUrl: './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  _prefix = contentChild(DaffPrefixDirective);\n\n  /**\n   * @docs-private\n   */\n  _actions = contentChild(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  dismissible = input(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  closeNotification = output<void>();\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"],"mappings":";;;;;;;AAqBA,IAAa,mCAAb,MAAa,iCAAgC;CAAhC;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgC,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhC;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAgC,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,6BAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAhC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgC,YAAA,CAAA;EAP5C,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EACJ,SAAS,6BACV;EACF,CAAA;;;ACgDD,IAAa,4BAAb,MAAa,0BAAyB;CAsBpC,IAAI,OAAI;EACN,OAAO,KAAK,gBAAgB,WAAW,eAAe,QAAQ,KAAK,gBAAgB,WAAW,eAAe,WAAW,UAAU;CACpI;CAOA,YACU,iBACA,aAAoC;EADpC,KAAA,kBAAA;EACA,KAAA,cAAA;EA7BV,KAAA,UAAU;EAKV,KAAA,UAAU,aAAa,qBAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CA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