@daffodil/design 0.94.1 → 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 +1 @@
1
- {"version":3,"file":"daffodil-design-hero.mjs","sources":["../../../libs/design/hero/src/hero/hero.component.ts","../../../libs/design/hero/src/hero-body/hero-body.directive.ts","../../../libs/design/hero/src/hero-icon/hero-icon.directive.ts","../../../libs/design/hero/src/hero-subtitle/hero-subtitle.directive.ts","../../../libs/design/hero/src/hero-tagline/hero-tagline.directive.ts","../../../libs/design/hero/src/hero-title/hero-title.directive.ts","../../../libs/design/hero/src/hero.module.ts","../../../libs/design/hero/src/hero.ts","../../../libs/design/hero/src/daffodil-design-hero.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport {\n DaffColorableDirective,\n DaffCompactableDirective,\n DaffArticleEncapsulatedDirective,\n DaffManageContainerLayoutDirective,\n DaffTextAlignableDirective,\n} from '@daffodil/design';\n\n/**\n * Hero is a top level container designed to be large and captivating.\n * It should be used only once per page, typically as the first component\n * to introduce the page’s main purpose or message.\n *\n * @example\n * ```html\n * <daff-hero>\n * <div daffHeroIcon>\n * <img src=\"assets/summer-sale-icon.svg\" alt=\"Summer sale icon\" />\n * </div>\n * <div daffHeroTagline>Limited Time Offer</div>\n * <h1 daffHeroTitle>Summer Collection Sale</h1>\n * <p daffHeroSubtitle>Up to 50% off select items through July 31</p>\n * <div daffHeroBody>\n * <button daff-button color=\"secondary\">Shop the sale</button>\n * <button daff-button color=\"theme\">Learn more</button>\n * </div>\n * </daff-hero>\n * ```\n */\n@Component({\n selector: 'daff-hero',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hero.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n { directive: DaffManageContainerLayoutDirective },\n {\n directive: DaffTextAlignableDirective,\n inputs: ['textAlignment'],\n },\n {\n directive: DaffCompactableDirective,\n inputs: ['compact'],\n },\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n ],\n host: {\n 'class': 'daff-hero',\n },\n})\nexport class DaffHeroComponent {\n constructor(private textAlignable: DaffTextAlignableDirective) {\n this.textAlignable.defaultAlignment = 'left';\n }\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Body is a flexible wrapper for additional components or custom layouts.\n * It's unstyled except for spacing, allowing for a ton of control and customization.\n * It should only be used once per hero.\n *\n * @example\n * ```html\n * <div daffHeroBody>Custom content</div>\n * ```\n */\n@Directive({\n selector: '[daffHeroBody]',\n host: {\n 'class': 'daff-hero__body',\n },\n})\n\nexport class DaffHeroBodyDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Icon is used to display a visual or branding element. Avoid using this for interactive or actionable icons.\n *\n * @example\n * ```html\n * <div daffHeroIcon>\n * <img src=\"assets/summer-sale-icon.svg\" alt=\"Summer sale icon\" />\n </div>\n * ```\n */\n@Directive({\n selector: '[daffHeroIcon]',\n host: {\n 'class': 'daff-hero__icon',\n },\n})\n\nexport class DaffHeroIconDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Subtitle is a secondary descriptive text displayed beneath the title.\n *\n * @example\n * ```html\n * <p daffHeroSubtitle>Up to 50% off select items through July 31</p>\n * ```\n */\n@Directive({\n selector: '[daffHeroSubtitle]',\n host: {\n 'class': 'daff-hero__subtitle',\n },\n})\n\nexport class DaffHeroSubtitleDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Tagline is a short, memorable phrase that complements the title and provides quick context.\n *\n * @example\n * ```html\n * <div daffHeroTagline>Limited Time Offer</div>\n * ```\n */\n@Directive({\n selector: '[daffHeroTagline]',\n host: {\n 'class': 'daff-hero__tagline',\n },\n})\n\nexport class DaffHeroTaglineDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Title is the primary heading for the hero.\n *\n * @example\n * ```html\n * <h1 daffHeroTitle>Summer Collection Sale</h1>\n * ```\n */\n@Directive({\n selector: '[daffHeroTitle]',\n host: {\n 'class': 'daff-hero__title',\n },\n})\n\nexport class DaffHeroTitleDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffHeroComponent } from './hero/hero.component';\nimport { DaffHeroBodyDirective } from './hero-body/hero-body.directive';\nimport { DaffHeroIconDirective } from './hero-icon/hero-icon.directive';\nimport { DaffHeroSubtitleDirective } from './hero-subtitle/hero-subtitle.directive';\nimport { DaffHeroTaglineDirective } from './hero-tagline/hero-tagline.directive';\nimport { DaffHeroTitleDirective } from './hero-title/hero-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_HERO_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n * */\n@NgModule({\n imports: [\n CommonModule,\n DaffHeroComponent,\n DaffHeroIconDirective,\n DaffHeroTaglineDirective,\n DaffHeroTitleDirective,\n DaffHeroSubtitleDirective,\n DaffHeroBodyDirective,\n ],\n exports: [\n DaffHeroComponent,\n DaffHeroIconDirective,\n DaffHeroTaglineDirective,\n DaffHeroTitleDirective,\n DaffHeroSubtitleDirective,\n DaffHeroBodyDirective,\n ],\n})\nexport class DaffHeroModule { }\n","import { DaffHeroComponent } from './hero/hero.component';\nimport { DaffHeroBodyDirective } from './hero-body/hero-body.directive';\nimport { DaffHeroIconDirective } from './hero-icon/hero-icon.directive';\nimport { DaffHeroSubtitleDirective } from './hero-subtitle/hero-subtitle.directive';\nimport { DaffHeroTaglineDirective } from './hero-tagline/hero-tagline.directive';\nimport { DaffHeroTitleDirective } from './hero-title/hero-title.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_HERO_COMPONENTS = <const> [\n DaffHeroComponent,\n DaffHeroIconDirective,\n DaffHeroTaglineDirective,\n DaffHeroTitleDirective,\n DaffHeroSubtitleDirective,\n DaffHeroBodyDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAeA;;;;;;;;;;;;;;;;;;;;AAoBG;MA2BU,iBAAiB,CAAA;AAC5B,IAAA,WAAA,CAAoB,aAAyC,EAAA;QAAzC,IAAA,CAAA,aAAa,GAAb,aAAa;AAC/B,QAAA,IAAI,CAAC,aAAa,CAAC,gBAAgB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1C,iBAAiB;IACjB,qBAAqB;IACrB,wBAAwB;IACxB,sBAAsB;IACtB,yBAAyB;IACzB,qBAAqB;;;AChBvB;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-hero.mjs","names":[],"sources":["../../../libs/design/hero/src/hero/hero.component.ts","../../../libs/design/hero/src/hero-body/hero-body.directive.ts","../../../libs/design/hero/src/hero-icon/hero-icon.directive.ts","../../../libs/design/hero/src/hero-subtitle/hero-subtitle.directive.ts","../../../libs/design/hero/src/hero-tagline/hero-tagline.directive.ts","../../../libs/design/hero/src/hero-title/hero-title.directive.ts","../../../libs/design/hero/src/hero.module.ts","../../../libs/design/hero/src/hero.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport {\n DaffColorableDirective,\n DaffCompactableDirective,\n DaffArticleEncapsulatedDirective,\n DaffManageContainerLayoutDirective,\n DaffTextAlignableDirective,\n} from '@daffodil/design';\n\n/**\n * Hero is a top level container designed to be large and captivating.\n * It should be used only once per page, typically as the first component\n * to introduce the page’s main purpose or message.\n *\n * @example\n * ```html\n * <daff-hero>\n * <div daffHeroIcon>\n * <img src=\"assets/summer-sale-icon.svg\" alt=\"Summer sale icon\" />\n * </div>\n * <div daffHeroTagline>Limited Time Offer</div>\n * <h1 daffHeroTitle>Summer Collection Sale</h1>\n * <p daffHeroSubtitle>Up to 50% off select items through July 31</p>\n * <div daffHeroBody>\n * <button daff-button color=\"secondary\">Shop the sale</button>\n * <button daff-button color=\"theme\">Learn more</button>\n * </div>\n * </daff-hero>\n * ```\n */\n@Component({\n selector: 'daff-hero',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hero.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n { directive: DaffManageContainerLayoutDirective },\n {\n directive: DaffTextAlignableDirective,\n inputs: ['textAlignment'],\n },\n {\n directive: DaffCompactableDirective,\n inputs: ['compact'],\n },\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n ],\n host: {\n 'class': 'daff-hero',\n },\n})\nexport class DaffHeroComponent {\n constructor(private textAlignable: DaffTextAlignableDirective) {\n this.textAlignable.defaultAlignment = 'left';\n }\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Body is a flexible wrapper for additional components or custom layouts.\n * It's unstyled except for spacing, allowing for a ton of control and customization.\n * It should only be used once per hero.\n *\n * @example\n * ```html\n * <div daffHeroBody>Custom content</div>\n * ```\n */\n@Directive({\n selector: '[daffHeroBody]',\n host: {\n 'class': 'daff-hero__body',\n },\n})\n\nexport class DaffHeroBodyDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Icon is used to display a visual or branding element. Avoid using this for interactive or actionable icons.\n *\n * @example\n * ```html\n * <div daffHeroIcon>\n * <img src=\"assets/summer-sale-icon.svg\" alt=\"Summer sale icon\" />\n </div>\n * ```\n */\n@Directive({\n selector: '[daffHeroIcon]',\n host: {\n 'class': 'daff-hero__icon',\n },\n})\n\nexport class DaffHeroIconDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Subtitle is a secondary descriptive text displayed beneath the title.\n *\n * @example\n * ```html\n * <p daffHeroSubtitle>Up to 50% off select items through July 31</p>\n * ```\n */\n@Directive({\n selector: '[daffHeroSubtitle]',\n host: {\n 'class': 'daff-hero__subtitle',\n },\n})\n\nexport class DaffHeroSubtitleDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Tagline is a short, memorable phrase that complements the title and provides quick context.\n *\n * @example\n * ```html\n * <div daffHeroTagline>Limited Time Offer</div>\n * ```\n */\n@Directive({\n selector: '[daffHeroTagline]',\n host: {\n 'class': 'daff-hero__tagline',\n },\n})\n\nexport class DaffHeroTaglineDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Title is the primary heading for the hero.\n *\n * @example\n * ```html\n * <h1 daffHeroTitle>Summer Collection Sale</h1>\n * ```\n */\n@Directive({\n selector: '[daffHeroTitle]',\n host: {\n 'class': 'daff-hero__title',\n },\n})\n\nexport class DaffHeroTitleDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffHeroComponent } from './hero/hero.component';\nimport { DaffHeroBodyDirective } from './hero-body/hero-body.directive';\nimport { DaffHeroIconDirective } from './hero-icon/hero-icon.directive';\nimport { DaffHeroSubtitleDirective } from './hero-subtitle/hero-subtitle.directive';\nimport { DaffHeroTaglineDirective } from './hero-tagline/hero-tagline.directive';\nimport { DaffHeroTitleDirective } from './hero-title/hero-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_HERO_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n * */\n@NgModule({\n imports: [\n CommonModule,\n DaffHeroComponent,\n DaffHeroIconDirective,\n DaffHeroTaglineDirective,\n DaffHeroTitleDirective,\n DaffHeroSubtitleDirective,\n DaffHeroBodyDirective,\n ],\n exports: [\n DaffHeroComponent,\n DaffHeroIconDirective,\n DaffHeroTaglineDirective,\n DaffHeroTitleDirective,\n DaffHeroSubtitleDirective,\n DaffHeroBodyDirective,\n ],\n})\nexport class DaffHeroModule { }\n","import { DaffHeroComponent } from './hero/hero.component';\nimport { DaffHeroBodyDirective } from './hero-body/hero-body.directive';\nimport { DaffHeroIconDirective } from './hero-icon/hero-icon.directive';\nimport { DaffHeroSubtitleDirective } from './hero-subtitle/hero-subtitle.directive';\nimport { DaffHeroTaglineDirective } from './hero-tagline/hero-tagline.directive';\nimport { DaffHeroTitleDirective } from './hero-title/hero-title.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_HERO_COMPONENTS = <const> [\n DaffHeroComponent,\n DaffHeroIconDirective,\n DaffHeroTaglineDirective,\n DaffHeroTitleDirective,\n DaffHeroSubtit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AA,gBAAA,mBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAPlC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EACJ,SAAS,mBACV;EACF,CAAA;;;ACgBD,IAAa,iBAAb,MAAa,eAAc;CAAd;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAc,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAd;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAc,SAAA;IAjBvB;IACA;IACA;IACA;IACA;IACA;IACA;GAAqB;GAAA,SAAA;IAGrB;IACA;IACA;IACA;IACA;IACA;GAAqB;EAAA,CAAA;CAAA;CAGZ;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAc,SAAA,CAjBvB,YAAY;EAAA,CAAA;CAAA;;AAiBH,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAnB1B,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;GACD;EACF,CAAA;;;ACrBD,MAAa,uBAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;AACD"}
@@ -0,0 +1,60 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component } from "@angular/core";
3
+ import * as i1 from "@daffodil/design";
4
+ import { DaffSkeletonableDirective } from "@daffodil/design";
5
+ import { NgOptimizedImage } from "@angular/common";
6
+ var DaffImageLiteComponent = class DaffImageLiteComponent {
7
+ static {
8
+ this.ɵfac = i0.ɵɵngDeclareFactory({
9
+ minVersion: "12.0.0",
10
+ version: "22.2.4",
11
+ ngImport: i0,
12
+ type: DaffImageLiteComponent,
13
+ deps: [],
14
+ target: i0.ɵɵFactoryTarget.Component
15
+ });
16
+ }
17
+ static {
18
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
19
+ minVersion: "14.0.0",
20
+ version: "22.2.4",
21
+ type: DaffImageLiteComponent,
22
+ isStandalone: true,
23
+ selector: "img[daff-image]",
24
+ host: { classAttribute: "daff-image-lite" },
25
+ hostDirectives: [{
26
+ directive: i1.DaffSkeletonableDirective,
27
+ inputs: ["skeleton", "skeleton"]
28
+ }],
29
+ ngImport: i0,
30
+ template: "<ng-content></ng-content>",
31
+ isInline: true,
32
+ styles: [":host{display:block;max-width:100%;height:auto}:host.daff-skeleton{animation:loading 1s linear infinite alternate;object-fit:none;object-position:-200% -200%}@keyframes loading{0%{opacity:.5}to{opacity:1}}\n"],
33
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
34
+ });
35
+ }
36
+ };
37
+ i0.ɵɵngDeclareClassMetadata({
38
+ minVersion: "12.0.0",
39
+ version: "22.2.4",
40
+ ngImport: i0,
41
+ type: DaffImageLiteComponent,
42
+ decorators: [{
43
+ type: Component,
44
+ args: [{
45
+ selector: "img[daff-image]",
46
+ template: "<ng-content></ng-content>",
47
+ changeDetection: ChangeDetectionStrategy.OnPush,
48
+ hostDirectives: [{
49
+ directive: DaffSkeletonableDirective,
50
+ inputs: ["skeleton"]
51
+ }],
52
+ host: { class: "daff-image-lite" },
53
+ styles: [":host{display:block;max-width:100%;height:auto}:host.daff-skeleton{animation:loading 1s linear infinite alternate;object-fit:none;object-position:-200% -200%}@keyframes loading{0%{opacity:.5}to{opacity:1}}\n"]
54
+ }]
55
+ }]
56
+ });
57
+ const DAFF_IMAGE_LITE_COMPONENTS = [DaffImageLiteComponent, NgOptimizedImage];
58
+ export { DAFF_IMAGE_LITE_COMPONENTS, DaffImageLiteComponent };
59
+
60
+ //# sourceMappingURL=daffodil-design-image-lite.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daffodil-design-image-lite.mjs","names":[],"sources":["../../../libs/design/image-lite/src/image.component.ts","../../../libs/design/image-lite/src/image.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/component-selector */\nimport {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { DaffSkeletonableDirective } from '@daffodil/design';\n\n@Component({\n selector: 'img[daff-image]',\n template: '<ng-content></ng-content>',\n styleUrl: './image.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n class: 'daff-image-lite',\n },\n})\nexport class DaffImageLiteComponent {}\n","import { NgOptimizedImage } from '@angular/common';\n\nimport { DaffImageLiteComponent } from './image.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_IMAGE_LITE_COMPONENTS = <const> [\n DaffImageLiteComponent,\n NgOptimizedImage,\n];\n"],"mappings":";;;;;AAuBA,IAAa,yBAAb,MAAa,uBAAsB;CAAtB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,kBAAA;GAAA,gBAAA,CAAA;IAAA,WAAA,GAAA;IAAA,QAAA,CAAA,YAAA,UAAA;GAAA,CAAA;GAAA,UAAA;GAAA,UAbvB;GAA2B,UAAA;GAAA,QAAA,CAAA,iNAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAa1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAflC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAiB,UACjB;GAA2B,iBAEpB,wBAAwB;GAAM,gBAC/B,CACd;IACE,WAAW;IACX,QAAQ,CAAC,UAAU;GACpB,CACF;GAAA,MACK,EACJ,OAAO,kBACR;GAAA,QAAA,CAAA,iNAAA;EAAA,CAAA;;;ACdH,MAAa,6BAAqC,CAChD,wBACA,gBACD"}
@@ -1,110 +1,248 @@
1
- import { NgOptimizedImage, CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, output, computed, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
- import * as i1 from '@angular/platform-browser';
5
- import * as i2 from '@daffodil/design';
6
- import { DaffSkeletonableDirective } from '@daffodil/design';
7
-
1
+ import { CommonModule, NgOptimizedImage } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, NgModule, computed, input, output } from "@angular/core";
4
+ import * as i1 from "@angular/platform-browser";
5
+ import * as i2 from "@daffodil/design";
6
+ import { DaffSkeletonableDirective } from "@daffodil/design";
8
7
  const validateInput = (prop) => (value) => {
9
- if (value === null || value === undefined || value === '') {
10
- throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);
11
- }
12
- return value;
8
+ if (value === null || value === void 0 || value === "") throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);
9
+ return value;
13
10
  };
14
- class DaffImageComponent {
15
- constructor(sanitizer) {
16
- this.sanitizer = sanitizer;
17
- /**
18
- * The URL of the image.
19
- */
20
- this.src = input.required({ ...(ngDevMode ? { debugName: "src" } : /* istanbul ignore next */ {}), transform: validateInput('src') });
21
- /**
22
- * The alternate text for the image.
23
- */
24
- this.alt = input.required({ ...(ngDevMode ? { debugName: "alt" } : /* istanbul ignore next */ {}), transform: validateInput('alt') });
25
- /**
26
- * The width of the image.
27
- */
28
- this.width = input.required({ ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: validateInput('width') });
29
- /**
30
- * The height of the image.
31
- */
32
- this.height = input.required({ ...(ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {}), transform: validateInput('height') });
33
- /**
34
- * Whether the image should be treated as a priority image for loading.
35
- * Priority images are loaded eagerly and not lazy-loaded.
36
- */
37
- this.priority = input(false, ...(ngDevMode ? [{ debugName: "priority" }] : /* istanbul ignore next */ []));
38
- /**
39
- * Emits when the image has loaded.
40
- */
41
- this.loaded = output();
42
- /**
43
- * @docs-private
44
- */
45
- this._paddingTop = computed(() => {
46
- if (!this.height() || !this.width()) {
47
- return undefined;
48
- }
49
- return this.sanitizer.bypassSecurityTrustStyle('calc(' + this.height() + ' / ' + this.width() + ' * 100%)');
50
- }, ...(ngDevMode ? [{ debugName: "_paddingTop" }] : /* istanbul ignore next */ []));
51
- /**
52
- * @docs-private
53
- *
54
- * The aspect ratio of an image, based on the width and height set by the user.
55
- */
56
- this._aspectRatio = computed(() => this.sanitizer.bypassSecurityTrustStyle(this.width() + ' / ' + this.height()), ...(ngDevMode ? [{ debugName: "_aspectRatio" }] : /* istanbul ignore next */ []));
57
- }
58
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffImageComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
59
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DaffImageComponent, isStandalone: true, selector: "daff-image", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: true, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loaded: "loaded" }, 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)=\"loaded.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 }); }
60
- }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffImageComponent, decorators: [{
62
- type: Component,
63
- args: [{ selector: 'daff-image', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
64
- {
65
- directive: DaffSkeletonableDirective,
66
- inputs: ['skeleton'],
67
- },
68
- ], host: {
69
- '[style.max-width]': 'width() + "px"',
70
- '[style.aspect-ratio]': '_aspectRatio()',
71
- }, imports: [
72
- NgOptimizedImage,
73
- ], template: "<img class=\"daff-image\"\n\t[ngSrc]=\"src()\"\n\t[alt]=\"alt()\"\n\tfill\n\t[priority]=\"priority()\"\n\t(load)=\"loaded.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"] }]
74
- }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: true }] }], priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "priority", required: false }] }], loaded: [{ type: i0.Output, args: ["loaded"] }] } });
75
-
76
- /**
77
- * @deprecated in favor of {@link DAFF_IMAGE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
78
- * */
79
- class DaffImageModule {
80
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
81
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffImageModule, imports: [CommonModule,
82
- DaffImageComponent], exports: [DaffImageComponent] }); }
83
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffImageModule, imports: [CommonModule] }); }
84
- }
85
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffImageModule, decorators: [{
86
- type: NgModule,
87
- args: [{
88
- imports: [
89
- CommonModule,
90
- DaffImageComponent,
91
- ],
92
- exports: [
93
- DaffImageComponent,
94
- ],
95
- }]
96
- }] });
97
-
98
- /**
99
- * @docs-private
100
- */
101
- const DAFF_IMAGE_COMPONENTS = [
102
- DaffImageComponent,
103
- ];
104
-
105
- /**
106
- * Generated bundle index. Do not edit.
107
- */
108
-
11
+ var DaffImageComponent = class DaffImageComponent {
12
+ constructor(sanitizer) {
13
+ this.sanitizer = sanitizer;
14
+ this.src = input.required({
15
+ ...ngDevMode ? { debugName: "src" } : /* istanbul ignore next */ {},
16
+ transform: validateInput("src")
17
+ });
18
+ this.alt = input.required({
19
+ ...ngDevMode ? { debugName: "alt" } : /* istanbul ignore next */ {},
20
+ transform: validateInput("alt")
21
+ });
22
+ this.width = input.required({
23
+ ...ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {},
24
+ transform: validateInput("width")
25
+ });
26
+ this.height = input.required({
27
+ ...ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {},
28
+ transform: validateInput("height")
29
+ });
30
+ this.priority = input(false, ...ngDevMode ? [{ debugName: "priority" }] : /* istanbul ignore next */ []);
31
+ this.loaded = output();
32
+ this._paddingTop = computed(() => {
33
+ if (!this.height() || !this.width()) return;
34
+ return this.sanitizer.bypassSecurityTrustStyle("calc(" + this.height() + " / " + this.width() + " * 100%)");
35
+ }, ...ngDevMode ? [{ debugName: "_paddingTop" }] : /* istanbul ignore next */ []);
36
+ this._aspectRatio = computed(() => this.sanitizer.bypassSecurityTrustStyle(this.width() + " / " + this.height()), ...ngDevMode ? [{ debugName: "_aspectRatio" }] : /* istanbul ignore next */ []);
37
+ }
38
+ static {
39
+ this.ɵfac = i0.ɵɵngDeclareFactory({
40
+ minVersion: "12.0.0",
41
+ version: "22.2.4",
42
+ ngImport: i0,
43
+ type: DaffImageComponent,
44
+ deps: [{ token: i1.DomSanitizer }],
45
+ target: i0.ɵɵFactoryTarget.Component
46
+ });
47
+ }
48
+ static {
49
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
50
+ minVersion: "17.1.0",
51
+ version: "22.2.4",
52
+ type: DaffImageComponent,
53
+ isStandalone: true,
54
+ selector: "daff-image",
55
+ inputs: {
56
+ src: {
57
+ classPropertyName: "src",
58
+ publicName: "src",
59
+ isSignal: true,
60
+ isRequired: true,
61
+ transformFunction: null
62
+ },
63
+ alt: {
64
+ classPropertyName: "alt",
65
+ publicName: "alt",
66
+ isSignal: true,
67
+ isRequired: true,
68
+ transformFunction: null
69
+ },
70
+ width: {
71
+ classPropertyName: "width",
72
+ publicName: "width",
73
+ isSignal: true,
74
+ isRequired: true,
75
+ transformFunction: null
76
+ },
77
+ height: {
78
+ classPropertyName: "height",
79
+ publicName: "height",
80
+ isSignal: true,
81
+ isRequired: true,
82
+ transformFunction: null
83
+ },
84
+ priority: {
85
+ classPropertyName: "priority",
86
+ publicName: "priority",
87
+ isSignal: true,
88
+ isRequired: false,
89
+ transformFunction: null
90
+ }
91
+ },
92
+ outputs: { loaded: "loaded" },
93
+ host: { properties: {
94
+ "style.max-width": "width() + \"px\"",
95
+ "style.aspect-ratio": "_aspectRatio()"
96
+ } },
97
+ hostDirectives: [{
98
+ directive: i2.DaffSkeletonableDirective,
99
+ inputs: ["skeleton", "skeleton"]
100
+ }],
101
+ ngImport: i0,
102
+ template: "<img class=\"daff-image\"\n [ngSrc]=\"src()\"\n [alt]=\"alt()\"\n fill\n [priority]=\"priority()\"\n (load)=\"loaded.emit()\" />",
103
+ 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"],
104
+ dependencies: [{
105
+ kind: "directive",
106
+ type: NgOptimizedImage,
107
+ selector: "img[ngSrc]",
108
+ inputs: [
109
+ "ngSrc",
110
+ "ngSrcset",
111
+ "sizes",
112
+ "width",
113
+ "height",
114
+ "decoding",
115
+ "loading",
116
+ "priority",
117
+ "loaderParams",
118
+ "disableOptimizedSrcset",
119
+ "fill",
120
+ "placeholder",
121
+ "placeholderConfig",
122
+ "src",
123
+ "srcset"
124
+ ]
125
+ }],
126
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
127
+ });
128
+ }
129
+ };
130
+ i0.ɵɵngDeclareClassMetadata({
131
+ minVersion: "12.0.0",
132
+ version: "22.2.4",
133
+ ngImport: i0,
134
+ type: DaffImageComponent,
135
+ decorators: [{
136
+ type: Component,
137
+ args: [{
138
+ selector: "daff-image",
139
+ changeDetection: ChangeDetectionStrategy.OnPush,
140
+ hostDirectives: [{
141
+ directive: DaffSkeletonableDirective,
142
+ inputs: ["skeleton"]
143
+ }],
144
+ host: {
145
+ "[style.max-width]": "width() + \"px\"",
146
+ "[style.aspect-ratio]": "_aspectRatio()"
147
+ },
148
+ imports: [NgOptimizedImage],
149
+ template: "<img class=\"daff-image\"\n [ngSrc]=\"src()\"\n [alt]=\"alt()\"\n fill\n [priority]=\"priority()\"\n (load)=\"loaded.emit()\" />",
150
+ 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"]
151
+ }]
152
+ }],
153
+ ctorParameters: () => [{ type: i1.DomSanitizer }],
154
+ propDecorators: {
155
+ src: [{
156
+ type: i0.Input,
157
+ args: [{
158
+ isSignal: true,
159
+ alias: "src",
160
+ required: true
161
+ }]
162
+ }],
163
+ alt: [{
164
+ type: i0.Input,
165
+ args: [{
166
+ isSignal: true,
167
+ alias: "alt",
168
+ required: true
169
+ }]
170
+ }],
171
+ width: [{
172
+ type: i0.Input,
173
+ args: [{
174
+ isSignal: true,
175
+ alias: "width",
176
+ required: true
177
+ }]
178
+ }],
179
+ height: [{
180
+ type: i0.Input,
181
+ args: [{
182
+ isSignal: true,
183
+ alias: "height",
184
+ required: true
185
+ }]
186
+ }],
187
+ priority: [{
188
+ type: i0.Input,
189
+ args: [{
190
+ isSignal: true,
191
+ alias: "priority",
192
+ required: false
193
+ }]
194
+ }],
195
+ loaded: [{
196
+ type: i0.Output,
197
+ args: ["loaded"]
198
+ }]
199
+ }
200
+ });
201
+ var DaffImageModule = class DaffImageModule {
202
+ static {
203
+ this.ɵfac = i0.ɵɵngDeclareFactory({
204
+ minVersion: "12.0.0",
205
+ version: "22.2.4",
206
+ ngImport: i0,
207
+ type: DaffImageModule,
208
+ deps: [],
209
+ target: i0.ɵɵFactoryTarget.NgModule
210
+ });
211
+ }
212
+ static {
213
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
214
+ minVersion: "14.0.0",
215
+ version: "22.2.4",
216
+ ngImport: i0,
217
+ type: DaffImageModule,
218
+ imports: [CommonModule, DaffImageComponent],
219
+ exports: [DaffImageComponent]
220
+ });
221
+ }
222
+ static {
223
+ this.ɵinj = i0.ɵɵngDeclareInjector({
224
+ minVersion: "12.0.0",
225
+ version: "22.2.4",
226
+ ngImport: i0,
227
+ type: DaffImageModule,
228
+ imports: [CommonModule]
229
+ });
230
+ }
231
+ };
232
+ i0.ɵɵngDeclareClassMetadata({
233
+ minVersion: "12.0.0",
234
+ version: "22.2.4",
235
+ ngImport: i0,
236
+ type: DaffImageModule,
237
+ decorators: [{
238
+ type: NgModule,
239
+ args: [{
240
+ imports: [CommonModule, DaffImageComponent],
241
+ exports: [DaffImageComponent]
242
+ }]
243
+ }]
244
+ });
245
+ const DAFF_IMAGE_COMPONENTS = [DaffImageComponent];
109
246
  export { DAFF_IMAGE_COMPONENTS, DaffImageComponent, DaffImageModule };
110
- //# sourceMappingURL=daffodil-design-image.mjs.map
247
+
248
+ //# sourceMappingURL=daffodil-design-image.mjs.map
@@ -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 { NgOptimizedImage } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n computed,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n} from '@angular/platform-browser';\n\nimport { DaffSkeletonableDirective } from '@daffodil/design';\n\nconst validateInput = (prop: string) => <T>(value: T): T => {\n if (value === null || value === undefined || <unknown>value === '') {\n throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);\n }\n\n return value;\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 {\n /**\n * The URL of the image.\n */\n src = input.required<string, string>({ transform: validateInput('src') });\n\n /**\n * The alternate text for the image.\n */\n alt = input.required<string, string>({ transform: validateInput('alt') });\n\n /**\n * The width of the image.\n */\n width = input.required<number, number>({ transform: validateInput('width') });\n\n /**\n * The height of the image.\n */\n height = input.required<number, number>({ transform: validateInput('height') });\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 loaded = output<void>();\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n _paddingTop = computed(() => {\n if (!this.height() || !this.width() ) {\n return undefined;\n }\n\n return this.sanitizer.bypassSecurityTrustStyle(\n 'calc(' + this.height() + ' / ' + this.width() + ' * 100%)',\n );\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 _aspectRatio = computed<SafeStyle>(\n () => this.sanitizer.bypassSecurityTrustStyle(\n this.width() + ' / ' + this.height(),\n ),\n );\n}\n","<img class=\"daff-image\"\n\t[ngSrc]=\"src()\"\n\t[alt]=\"alt()\"\n\tfill\n\t[priority]=\"priority()\"\n\t(load)=\"loaded.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":";;;;;;;AAeA,MAAM,aAAa,GAAG,CAAC,IAAY,KAAK,CAAI,KAAQ,KAAO;AACzD,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAa,KAAK,KAAK,EAAE,EAAE;AAClE,QAAA,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAA,WAAA,CAAa,CAAC;IAC9E;AAEA,IAAA,OAAO,KAAK;AACd,CAAC;MAqBY,kBAAkB,CAAA;AAgC7B,IAAA,WAAA,CAAoB,SAAuB,EAAA;QAAvB,IAAA,CAAA,SAAS,GAAT,SAAS;AA/B7B;;AAEG;AACH,QAAA,IAAA,CAAA,GA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A,EAAA,uIAAA,EAAA,MAAA,EAAA,CAAA,sjBAAA,CAAA,EAAA;;;AEnCH;;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;;;;"}
1
+ {"version":3,"file":"daffodil-design-image.mjs","names":[],"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"],"sourcesContent":["import { NgOptimizedImage } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n computed,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n} from '@angular/platform-browser';\n\nimport { DaffSkeletonableDirective } from '@daffodil/design';\n\nconst validateInput = (prop: string) => <T>(value: T): T => {\n if (value === null || value === undefined || <unknown>value === '') {\n throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);\n }\n\n return value;\n};\n\n/**\n * @deprecated in favor of {@link DaffImageLiteComponent}. Deprecated in version 0.95.0. Will be removed in version 0.98.0.\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 {\n /**\n * The URL of the image.\n */\n src = input.required<string, string>({ transform: validateInput('src') });\n\n /**\n * The alternate text for the image.\n */\n alt = input.required<string, string>({ transform: validateInput('alt') });\n\n /**\n * The width of the image.\n */\n width = input.required<number, number>({ transform: validateInput('width') });\n\n /**\n * The height of the image.\n */\n height = input.required<number, number>({ transform: validateInput('height') });\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 loaded = output<void>();\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n _paddingTop = computed(() => {\n if (!this.height() || !this.width() ) {\n return undefined;\n }\n\n return this.sanitizer.bypassSecurityTrustStyle(\n 'calc(' + this.height() + ' / ' + this.width() + ' * 100%)',\n );\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 _aspectRatio = computed<SafeStyle>(\n () => this.sanitizer.bypassSecurityTrustStyle(\n this.width() + ' / ' + this.height(),\n ),\n );\n}\n","<img class=\"daff-image\"\n\t[ngSrc]=\"src()\"\n\t[alt]=\"alt()\"\n\tfill\n\t[priority]=\"priority()\"\n\t(load)=\"loaded.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 0.98.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 *\n * @deprecated in favor of {@link DAFF_IMAGE_LITE_COMPONENTS}. Deprecated in version 0.95.0. Will be removed in version 0.98.0.\n */\nexport const DAFF_IMAGE_COMPONENTS = <const> [\n DaffImageComponent,\n];\n"],"mappings":";;;;;;AAeA,MAAM,iBAAiB,UAAqB,UAAe;CACzD,IAAI,UAAU,QAAQ,UAAU,UAAsB,UAAU,IAC9D,MAAM,IAAI,MAAM,0CAA0C,KAAI,YAAa;CAG7E,OAAO;AACT;AAwBA,IAAa,qBAAb,MAAa,mBAAkB;CAgC7B,YAAoB,WAAuB;EAAvB,KAAA,YAAA;EA5BpB,KAAA,MAAM,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;GAAmB,WAAW,cAAc,KAAK;EAAC,CAAA;EAKtE,KAAA,MAAM,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;GAAmB,WAAW,cAAc,KAAK;EAAC,CAAA;EAKtE,KAAA,QAAQ,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;GAAmB,WAAW,cAAc,OAAO;EAAC,CAAA;EAK1E,KAAA,SAAS,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;GAAmB,WAAW,cAAc,QAAQ;EAAC,CAAA;EAM5E,KAAA,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,C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