@daffodil/design 0.90.0 → 0.91.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 (200) hide show
  1. package/accordion/index.d.ts +8 -5
  2. package/article/README.md +1 -1
  3. package/article/index.d.ts +20 -0
  4. package/article/src/article-theme.scss +10 -0
  5. package/button/index.d.ts +4 -4
  6. package/button/src/button/button-base.scss +3 -3
  7. package/button/src/button/raised/raised-theme.scss +2 -2
  8. package/card/README.md +0 -8
  9. package/card/index.d.ts +7 -41
  10. package/card/src/card-base-theme.scss +2 -5
  11. package/card/src/card-base.scss +2 -2
  12. package/checkbox/README.md +0 -0
  13. package/checkbox/index.d.ts +177 -0
  14. package/fesm2022/daffodil-design-accordion.mjs +23 -14
  15. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-article.mjs +129 -5
  17. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-button.mjs +24 -20
  19. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-card.mjs +16 -63
  21. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-checkbox.mjs +317 -0
  23. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -0
  24. package/fesm2022/daffodil-design-form-field.mjs +35 -65
  25. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-form.mjs +62 -0
  27. package/fesm2022/daffodil-design-form.mjs.map +1 -0
  28. package/fesm2022/daffodil-design-image.mjs +12 -4
  29. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-modal.mjs +55 -56
  31. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-notification.mjs +14 -50
  33. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-paginator.mjs +6 -11
  35. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-quantity-field.mjs +3 -5
  37. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-radio.mjs +13 -42
  39. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-sidebar.mjs +6 -36
  41. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  42. package/fesm2022/daffodil-design-switch.mjs +48 -105
  43. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-tabs.mjs +22 -14
  45. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-toast.mjs +56 -55
  47. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-tree.mjs +4 -13
  49. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  50. package/fesm2022/daffodil-design.mjs +250 -461
  51. package/fesm2022/daffodil-design.mjs.map +1 -1
  52. package/form/README.md +75 -0
  53. package/form/index.d.ts +27 -0
  54. package/form-field/README.md +49 -39
  55. package/form-field/index.d.ts +56 -36
  56. package/image/README.md +27 -19
  57. package/image/index.d.ts +6 -1
  58. package/index.d.ts +180 -259
  59. package/input/README.md +32 -12
  60. package/modal/README.md +106 -16
  61. package/modal/index.d.ts +50 -21
  62. package/native-select/README.md +52 -15
  63. package/notification/index.d.ts +7 -38
  64. package/package.json +1 -1
  65. package/paginator/index.d.ts +1 -7
  66. package/radio/index.d.ts +0 -16
  67. package/scss/layout/_breakpoint.scss +1 -1
  68. package/scss/theme.scss +2 -4
  69. package/scss/theming/_color-palettes.scss +21 -7
  70. package/scss/theming/_configure-theme.scss +11 -10
  71. package/scss/theming/_daff-theme.scss +5 -14
  72. package/scss/theming/_get-base-color.scss +2 -2
  73. package/scss/theming/_get-palette.scss +2 -2
  74. package/scss/theming/_get-theme-mode.scss +3 -3
  75. package/scss/theming/_index.scss +2 -1
  76. package/scss/theming/contrast/max-contrast/max-contrast.scss +3 -3
  77. package/scss/theming/contrast/text-contrast/text-contrast.scss +22 -16
  78. package/scss/theming/contrast/text-contrast/text-contrast.spec.scss +57 -0
  79. package/scss/theming/create-theme/_create-theme.scss +330 -0
  80. package/scss/theming/create-theme/_create-theme.spec.scss +122 -0
  81. package/scss/theming/create-theme/_index.scss +1 -0
  82. package/scss/theming/get-font-colors/_get-font-colors.scss +36 -0
  83. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +72 -0
  84. package/scss/typography/mixins/_font-weight.scss +8 -14
  85. package/select/README.md +107 -4
  86. package/sidebar/README.md +0 -8
  87. package/sidebar/index.d.ts +3 -15
  88. package/switch/README.md +19 -27
  89. package/switch/index.d.ts +18 -48
  90. package/switch/src/switch-theme.scss +26 -18
  91. package/tabs/index.d.ts +7 -4
  92. package/tag/src/tag-theme.scss +11 -9
  93. package/textarea/README.md +35 -5
  94. package/tree/index.d.ts +0 -6
  95. package/tree/src/tree-theme.scss +0 -4
  96. package/accordion/examples/index.d.ts +0 -20
  97. package/article/examples/index.d.ts +0 -50
  98. package/breadcrumb/examples/index.d.ts +0 -10
  99. package/button/examples/index.d.ts +0 -67
  100. package/callout/examples/index.d.ts +0 -41
  101. package/card/examples/index.d.ts +0 -62
  102. package/card/src/card/raised/raised-theme.scss +0 -28
  103. package/checkbox/examples/index.d.ts +0 -32
  104. package/container/examples/index.d.ts +0 -16
  105. package/fesm2022/daffodil-design-accordion-examples.mjs +0 -50
  106. package/fesm2022/daffodil-design-accordion-examples.mjs.map +0 -1
  107. package/fesm2022/daffodil-design-article-examples.mjs +0 -134
  108. package/fesm2022/daffodil-design-article-examples.mjs.map +0 -1
  109. package/fesm2022/daffodil-design-breadcrumb-examples.mjs +0 -46
  110. package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +0 -1
  111. package/fesm2022/daffodil-design-button-examples.mjs +0 -178
  112. package/fesm2022/daffodil-design-button-examples.mjs.map +0 -1
  113. package/fesm2022/daffodil-design-callout-examples.mjs +0 -116
  114. package/fesm2022/daffodil-design-callout-examples.mjs.map +0 -1
  115. package/fesm2022/daffodil-design-card-examples.mjs +0 -168
  116. package/fesm2022/daffodil-design-card-examples.mjs.map +0 -1
  117. package/fesm2022/daffodil-design-checkbox-examples.mjs +0 -76
  118. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +0 -1
  119. package/fesm2022/daffodil-design-container-examples.mjs +0 -41
  120. package/fesm2022/daffodil-design-container-examples.mjs.map +0 -1
  121. package/fesm2022/daffodil-design-form-field-examples.mjs +0 -96
  122. package/fesm2022/daffodil-design-form-field-examples.mjs.map +0 -1
  123. package/fesm2022/daffodil-design-hero-examples.mjs +0 -121
  124. package/fesm2022/daffodil-design-hero-examples.mjs.map +0 -1
  125. package/fesm2022/daffodil-design-image-examples.mjs +0 -58
  126. package/fesm2022/daffodil-design-image-examples.mjs.map +0 -1
  127. package/fesm2022/daffodil-design-input-examples.mjs +0 -108
  128. package/fesm2022/daffodil-design-input-examples.mjs.map +0 -1
  129. package/fesm2022/daffodil-design-list-examples.mjs +0 -77
  130. package/fesm2022/daffodil-design-list-examples.mjs.map +0 -1
  131. package/fesm2022/daffodil-design-loading-icon-examples.mjs +0 -44
  132. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +0 -1
  133. package/fesm2022/daffodil-design-media-gallery-examples.mjs +0 -104
  134. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +0 -1
  135. package/fesm2022/daffodil-design-menu-examples.mjs +0 -50
  136. package/fesm2022/daffodil-design-menu-examples.mjs.map +0 -1
  137. package/fesm2022/daffodil-design-modal-examples.mjs +0 -51
  138. package/fesm2022/daffodil-design-modal-examples.mjs.map +0 -1
  139. package/fesm2022/daffodil-design-native-select-examples.mjs +0 -71
  140. package/fesm2022/daffodil-design-native-select-examples.mjs.map +0 -1
  141. package/fesm2022/daffodil-design-navbar-examples.mjs +0 -88
  142. package/fesm2022/daffodil-design-navbar-examples.mjs.map +0 -1
  143. package/fesm2022/daffodil-design-notification-examples.mjs +0 -102
  144. package/fesm2022/daffodil-design-notification-examples.mjs.map +0 -1
  145. package/fesm2022/daffodil-design-paginator-examples.mjs +0 -59
  146. package/fesm2022/daffodil-design-paginator-examples.mjs.map +0 -1
  147. package/fesm2022/daffodil-design-progress-bar-examples.mjs +0 -57
  148. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +0 -1
  149. package/fesm2022/daffodil-design-quantity-field-examples.mjs +0 -85
  150. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +0 -1
  151. package/fesm2022/daffodil-design-radio-examples.mjs +0 -34
  152. package/fesm2022/daffodil-design-radio-examples.mjs.map +0 -1
  153. package/fesm2022/daffodil-design-select-examples.mjs +0 -117
  154. package/fesm2022/daffodil-design-select-examples.mjs.map +0 -1
  155. package/fesm2022/daffodil-design-sidebar-examples.mjs +0 -109
  156. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +0 -1
  157. package/fesm2022/daffodil-design-sticky-examples.mjs +0 -25
  158. package/fesm2022/daffodil-design-sticky-examples.mjs.map +0 -1
  159. package/fesm2022/daffodil-design-switch-examples.mjs +0 -110
  160. package/fesm2022/daffodil-design-switch-examples.mjs.map +0 -1
  161. package/fesm2022/daffodil-design-tabs-examples.mjs +0 -115
  162. package/fesm2022/daffodil-design-tabs-examples.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-tag-examples.mjs +0 -125
  164. package/fesm2022/daffodil-design-tag-examples.mjs.map +0 -1
  165. package/fesm2022/daffodil-design-text-snippet-examples.mjs +0 -25
  166. package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +0 -1
  167. package/fesm2022/daffodil-design-textarea-examples.mjs +0 -66
  168. package/fesm2022/daffodil-design-textarea-examples.mjs.map +0 -1
  169. package/fesm2022/daffodil-design-toast-examples.mjs +0 -147
  170. package/fesm2022/daffodil-design-toast-examples.mjs.map +0 -1
  171. package/fesm2022/daffodil-design-tree-examples.mjs +0 -104
  172. package/fesm2022/daffodil-design-tree-examples.mjs.map +0 -1
  173. package/form-field/examples/index.d.ts +0 -18
  174. package/hero/examples/index.d.ts +0 -45
  175. package/image/examples/index.d.ts +0 -10
  176. package/input/examples/index.d.ts +0 -10
  177. package/list/examples/index.d.ts +0 -29
  178. package/loading-icon/examples/index.d.ts +0 -16
  179. package/media-gallery/examples/index.d.ts +0 -38
  180. package/menu/examples/index.d.ts +0 -20
  181. package/modal/examples/index.d.ts +0 -15
  182. package/native-select/examples/index.d.ts +0 -10
  183. package/navbar/examples/index.d.ts +0 -31
  184. package/notification/examples/index.d.ts +0 -12
  185. package/paginator/examples/index.d.ts +0 -26
  186. package/progress-bar/examples/index.d.ts +0 -10
  187. package/quantity-field/examples/index.d.ts +0 -30
  188. package/radio/examples/index.d.ts +0 -13
  189. package/select/examples/index.d.ts +0 -28
  190. package/sidebar/examples/index.d.ts +0 -10
  191. package/sticky/examples/index.d.ts +0 -10
  192. package/switch/examples/index.d.ts +0 -46
  193. package/tabs/examples/index.d.ts +0 -12
  194. package/tag/examples/index.d.ts +0 -50
  195. package/text-snippet/examples/index.d.ts +0 -10
  196. package/textarea/examples/index.d.ts +0 -10
  197. package/toast/examples/index.d.ts +0 -56
  198. package/tree/examples/index.d.ts +0 -18
  199. /package/{form-field → form}/src/error-message/error-message-theme.scss +0 -0
  200. /package/{form-field → form}/src/hint/hint-theme.scss +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-form-field.mjs","sources":["../../../libs/design/form-field/src/error-message/error-message.component.ts","../../../libs/design/form-field/src/action/action.directive.ts","../../../libs/design/form-field/src/form-field-control.ts","../../../libs/design/form-field/src/hint/hint.component.ts","../../../libs/design/form-field/src/label/label.directive.ts","../../../libs/design/form-field/src/form-field/form-field.component.ts","../../../libs/design/form-field/src/form-field/form-field.component.html","../../../libs/design/form-field/src/form-field.module.ts","../../../libs/design/form-field/src/form-field.ts","../../../libs/design/form-field/src/daffodil-design-form-field.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-error-message',\n template: '<ng-content></ng-content>',\n styleUrls: ['./error-message.component.scss'],\n host: {\n class: 'daff-error-message',\n 'aria-live': 'polite',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffErrorMessageComponent {}\n","import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffFormFieldAction]',\n})\nexport class DaffFormFieldActionDirective {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-form-field-action') class = true;\n}\n","import { NgControl } from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\n\nimport { DaffFormFieldState } from './form-field-state';\n\n/**\n *\n * The class that a form control must **implement** in order to be\n * used with the DaffFormFieldComponent.\n *\n * You may ask: \"Why are you implementing an abstract class, not extending it?\"\n * We do this so that the Angular DI container can match the class token. A typical\n * interface would be \"more accurate\" here, but since interfaces don't exist\n * in javascript, they get thrown out by the typescript compiler and cannot\n * be used for the necessary dependency injection.\n */\nexport abstract class DaffFormFieldControl<T> {\n abstract readonly controlType?: any;\n\n readonly supportsAutoLabelling?: boolean = true;\n\n abstract readonly focused: boolean;\n\n abstract readonly required: boolean;\n\n abstract readonly disabled: boolean;\n\n readonly id?: string;\n\n get raised() {\n return this.focused;\n };\n\n abstract focus(event?: Event): void;\n\n abstract readonly value: T;\n\n constructor(public ngControl: NgControl | null) {\n }\n\n get state(): DaffFormFieldState {\n return {\n focused: this.focused,\n filled: !!this.value,\n disabled: this.ngControl?.disabled ?? this.disabled,\n error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),\n valid: !this.ngControl?.errors && this.ngControl?.dirty,\n };\n }\n\n _stateChanges = new BehaviorSubject({\n focused: false,\n filled: false,\n disabled: false,\n error: false,\n valid: true,\n });\n\n stateChanges: Observable<DaffFormFieldState>;\n\n emitState(deferred = false) {\n if(deferred) {\n Promise.resolve().then(() => {\n this._stateChanges.next(this.state);\n });\n return;\n }\n\n this._stateChanges.next(this.state);\n }\n};\n","import {\n Component,\n ChangeDetectionStrategy,\n HostBinding,\n Input,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-hint',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hint.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class DaffHintComponent {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-hint') class = true;\n\n /**\n * Displays a validated hint UI.\n * */\n @Input() @HostBinding('class.validated') validated = false;\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-form-label',\n})\nexport class DaffFormFieldLabelDirective {}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ContentChild,\n AfterContentInit,\n AfterContentChecked,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Input,\n AfterViewInit,\n isDevMode,\n ElementRef,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffSkeletonableDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\n\nimport { DaffFormFieldActionDirective } from '../action/action.directive';\nimport { DaffErrorMessageComponent } from '../error-message/error-message.component';\nimport { DaffFormFieldControl } from '../form-field-control';\nimport { DaffHintComponent } from '../hint/hint.component';\nimport { DaffFormFieldLabelDirective } from '../label/label.directive';\n\nlet daffFormFieldId = 0;\n\nexport type DaffFormFieldApperanace = 'fluid' | 'fixed';\n\nenum DaffFormFieldApperanaceEnum {\n Fluid = 'fluid',\n Fixed = 'fixed',\n}\n\nexport const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';\n\n@Component({\n selector: 'daff-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n ],\n host: {\n class: 'daff-form-field',\n '[class.is-native-select]': 'isNativeSelect',\n '[class.has-prefix]': '_prefix',\n '[class.has-suffix]': '_suffix || action',\n '[class.daff-error]': 'isError',\n '[class.daff-disabled]': 'isDisabled',\n '[class.daff-valid]': 'isValid',\n '[class.daff-focused]': 'isFocused',\n '[class.daff-raised]': 'isRaised',\n '[class.fluid]': 'appearance === \"fluid\"',\n '[class.fixed]': 'appearance === \"fixed\"',\n },\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n})\nexport class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n /** @docs-private */\n get isNativeSelect() {\n return this._control.controlType === 'native-select';\n }\n\n constructor(private cd: ChangeDetectorRef, public elementRef: ElementRef) {}\n\n /** @docs-private */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /** @docs-private */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n\n /**\n * @docs-private\n *\n * The child form control that the form field manages.\n */\n @ContentChild(DaffFormFieldControl) _control: DaffFormFieldControl<unknown>;\n\n /**\n * @docs-private\n * @deprecated Deprecated in version 0.86.0. Will be removed in v1.0.0. Deprecated in version 0.89.0. Will be removed in version 0.92.0.\n */\n @ContentChild(DaffFormLabelDirective) _formLabelDirective: DaffFormLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldLabelDirective) _formFieldLabelDirective: DaffFormFieldLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldActionDirective) _action: DaffFormFieldActionDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffHintComponent) private _hint: DaffHintComponent;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffErrorMessageComponent) private _error: DaffErrorMessageComponent;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as error.\n */\n isError = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field contains any user input.\n */\n isFilled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as disabled.\n */\n isDisabled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as valid.\n */\n isValid = false;\n\n /**\n * @docs-private\n *\n * Determines whether or not the form field should display its focused state.\n */\n get isFocused() {\n return this._control?.focused;\n }\n\n /**\n * @docs-private\n */\n get isRaised() {\n return this._control?.raised || this.isFilled;\n }\n\n private _appearance: DaffFormFieldApperanace = DaffFormFieldApperanaceEnum.Fluid;\n\n /**\n * The appearance style of a form field, whether the label is fluid or fixed.\n */\n @Input()\n get appearance() {\n return this._appearance;\n }\n\n set appearance(value: DaffFormFieldApperanace) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._appearance = DaffFormFieldApperanaceEnum.Fluid;\n } else {\n this._appearance = value;\n }\n };\n\n /**\n * @docs-private\n */\n get isFixed() {\n return this._appearance === DaffFormFieldApperanaceEnum.Fixed;\n }\n\n /**\n * The unique id of the form field. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each form field is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the form field.\n */\n @Input() id = 'daff-form-field-' + ++daffFormFieldId;\n\n /**\n * @docs-private\n */\n hasHint() {\n return this._hint ? true : false;\n }\n\n /**\n * @docs-private\n */\n hintId = this.id + '-hint';\n\n /**\n * @docs-private\n */\n hasErrorMessage() {\n return this._error ? true : false;\n }\n\n /**\n * @docs-private\n */\n errorMessageId = this.id + '-error';\n\n /**\n * @docs-private\n */\n get autoLabelId() {\n return this._control.supportsAutoLabelling ? this.id : null;\n }\n\n /**\n * @docs-private\n */\n get customId() {\n return this._control.supportsAutoLabelling ? null : this.id;\n }\n\n /**\n * @docs-private\n *\n * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.\n */\n ngAfterViewInit() {\n if (isDevMode()) {\n if (!this._formFieldLabelDirective && this._control.supportsAutoLabelling && !(this._control.id)) {\n console.warn(\n `Accessibility Warning: The form field with id \"${this.id}\" uses a control that supports auto-labelling, but no <daff-form-label> component was found.\\n\\n` +\n `1. Add a <daff-form-label> component (recommended)\\n` +\n `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\\n\\n` +\n `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`,\n );\n }\n\n if(this._suffix && this._action && !this.isFixed) {\n console.warn(\n `UI consideration for form field with id \"${this.id}\":\\n\\n` + `In a fluid appearance, avoid using suffix alongside an action.`,\n );\n };\n }\n }\n\n /**\n * Validates whether or not the form field is in a \"usable\" state.\n */\n private _validateFormControl() {\n if (!this._control) {\n throw new Error(DaffFormFieldMissingControlMessage);\n }\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentInit() {\n this._validateFormControl();\n\n this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {\n this.isFilled = filled;\n this.isError = error;\n this.isDisabled = disabled;\n this.isValid = valid;\n\n this.cd.markForCheck();\n });\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentChecked() {\n this._validateFormControl();\n }\n}\n","<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>","import { NgModule } from '@angular/core';\n\nimport { DaffFormLabelModule } from '@daffodil/design';\n\nimport { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\nimport { DaffHintComponent } from './hint/hint.component';\n\n/**\n * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormLabelModule,\n ],\n exports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormLabelModule,\n ],\n})\nexport class DaffFormFieldModule { }\n","import {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\n\nimport { DaffFormFieldActionDirective } from './action/action.directive';\nimport { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\nimport { DaffHintComponent } from './hint/hint.component';\nimport { DaffFormFieldLabelDirective } from './label/label.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_FIELD_COMPONENTS = <const> [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffFormLabelDirective,\n DaffHintComponent,\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormFieldLabelDirective,\n DaffFormFieldActionDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAea,yBAAyB,CAAA;iIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,qKAR1B,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQ1B,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAVrC,SAAS;+BACE,oBAAoB,EAAA,QAAA,EACpB,2BAA2B,EAAA,IAAA,EAE/B;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,WAAW,EAAE,QAAQ;qBACtB,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,2DAAA,CAAA,EAAA;;;MCLpC,4BAA4B,CAAA;AAHzC,IAAA,WAAA,GAAA;AAIE;;AAEG;QAC0C,IAAA,CAAA,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iB;wBACjB,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,mBAAmB;AACpB,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;AACI,MAAM,0BAA0B,GAAW;IAChD,sBAAsB;IACtB,yBAAyB;IACzB,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,2BAA2B;IAC3B,4BAA4B;;;ACvB9B;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-form-field.mjs","sources":["../../../libs/design/form-field/src/action/action.directive.ts","../../../libs/design/form-field/src/form-field-control.ts","../../../libs/design/form-field/src/form-field/form-field.component.ts","../../../libs/design/form-field/src/form-field/form-field.component.html","../../../libs/design/form-field/src/form-field.module.ts","../../../libs/design/form-field/src/form-field.ts","../../../libs/design/form-field/src/daffodil-design-form-field.ts"],"sourcesContent":["import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffFormFieldAction]',\n})\nexport class DaffFormFieldActionDirective {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-form-field-action') class = true;\n}\n","import { NgControl } from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\n\nimport { DaffFormFieldState } from './form-field-state';\n\n/**\n * An abstract class that form controls must implement to be used with the DaffFormFieldComponent.\n *\n * > **Note**\n * > This is an abstract class instead of an interface to support Angular's dependency injection. Interfaces are erased during TypeScript compilation and cannot be used as DI tokens.\n *\n * > By using an abstract class, the Angular DI container can match the class token for injection.\n */\nexport abstract class DaffFormFieldControl<T> {\n /**\n * The type of the control (e.g., 'input', 'select', 'textarea').\n * Used to apply control-specific styling or behavior.\n */\n abstract readonly controlType?: any;\n\n /**\n * Whether the control supports automatic label behavior.\n * When `true`, the form field will associate the label with the control using `for` and `id` attributes.\n *\n * Defaults to `true`.\n */\n readonly supportsAutoLabelling?: boolean = true;\n\n /**\n * Whether the control currently has focus.\n */\n abstract readonly focused: boolean;\n\n /**\n * Whether the control is required for form validation.\n */\n abstract readonly required: boolean;\n\n /**\n * Whether the control is disabled.\n */\n abstract readonly disabled: boolean;\n\n /**\n * The unique identifier for the control element.\n */\n readonly id?: string;\n\n /**\n * Whether the label should be in the raised position.\n * By default, matches the focused state.\n */\n get raised() {\n return this.focused;\n };\n\n /**\n * Sets focus on the control.\n *\n * @param event - Optional event that triggers the focus.\n */\n abstract focus(event?: Event): void;\n\n /**\n * The current value of the control.\n */\n abstract readonly value: T;\n\n constructor(public ngControl: NgControl | null) {}\n\n /**\n * Computes the current state of the form field control.\n * Combines control properties and form validation state.\n */\n get state(): DaffFormFieldState {\n return {\n focused: this.focused,\n filled: !!this.value,\n disabled: this.ngControl?.disabled ?? this.disabled,\n error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),\n valid: !this.ngControl?.errors && this.ngControl?.dirty,\n };\n }\n\n _stateChanges = new BehaviorSubject({\n focused: false,\n filled: false,\n disabled: false,\n error: false,\n valid: true,\n });\n\n /**\n * Observable stream of state changes for the form field control.\n */\n stateChanges: Observable<DaffFormFieldState>;\n\n /**\n * Emits the current state.\n */\n emitState(deferred = false) {\n if(deferred) {\n Promise.resolve().then(() => {\n this._stateChanges.next(this.state);\n });\n return;\n }\n\n this._stateChanges.next(this.state);\n }\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ContentChild,\n AfterContentInit,\n AfterContentChecked,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Input,\n AfterViewInit,\n isDevMode,\n ElementRef,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffSkeletonableDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from '../action/action.directive';\nimport { DaffFormFieldControl } from '../form-field-control';\n\nlet daffFormFieldId = 0;\n\nexport type DaffFormFieldApperanace = 'fluid' | 'fixed';\n\nenum DaffFormFieldApperanaceEnum {\n Fluid = 'fluid',\n Fixed = 'fixed',\n}\n\nexport const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';\n\n@Component({\n selector: 'daff-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n ],\n host: {\n class: 'daff-form-field',\n '[class.is-native-select]': 'isNativeSelect',\n '[class.has-prefix]': '_prefix',\n '[class.has-suffix]': '_suffix || action',\n '[class.daff-error]': 'isError',\n '[class.daff-disabled]': 'isDisabled',\n '[class.daff-valid]': 'isValid',\n '[class.daff-focused]': 'isFocused',\n '[class.daff-raised]': 'isRaised',\n '[class.fluid]': 'appearance === \"fluid\"',\n '[class.fixed]': 'appearance === \"fixed\"',\n },\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n})\nexport class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n /** @docs-private */\n get isNativeSelect() {\n return this._control.controlType === 'native-select';\n }\n\n constructor(private cd: ChangeDetectorRef, public elementRef: ElementRef) {}\n\n /** @docs-private */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /** @docs-private */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n\n /**\n * @docs-private\n *\n * The child form control that the form field manages.\n */\n @ContentChild(DaffFormFieldControl) _control: DaffFormFieldControl<unknown>;\n\n /**\n * @docs-private\n * @deprecated Deprecated in version 0.86.0. Will be removed in v1.0.0. Deprecated in version 0.89.0. Will be removed in version 0.92.0.\n */\n @ContentChild(DaffFormLabelDirective) _formLabelDirective: DaffFormLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldLabelDirective) _formFieldLabelDirective: DaffFormFieldLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldActionDirective) _action: DaffFormFieldActionDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffHintComponent) private _hint: DaffHintComponent;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffErrorMessageComponent) private _error: DaffErrorMessageComponent;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as error.\n */\n isError = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field contains any user input.\n */\n isFilled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as disabled.\n */\n isDisabled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as valid.\n */\n isValid = false;\n\n /**\n * @docs-private\n *\n * Determines whether or not the form field should display its focused state.\n */\n get isFocused() {\n return this._control?.focused;\n }\n\n /**\n * @docs-private\n */\n get isRaised() {\n return this._control?.raised || this.isFilled;\n }\n\n private _appearance: DaffFormFieldApperanace = DaffFormFieldApperanaceEnum.Fluid;\n\n /**\n * The appearance style of a form field, whether the label is `fluid` or `fixed`.\n */\n @Input()\n get appearance() {\n return this._appearance;\n }\n\n set appearance(value: DaffFormFieldApperanace) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._appearance = DaffFormFieldApperanaceEnum.Fluid;\n } else {\n this._appearance = value;\n }\n };\n\n /**\n * @docs-private\n */\n get isFixed() {\n return this._appearance === DaffFormFieldApperanaceEnum.Fixed;\n }\n\n /**\n * The unique id of the form field. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each form field is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the form field.\n */\n @Input() id = 'daff-form-field-' + ++daffFormFieldId;\n\n /**\n * @docs-private\n */\n hasHint() {\n return this._hint ? true : false;\n }\n\n /**\n * @docs-private\n */\n hintId = this.id + '-hint';\n\n /**\n * @docs-private\n */\n hasErrorMessage() {\n return this._error ? true : false;\n }\n\n /**\n * @docs-private\n */\n errorMessageId = this.id + '-error';\n\n /**\n * @docs-private\n */\n get autoLabelId() {\n return this._control.supportsAutoLabelling ? this.id : null;\n }\n\n /**\n * @docs-private\n */\n get customId() {\n return this._control.supportsAutoLabelling ? null : this.id;\n }\n\n /**\n * @docs-private\n *\n * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.\n */\n ngAfterViewInit() {\n if (isDevMode()) {\n if (!this._formFieldLabelDirective && this._control.supportsAutoLabelling && !(this._control.id)) {\n console.warn(\n `Accessibility Warning: The form field with id \"${this.id}\" uses a control that supports auto-labelling, but no <daff-form-label> component was found.\\n\\n` +\n `1. Add a <daff-form-label> component (recommended)\\n` +\n `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\\n\\n` +\n `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`,\n );\n }\n\n if(this._suffix && this._action && !this.isFixed) {\n console.warn(\n `UI consideration for form field with id \"${this.id}\":\\n\\n` + `In a fluid appearance, avoid using suffix alongside an action.`,\n );\n };\n }\n }\n\n /**\n * Validates whether or not the form field is in a \"usable\" state.\n */\n private _validateFormControl() {\n if (!this._control) {\n throw new Error(DaffFormFieldMissingControlMessage);\n }\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentInit() {\n this._validateFormControl();\n\n this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {\n this.isFilled = filled;\n this.isError = error;\n this.isDisabled = disabled;\n this.isValid = valid;\n\n this.cd.markForCheck();\n });\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentChecked() {\n this._validateFormControl();\n }\n}\n","<ng-content />\n\n@if (isFixed) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action && !isFixed) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action && isFixed)) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId\"\n [attr.id]=\"customId\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control.required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>","import { NgModule } from '@angular/core';\n\nimport { DaffFormLabelModule } from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n exports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n})\nexport class DaffFormFieldModule { }\n","import {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from './action/action.directive';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_FIELD_COMPONENTS = <const> [\n DaffFormFieldComponent,\n DaffFormLabelDirective,\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormFieldActionDirective,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffErrorMessageComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAQa,4BAA4B,CAAA;AAHzC,IAAA,WAAA,GAAA;AAIE;;AAEG;QAC0C,IAAA,CAAA,KAAK,GAAG,IAAI;AAC1D,IAAA;iIALY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,8BAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA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ACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,2BAA2B;wBAC3B,mBAAmB;AACpB,qBAAA;AACF,iBAAA;;;ACfD;;AAEG;AACI,MAAM,0BAA0B,GAAW;IAChD,sBAAsB;IACtB,sBAAsB;IACtB,mBAAmB;IACnB,mBAAmB;IACnB,4BAA4B;IAC5B,iBAAiB;IACjB,2BAA2B;IAC3B,yBAAyB;;;ACzB3B;;AAEG;;;;"}
@@ -0,0 +1,62 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, Input, Directive } from '@angular/core';
3
+
4
+ class DaffErrorMessageComponent {
5
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffErrorMessageComponent, isStandalone: true, selector: "daff-error-message", host: { attributes: { "aria-live": "polite" }, classAttribute: "daff-error-message" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7
+ }
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffErrorMessageComponent, decorators: [{
9
+ type: Component,
10
+ args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', host: {
11
+ class: 'daff-error-message',
12
+ 'aria-live': 'polite',
13
+ }, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"] }]
14
+ }] });
15
+
16
+ class DaffHintComponent {
17
+ constructor() {
18
+ /**
19
+ * Displays a validated hint UI.
20
+ * */
21
+ this.validated = false;
22
+ }
23
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffHintComponent, isStandalone: true, selector: "daff-hint", inputs: { validated: "validated" }, host: { properties: { "class.validated": "validated" }, classAttribute: "daff-hint" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffHintComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
29
+ class: 'daff-hint',
30
+ '[class.validated]': 'validated',
31
+ }, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"] }]
32
+ }], propDecorators: { validated: [{
33
+ type: Input
34
+ }] } });
35
+
36
+ class DaffFormFieldLabelDirective {
37
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormFieldLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
38
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffFormFieldLabelDirective, isStandalone: true, selector: "daff-form-label", ngImport: i0 }); }
39
+ }
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormFieldLabelDirective, decorators: [{
41
+ type: Directive,
42
+ args: [{
43
+ // eslint-disable-next-line @angular-eslint/directive-selector
44
+ selector: 'daff-form-label',
45
+ }]
46
+ }] });
47
+
48
+ /**
49
+ * @docs-private
50
+ */
51
+ const DAFF_FORM_HELPER_COMPONENTS = [
52
+ DaffErrorMessageComponent,
53
+ DaffHintComponent,
54
+ DaffFormFieldLabelDirective,
55
+ ];
56
+
57
+ /**
58
+ * Generated bundle index. Do not edit.
59
+ */
60
+
61
+ export { DAFF_FORM_HELPER_COMPONENTS, DaffErrorMessageComponent, DaffFormFieldLabelDirective, DaffHintComponent };
62
+ //# sourceMappingURL=daffodil-design-form.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-design-form.mjs","sources":["../../../libs/design/form/src/error-message/error-message.component.ts","../../../libs/design/form/src/hint/hint.component.ts","../../../libs/design/form/src/label/label.directive.ts","../../../libs/design/form/src/form.ts","../../../libs/design/form/src/daffodil-design-form.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-error-message',\n template: '<ng-content></ng-content>',\n styleUrls: ['./error-message.component.scss'],\n host: {\n class: 'daff-error-message',\n 'aria-live': 'polite',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffErrorMessageComponent {}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-hint',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hint.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'daff-hint',\n '[class.validated]': 'validated',\n },\n})\nexport class DaffHintComponent {\n /**\n * Displays a validated hint UI.\n * */\n @Input() validated = false;\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-form-label',\n})\nexport class DaffFormFieldLabelDirective {}\n","import { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffHintComponent } from './hint/hint.component';\nimport { DaffFormFieldLabelDirective } from './label/label.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_HELPER_COMPONENTS = <const> [\n DaffErrorMessageCom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EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQ1B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,YACX,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,mBAAmB,EAAE,WAAW;AACjC,qBAAA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA;8BAMQ,SAAS,EAAA,CAAA;sBAAjB;;;MCdU,2BAA2B,CAAA;iIAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAJvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,iBAAiB;AAC5B,iBAAA;;;ACDD;;AAEG;AACI,MAAM,2BAA2B,GAAW;IACjD,yBAAyB;IACzB,iBAAiB;IACjB,2BAA2B;;;ACV7B;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
- import { CommonModule } from '@angular/common';
1
+ import { NgOptimizedImage, CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Output, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import { input, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/platform-browser';
5
5
  import * as i2 from '@daffodil/design';
6
6
  import { DaffSkeletonableDirective } from '@daffodil/design';
@@ -73,6 +73,11 @@ class DaffImageComponent {
73
73
  }
74
74
  constructor(sanitizer) {
75
75
  this.sanitizer = sanitizer;
76
+ /**
77
+ * Whether the image should be treated as a priority image for loading.
78
+ * Priority images are loaded eagerly and not lazy-loaded.
79
+ */
80
+ this.priority = input(false, ...(ngDevMode ? [{ debugName: "priority" }] : []));
76
81
  /**
77
82
  * Emits when the image has loaded.
78
83
  */
@@ -98,7 +103,7 @@ class DaffImageComponent {
98
103
  return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);
99
104
  }
100
105
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffImageComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
101
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffImageComponent, isStandalone: true, selector: "daff-image", inputs: { src: "src", alt: "alt", width: "width", height: "height" }, outputs: { load: "load" }, host: { properties: { "style.max-width": "width + \"px\"" } }, hostDirectives: [{ directive: i2.DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "<img class=\"daff-image\" [src]=\"src\" [alt]=\"alt\" (load)=\"load.emit\" loading=\"lazy\" [style.aspectRatio]=\"_aspectRatio\"/>", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host.daff-skeleton{display:flex;position:relative;height:100%;width:100%;border-radius:0}:host.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:100%;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}:host.daff-skeleton img{opacity:0}:host img{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
106
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: DaffImageComponent, isStandalone: true, selector: "daff-image", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: false, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: false, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: false, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { load: "load" }, host: { properties: { "style.max-width": "width + \"px\"", "style.aspect-ratio": "_aspectRatio" } }, hostDirectives: [{ directive: i2.DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "<img class=\"daff-image\"\n\t[ngSrc]=\"src\"\n\t[alt]=\"alt\"\n\tfill\n\t[priority]=\"priority\"\n\t(load)=\"load.emit\" />", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host.daff-skeleton{display:flex;position:relative;height:100%;width:100%;border-radius:0}:host.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:100%;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}:host.daff-skeleton img{opacity:0}:host img{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
102
107
  }
103
108
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffImageComponent, decorators: [{
104
109
  type: Component,
@@ -109,7 +114,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
109
114
  },
110
115
  ], host: {
111
116
  '[style.max-width]': 'width + "px"',
112
- }, template: "<img class=\"daff-image\" [src]=\"src\" [alt]=\"alt\" (load)=\"load.emit\" loading=\"lazy\" [style.aspectRatio]=\"_aspectRatio\"/>", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host.daff-skeleton{display:flex;position:relative;height:100%;width:100%;border-radius:0}:host.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:100%;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}:host.daff-skeleton img{opacity:0}:host img{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"] }]
117
+ '[style.aspect-ratio]': '_aspectRatio',
118
+ }, imports: [
119
+ NgOptimizedImage,
120
+ ], template: "<img class=\"daff-image\"\n\t[ngSrc]=\"src\"\n\t[alt]=\"alt\"\n\tfill\n\t[priority]=\"priority\"\n\t(load)=\"load.emit\" />", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host.daff-skeleton{display:flex;position:relative;height:100%;width:100%;border-radius:0}:host.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:100%;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}:host.daff-skeleton img{opacity:0}:host img{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"] }]
113
121
  }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { src: [{
114
122
  type: Input
115
123
  }], alt: [{
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-image.mjs","sources":["../../../libs/design/image/src/image/image.component.ts","../../../libs/design/image/src/image/image.component.html","../../../libs/design/image/src/image.module.ts","../../../libs/design/image/src/image.ts","../../../libs/design/image/src/daffodil-design-image.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n Input,\n EventEmitter,\n OnInit,\n Output,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n} from '@angular/platform-browser';\n\nimport { DaffSkeletonableDirective } from '@daffodil/design';\n\nconst validateProperty = (object: Record<string, any>, prop: string) => {\n if (object[prop] === null || object[prop] === undefined || object[prop] === '') {\n throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);\n }\n};\n\nconst validateProperties = (object: Record<string, any>, props: string[]) => {\n const invalidProps = props.filter(prop => {\n try {\n validateProperty(object, prop);\n } catch(e) {\n return true;\n }\n return false;\n });\n\n if (invalidProps.length) {\n throw new Error(`DaffImageComponent must have the ${invalidProps.join(',')} attributes defined.`);\n }\n};\n\n@Component({\n selector: 'daff-image',\n templateUrl: './image.component.html',\n styleUrls: ['./image.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n '[style.max-width]': 'width + \"px\"',\n },\n})\nexport class DaffImageComponent implements OnInit {\n private _src: string;\n\n /**\n * The URL of the image.\n */\n @Input()\n get src(): string {\n return this._src;\n }\n set src(value: string) {\n this._src = value;\n validateProperty(this, 'src');\n }\n\n private _alt: string;\n\n /**\n * The alternate text for the image.\n */\n @Input()\n get alt(): string {\n return this._alt;\n }\n set alt(value: string) {\n this._alt = value;\n validateProperty(this, 'alt');\n }\n\n private _width: number;\n\n /**\n * The width of the image.\n */\n @Input()\n get width(): number {\n return this._width;\n }\n set width(value: number) {\n this._width = value;\n validateProperty(this, 'width');\n }\n\n private _height: number;\n\n /**\n * The height of the image.\n */\n @Input()\n get height(): number {\n return this._height;\n }\n set height(value: number) {\n this._height = value;\n validateProperty(this, 'height');\n }\n\n /**\n * Emits when the image has loaded.\n */\n // TODO: rename event to not collide with native event (unless that's intentional)\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() load: EventEmitter<void> = new EventEmitter();\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n validateProperties(this, ['src', 'alt', 'width', 'height']);\n }\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n get _paddingTop(): any {\n if (!this.height || !this.width ) {\n return undefined;\n }\n\n return this.sanitizer.bypassSecurityTrustStyle('calc(' + this.height + ' / ' + this.width + ' * 100%)');\n }\n\n /**\n * @docs-private\n *\n * The aspect ratio of an image, based on the width and height set by the user.\n */\n get _aspectRatio(): SafeStyle {\n return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);\n }\n}\n","<img class=\"daff-image\" [src]=\"src\" [alt]=\"alt\" (load)=\"load.emit\" loading=\"lazy\" [style.aspectRatio]=\"_aspectRatio\"/>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffImageComponent } from './image/image.component';\n\n/**\n * @deprecated in favor of {@link DAFF_IMAGE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n * */\n@NgModule({\n imports: [\n CommonModule,\n DaffImageComponent,\n ],\n exports: [\n DaffImageComponent,\n ],\n})\nexport class DaffImageModule { }\n","import { DaffImageComponent } from './image/image.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_IMAGE_COMPONENTS = <const> [\n DaffImageComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAeA,MAAM,gBAAgB,GAAG,CAAC,MAA2B,EAAE,IAAY,KAAI;IACrE,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;AAC9E,QAAA,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAA,WAAA,CAAa,CAAC;IAC9E;AACF,CAAC;AAED,MAAM,kBAAkB,GAAG,CAAC,MAA2B,EAAE,KAAe,KAAI;IAC1E,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,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AAO,EAAE;wBACP,kBAAkB;AACnB,qBAAA;AACF,iBAAA;;;ACdD;;AAEG;AACI,MAAM,qBAAqB,GAAW;IAC3C,kBAAkB;;;ACNpB;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-image.mjs","sources":["../../../libs/design/image/src/image/image.component.ts","../../../libs/design/image/src/image/image.component.html","../../../libs/design/image/src/image.module.ts","../../../libs/design/image/src/image.ts","../../../libs/design/image/src/daffodil-design-image.ts"],"sourcesContent":["import { NgOptimizedImage } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n Input,\n EventEmitter,\n OnInit,\n Output,\n input,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n} from '@angular/platform-browser';\n\nimport { DaffSkeletonableDirective } from '@daffodil/design';\n\nconst validateProperty = (object: Record<string, any>, prop: string) => {\n if (object[prop] === null || object[prop] === undefined || object[prop] === '') {\n throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);\n }\n};\n\nconst validateProperties = (object: Record<string, any>, props: string[]) => {\n const invalidProps = props.filter(prop => {\n try {\n validateProperty(object, prop);\n } catch(e) {\n return true;\n }\n return false;\n });\n\n if (invalidProps.length) {\n throw new Error(`DaffImageComponent must have the ${invalidProps.join(',')} attributes defined.`);\n }\n};\n\n@Component({\n selector: 'daff-image',\n templateUrl: './image.component.html',\n styleUrls: ['./image.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n '[style.max-width]': 'width + \"px\"',\n '[style.aspect-ratio]': '_aspectRatio',\n },\n imports: [\n NgOptimizedImage,\n ],\n})\nexport class DaffImageComponent implements OnInit {\n private _src: string;\n\n /**\n * The URL of the image.\n */\n @Input()\n get src(): string {\n return this._src;\n }\n set src(value: string) {\n this._src = value;\n validateProperty(this, 'src');\n }\n\n private _alt: string;\n\n /**\n * The alternate text for the image.\n */\n @Input()\n get alt(): string {\n return this._alt;\n }\n set alt(value: string) {\n this._alt = value;\n validateProperty(this, 'alt');\n }\n\n private _width: number;\n\n /**\n * The width of the image.\n */\n @Input()\n get width(): number {\n return this._width;\n }\n set width(value: number) {\n this._width = value;\n validateProperty(this, 'width');\n }\n\n private _height: number;\n\n /**\n * The height of the image.\n */\n @Input()\n get height(): number {\n return this._height;\n }\n set height(value: number) {\n this._height = value;\n validateProperty(this, 'height');\n }\n\n /**\n * Whether the image should be treated as a priority image for loading.\n * Priority images are loaded eagerly and not lazy-loaded.\n */\n priority = input(false);\n\n /**\n * Emits when the image has loaded.\n */\n // TODO: rename event to not collide with native event (unless that's intentional)\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() load: EventEmitter<void> = new EventEmitter();\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n validateProperties(this, ['src', 'alt', 'width', 'height']);\n }\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n get _paddingTop(): any {\n if (!this.height || !this.width ) {\n return undefined;\n }\n\n return this.sanitizer.bypassSecurityTrustStyle('calc(' + this.height + ' / ' + this.width + ' * 100%)');\n }\n\n /**\n * @docs-private\n *\n * The aspect ratio of an image, based on the width and height set by the user.\n */\n get _aspectRatio(): SafeStyle {\n return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);\n }\n}\n","<img class=\"daff-image\"\n\t[ngSrc]=\"src\"\n\t[alt]=\"alt\"\n\tfill\n\t[priority]=\"priority\"\n\t(load)=\"load.emit\" />","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffImageComponent } from './image/image.component';\n\n/**\n * @deprecated in favor of {@link DAFF_IMAGE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n * */\n@NgModule({\n imports: [\n CommonModule,\n DaffImageComponent,\n ],\n exports: [\n DaffImageComponent,\n ],\n})\nexport class DaffImageModule { }\n","import { DaffImageComponent } from './image/image.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_IMAGE_COMPONENTS = <const> [\n DaffImageComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBA,MAAM,gBAAgB,GAAG,CAAC,MAA2B,EAAE,IAAY,KAAI;IACrE,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;AAC9E,QAAA,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAA,WAAA,CAAa,CAAC;IAC9E;AACF,CAAC;AAED,MAAM,kBAAkB,GAAG,CAAC,MAA2B,EAAE,KAAe,KAAI;IAC1E,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,IAAG;AACvC,QAAA,IAAI;AACF,YAAA,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC;QAChC;QAAE,OAAM,CAAC,EAAE;AACT,YAAA,OAAO,IAAI;QACb;AACA,QAAA,OAAO,KAAK;AACd,IAAA,CAAC,CAAC;AAEF,IAAA,IAAI,YAAY,CAAC,MAAM,EAAE;AACvB,QAAA,MAAM,IAAI,KAAK,CAAC,CAAA,iCAAA,EAAoC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,oBAAA,CAAsB,CAAC;IACnG;AACF,CAAC;MAqBY,kBAAkB,CAAA;AAG7B;;AAEG;AACH,IAAA,IACI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;IAClB;IACA,IAAI,GAAG,CAAC,KAAa,EAAA;AACnB,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK;AACjB,QAAA,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC;IAC/B;AAIA;;AAEG;AACH,IAAA,IACI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;IAClB;IACA,IAAI,GAAG,CAAC,KAAa,EAAA;AACnB,QAAA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AAEK;MAUQ,eAAe,CAAA;iIAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPxB,YAAY;AACZ,YAAA,kBAAkB,aAGlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGT,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPxB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAOH,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;AACnB,qBAAA;AACF,iBAAA;;;ACdD;;AAEG;AACI,MAAM,qBAAqB,GAAW;IAC3C,kBAAkB;;;ACNpB;;AAEG;;;;"}
@@ -4,27 +4,16 @@ import { GlobalPositionStrategy, OverlayModule } from '@angular/cdk/overlay';
4
4
  import * as i4 from '@angular/cdk/portal';
5
5
  import { ComponentPortal, PortalModule, CdkPortalOutlet } from '@angular/cdk/portal';
6
6
  import * as i0 from '@angular/core';
7
- import { Injector, Injectable, EventEmitter, HostListener, HostBinding, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, Optional, Directive, Input, NgModule } from '@angular/core';
7
+ import { Injector, Injectable, signal, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, Optional, Directive, Input, NgModule } from '@angular/core';
8
8
  import { Subject } from 'rxjs';
9
+ import { take, delay } from 'rxjs/operators';
9
10
  import * as i3 from '@daffodil/design';
10
11
  import { daffFocusableElementsSelector, DaffOpenableDirective } from '@daffodil/design';
11
- import { trigger, state, transition, style, animate } from '@angular/animations';
12
- import { take } from 'rxjs/operators';
13
12
  import { CommonModule } from '@angular/common';
14
13
  import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
15
14
  import { DaffIconButtonComponent, DaffButtonModule } from '@daffodil/design/button';
16
15
  import { faXmark } from '@fortawesome/free-solid-svg-icons';
17
16
 
18
- const daffFadeAnimations = {
19
- fade: trigger('fade', [
20
- state('open', style({ opacity: 1 })),
21
- state('closed', style({ opacity: 0 })),
22
- transition('open <=> closed', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
23
- ]),
24
- };
25
-
26
- const getAnimationState = (open) => open ? 'open' : 'closed';
27
-
28
17
  class DaffModalService {
29
18
  constructor(overlay) {
30
19
  this.overlay = overlay;
@@ -44,12 +33,24 @@ class DaffModalService {
44
33
  _attachModalContent(component, modal) {
45
34
  modal.instance.attachContent(new ComponentPortal(component));
46
35
  }
47
- _createOverlayRef() {
36
+ _createPositionStrategy(position) {
37
+ // Horizontal position is always center
38
+ const strategy = new GlobalPositionStrategy().centerHorizontally();
39
+ // Handle vertical positioning
40
+ if (position?.vertical === 'top') {
41
+ strategy.top(position.offsetTop ?? '15vh');
42
+ }
43
+ else {
44
+ // Default to center
45
+ strategy.centerVertically();
46
+ }
47
+ return strategy;
48
+ }
49
+ _createOverlayRef(config) {
50
+ const positionStrategy = this._createPositionStrategy(config?.position);
48
51
  return this.overlay.create({
49
52
  hasBackdrop: true,
50
- positionStrategy: new GlobalPositionStrategy()
51
- .centerHorizontally()
52
- .centerVertically(),
53
+ positionStrategy,
53
54
  scrollStrategy: this.overlay.scrollStrategies.block(),
54
55
  });
55
56
  }
@@ -60,9 +61,14 @@ class DaffModalService {
60
61
  this._modals.delete(modal.modal.instance);
61
62
  modal.overlay.dispose();
62
63
  }
64
+ _closeAllModals() {
65
+ const modals = Array.from(this._modals.values());
66
+ modals.forEach((modal) => this.close(modal.modal.instance));
67
+ }
63
68
  open(component, configuration) {
69
+ this._closeAllModals();
64
70
  const config = { ...this.defaultConfiguration, ...configuration };
65
- const _ref = this._createOverlayRef();
71
+ const _ref = this._createOverlayRef(config);
66
72
  const _modal = this._attachModal(_ref);
67
73
  const _attachedModal = this._attachModalContent(component, _modal);
68
74
  if (configuration?.ariaLabelledBy) {
@@ -81,10 +87,10 @@ class DaffModalService {
81
87
  return modal.modal.instance;
82
88
  }
83
89
  close(component) {
84
- component.hide();
85
90
  const modal = this._modals.get(component);
86
91
  modal.overlay.detachBackdrop();
87
- component.closedAnimationCompleted$.pipe(take(1)).subscribe((e) => this._removeModal(modal));
92
+ component.closedAnimationCompleted$.pipe(take(1)).subscribe(() => this._removeModal(modal));
93
+ component.hide();
88
94
  }
89
95
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffModalService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
90
96
  /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffModalService }); }
@@ -93,7 +99,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
93
99
  type: Injectable
94
100
  }], ctorParameters: () => [{ type: i1.Overlay }] });
95
101
 
102
+ /* eslint-disable quote-props */
96
103
  class DaffModalComponent {
104
+ /**
105
+ * @docs-private
106
+ *
107
+ * By default, the `aria-labelledby` of the modal is set to the `id` of the modal title.
108
+ */
97
109
  get ariaLabelledBy() {
98
110
  return this._ariaLabelledBy;
99
111
  }
@@ -113,11 +125,8 @@ class DaffModalComponent {
113
125
  this.openDirective = openDirective;
114
126
  this._focusStack = _focusStack;
115
127
  this.changeDetector = changeDetector;
128
+ this.closing = signal(false, ...(ngDevMode ? [{ debugName: "closing" }] : []));
116
129
  this._ariaLabelledBy = null;
117
- /**
118
- * Event fired when the close animation is completed.
119
- */
120
- this.animationCompleted = new EventEmitter();
121
130
  /**
122
131
  * Private subject for closed animation completion events.
123
132
  */
@@ -125,7 +134,7 @@ class DaffModalComponent {
125
134
  /**
126
135
  * Observable that emits when the close animation is completed.
127
136
  */
128
- this.closedAnimationCompleted$ = this._closedAnimationCompleted.asObservable();
137
+ this.closedAnimationCompleted$ = this._closedAnimationCompleted.asObservable().pipe(delay(300));
129
138
  this.openDirective.stateless = false;
130
139
  }
131
140
  /**
@@ -151,52 +160,46 @@ class DaffModalComponent {
151
160
  }
152
161
  }
153
162
  /**
163
+ * @docs-private
164
+ *
154
165
  * Helper method to attach portable content to modal.
155
166
  */
156
167
  attachContent(portal) {
157
168
  const attachContent = this._portalOutlet.attachComponentPortal(portal);
158
169
  return attachContent;
159
170
  }
160
- /** Animation hook that controls the entrance and exit animations of the modal. */
161
- /**
162
- * @docs-private
163
- */
164
- get fadeState() {
165
- return getAnimationState(this.openDirective.open);
166
- }
167
171
  /**
168
- * Animation event that can used to hook into when
169
- * animations are fully completed. We use this in the DaffModalService
170
- * to determine when to actually remove the dynamically rendered element from the DOM
171
- * so that the animation does not clip as the element is removed.
172
+ * Tracks the open state of the modal.
172
173
  */
173
- animationDone(e) {
174
- this.animationCompleted.emit(e);
175
- if (e.toState === 'closed') {
176
- this._focusStack.pop();
177
- this._closedAnimationCompleted.next(e);
178
- this._closedAnimationCompleted.complete();
179
- }
180
- }
181
174
  get open() {
182
175
  return this.openDirective.open;
183
176
  }
184
177
  /**
185
- * Reveals the modal
178
+ * @docs-private
179
+ *
180
+ * Reveals the modal.
186
181
  */
187
182
  reveal() {
188
183
  this.openDirective.reveal();
189
184
  this.changeDetector.markForCheck();
190
185
  }
191
186
  /**
192
- * Hides the modal
187
+ * @docs-private
188
+ *
189
+ * Hides the modal.
193
190
  */
194
191
  hide() {
195
192
  this.openDirective.hide();
193
+ this.closing.set(true);
194
+ this._closedAnimationCompleted.next(true);
195
+ this._focusTrap?.destroy();
196
+ this._focusStack.pop();
196
197
  this.changeDetector.markForCheck();
197
198
  }
198
199
  /**
199
- * Toggles the visibility of the modal
200
+ * @docs-private
201
+ *
202
+ * Toggles the visibility of the modal.
200
203
  */
201
204
  toggle() {
202
205
  this.openDirective.toggle();
@@ -209,7 +212,7 @@ class DaffModalComponent {
209
212
  this._closedAnimationCompleted.complete();
210
213
  }
211
214
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffModalComponent, deps: [{ token: DaffModalService }, { token: i2.ConfigurableFocusTrapFactory }, { token: i0.ElementRef }, { token: i3.DaffOpenableDirective }, { token: i3.DaffFocusStackService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
212
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffModalComponent, isStandalone: true, selector: "daff-modal", host: { attributes: { "role": "dialog", "aria-modal": "true" }, listeners: { "keydown.escape": "onEscape()", "@fade.done": "animationDone($event)" }, properties: { "attr.aria-labelledby": "ariaLabelledBy", "@fade": "this.fadeState" }, classAttribute: "daff-modal" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], hostDirectives: [{ directive: i3.DaffOpenableDirective, outputs: ["toggled", "toggled"] }], ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".daff-modal{display:flex;flex-direction:column;justify-content:space-between;border-radius:.25rem;max-height:90vh;max-width:90vw;overflow:hidden;z-index:3}@media (min-width: 480px){.daff-modal{max-height:80vh;max-width:80vw}}.daff-modal>*{display:inherit;flex-direction:inherit;justify-content:inherit;border-radius:inherit;max-height:inherit;max-width:inherit;overflow:inherit;z-index:inherit}@media (min-width: 480px){.daff-modal>*{max-height:inherit;max-width:inherit}}.daff-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.5rem;position:relative}.daff-modal-header .daff-modal-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem;font-weight:500;line-height:1.5rem;margin:0;padding:0 2rem 0 0}.daff-modal-header__dismiss-button{position:absolute;right:7px;top:12px}.daff-modal-content{display:block;flex-grow:1;max-height:60vh;overflow-y:auto;padding:1.5rem}.daff-modal-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;padding:1.5rem}.daff-modal-content+.daff-modal-actions{padding:0 1.5rem 1.5rem}.daff-modal-header+.daff-modal-content{padding-top:0}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: OverlayModule }], animations: [daffFadeAnimations.fade], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
215
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffModalComponent, isStandalone: true, selector: "daff-modal", host: { attributes: { "role": "dialog", "aria-modal": "true" }, listeners: { "keydown.escape": "onEscape()" }, properties: { "attr.aria-labelledby": "ariaLabelledBy", "animate.enter": "\"opening\"", "class.closing": "closing()" }, classAttribute: "daff-modal" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], hostDirectives: [{ directive: i3.DaffOpenableDirective, outputs: ["toggled", "toggled"] }], ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".daff-modal{display:flex;flex-direction:column;justify-content:space-between;border-radius:.25rem;max-height:90vh;max-width:90vw;overflow:hidden;z-index:3}.daff-modal.opening{animation:opening .3s}@keyframes opening{0%{opacity:0}to{opacity:1}}.daff-modal.closing{opacity:0;animation:closing .3s}@keyframes closing{0%{opacity:1}to{opacity:0}}@media (min-width: 480px){.daff-modal{max-height:80vh;max-width:80vw}}.daff-modal>*{display:inherit;flex-direction:inherit;justify-content:inherit;border-radius:inherit;max-height:inherit;max-width:inherit;overflow:inherit;z-index:inherit}@media (min-width: 480px){.daff-modal>*{max-height:inherit;max-width:inherit}}.daff-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.5rem;position:relative}.daff-modal-header .daff-modal-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem;font-weight:500;line-height:1.5rem;margin:0;padding:0 2rem 0 0}.daff-modal-header__dismiss-button{position:absolute;right:7px;top:12px}.daff-modal-content{display:block;flex-grow:1;max-height:60vh;overflow-y:auto;padding:1.5rem}.daff-modal-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;padding:1.5rem}.daff-modal-content+.daff-modal-actions{padding:0 1.5rem 1.5rem}.daff-modal-header+.daff-modal-content{padding-top:0}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: OverlayModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
213
216
  }
214
217
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffModalComponent, decorators: [{
215
218
  type: Component,
@@ -222,19 +225,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
222
225
  'aria-modal': 'true',
223
226
  '[attr.aria-labelledby]': 'ariaLabelledBy',
224
227
  '(keydown.escape)': 'onEscape()',
225
- }, animations: [daffFadeAnimations.fade], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
228
+ '[animate.enter]': '"opening"',
229
+ '[class.closing]': 'closing()',
230
+ }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
226
231
  PortalModule,
227
232
  OverlayModule,
228
- ], template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".daff-modal{display:flex;flex-direction:column;justify-content:space-between;border-radius:.25rem;max-height:90vh;max-width:90vw;overflow:hidden;z-index:3}@media (min-width: 480px){.daff-modal{max-height:80vh;max-width:80vw}}.daff-modal>*{display:inherit;flex-direction:inherit;justify-content:inherit;border-radius:inherit;max-height:inherit;max-width:inherit;overflow:inherit;z-index:inherit}@media (min-width: 480px){.daff-modal>*{max-height:inherit;max-width:inherit}}.daff-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.5rem;position:relative}.daff-modal-header .daff-modal-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem;font-weight:500;line-height:1.5rem;margin:0;padding:0 2rem 0 0}.daff-modal-header__dismiss-button{position:absolute;right:7px;top:12px}.daff-modal-content{display:block;flex-grow:1;max-height:60vh;overflow-y:auto;padding:1.5rem}.daff-modal-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;padding:1.5rem}.daff-modal-content+.daff-modal-actions{padding:0 1.5rem 1.5rem}.daff-modal-header+.daff-modal-content{padding-top:0}\n"] }]
233
+ ], template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".daff-modal{display:flex;flex-direction:column;justify-content:space-between;border-radius:.25rem;max-height:90vh;max-width:90vw;overflow:hidden;z-index:3}.daff-modal.opening{animation:opening .3s}@keyframes opening{0%{opacity:0}to{opacity:1}}.daff-modal.closing{opacity:0;animation:closing .3s}@keyframes closing{0%{opacity:1}to{opacity:0}}@media (min-width: 480px){.daff-modal{max-height:80vh;max-width:80vw}}.daff-modal>*{display:inherit;flex-direction:inherit;justify-content:inherit;border-radius:inherit;max-height:inherit;max-width:inherit;overflow:inherit;z-index:inherit}@media (min-width: 480px){.daff-modal>*{max-height:inherit;max-width:inherit}}.daff-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.5rem;position:relative}.daff-modal-header .daff-modal-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem;font-weight:500;line-height:1.5rem;margin:0;padding:0 2rem 0 0}.daff-modal-header__dismiss-button{position:absolute;right:7px;top:12px}.daff-modal-content{display:block;flex-grow:1;max-height:60vh;overflow-y:auto;padding:1.5rem}.daff-modal-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;padding:1.5rem}.daff-modal-content+.daff-modal-actions{padding:0 1.5rem 1.5rem}.daff-modal-header+.daff-modal-content{padding-top:0}\n"] }]
229
234
  }], ctorParameters: () => [{ type: DaffModalService }, { type: i2.ConfigurableFocusTrapFactory }, { type: i0.ElementRef }, { type: i3.DaffOpenableDirective }, { type: i3.DaffFocusStackService }, { type: i0.ChangeDetectorRef }], propDecorators: { _portalOutlet: [{
230
235
  type: ViewChild,
231
236
  args: [CdkPortalOutlet, { static: true }]
232
- }], fadeState: [{
233
- type: HostBinding,
234
- args: ['@fade']
235
- }], animationDone: [{
236
- type: HostListener,
237
- args: ['@fade.done', ['$event']]
238
237
  }] } });
239
238
 
240
239
  /* eslint-disable quote-props */