@daffodil/design 0.94.1-rc.0 → 0.95.0

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.
Files changed (170) hide show
  1. package/README.md +1 -2
  2. package/accordion/src/accordion-theme.scss +4 -4
  3. package/article/README.md +4 -27
  4. package/article/src/article-theme.scss +14 -14
  5. package/badge/src/badge-theme.scss +0 -6
  6. package/button/README.md +0 -4
  7. package/button/src/button/basic/button-theme.scss +17 -42
  8. package/button/src/button/button-base.scss +12 -3
  9. package/button/src/button/flat/flat-theme.scss +14 -12
  10. package/button/src/button/icon/icon-theme.scss +19 -40
  11. package/button/src/button/stroked/stroked-theme.scss +22 -36
  12. package/card/src/card/stroked/stroked-theme.scss +1 -1
  13. package/card/src/card-base.scss +0 -1
  14. package/fesm2022/daffodil-design-accordion.mjs +285 -188
  15. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-article.mjs +578 -340
  17. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-badge.mjs +166 -84
  19. package/fesm2022/daffodil-design-badge.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-beacon.mjs +109 -47
  21. package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +541 -408
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +349 -224
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +496 -327
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +373 -313
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +103 -60
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +441 -352
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +155 -57
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +349 -234
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image-lite.mjs +60 -0
  41. package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
  42. package/fesm2022/daffodil-design-image.mjs +245 -107
  43. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-input.mjs +217 -164
  45. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +308 -170
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
  49. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-menu.mjs +525 -417
  51. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-modal.mjs +680 -450
  53. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-native-select.mjs +175 -166
  55. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-navbar.mjs +145 -68
  57. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-notification.mjs +376 -226
  59. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-paginator.mjs +296 -192
  61. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
  63. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-radio.mjs +382 -300
  65. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-select.mjs +424 -364
  67. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-sidebar.mjs +874 -887
  69. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-spinner.mjs +156 -99
  71. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-switch.mjs +176 -106
  73. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-tabs.mjs +685 -427
  75. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-tag.mjs +251 -133
  77. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-testing.mjs +4 -16
  79. package/fesm2022/daffodil-design-testing.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
  81. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-textarea.mjs +170 -150
  83. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-toast.mjs +658 -481
  85. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-tree.mjs +456 -469
  87. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
  89. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  90. package/fesm2022/daffodil-design.mjs +1628 -1650
  91. package/fesm2022/daffodil-design.mjs.map +1 -1
  92. package/form-field/README.md +0 -4
  93. package/form-field/src/form-field-theme.scss +12 -4
  94. package/image/README.md +4 -0
  95. package/image-lite/README.md +58 -0
  96. package/image-lite/src/image-theme.scss +18 -0
  97. package/list/src/list-base.scss +3 -4
  98. package/list/src/list-theme.scss +6 -5
  99. package/media-gallery/README.md +1 -1
  100. package/media-gallery/src/media-gallery-theme.scss +3 -3
  101. package/menu/src/menu-theme.scss +6 -2
  102. package/notification/src/notification-theme.scss +10 -10
  103. package/package.json +1 -1
  104. package/scss/global.scss +17 -11
  105. package/scss/theme.scss +2 -18
  106. package/scss/theming/_get-palette.scss +0 -3
  107. package/scss/theming/_index.scss +0 -1
  108. package/scss/theming/_light-dark.scss +2 -2
  109. package/scss/theming/_theme-css-variables.scss +1 -1
  110. package/scss/theming/create-theme/_create-theme.scss +2 -2
  111. package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
  112. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
  113. package/scss/typography/_classes.scss +0 -6
  114. package/scss/typography/_index.scss +0 -1
  115. package/scss/typography/mixins/_sizes.scss +0 -1
  116. package/scss/typography/utilities/_variables.scss +3 -0
  117. package/select/src/select-theme.scss +10 -14
  118. package/switch/src/switch-theme.scss +2 -2
  119. package/tabs/src/tabs-theme.scss +4 -4
  120. package/types/daffodil-design-accordion.d.ts +92 -67
  121. package/types/daffodil-design-article.d.ts +49 -56
  122. package/types/daffodil-design-badge.d.ts +56 -33
  123. package/types/daffodil-design-beacon.d.ts +35 -14
  124. package/types/daffodil-design-breadcrumb.d.ts +89 -85
  125. package/types/daffodil-design-button.d.ts +128 -146
  126. package/types/daffodil-design-callout.d.ts +55 -39
  127. package/types/daffodil-design-card.d.ts +66 -56
  128. package/types/daffodil-design-checkbox.d.ts +211 -167
  129. package/types/daffodil-design-container.d.ts +17 -16
  130. package/types/daffodil-design-form-field.d.ts +273 -240
  131. package/types/daffodil-design-form.d.ts +21 -21
  132. package/types/daffodil-design-hero.d.ts +55 -39
  133. package/types/daffodil-design-image-lite.d.ts +17 -0
  134. package/types/daffodil-design-image.d.ts +89 -55
  135. package/types/daffodil-design-input.d.ts +86 -72
  136. package/types/daffodil-design-list.d.ts +49 -43
  137. package/types/daffodil-design-media-gallery.d.ts +176 -148
  138. package/types/daffodil-design-menu.d.ts +177 -169
  139. package/types/daffodil-design-modal.d.ts +205 -205
  140. package/types/daffodil-design-native-select.d.ts +94 -84
  141. package/types/daffodil-design-navbar.d.ts +34 -24
  142. package/types/daffodil-design-notification.d.ts +82 -67
  143. package/types/daffodil-design-paginator.d.ts +140 -118
  144. package/types/daffodil-design-progress-bar.d.ts +92 -74
  145. package/types/daffodil-design-radio.d.ts +183 -144
  146. package/types/daffodil-design-select.d.ts +207 -178
  147. package/types/daffodil-design-sidebar.d.ts +270 -253
  148. package/types/daffodil-design-spinner.d.ts +49 -36
  149. package/types/daffodil-design-switch.d.ts +77 -46
  150. package/types/daffodil-design-tabs.d.ts +248 -198
  151. package/types/daffodil-design-tag.d.ts +91 -56
  152. package/types/daffodil-design-testing.d.ts +1 -3
  153. package/types/daffodil-design-text-snippet.d.ts +48 -37
  154. package/types/daffodil-design-textarea.d.ts +88 -79
  155. package/types/daffodil-design-toast.d.ts +175 -183
  156. package/types/daffodil-design-tree.d.ts +186 -169
  157. package/types/daffodil-design-youtube-player.d.ts +56 -52
  158. package/types/daffodil-design.d.ts +614 -695
  159. package/button/src/button/raised/raised-theme.scss +0 -92
  160. package/button/src/button/underline/underline-theme.scss +0 -141
  161. package/fesm2022/daffodil-design-link-set.mjs +0 -160
  162. package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
  164. package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
  165. package/link-set/README.md +0 -86
  166. package/quantity-field/README.md +0 -63
  167. package/scss/theming/_configure-theme.scss +0 -120
  168. package/scss/typography/mixins/_font-weight.scss +0 -14
  169. package/types/daffodil-design-link-set.d.ts +0 -72
  170. package/types/daffodil-design-quantity-field.d.ts +0 -171
@@ -1,229 +1,379 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, contentChild, input, output, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
4
- import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
5
- import * as i1 from '@daffodil/design';
6
- import { DaffStatusEnum, DaffPrefixDirective, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffOrientableDirective, DaffPrefixSuffixModule } from '@daffodil/design';
7
- import { faTimes } from '@fortawesome/free-solid-svg-icons';
8
-
9
- /* eslint-disable quote-props */
10
- /**
11
- * Actions is used to include actionable buttons related to the notification (e.g., dismiss, navigate).
12
- *
13
- * @example
14
- * ```html
15
- * <div daffNotificationActions>
16
- * <button daff-button>Update payment</button>
17
- * <button daff-button>Contact support</button>
18
- * </div>
19
- * ```
20
- */
21
- class DaffNotificationActionsDirective {
22
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffNotificationActionsDirective, isStandalone: true, selector: "[daffNotificationActions]", host: { classAttribute: "daff-notification__actions" }, ngImport: i0 }); }
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationActionsDirective, decorators: [{
26
- type: Directive,
27
- args: [{
28
- selector: '[daffNotificationActions]',
29
- host: {
30
- 'class': 'daff-notification__actions',
31
- },
32
- }]
33
- }] });
34
-
35
- /**
36
- * Notifications provide contextual feedback or information related to user actions within a page's content.
37
- *
38
- * Use [Toast](/libs/design/toast/README.md) for app-level alerts.
39
- *
40
- * @example
41
- * ```html
42
- * <daff-notification>
43
- * <fa-icon daffPrefix [icon]="faExclamation"></fa-icon>
44
- * <div daffNotificationTitle>Payment Failed</div>
45
- * <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>
46
- * <div daffNotificationActions>
47
- * <button daff-button>Update payment</button>
48
- * <button daff-button>Contact support</button>
49
- * </div>
50
- * </daff-notification>
51
- * ```
52
- */
53
- class DaffNotificationComponent {
54
- /**
55
- * @docs-private
56
- *
57
- * Sets role to alert when `status="warn"` or `status="critical"`.
58
- * Sets role to status on all other instances.
59
- */
60
- get role() {
61
- return this.statusDirective.status === DaffStatusEnum.Warn || this.statusDirective.status === DaffStatusEnum.Critical ? 'alert' : 'status';
62
- }
63
- ;
64
- constructor(statusDirective, orientation) {
65
- this.statusDirective = statusDirective;
66
- this.orientation = orientation;
67
- /**
68
- * @docs-private
69
- */
70
- this.faTimes = faTimes;
71
- /**
72
- * @docs-private
73
- */
74
- this._prefix = contentChild(DaffPrefixDirective, ...(ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []));
75
- /**
76
- * @docs-private
77
- */
78
- this._actions = contentChild(DaffNotificationActionsDirective, ...(ngDevMode ? [{ debugName: "_actions" }] : /* istanbul ignore next */ []));
79
- /** Whether the notification can be dismissed by the user.
80
- * Displays a close icon if `true`.
81
- */
82
- this.dismissible = input(false, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
83
- /**
84
- * Emits when the notification is closed.
85
- */
86
- this.closeNotification = output();
87
- this.orientation.defaultOrientation = 'vertical';
88
- }
89
- /**
90
- * @docs-private
91
- *
92
- * Internal handler for the close icon click.
93
- */
94
- onCloseNotification(event) {
95
- this.closeNotification.emit();
96
- }
97
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationComponent, deps: [{ token: i1.DaffStatusableDirective }, { token: i1.DaffOrientableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
98
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffNotificationComponent, isStandalone: true, selector: "daff-notification", inputs: { dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeNotification: "closeNotification" }, host: { attributes: { "tabindex": "0" }, properties: { "class.dismissible": "dismissible()", "attr.role": "role" }, classAttribute: "daff-notification" }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, isSignal: true }, { propertyName: "_actions", first: true, predicate: DaffNotificationActionsDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }, { directive: i1.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i1.DaffOrientableDirective, inputs: ["orientation", "orientation"] }], ngImport: i0, template: "@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}", styles: [".daff-notification{display:flex;border-radius:.25rem;font-size:1rem;line-height:1.5rem;position:relative}.daff-notification .daff-prefix{padding:1rem 0 1rem 1rem}.daff-notification__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-notification__body{display:flex;font-size:1rem;line-height:1.5rem;padding:1rem;width:100%}.daff-notification__content{display:flex;flex-direction:column;gap:.25rem}.daff-notification__title{font-size:1rem;font-weight:600;line-height:1.5rem}.daff-notification__message{font-size:1rem;font-weight:400;line-height:1.25rem}.daff-notification__actions{display:flex;gap:.5rem}.daff-notification.dismissible.daff-horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.daff-vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.daff-horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.daff-horizontal .daff-notification__message{align-self:center}.daff-notification.daff-horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.daff-horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.daff-horizontal .daff-notification__actions{min-height:3rem;padding:.5rem 1rem .5rem 0;margin:0}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
99
- }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationComponent, decorators: [{
101
- type: Component,
102
- args: [{ selector: 'daff-notification', hostDirectives: [
103
- { directive: DaffArticleEncapsulatedDirective },
104
- {
105
- directive: DaffStatusableDirective,
106
- inputs: ['status'],
107
- },
108
- {
109
- directive: DaffOrientableDirective,
110
- inputs: ['orientation'],
111
- },
112
- ], host: {
113
- class: 'daff-notification',
114
- '[class.dismissible]': 'dismissible()',
115
- tabindex: '0',
116
- '[attr.role]': 'role',
117
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
118
- FaIconComponent,
119
- DaffPrefixDirective,
120
- ], template: "@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}", styles: [".daff-notification{display:flex;border-radius:.25rem;font-size:1rem;line-height:1.5rem;position:relative}.daff-notification .daff-prefix{padding:1rem 0 1rem 1rem}.daff-notification__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-notification__body{display:flex;font-size:1rem;line-height:1.5rem;padding:1rem;width:100%}.daff-notification__content{display:flex;flex-direction:column;gap:.25rem}.daff-notification__title{font-size:1rem;font-weight:600;line-height:1.5rem}.daff-notification__message{font-size:1rem;font-weight:400;line-height:1.25rem}.daff-notification__actions{display:flex;gap:.5rem}.daff-notification.dismissible.daff-horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.daff-vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.daff-horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.daff-horizontal .daff-notification__message{align-self:center}.daff-notification.daff-horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.daff-horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.daff-horizontal .daff-notification__actions{min-height:3rem;padding:.5rem 1rem .5rem 0;margin:0}\n"] }]
121
- }], ctorParameters: () => [{ type: i1.DaffStatusableDirective }, { type: i1.DaffOrientableDirective }], propDecorators: { _prefix: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }] }], _actions: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffNotificationActionsDirective), { isSignal: true }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], closeNotification: [{ type: i0.Output, args: ["closeNotification"] }] } });
122
-
123
- /* eslint-disable quote-props */
124
- /**
125
- * Message provides additional details or supporting context that supplements
126
- * the notification title. Keep this brief—ideally one to two short sentences.
127
- *
128
- * @example
129
- * ```html
130
- * <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>
131
- * ```
132
- */
133
- class DaffNotificationMessageDirective {
134
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationMessageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
135
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffNotificationMessageDirective, isStandalone: true, selector: "[daffNotificationMessage]", host: { classAttribute: "daff-notification__message" }, ngImport: i0 }); }
136
- }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationMessageDirective, decorators: [{
138
- type: Directive,
139
- args: [{
140
- selector: '[daffNotificationMessage]',
141
- host: {
142
- 'class': 'daff-notification__message',
143
- },
144
- }]
145
- }] });
146
-
147
- /* eslint-disable quote-props */
148
- /**
149
- * Title is the primary text summarizing the notification.
150
- *
151
- * @example
152
- * ```html
153
- * <div daffNotificationTitle>Payment Failed</div>
154
- * ```
155
- */
156
- class DaffNotificationTitleDirective {
157
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
158
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffNotificationTitleDirective, isStandalone: true, selector: "[daffNotificationTitle]", host: { classAttribute: "daff-notification__title" }, ngImport: i0 }); }
159
- }
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationTitleDirective, decorators: [{
161
- type: Directive,
162
- args: [{
163
- selector: '[daffNotificationTitle]',
164
- host: {
165
- 'class': 'daff-notification__title',
166
- },
167
- }]
168
- }] });
169
-
170
- /**
171
- * @deprecated in favor of {@link DAFF_NOTIFICATION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
172
- */
173
- class DaffNotificationModule {
174
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
175
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationModule, imports: [CommonModule,
176
- DaffPrefixSuffixModule,
177
- FontAwesomeModule,
178
- DaffNotificationComponent,
179
- DaffNotificationActionsDirective,
180
- DaffNotificationMessageDirective,
181
- DaffNotificationTitleDirective], exports: [DaffNotificationComponent,
182
- DaffNotificationActionsDirective,
183
- DaffNotificationMessageDirective,
184
- DaffNotificationTitleDirective,
185
- DaffPrefixSuffixModule] }); }
186
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationModule, imports: [CommonModule,
187
- DaffPrefixSuffixModule,
188
- FontAwesomeModule,
189
- DaffNotificationComponent, DaffPrefixSuffixModule] }); }
190
- }
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffNotificationModule, decorators: [{
192
- type: NgModule,
193
- args: [{
194
- imports: [
195
- CommonModule,
196
- DaffPrefixSuffixModule,
197
- FontAwesomeModule,
198
- DaffNotificationComponent,
199
- DaffNotificationActionsDirective,
200
- DaffNotificationMessageDirective,
201
- DaffNotificationTitleDirective,
202
- ],
203
- exports: [
204
- DaffNotificationComponent,
205
- DaffNotificationActionsDirective,
206
- DaffNotificationMessageDirective,
207
- DaffNotificationTitleDirective,
208
- DaffPrefixSuffixModule,
209
- ],
210
- }]
211
- }] });
212
-
213
- /**
214
- * @docs-private
215
- */
1
+ import { CommonModule } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, Directive, NgModule, ViewEncapsulation, contentChild, input, output } from "@angular/core";
4
+ import { FaIconComponent, FontAwesomeModule } from "@fortawesome/angular-fontawesome";
5
+ import * as i1 from "@daffodil/design";
6
+ import { DaffArticleEncapsulatedDirective, DaffOrientableDirective, DaffPrefixDirective, DaffPrefixSuffixModule, DaffStatusEnum, DaffStatusableDirective } from "@daffodil/design";
7
+ import { faTimes } from "@fortawesome/free-solid-svg-icons";
8
+ var DaffNotificationActionsDirective = class DaffNotificationActionsDirective {
9
+ static {
10
+ this.ɵfac = i0.ɵɵngDeclareFactory({
11
+ minVersion: "12.0.0",
12
+ version: "22.2.4",
13
+ ngImport: i0,
14
+ type: DaffNotificationActionsDirective,
15
+ deps: [],
16
+ target: i0.ɵɵFactoryTarget.Directive
17
+ });
18
+ }
19
+ static {
20
+ this.ɵdir = i0.ɵɵngDeclareDirective({
21
+ minVersion: "14.0.0",
22
+ version: "22.2.4",
23
+ type: DaffNotificationActionsDirective,
24
+ isStandalone: true,
25
+ selector: "[daffNotificationActions]",
26
+ host: { classAttribute: "daff-notification__actions" },
27
+ ngImport: i0
28
+ });
29
+ }
30
+ };
31
+ i0.ɵɵngDeclareClassMetadata({
32
+ minVersion: "12.0.0",
33
+ version: "22.2.4",
34
+ ngImport: i0,
35
+ type: DaffNotificationActionsDirective,
36
+ decorators: [{
37
+ type: Directive,
38
+ args: [{
39
+ selector: "[daffNotificationActions]",
40
+ host: { "class": "daff-notification__actions" }
41
+ }]
42
+ }]
43
+ });
44
+ var DaffNotificationComponent = class DaffNotificationComponent {
45
+ get role() {
46
+ return this.statusDirective.status === DaffStatusEnum.Warn || this.statusDirective.status === DaffStatusEnum.Critical ? "alert" : "status";
47
+ }
48
+ constructor(statusDirective, orientation) {
49
+ this.statusDirective = statusDirective;
50
+ this.orientation = orientation;
51
+ this.faTimes = faTimes;
52
+ this._prefix = contentChild(DaffPrefixDirective, ...ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []);
53
+ this._actions = contentChild(DaffNotificationActionsDirective, ...ngDevMode ? [{ debugName: "_actions" }] : /* istanbul ignore next */ []);
54
+ this.dismissible = input(false, ...ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []);
55
+ this.closeNotification = output();
56
+ this.orientation.defaultOrientation = "vertical";
57
+ }
58
+ onCloseNotification(event) {
59
+ this.closeNotification.emit();
60
+ }
61
+ static {
62
+ this.ɵfac = i0.ɵɵngDeclareFactory({
63
+ minVersion: "12.0.0",
64
+ version: "22.2.4",
65
+ ngImport: i0,
66
+ type: DaffNotificationComponent,
67
+ deps: [{ token: i1.DaffStatusableDirective }, { token: i1.DaffOrientableDirective }],
68
+ target: i0.ɵɵFactoryTarget.Component
69
+ });
70
+ }
71
+ static {
72
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
73
+ minVersion: "17.0.0",
74
+ version: "22.2.4",
75
+ type: DaffNotificationComponent,
76
+ isStandalone: true,
77
+ selector: "daff-notification",
78
+ inputs: { dismissible: {
79
+ classPropertyName: "dismissible",
80
+ publicName: "dismissible",
81
+ isSignal: true,
82
+ isRequired: false,
83
+ transformFunction: null
84
+ } },
85
+ outputs: { closeNotification: "closeNotification" },
86
+ host: {
87
+ attributes: { "tabindex": "0" },
88
+ properties: {
89
+ "class.dismissible": "dismissible()",
90
+ "attr.role": "role"
91
+ },
92
+ classAttribute: "daff-notification"
93
+ },
94
+ queries: [{
95
+ propertyName: "_prefix",
96
+ first: true,
97
+ predicate: DaffPrefixDirective,
98
+ descendants: true,
99
+ isSignal: true
100
+ }, {
101
+ propertyName: "_actions",
102
+ first: true,
103
+ predicate: DaffNotificationActionsDirective,
104
+ descendants: true,
105
+ isSignal: true
106
+ }],
107
+ hostDirectives: [
108
+ { directive: i1.DaffArticleEncapsulatedDirective },
109
+ {
110
+ directive: i1.DaffStatusableDirective,
111
+ inputs: ["status", "status"]
112
+ },
113
+ {
114
+ directive: i1.DaffOrientableDirective,
115
+ inputs: ["orientation", "orientation"]
116
+ }
117
+ ],
118
+ ngImport: i0,
119
+ template: "@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}",
120
+ styles: [".daff-notification{display:flex;border-radius:.25rem;font-size:var(--daff-font-size-base);line-height:1.5rem;position:relative}.daff-notification .daff-prefix{padding:1rem 0 1rem 1rem}.daff-notification__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-notification__body{display:flex;font-size:1rem;line-height:1.5rem;padding:1rem;width:100%}.daff-notification__content{display:flex;flex-direction:column;gap:.25rem}.daff-notification__title{font-size:var(--daff-font-size-base);font-weight:600;line-height:1.5rem}.daff-notification__message{font-size:var(--daff-font-size-base);font-weight:400;line-height:1.25rem}.daff-notification__actions{display:flex;gap:.5rem}.daff-notification.dismissible.daff-horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.daff-vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.daff-horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.daff-horizontal .daff-notification__message{align-self:center}.daff-notification.daff-horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.daff-horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.daff-horizontal .daff-notification__actions{min-height:3rem;padding:.5rem 1rem .5rem 0;margin:0}\n"],
121
+ dependencies: [{
122
+ kind: "component",
123
+ type: FaIconComponent,
124
+ selector: "fa-icon",
125
+ inputs: [
126
+ "icon",
127
+ "title",
128
+ "animation",
129
+ "mask",
130
+ "flip",
131
+ "size",
132
+ "pull",
133
+ "border",
134
+ "inverse",
135
+ "symbol",
136
+ "rotate",
137
+ "fixedWidth",
138
+ "transform",
139
+ "a11yRole"
140
+ ],
141
+ outputs: [
142
+ "iconChange",
143
+ "titleChange",
144
+ "animationChange",
145
+ "maskChange",
146
+ "flipChange",
147
+ "sizeChange",
148
+ "pullChange",
149
+ "borderChange",
150
+ "inverseChange",
151
+ "symbolChange",
152
+ "rotateChange",
153
+ "fixedWidthChange",
154
+ "transformChange",
155
+ "a11yRoleChange"
156
+ ]
157
+ }],
158
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
159
+ encapsulation: i0.ViewEncapsulation.None
160
+ });
161
+ }
162
+ };
163
+ i0.ɵɵngDeclareClassMetadata({
164
+ minVersion: "12.0.0",
165
+ version: "22.2.4",
166
+ ngImport: i0,
167
+ type: DaffNotificationComponent,
168
+ decorators: [{
169
+ type: Component,
170
+ args: [{
171
+ selector: "daff-notification",
172
+ hostDirectives: [
173
+ { directive: DaffArticleEncapsulatedDirective },
174
+ {
175
+ directive: DaffStatusableDirective,
176
+ inputs: ["status"]
177
+ },
178
+ {
179
+ directive: DaffOrientableDirective,
180
+ inputs: ["orientation"]
181
+ }
182
+ ],
183
+ host: {
184
+ class: "daff-notification",
185
+ "[class.dismissible]": "dismissible()",
186
+ tabindex: "0",
187
+ "[attr.role]": "role"
188
+ },
189
+ encapsulation: ViewEncapsulation.None,
190
+ changeDetection: ChangeDetectionStrategy.OnPush,
191
+ imports: [FaIconComponent, DaffPrefixDirective],
192
+ template: "@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}",
193
+ styles: [".daff-notification{display:flex;border-radius:.25rem;font-size:var(--daff-font-size-base);line-height:1.5rem;position:relative}.daff-notification .daff-prefix{padding:1rem 0 1rem 1rem}.daff-notification__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-notification__body{display:flex;font-size:1rem;line-height:1.5rem;padding:1rem;width:100%}.daff-notification__content{display:flex;flex-direction:column;gap:.25rem}.daff-notification__title{font-size:var(--daff-font-size-base);font-weight:600;line-height:1.5rem}.daff-notification__message{font-size:var(--daff-font-size-base);font-weight:400;line-height:1.25rem}.daff-notification__actions{display:flex;gap:.5rem}.daff-notification.dismissible.daff-horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.daff-vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.daff-horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.daff-horizontal .daff-notification__message{align-self:center}.daff-notification.daff-horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.daff-horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.daff-horizontal .daff-notification__actions{min-height:3rem;padding:.5rem 1rem .5rem 0;margin:0}\n"]
194
+ }]
195
+ }],
196
+ ctorParameters: () => [{ type: i1.DaffStatusableDirective }, { type: i1.DaffOrientableDirective }],
197
+ propDecorators: {
198
+ _prefix: [{
199
+ type: i0.ContentChild,
200
+ args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }]
201
+ }],
202
+ _actions: [{
203
+ type: i0.ContentChild,
204
+ args: [i0.forwardRef(() => DaffNotificationActionsDirective), { isSignal: true }]
205
+ }],
206
+ dismissible: [{
207
+ type: i0.Input,
208
+ args: [{
209
+ isSignal: true,
210
+ alias: "dismissible",
211
+ required: false
212
+ }]
213
+ }],
214
+ closeNotification: [{
215
+ type: i0.Output,
216
+ args: ["closeNotification"]
217
+ }]
218
+ }
219
+ });
220
+ var DaffNotificationMessageDirective = class DaffNotificationMessageDirective {
221
+ static {
222
+ this.ɵfac = i0.ɵɵngDeclareFactory({
223
+ minVersion: "12.0.0",
224
+ version: "22.2.4",
225
+ ngImport: i0,
226
+ type: DaffNotificationMessageDirective,
227
+ deps: [],
228
+ target: i0.ɵɵFactoryTarget.Directive
229
+ });
230
+ }
231
+ static {
232
+ this.ɵdir = i0.ɵɵngDeclareDirective({
233
+ minVersion: "14.0.0",
234
+ version: "22.2.4",
235
+ type: DaffNotificationMessageDirective,
236
+ isStandalone: true,
237
+ selector: "[daffNotificationMessage]",
238
+ host: { classAttribute: "daff-notification__message" },
239
+ ngImport: i0
240
+ });
241
+ }
242
+ };
243
+ i0.ɵɵngDeclareClassMetadata({
244
+ minVersion: "12.0.0",
245
+ version: "22.2.4",
246
+ ngImport: i0,
247
+ type: DaffNotificationMessageDirective,
248
+ decorators: [{
249
+ type: Directive,
250
+ args: [{
251
+ selector: "[daffNotificationMessage]",
252
+ host: { "class": "daff-notification__message" }
253
+ }]
254
+ }]
255
+ });
256
+ var DaffNotificationTitleDirective = class DaffNotificationTitleDirective {
257
+ static {
258
+ this.ɵfac = i0.ɵɵngDeclareFactory({
259
+ minVersion: "12.0.0",
260
+ version: "22.2.4",
261
+ ngImport: i0,
262
+ type: DaffNotificationTitleDirective,
263
+ deps: [],
264
+ target: i0.ɵɵFactoryTarget.Directive
265
+ });
266
+ }
267
+ static {
268
+ this.ɵdir = i0.ɵɵngDeclareDirective({
269
+ minVersion: "14.0.0",
270
+ version: "22.2.4",
271
+ type: DaffNotificationTitleDirective,
272
+ isStandalone: true,
273
+ selector: "[daffNotificationTitle]",
274
+ host: { classAttribute: "daff-notification__title" },
275
+ ngImport: i0
276
+ });
277
+ }
278
+ };
279
+ i0.ɵɵngDeclareClassMetadata({
280
+ minVersion: "12.0.0",
281
+ version: "22.2.4",
282
+ ngImport: i0,
283
+ type: DaffNotificationTitleDirective,
284
+ decorators: [{
285
+ type: Directive,
286
+ args: [{
287
+ selector: "[daffNotificationTitle]",
288
+ host: { "class": "daff-notification__title" }
289
+ }]
290
+ }]
291
+ });
292
+ var DaffNotificationModule = class DaffNotificationModule {
293
+ static {
294
+ this.ɵfac = i0.ɵɵngDeclareFactory({
295
+ minVersion: "12.0.0",
296
+ version: "22.2.4",
297
+ ngImport: i0,
298
+ type: DaffNotificationModule,
299
+ deps: [],
300
+ target: i0.ɵɵFactoryTarget.NgModule
301
+ });
302
+ }
303
+ static {
304
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
305
+ minVersion: "14.0.0",
306
+ version: "22.2.4",
307
+ ngImport: i0,
308
+ type: DaffNotificationModule,
309
+ imports: [
310
+ CommonModule,
311
+ DaffPrefixSuffixModule,
312
+ FontAwesomeModule,
313
+ DaffNotificationComponent,
314
+ DaffNotificationActionsDirective,
315
+ DaffNotificationMessageDirective,
316
+ DaffNotificationTitleDirective
317
+ ],
318
+ exports: [
319
+ DaffNotificationComponent,
320
+ DaffNotificationActionsDirective,
321
+ DaffNotificationMessageDirective,
322
+ DaffNotificationTitleDirective,
323
+ DaffPrefixSuffixModule
324
+ ]
325
+ });
326
+ }
327
+ static {
328
+ this.ɵinj = i0.ɵɵngDeclareInjector({
329
+ minVersion: "12.0.0",
330
+ version: "22.2.4",
331
+ ngImport: i0,
332
+ type: DaffNotificationModule,
333
+ imports: [
334
+ CommonModule,
335
+ DaffPrefixSuffixModule,
336
+ FontAwesomeModule,
337
+ DaffNotificationComponent,
338
+ DaffPrefixSuffixModule
339
+ ]
340
+ });
341
+ }
342
+ };
343
+ i0.ɵɵngDeclareClassMetadata({
344
+ minVersion: "12.0.0",
345
+ version: "22.2.4",
346
+ ngImport: i0,
347
+ type: DaffNotificationModule,
348
+ decorators: [{
349
+ type: NgModule,
350
+ args: [{
351
+ imports: [
352
+ CommonModule,
353
+ DaffPrefixSuffixModule,
354
+ FontAwesomeModule,
355
+ DaffNotificationComponent,
356
+ DaffNotificationActionsDirective,
357
+ DaffNotificationMessageDirective,
358
+ DaffNotificationTitleDirective
359
+ ],
360
+ exports: [
361
+ DaffNotificationComponent,
362
+ DaffNotificationActionsDirective,
363
+ DaffNotificationMessageDirective,
364
+ DaffNotificationTitleDirective,
365
+ DaffPrefixSuffixModule
366
+ ]
367
+ }]
368
+ }]
369
+ });
216
370
  const DAFF_NOTIFICATION_COMPONENTS = [
217
- DaffNotificationComponent,
218
- DaffNotificationActionsDirective,
219
- DaffNotificationMessageDirective,
220
- DaffNotificationTitleDirective,
221
- DaffPrefixDirective,
371
+ DaffNotificationComponent,
372
+ DaffNotificationActionsDirective,
373
+ DaffNotificationMessageDirective,
374
+ DaffNotificationTitleDirective,
375
+ DaffPrefixDirective
222
376
  ];
223
-
224
- /**
225
- * Generated bundle index. Do not edit.
226
- */
227
-
228
377
  export { DAFF_NOTIFICATION_COMPONENTS, DaffNotificationActionsDirective, DaffNotificationComponent, DaffNotificationMessageDirective, DaffNotificationModule, DaffNotificationTitleDirective };
229
- //# sourceMappingURL=daffodil-design-notification.mjs.map
378
+
379
+ //# sourceMappingURL=daffodil-design-notification.mjs.map