@daffodil/design 0.89.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 (209) hide show
  1. package/README.md +1 -0
  2. package/accordion/index.d.ts +8 -5
  3. package/article/README.md +1 -1
  4. package/article/index.d.ts +20 -0
  5. package/article/src/article-theme.scss +10 -0
  6. package/button/index.d.ts +4 -4
  7. package/button/src/button/button-base.scss +3 -3
  8. package/button/src/button/raised/raised-theme.scss +6 -16
  9. package/card/README.md +0 -8
  10. package/card/index.d.ts +7 -41
  11. package/card/src/card-base-theme.scss +2 -5
  12. package/card/src/card-base.scss +2 -2
  13. package/checkbox/README.md +0 -0
  14. package/checkbox/index.d.ts +177 -0
  15. package/fesm2022/daffodil-design-accordion.mjs +23 -14
  16. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  17. package/fesm2022/daffodil-design-article.mjs +129 -5
  18. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  19. package/fesm2022/daffodil-design-button.mjs +24 -20
  20. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  21. package/fesm2022/daffodil-design-card.mjs +16 -63
  22. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  23. package/fesm2022/daffodil-design-checkbox.mjs +317 -0
  24. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -0
  25. package/fesm2022/daffodil-design-form-field.mjs +55 -162
  26. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  27. package/fesm2022/daffodil-design-form.mjs +62 -0
  28. package/fesm2022/daffodil-design-form.mjs.map +1 -0
  29. package/fesm2022/daffodil-design-image.mjs +12 -4
  30. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  31. package/fesm2022/daffodil-design-modal.mjs +55 -56
  32. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  33. package/fesm2022/daffodil-design-notification.mjs +14 -50
  34. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  35. package/fesm2022/daffodil-design-paginator.mjs +6 -11
  36. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  37. package/fesm2022/daffodil-design-quantity-field.mjs +3 -5
  38. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  39. package/fesm2022/daffodil-design-radio.mjs +304 -0
  40. package/fesm2022/daffodil-design-radio.mjs.map +1 -0
  41. package/fesm2022/daffodil-design-select.mjs +2 -2
  42. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  43. package/fesm2022/daffodil-design-sidebar.mjs +6 -36
  44. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  45. package/fesm2022/daffodil-design-switch.mjs +48 -105
  46. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  47. package/fesm2022/daffodil-design-tabs.mjs +22 -14
  48. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  49. package/fesm2022/daffodil-design-tag.mjs +131 -0
  50. package/fesm2022/daffodil-design-tag.mjs.map +1 -0
  51. package/fesm2022/daffodil-design-toast.mjs +56 -55
  52. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  53. package/fesm2022/daffodil-design-tree.mjs +4 -13
  54. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  55. package/fesm2022/daffodil-design.mjs +250 -774
  56. package/fesm2022/daffodil-design.mjs.map +1 -1
  57. package/form/README.md +75 -0
  58. package/form/index.d.ts +27 -0
  59. package/form-field/README.md +49 -39
  60. package/form-field/index.d.ts +58 -76
  61. package/image/README.md +27 -19
  62. package/image/index.d.ts +6 -1
  63. package/index.d.ts +180 -424
  64. package/input/README.md +32 -12
  65. package/modal/README.md +106 -16
  66. package/modal/index.d.ts +50 -21
  67. package/native-select/README.md +52 -15
  68. package/notification/index.d.ts +7 -38
  69. package/package.json +1 -1
  70. package/paginator/index.d.ts +1 -7
  71. package/radio/README.md +52 -0
  72. package/radio/index.d.ts +160 -0
  73. package/scss/core/error/error-to-string.scss +6 -6
  74. package/scss/core/map/map-get/map-get.scss +3 -3
  75. package/scss/layout/_breakpoint.scss +1 -1
  76. package/scss/theme.scss +4 -4
  77. package/scss/theming/_color-palettes.scss +21 -7
  78. package/scss/theming/_configure-theme.scss +11 -10
  79. package/scss/theming/_daff-theme.scss +5 -14
  80. package/scss/theming/_get-base-color.scss +2 -2
  81. package/scss/theming/_get-palette.scss +2 -2
  82. package/scss/theming/_get-theme-mode.scss +3 -3
  83. package/scss/theming/_index.scss +2 -1
  84. package/scss/theming/contrast/_index.scss +1 -0
  85. package/scss/theming/contrast/max-contrast/max-contrast.scss +47 -0
  86. package/scss/theming/contrast/max-contrast/max-contrast.spec.scss +57 -0
  87. package/scss/theming/contrast/text-contrast/text-contrast.scss +22 -16
  88. package/scss/theming/contrast/text-contrast/text-contrast.spec.scss +57 -0
  89. package/scss/theming/create-theme/_create-theme.scss +330 -0
  90. package/scss/theming/create-theme/_create-theme.spec.scss +122 -0
  91. package/scss/theming/create-theme/_index.scss +1 -0
  92. package/scss/theming/get-font-colors/_get-font-colors.scss +36 -0
  93. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +72 -0
  94. package/scss/typography/mixins/_font-weight.scss +8 -14
  95. package/select/README.md +107 -4
  96. package/sidebar/README.md +0 -8
  97. package/sidebar/index.d.ts +3 -15
  98. package/switch/README.md +19 -27
  99. package/switch/index.d.ts +18 -48
  100. package/switch/src/switch-theme.scss +26 -18
  101. package/tabs/index.d.ts +7 -4
  102. package/tag/README.md +87 -0
  103. package/tag/index.d.ts +71 -0
  104. package/tag/src/tag-theme.scss +137 -0
  105. package/textarea/README.md +35 -5
  106. package/tree/index.d.ts +0 -6
  107. package/tree/src/tree-theme.scss +0 -4
  108. package/accordion/examples/index.d.ts +0 -20
  109. package/article/examples/index.d.ts +0 -50
  110. package/breadcrumb/examples/index.d.ts +0 -10
  111. package/button/examples/index.d.ts +0 -67
  112. package/callout/examples/index.d.ts +0 -41
  113. package/card/examples/index.d.ts +0 -62
  114. package/card/src/card/raised/raised-theme.scss +0 -28
  115. package/checkbox/examples/index.d.ts +0 -32
  116. package/container/examples/index.d.ts +0 -16
  117. package/fesm2022/daffodil-design-accordion-examples.mjs +0 -50
  118. package/fesm2022/daffodil-design-accordion-examples.mjs.map +0 -1
  119. package/fesm2022/daffodil-design-article-examples.mjs +0 -134
  120. package/fesm2022/daffodil-design-article-examples.mjs.map +0 -1
  121. package/fesm2022/daffodil-design-breadcrumb-examples.mjs +0 -46
  122. package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +0 -1
  123. package/fesm2022/daffodil-design-button-examples.mjs +0 -178
  124. package/fesm2022/daffodil-design-button-examples.mjs.map +0 -1
  125. package/fesm2022/daffodil-design-callout-examples.mjs +0 -116
  126. package/fesm2022/daffodil-design-callout-examples.mjs.map +0 -1
  127. package/fesm2022/daffodil-design-card-examples.mjs +0 -168
  128. package/fesm2022/daffodil-design-card-examples.mjs.map +0 -1
  129. package/fesm2022/daffodil-design-checkbox-examples.mjs +0 -76
  130. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +0 -1
  131. package/fesm2022/daffodil-design-container-examples.mjs +0 -41
  132. package/fesm2022/daffodil-design-container-examples.mjs.map +0 -1
  133. package/fesm2022/daffodil-design-form-field-examples.mjs +0 -96
  134. package/fesm2022/daffodil-design-form-field-examples.mjs.map +0 -1
  135. package/fesm2022/daffodil-design-hero-examples.mjs +0 -121
  136. package/fesm2022/daffodil-design-hero-examples.mjs.map +0 -1
  137. package/fesm2022/daffodil-design-image-examples.mjs +0 -58
  138. package/fesm2022/daffodil-design-image-examples.mjs.map +0 -1
  139. package/fesm2022/daffodil-design-input-examples.mjs +0 -108
  140. package/fesm2022/daffodil-design-input-examples.mjs.map +0 -1
  141. package/fesm2022/daffodil-design-list-examples.mjs +0 -77
  142. package/fesm2022/daffodil-design-list-examples.mjs.map +0 -1
  143. package/fesm2022/daffodil-design-loading-icon-examples.mjs +0 -44
  144. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +0 -1
  145. package/fesm2022/daffodil-design-media-gallery-examples.mjs +0 -104
  146. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +0 -1
  147. package/fesm2022/daffodil-design-menu-examples.mjs +0 -50
  148. package/fesm2022/daffodil-design-menu-examples.mjs.map +0 -1
  149. package/fesm2022/daffodil-design-modal-examples.mjs +0 -51
  150. package/fesm2022/daffodil-design-modal-examples.mjs.map +0 -1
  151. package/fesm2022/daffodil-design-native-select-examples.mjs +0 -71
  152. package/fesm2022/daffodil-design-native-select-examples.mjs.map +0 -1
  153. package/fesm2022/daffodil-design-navbar-examples.mjs +0 -88
  154. package/fesm2022/daffodil-design-navbar-examples.mjs.map +0 -1
  155. package/fesm2022/daffodil-design-notification-examples.mjs +0 -102
  156. package/fesm2022/daffodil-design-notification-examples.mjs.map +0 -1
  157. package/fesm2022/daffodil-design-paginator-examples.mjs +0 -59
  158. package/fesm2022/daffodil-design-paginator-examples.mjs.map +0 -1
  159. package/fesm2022/daffodil-design-progress-bar-examples.mjs +0 -57
  160. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +0 -1
  161. package/fesm2022/daffodil-design-quantity-field-examples.mjs +0 -85
  162. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-radio-examples.mjs +0 -31
  164. package/fesm2022/daffodil-design-radio-examples.mjs.map +0 -1
  165. package/fesm2022/daffodil-design-select-examples.mjs +0 -117
  166. package/fesm2022/daffodil-design-select-examples.mjs.map +0 -1
  167. package/fesm2022/daffodil-design-sidebar-examples.mjs +0 -109
  168. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +0 -1
  169. package/fesm2022/daffodil-design-sticky-examples.mjs +0 -25
  170. package/fesm2022/daffodil-design-sticky-examples.mjs.map +0 -1
  171. package/fesm2022/daffodil-design-switch-examples.mjs +0 -110
  172. package/fesm2022/daffodil-design-switch-examples.mjs.map +0 -1
  173. package/fesm2022/daffodil-design-tabs-examples.mjs +0 -115
  174. package/fesm2022/daffodil-design-tabs-examples.mjs.map +0 -1
  175. package/fesm2022/daffodil-design-text-snippet-examples.mjs +0 -25
  176. package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +0 -1
  177. package/fesm2022/daffodil-design-textarea-examples.mjs +0 -66
  178. package/fesm2022/daffodil-design-textarea-examples.mjs.map +0 -1
  179. package/fesm2022/daffodil-design-toast-examples.mjs +0 -147
  180. package/fesm2022/daffodil-design-toast-examples.mjs.map +0 -1
  181. package/fesm2022/daffodil-design-tree-examples.mjs +0 -104
  182. package/fesm2022/daffodil-design-tree-examples.mjs.map +0 -1
  183. package/form-field/examples/index.d.ts +0 -18
  184. package/hero/examples/index.d.ts +0 -45
  185. package/image/examples/index.d.ts +0 -10
  186. package/input/examples/index.d.ts +0 -10
  187. package/list/examples/index.d.ts +0 -29
  188. package/loading-icon/examples/index.d.ts +0 -16
  189. package/media-gallery/examples/index.d.ts +0 -38
  190. package/menu/examples/index.d.ts +0 -20
  191. package/modal/examples/index.d.ts +0 -15
  192. package/native-select/examples/index.d.ts +0 -10
  193. package/navbar/examples/index.d.ts +0 -31
  194. package/notification/examples/index.d.ts +0 -12
  195. package/paginator/examples/index.d.ts +0 -26
  196. package/progress-bar/examples/index.d.ts +0 -10
  197. package/quantity-field/examples/index.d.ts +0 -30
  198. package/radio/examples/index.d.ts +0 -13
  199. package/select/examples/index.d.ts +0 -28
  200. package/sidebar/examples/index.d.ts +0 -10
  201. package/sticky/examples/index.d.ts +0 -10
  202. package/switch/examples/index.d.ts +0 -46
  203. package/tabs/examples/index.d.ts +0 -12
  204. package/text-snippet/examples/index.d.ts +0 -10
  205. package/textarea/examples/index.d.ts +0 -10
  206. package/toast/examples/index.d.ts +0 -56
  207. package/tree/examples/index.d.ts +0 -18
  208. /package/{form-field → form}/src/error-message/error-message-theme.scss +0 -0
  209. /package/{form-field → form}/src/hint/hint-theme.scss +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-accordion.mjs","sources":["../../../libs/design/accordion/src/accordion/accordion/accordion.component.ts","../../../libs/design/accordion/src/accordion/accordion-item/accordion-item.component.ts","../../../libs/design/accordion/src/accordion/accordion-item/accordion-item.component.html","../../../libs/design/accordion/src/accordion/accordion-item-title/accordion-item-title.directive.ts","../../../libs/design/accordion/src/accordion.module.ts","../../../libs/design/accordion/src/accordion.ts","../../../libs/design/accordion/src/daffodil-design-accordion.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\n/**\n * Groups accordion items.\n *\n * @example\n * ```html\n * <daff-accordion>\n * <daff-accordion-item>\n * <div daffAccordionItemTitle>Title</div>\n * <div>Expandable content</div>\n * </daff-accordion-item>\n * <daff-accordion-item>\n * <div daffAccordionItemTitle>Title</div>\n * <div>Expandable content</div>\n * </daff-accordion-item>\n * </daff-accordion>\n * ```\n */\n@Component({\n selector: 'daff-accordion',\n template: '<ng-content></ng-content>',\n styles: [`\n :host {\n display: block;\n }\n `],\n hostDirectives: [{\n directive: DaffArticleEncapsulatedDirective,\n }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n\nexport class DaffAccordionComponent {}\n","/* eslint-disable quote-props */\nimport {\n Component,\n Input,\n OnInit,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport {\n DaffOpenable,\n DaffOpenableDirective,\n} from '@daffodil/design';\n\n\nlet daffAccordionItemId = 0;\nlet daffAccordionItemContentId = 0;\n\n/**\n * Contains the title and collapsible content. Handles expansion and collapse on user interaction. All `<daff-accordion-item>`s should be grouped inside a `<daff-accordion>`.\n *\n * @example\n * ```html\n * <daff-accordion-item>\n * <div daffAccordionItemTitle>Title</div>\n * <div>Accordion content</div>\n * </daff-accordion-item>\n * ```\n */\n@Component({\n selector: 'daff-accordion-item',\n templateUrl: './accordion-item.component.html',\n styleUrls: ['./accordion-item.component.scss'],\n hostDirectives: [{\n directive: DaffOpenableDirective,\n outputs: ['toggled'],\n }],\n host: {\n 'class': 'daff-accordion-item',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffAccordionItemComponent implements OnInit, DaffOpenable {\n /**\n * The unique id of an accordion item. Defaults to an autogenerated value.\n */\n @Input() itemId: string = 'daff-accordion-item' + '-' + ++daffAccordionItemId;\n\n /**\n * The unique id of an accordion item content. Defaults to an autogenerated value.\n */\n @Input() contentId: string = 'daff-accordion-item-content' + '-' + ++daffAccordionItemContentId;\n\n /**\n * Whether or not an accordion item is initially expanded by default.\n */\n @Input() initiallyExpanded = false;\n\n /**\n * Disables an accordion item and prevents it from being expanded or collapsed.\n */\n @Input() disabled = false;\n\n constructor(private openDirective: DaffOpenableDirective) {\n this.openDirective.stateless = false;\n }\n\n /**\n * @docs-private\n */\n ngOnInit() {\n this.openDirective.open = this.initiallyExpanded ? this.initiallyExpanded : this.openDirective.open;\n }\n\n /**\n * @docs-private\n */\n get open() {\n return this.openDirective.open;\n }\n\n /**\n * Reveals the contents of the accordion item.\n */\n reveal() {\n this.openDirective.reveal();\n }\n\n /**\n * Hides the contents of the accordion item.\n */\n hide() {\n this.openDirective.hide();\n }\n\n /**\n * Toggles the visibility of the contents of the accordion item.\n */\n toggle() {\n this.openDirective.toggle();\n }\n}\n","<button type=\"button\" class=\"daff-accordion-item__header\"\n (click)=\"toggle()\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-controls]=\"contentId\"\n [id]=\"itemId\"\n [disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\">\n <ng-content select=\"[daffAccordionItemTitle]\"></ng-content>\n</button>\n<div class=\"daff-accordion-item__content\" [id]=\"contentId\" [attr.aria-labelledby]=\"itemId\" role=\"region\">\n <ng-content></ng-content>\n</div>","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Used to provide a high level overview of the panel content. It should be wrapped by a `<daff-accordion-item>`.\n *\n * @example\n * ```html\n * <div daffAccordionItemTitle>Title</div>\n * ```\n */\n@Directive({\n selector: '[daffAccordionItemTitle]',\n host: {\n 'class': 'daff-accordion-item__title',\n },\n})\nexport class DaffAccordionItemTitleDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffAccordionComponent } from './accordion/accordion/accordion.component';\nimport { DaffAccordionItemComponent } from './accordion/accordion-item/accordion-item.component';\nimport { DaffAccordionItemTitleDirective } from './accordion/accordion-item-title/accordion-item-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ACCORDION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffAccordionComponent,\n DaffAccordionItemComponent,\n DaffAccordionItemTitleDirective,\n ],\n exports: [\n DaffAccordionComponent,\n DaffAccordionItemComponent,\n DaffAccordionItemTitleDirective,\n ],\n})\nexport class DaffAccordionModule { }\n","import { DaffAccordionComponent } from './accordion/accordion/accordion.component';\nimport { DaffAccordionItemComponent } from './accordion/accordion-item/accordion-item.component';\nimport { DaffAccordionItemTitleDirective } from './accordion/accordion-item-title/accordion-item-title.directive';\n\n/**\n * @docs-private\n *\n * `DAFF_ACCORDION_COMPONENTS` imports all the available components and directives related to the component.\n */\nexport const DAFF_ACCORDION_COMPONENTS = <const> [\n DaffAccordionComponent,\n DaffAccordionItemComponent,\n DaffAccordionItemTitleDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;MAeU,sBAAsB,CAAA;iIAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,gJAZvB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAA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A;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;wBACtB,0BAA0B;wBAC1B,+BAA+B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,0BAA0B;wBAC1B,+BAA+B;AAChC,qBAAA;AACF,iBAAA;;;AClBD;;;;AAIG;AACI,MAAM,yBAAyB,GAAW;IAC/C,sBAAsB;IACtB,0BAA0B;IAC1B,+BAA+B;;;ACZjC;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-accordion.mjs","sources":["../../../libs/design/accordion/src/accordion/accordion/accordion.component.ts","../../../libs/design/accordion/src/accordion/accordion-item/accordion-item.component.ts","../../../libs/design/accordion/src/accordion/accordion-item/accordion-item.component.html","../../../libs/design/accordion/src/accordion/accordion-item-title/accordion-item-title.directive.ts","../../../libs/design/accordion/src/accordion.module.ts","../../../libs/design/accordion/src/accordion.ts","../../../libs/design/accordion/src/daffodil-design-accordion.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\n/**\n * Groups accordion items.\n *\n * @example\n * ```html\n * <daff-accordion>\n * <daff-accordion-item>\n * <div daffAccordionItemTitle>Title</div>\n * <div>Expandable content</div>\n * </daff-accordion-item>\n * <daff-accordion-item>\n * <div daffAccordionItemTitle>Title</div>\n * <div>Expandable content</div>\n * </daff-accordion-item>\n * </daff-accordion>\n * ```\n */\n@Component({\n selector: 'daff-accordion',\n template: '<ng-content></ng-content>',\n styles: [`\n :host {\n display: block;\n }\n `],\n hostDirectives: [{\n directive: DaffArticleEncapsulatedDirective,\n }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n\nexport class DaffAccordionComponent {}\n","/* eslint-disable quote-props */\nimport {\n Component,\n Input,\n OnInit,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport {\n DaffDisableableDirective,\n DaffOpenable,\n DaffOpenableDirective,\n} from '@daffodil/design';\n\n\nlet daffAccordionItemId = 0;\nlet daffAccordionItemContentId = 0;\n\n/**\n * Contains the title and collapsible content. Handles expansion and collapse on user interaction. All `<daff-accordion-item>`s should be grouped inside a `<daff-accordion>`.\n *\n * @example\n * ```html\n * <daff-accordion-item>\n * <div daffAccordionItemTitle>Title</div>\n * <div>Accordion content</div>\n * </daff-accordion-item>\n * ```\n */\n@Component({\n selector: 'daff-accordion-item',\n templateUrl: './accordion-item.component.html',\n styleUrls: ['./accordion-item.component.scss'],\n hostDirectives: [\n {\n directive: DaffOpenableDirective,\n outputs: ['toggled'],\n },\n {\n directive: DaffDisableableDirective,\n inputs: ['disabled'],\n },\n ],\n host: {\n 'class': 'daff-accordion-item',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffAccordionItemComponent implements OnInit, DaffOpenable {\n /**\n * The unique id of an accordion item. Defaults to an autogenerated value.\n */\n @Input() itemId: string = 'daff-accordion-item' + '-' + ++daffAccordionItemId;\n\n /**\n * The unique id of an accordion item content. Defaults to an autogenerated value.\n */\n @Input() contentId: string = 'daff-accordion-item-content' + '-' + ++daffAccordionItemContentId;\n\n /**\n * Whether or not an accordion item is initially expanded by default.\n */\n @Input() initiallyExpanded = false;\n\n /**\n * @docs-private\n *\n * Internal function to access the disabled property of the DaffDisableableDirective\n */\n get disabled() {\n return this.disabledDirective.disabled;\n }\n\n constructor(\n private openDirective: DaffOpenableDirective,\n private disabledDirective: DaffDisableableDirective,\n ) {\n this.openDirective.stateless = false;\n }\n\n /**\n * @docs-private\n */\n ngOnInit() {\n this.openDirective.open = this.initiallyExpanded ? this.initiallyExpanded : this.openDirective.open;\n }\n\n /**\n * @docs-private\n */\n get open() {\n return this.openDirective.open;\n }\n\n /**\n * Reveals the contents of the accordion item.\n */\n reveal() {\n this.openDirective.reveal();\n }\n\n /**\n * Hides the contents of the accordion item.\n */\n hide() {\n this.openDirective.hide();\n }\n\n /**\n * Toggles the visibility of the contents of the accordion item.\n */\n toggle() {\n this.openDirective.toggle();\n }\n}\n","<button type=\"button\" class=\"daff-accordion-item__header\"\n (click)=\"toggle()\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-controls]=\"contentId\"\n [id]=\"itemId\"\n [disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\">\n <ng-content select=\"[daffAccordionItemTitle]\"></ng-content>\n</button>\n<div class=\"daff-accordion-item__content\" [id]=\"contentId\" [attr.aria-labelledby]=\"itemId\" role=\"region\">\n <ng-content></ng-content>\n</div>","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Used to provide a high level overview of the panel content. It should be wrapped by a `<daff-accordion-item>`.\n *\n * @example\n * ```html\n * <div daffAccordionItemTitle>Title</div>\n * ```\n */\n@Directive({\n selector: '[daffAccordionItemTitle]',\n host: {\n 'class': 'daff-accordion-item__title',\n },\n})\nexport class DaffAccordionItemTitleDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffAccordionComponent } from './accordion/accordion/accordion.component';\nimport { DaffAccordionItemComponent } from './accordion/accordion-item/accordion-item.component';\nimport { DaffAccordionItemTitleDirective } from './accordion/accordion-item-title/accordion-item-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ACCORDION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffAccordionComponent,\n DaffAccordionItemComponent,\n DaffAccordionItemTitleDirective,\n ],\n exports: [\n DaffAccordionComponent,\n DaffAccordionItemComponent,\n DaffAccordionItemTitleDirective,\n ],\n})\nexport class DaffAccordionModule { }\n","import { DaffAccordionComponent } from './accordion/accordion/accordion.component';\nimport { DaffAccordionItemComponent } from './accordion/accordion-item/accordion-item.component';\nimport { DaffAccordionItemTitleDirective } from './accordion/accordion-item-title/accordion-item-title.directive';\n\n/**\n * @docs-private\n *\n * `DAFF_ACCORDION_COMPONENTS` imports all the available components and directives related to the component.\n */\nexport const DAFF_ACCORDION_COMPONENTS = <const> [\n DaffAccordionComponent,\n DaffAccordionItemComponent,\n DaffAccordionItemTitleDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;MAeU,sBAAsB,CAAA;iIAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,gJAZvB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAY1B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAdlC,SAAS;+BACE,gBAAgB,EAAA,QAAA,EAChB,2BAA2B,EAAA,cAAA,EAMrB,CAAC;AACf,4BAAA,SAAS,EAAE,gCAAgC;yBAC5C,CAAC,EAAA,eAAA,EACe,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;ACnCjD;AAgBA,IAAI,mBAAmB,GAAG,CAAC;AAC3B,IAAI,0BAA0B,GAAG,CAAC;AAElC;;;;;;;;;;AAUG;MAqBU,0BAA0B,CAAA;AAgBrC;;;;AAIG;AACH,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ;IACxC;IAEA,WAAA,CACU,aAAoC,EACpC,iBAA2C,EAAA;QAD3C,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,iBAAiB,GAAjB,iBA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B;AACtC,qBAAA;AACF,iBAAA;;;ACTD;;AAEG;MAcU,mBAAmB,CAAA;iIAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,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,mBAAmB,YAX5B,YAAY;YACZ,sBAAsB;YACtB,0BAA0B;AAC1B,YAAA,+BAA+B,aAG/B,sBAAsB;YACtB,0BAA0B;YAC1B,+BAA+B,CAAA,EAAA,CAAA,CAAA;AAGtB,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,mBAAmB,YAX5B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAWH,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;wBACtB,0BAA0B;wBAC1B,+BAA+B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,0BAA0B;wBAC1B,+BAA+B;AAChC,qBAAA;AACF,iBAAA;;;AClBD;;;;AAIG;AACI,MAAM,yBAAyB,GAAW;IAC/C,sBAAsB;IACtB,0BAA0B;IAC1B,+BAA+B;;;ACZjC;;AAEG;;;;"}
@@ -1,22 +1,146 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
3
+ import { input, signal, inject, NgZone, ChangeDetectionStrategy, Component, Injectable, ElementRef, ViewContainerRef, afterEveryRender, DestroyRef, ViewEncapsulation, Directive, NgModule } from '@angular/core';
4
+ import { FaIconComponent } from '@fortawesome/angular-fontawesome';
5
+ import { faCopy, faCheck } from '@fortawesome/free-solid-svg-icons';
6
+ import * as i1 from '@daffodil/design/button';
7
+ import { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';
8
+
9
+ /**
10
+ * DaffArticleCopyButtonComponent is a button that copies text content to the clipboard.
11
+ * It provides visual feedback by changing the icon when content is successfully copied.
12
+ *
13
+ * @example
14
+ * ```html
15
+ * <daff-article-copy-button [content]="codeSnippet" />
16
+ * ```
17
+ */
18
+ class DaffArticleCopyButtonComponent {
19
+ constructor() {
20
+ // Content to be copied to clipboard
21
+ this.content = input.required(...(ngDevMode ? [{ debugName: "content" }] : []));
22
+ this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : []));
23
+ this.faCopy = faCopy; // default copy icon
24
+ this.faCheck = faCheck; // check icon for copied state
25
+ this._ngZone = inject(NgZone);
26
+ }
27
+ ngOnDestroy() {
28
+ if (this.timeoutId) {
29
+ clearTimeout(this.timeoutId);
30
+ }
31
+ }
32
+ async copyToClipboard() {
33
+ try {
34
+ // Write content to clipboard
35
+ await navigator.clipboard.writeText(this.content());
36
+ this.copied.set(true);
37
+ clearTimeout(this.timeoutId);
38
+ this._ngZone.runOutsideAngular(() => {
39
+ this.timeoutId = setTimeout(() => {
40
+ this._ngZone.run(() => this.copied.set(false));
41
+ }, 1500);
42
+ });
43
+ }
44
+ catch (err) {
45
+ console.error('Failed to copy text: ', err);
46
+ }
47
+ }
48
+ get ariaLabel() {
49
+ return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';
50
+ }
51
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleCopyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
52
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffArticleCopyButtonComponent, isStandalone: true, selector: "daff-article-copy-button", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n", styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: i1.DaffIconButtonComponent, selector: "button[daff-icon-button],a[daff-icon-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleCopyButtonComponent, decorators: [{
55
+ type: Component,
56
+ args: [{ selector: 'daff-article-copy-button', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
57
+ FaIconComponent,
58
+ DAFF_ICON_BUTTON_COMPONENTS,
59
+ ], template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n", styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"] }]
60
+ }] });
61
+
62
+ class DaffArticleCopyButtonService {
63
+ constructor() {
64
+ this.buttons = [];
65
+ }
66
+ /**
67
+ * Finds all code blocks and adds copy buttons to them.
68
+ * Skips code blocks with the `nocopy` attribute.
69
+ * @param hostElement - The host element to search for code blocks.
70
+ * @param viewContainerRef - The view container to create the copy button components.
71
+ */
72
+ addCopyButtonsToCodeBlocks(hostElement, viewContainerRef) {
73
+ const codeBlocks = hostElement.querySelectorAll('pre');
74
+ codeBlocks.forEach((pre) => {
75
+ const code = pre.querySelector('code');
76
+ if (!code) {
77
+ return;
78
+ }
79
+ // Skip if nocopy attribute is present
80
+ if (pre.hasAttribute('nocopy')) {
81
+ return;
82
+ }
83
+ // Skip if already has a copy button
84
+ if (pre.querySelector('daff-article-copy-button')) {
85
+ return;
86
+ }
87
+ const textContent = code.textContent || '';
88
+ // Create the copy button component
89
+ const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);
90
+ buttonRef.setInput('content', textContent);
91
+ // Insert button into pre before the code element
92
+ pre.insertBefore(buttonRef.location.nativeElement, code);
93
+ this.buttons.push({
94
+ buttonRef,
95
+ preElement: pre,
96
+ });
97
+ });
98
+ }
99
+ /**
100
+ * Cleanup copy button references
101
+ */
102
+ cleanup() {
103
+ this.buttons.forEach(({ buttonRef }) => {
104
+ buttonRef.destroy();
105
+ });
106
+ this.buttons = [];
107
+ }
108
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleCopyButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
109
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleCopyButtonService }); }
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleCopyButtonService, decorators: [{
112
+ type: Injectable
113
+ }] });
4
114
 
5
115
  /* eslint-disable quote-props */
6
116
  /**
7
117
  * A component for creating articles within your page.
8
118
  */
9
119
  class DaffArticleComponent {
10
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffArticleComponent, isStandalone: true, selector: "daff-article", host: { attributes: { "role": "article" }, classAttribute: "daff-article" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;word-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media (min-width: 768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.25rem;font-size:.875rem;line-height:1.5rem;margin:1.5rem 0;padding:1.5rem;overflow-x:auto}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{padding:0}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media (min-width: 768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
120
+ constructor(copyButtonService) {
121
+ this.copyButtonService = copyButtonService;
122
+ const elementRef = inject((ElementRef));
123
+ const viewContainerRef = inject(ViewContainerRef);
124
+ afterEveryRender({
125
+ write: () => {
126
+ this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);
127
+ },
128
+ });
129
+ const destroyRef = inject(DestroyRef);
130
+ destroyRef.onDestroy(() => {
131
+ this.copyButtonService.cleanup();
132
+ });
133
+ }
134
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleComponent, deps: [{ token: DaffArticleCopyButtonService }], target: i0.ɵɵFactoryTarget.Component }); }
135
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffArticleComponent, isStandalone: true, selector: "daff-article", host: { attributes: { "role": "article" }, classAttribute: "daff-article" }, providers: [DaffArticleCopyButtonService], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;word-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media (min-width: 768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.25rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media (min-width: 768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
12
136
  }
13
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleComponent, decorators: [{
14
138
  type: Component,
15
139
  args: [{ selector: 'daff-article', template: '<ng-content></ng-content>', host: {
16
140
  'class': 'daff-article',
17
141
  'role': 'article',
18
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;word-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media (min-width: 768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.25rem;font-size:.875rem;line-height:1.5rem;margin:1.5rem 0;padding:1.5rem;overflow-x:auto}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{padding:0}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media (min-width: 768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"] }]
19
- }] });
142
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DaffArticleCopyButtonService], styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;word-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media (min-width: 768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.25rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media (min-width: 768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"] }]
143
+ }], ctorParameters: () => [{ type: DaffArticleCopyButtonService }] });
20
144
 
21
145
  /* eslint-disable quote-props */
22
146
  class DaffArticleMetaDirective {
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-article.mjs","sources":["../../../libs/design/article/src/article/article.component.ts","../../../libs/design/article/src/article-meta/article-meta.directive.ts","../../../libs/design/article/src/article.module.ts","../../../libs/design/article/src/article.ts","../../../libs/design/article/src/daffodil-design-article.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n/**\n * A component for creating articles within your page.\n */\n@Component({\n selector: 'daff-article',\n template: '<ng-content></ng-content>',\n styleUrls: ['./article.component.scss'],\n host: {\n 'class': 'daff-article',\n 'role': 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffArticleComponent {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n@Directive({\n selector: '[daffArticleMeta]',\n host: {\n 'class': 'daff-article__meta',\n },\n})\nexport class DaffArticleMetaDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n exports: [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n})\nexport class DaffArticleModule { }\n","import { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_ARTICLE_COMPONENTS = <const> [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AAOA;;AAEG;MAYU,oBAAoB,CAAA;iIAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,qJATrB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+0GAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAS1B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACE,cAAc,EAAA,QAAA,EACd,2BAA2B,EAAA,IAAA,EAE/B;AACJ,wBAAA,OAAO,EAAE,cAAc;AACvB,wBAAA,MAAM,EAAE,SAAS;AAClB,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,+0GAAA,CAAA,EAAA;;;ACnBjD;MASa,wBAAwB,CAAA;iIAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,oBAAA,EAAA,EAAA,QAAA,EAAA,EAAA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/src/article-copy-button/copy-button/copy-button.component.ts","../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.html","../../../libs/design/article/src/article-copy-button/service/copy-button.service.ts","../../../libs/design/article/src/article/article.component.ts","../../../libs/design/article/src/article-meta/article-meta.directive.ts","../../../libs/design/article/src/article.module.ts","../../../libs/design/article/src/article.ts","../../../libs/design/article/src/daffodil-design-article.ts"],"sourcesContent":["import {\n Component,\n NgZone,\n ChangeDetectionStrategy,\n input,\n signal,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faCheck,\n faCopy,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n/**\n * DaffArticleCopyButtonComponent is a button that copies text content to the clipboard.\n * It provides visual feedback by changing the icon when content is successfully copied.\n *\n * @example\n * ```html\n * <daff-article-copy-button [content]=\"codeSnippet\" />\n * ```\n */\n@Component({\n selector: 'daff-article-copy-button',\n templateUrl: './copy-button.component.html',\n styleUrls: ['./copy-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleCopyButtonComponent implements OnDestroy {\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n // Content to be copied to clipboard\n content = input.required<string>();\n\n protected copied = signal(false);\n\n protected readonly faCopy = faCopy; // default copy icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyToClipboard(): Promise<void> {\n try {\n // Write content to clipboard\n await navigator.clipboard.writeText(this.content());\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';\n }\n}\n","<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonComponent } from '../copy-button/copy-button.component';\n\ninterface ButtonEntry {\n buttonRef: ComponentRef<DaffArticleCopyButtonComponent>;\n preElement: HTMLPreElement;\n}\n\n@Injectable()\nexport class DaffArticleCopyButtonService {\n private buttons: Array<ButtonEntry> = [];\n\n /**\n * Finds all code blocks and adds copy buttons to them.\n * Skips code blocks with the `nocopy` attribute.\n * @param hostElement - The host element to search for code blocks.\n * @param viewContainerRef - The view container to create the copy button components.\n */\n addCopyButtonsToCodeBlocks(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const codeBlocks = hostElement.querySelectorAll('pre');\n\n codeBlocks.forEach((pre: HTMLPreElement) => {\n const code = pre.querySelector('code');\n if (!code) {\n return;\n }\n\n // Skip if nocopy attribute is present\n if (pre.hasAttribute('nocopy')) {\n return;\n }\n\n // Skip if already has a copy button\n if (pre.querySelector('daff-article-copy-button')) {\n return;\n }\n\n const textContent = code.textContent || '';\n\n // Create the copy button component\n const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);\n buttonRef.setInput('content', textContent);\n\n // Insert button into pre before the code element\n pre.insertBefore(buttonRef.location.nativeElement, code);\n\n this.buttons.push({\n buttonRef,\n preElement: pre,\n });\n });\n }\n\n /**\n * Cleanup copy button references\n */\n cleanup(): void {\n this.buttons.forEach(({ buttonRef }) => {\n buttonRef.destroy();\n });\n this.buttons = [];\n }\n}\n","/* eslint-disable quote-props */\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ViewContainerRef,\n inject,\n DestroyRef,\n afterEveryRender,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonService } from '../article-copy-button/service/copy-button.service';\n\n/**\n * A component for creating articles within your page.\n */\n@Component({\n selector: 'daff-article',\n template: '<ng-content></ng-content>',\n styleUrls: ['./article.component.scss'],\n host: {\n 'class': 'daff-article',\n 'role': 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DaffArticleCopyButtonService],\n})\nexport class DaffArticleComponent {\n constructor(\n private copyButtonService: DaffArticleCopyButtonService,\n ) {\n const elementRef = inject(ElementRef<HTMLElement>);\n const viewContainerRef = inject(ViewContainerRef);\n\n afterEveryRender({\n write: () => {\n this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);\n },\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n this.copyButtonService.cleanup();\n });\n }\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n@Directive({\n selector: '[daffArticleMeta]',\n host: {\n 'class': 'daff-article__meta',\n },\n})\nexport class DaffArticleMetaDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n exports: [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n})\nexport class DaffArticleModule { }\n","import { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_ARTICLE_COMPONENTS = <const> [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffArticleCopyButtonService"],"mappings":";;;;;;;;AAiBA;;;;;;;;AAQG;MAWU,8BAA8B,CAAA;AAV3C,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAU;AAExB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK,kDAAC;AAEb,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC;AAChB,QAAA,IAAA,CAAA,OAAO,GAAG,OAAO,CAAC;AAC7B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AA2BjC,IAAA;IAzBC,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;QAC9B;IACF;AAEA,IAAA,MAAM,eAAe,GAAA;AACnB,QAAA,IAAI;;YAEF,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;AACnD,YAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;AACrB,YAAA,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;AAC5B,YAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAK;AAClC,gBAAA,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,MAAK;AAC/B,oBAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAChD,CAAC,EAAE,IAAI,CAAC;AACV,YAAA,CAAC,CAAC;QACJ;QAAE,OAAO,GAAG,EAAE;AACZ,YAAA,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,GAAG,CAAC;QAC7C;IACF;AAE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AAiB,CAAA;iIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,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,iBAAiB,YAT1B,YAAY;YACZ,oBAAoB;AACpB,YAAA,wBAAwB,aAGxB,oBAAoB;YACpB,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAGf,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,iBAAiB,YAT1B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FASH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAX7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,oBAAoB;wBACpB,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,wBAAwB;AACzB,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;AACI,MAAM,uBAAuB,GAAW;IAC7C,oBAAoB;IACpB,wBAAwB;;;ACR1B;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
3
3
  import { Directive, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, HostBinding, NgModule } from '@angular/core';
4
4
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
5
5
  import * as i2 from '@daffodil/design';
6
- import { DaffSizableDirective, DaffPrefixDirective, DaffSuffixDirective, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffColorableDirective } from '@daffodil/design';
6
+ import { DaffSizableDirective, DaffPrefixDirective, DaffSuffixDirective, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffColorableDirective, DaffDisableableDirective } from '@daffodil/design';
7
7
 
8
8
  class DaffButtonSizableDirective extends DaffSizableDirective {
9
9
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffButtonSizableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
@@ -15,13 +15,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
15
15
  }] });
16
16
 
17
17
  class DaffButtonBaseDirective {
18
- constructor(size) {
18
+ constructor(size, disabledDirective) {
19
19
  this.size = size;
20
+ this.disabledDirective = disabledDirective;
20
21
  /**
21
22
  * Sets the tabindex.
22
23
  */
23
24
  this.tabindex = 0;
24
- this._disabled = false;
25
25
  /**
26
26
  * Sets the default size of a button to medium.
27
27
  */
@@ -31,13 +31,13 @@ class DaffButtonBaseDirective {
31
31
  * The disabled state of the button.
32
32
  */
33
33
  get disabled() {
34
- return this._disabled;
34
+ return this.disabledDirective.disabled;
35
35
  }
36
36
  set disabled(value) {
37
- this._disabled = coerceBooleanProperty(value);
37
+ this.disabledDirective.disabled = coerceBooleanProperty(value);
38
38
  }
39
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffButtonBaseDirective, deps: [{ token: DaffButtonSizableDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
40
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffButtonBaseDirective, isStandalone: true, selector: "[daffButtonBase]", inputs: { tabindex: "tabindex", disabled: "disabled" }, host: { properties: { "class.disabled": "disabled", "attr.disabled": "disabled ? true : null", "attr.aria-disabled": "disabled ? true : null", "attr.tabindex": "disabled ? -1 : this.tabindex" } }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, static: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true, static: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: DaffButtonSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }], ngImport: i0 }); }
39
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffButtonBaseDirective, deps: [{ token: DaffButtonSizableDirective }, { token: i2.DaffDisableableDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
40
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffButtonBaseDirective, isStandalone: true, selector: "[daffButtonBase]", inputs: { tabindex: "tabindex", disabled: "disabled" }, host: { properties: { "class.disabled": "disabled", "attr.disabled": "disabled ? true : null", "attr.aria-disabled": "disabled ? true : null", "attr.tabindex": "disabled ? -1 : this.tabindex" } }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, static: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true, static: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: DaffButtonSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }, { directive: i2.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0 }); }
41
41
  }
42
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffButtonBaseDirective, decorators: [{
43
43
  type: Directive,
@@ -57,6 +57,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
57
57
  directive: DaffColorableDirective,
58
58
  inputs: ['color'],
59
59
  },
60
+ {
61
+ directive: DaffDisableableDirective,
62
+ inputs: ['disabled'],
63
+ },
60
64
  ],
61
65
  host: {
62
66
  '[class.disabled]': 'disabled',
@@ -65,7 +69,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
65
69
  '[attr.tabindex]': 'disabled ? -1 : this.tabindex',
66
70
  },
67
71
  }]
68
- }], ctorParameters: () => [{ type: DaffButtonSizableDirective }], propDecorators: { _prefix: [{
72
+ }], ctorParameters: () => [{ type: DaffButtonSizableDirective }, { type: i2.DaffDisableableDirective }], propDecorators: { _prefix: [{
69
73
  type: ContentChild,
70
74
  args: [DaffPrefixDirective, { static: true }]
71
75
  }], _suffix: [{
@@ -105,14 +109,14 @@ class DaffButtonComponent extends DaffButtonBaseDirective {
105
109
  this.elevated = false;
106
110
  }
107
111
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
108
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffButtonComponent, isStandalone: true, selector: "button[daff-button],a[daff-button]", inputs: { elevated: "elevated" }, host: { properties: { "class.elevated": "elevated" }, classAttribute: "daff-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-button[disabled],.daff-button.disabled{cursor:not-allowed;opacity:.5}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:1}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button:not(.daff-button[disabled],.daff-button.disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-button:not(.daff-button[disabled],.daff-button.disabled):hover:after,.daff-button:not(.daff-button[disabled],.daff-button.disabled):active:after{opacity:1}.daff-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-button.elevated[disabled]:hover,.daff-button.elevated.disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
112
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffButtonComponent, isStandalone: true, selector: "button[daff-button],a[daff-button]", inputs: { elevated: "elevated" }, host: { properties: { "class.elevated": "elevated" }, classAttribute: "daff-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-button[disabled],.daff-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:1}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):hover:after,.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):active:after{opacity:1}.daff-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-button.elevated[disabled]:hover,.daff-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
109
113
  }
110
114
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffButtonComponent, decorators: [{
111
115
  type: Component,
112
116
  args: [{ selector: 'button[daff-button]' + ',' + 'a[daff-button]', host: {
113
117
  'class': 'daff-button',
114
118
  '[class.elevated]': 'elevated',
115
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-button[disabled],.daff-button.disabled{cursor:not-allowed;opacity:.5}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:1}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button:not(.daff-button[disabled],.daff-button.disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-button:not(.daff-button[disabled],.daff-button.disabled):hover:after,.daff-button:not(.daff-button[disabled],.daff-button.disabled):active:after{opacity:1}.daff-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-button.elevated[disabled]:hover,.daff-button.elevated.disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
119
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-button[disabled],.daff-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:1}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):hover:after,.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):active:after{opacity:1}.daff-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-button.elevated[disabled]:hover,.daff-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
116
120
  }], propDecorators: { elevated: [{
117
121
  type: Input
118
122
  }] } });
@@ -138,13 +142,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
138
142
  /* eslint-disable quote-props */
139
143
  class DaffFlatButtonComponent extends DaffButtonBaseDirective {
140
144
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFlatButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
141
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffFlatButtonComponent, isStandalone: true, selector: "button[daff-flat-button],a[daff-flat-button]", host: { classAttribute: "daff-flat-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-flat-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.disabled{cursor:not-allowed;opacity:.5}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:1}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.disabled):hover:after,.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.disabled):active:after{opacity:1}.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
145
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffFlatButtonComponent, isStandalone: true, selector: "button[daff-flat-button],a[daff-flat-button]", host: { classAttribute: "daff-flat-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-flat-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:1}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):hover:after,.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):active:after{opacity:1}.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
142
146
  }
143
147
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFlatButtonComponent, decorators: [{
144
148
  type: Component,
145
149
  args: [{ selector: 'button[daff-flat-button]' + ',' + 'a[daff-flat-button]', host: {
146
150
  'class': 'daff-flat-button',
147
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-flat-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.disabled{cursor:not-allowed;opacity:.5}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:1}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.disabled):hover:after,.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.disabled):active:after{opacity:1}.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
151
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-flat-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:1}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):hover:after,.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):active:after{opacity:1}.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
148
152
  }] });
149
153
 
150
154
  /**
@@ -164,13 +168,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
164
168
  /* eslint-disable quote-props */
165
169
  class DaffIconButtonComponent extends DaffButtonBaseDirective {
166
170
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffIconButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
167
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffIconButtonComponent, isStandalone: true, selector: "button[daff-icon-button],a[daff-icon-button]", host: { classAttribute: "daff-icon-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-icon-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.disabled{cursor:not-allowed;opacity:.5}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:1}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-icon-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;width:2rem}.daff-icon-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;width:3rem}.daff-icon-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;width:3.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
171
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffIconButtonComponent, isStandalone: true, selector: "button[daff-icon-button],a[daff-icon-button]", host: { classAttribute: "daff-icon-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-icon-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:1}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-icon-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;width:2rem}.daff-icon-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;width:3rem}.daff-icon-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;width:3.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
168
172
  }
169
173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffIconButtonComponent, decorators: [{
170
174
  type: Component,
171
175
  args: [{ selector: 'button[daff-icon-button]' + ',' + 'a[daff-icon-button]', host: {
172
176
  'class': 'daff-icon-button',
173
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-icon-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.disabled{cursor:not-allowed;opacity:.5}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:1}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-icon-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;width:2rem}.daff-icon-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;width:3rem}.daff-icon-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;width:3.5rem}\n"] }]
177
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-icon-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:1}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-icon-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;width:2rem}.daff-icon-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;width:3rem}.daff-icon-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;width:3.5rem}\n"] }]
174
178
  }] });
175
179
 
176
180
  /**
@@ -202,11 +206,11 @@ class DaffRaisedButtonComponent extends DaffButtonBaseDirective {
202
206
  this.class = true;
203
207
  }
204
208
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffRaisedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
205
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffRaisedButtonComponent, isStandalone: true, selector: "button[daff-raised-button],a[daff-raised-button]", host: { properties: { "class.daff-raised-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-raised-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-raised-button[disabled],.daff-raised-button.disabled{cursor:not-allowed;opacity:.5}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:1}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.disabled):after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.disabled):hover:after,.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.disabled):active:after{opacity:1}.daff-raised-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-raised-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-raised-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
209
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffRaisedButtonComponent, isStandalone: true, selector: "button[daff-raised-button],a[daff-raised-button]", host: { properties: { "class.daff-raised-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-raised-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-raised-button[disabled],.daff-raised-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:1}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):hover:after,.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):active:after{opacity:1}.daff-raised-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-raised-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-raised-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
206
210
  }
207
211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffRaisedButtonComponent, decorators: [{
208
212
  type: Component,
209
- args: [{ selector: 'button[daff-raised-button]' + ',' + 'a[daff-raised-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-raised-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-raised-button[disabled],.daff-raised-button.disabled{cursor:not-allowed;opacity:.5}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:1}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.disabled):after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.disabled):hover:after,.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.disabled):active:after{opacity:1}.daff-raised-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-raised-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-raised-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
213
+ args: [{ selector: 'button[daff-raised-button]' + ',' + 'a[daff-raised-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-raised-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-raised-button[disabled],.daff-raised-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:1}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):hover:after,.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):active:after{opacity:1}.daff-raised-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-raised-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-raised-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
210
214
  }], propDecorators: { class: [{
211
215
  type: HostBinding,
212
216
  args: ['class.daff-raised-button']
@@ -240,14 +244,14 @@ class DaffStrokedButtonComponent extends DaffButtonBaseDirective {
240
244
  this.elevated = false;
241
245
  }
242
246
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffStrokedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
243
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffStrokedButtonComponent, isStandalone: true, selector: "button[daff-stroked-button],a[daff-stroked-button]", inputs: { elevated: "elevated" }, host: { properties: { "class.elevated": "elevated" }, classAttribute: "daff-stroked-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-stroked-button[disabled],.daff-stroked-button.disabled{cursor:not-allowed;opacity:.5}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:1}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.disabled):after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.disabled):hover:after,.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.disabled):active:after{opacity:1}.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-stroked-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-stroked-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-stroked-button.elevated[disabled]:hover,.daff-stroked-button.elevated.disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
247
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffStrokedButtonComponent, isStandalone: true, selector: "button[daff-stroked-button],a[daff-stroked-button]", inputs: { elevated: "elevated" }, host: { properties: { "class.elevated": "elevated" }, classAttribute: "daff-stroked-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:1}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):hover:after,.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):active:after{opacity:1}.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-stroked-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-stroked-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-stroked-button.elevated[disabled]:hover,.daff-stroked-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
244
248
  }
245
249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffStrokedButtonComponent, decorators: [{
246
250
  type: Component,
247
251
  args: [{ selector: 'button[daff-stroked-button]' + ',' + 'a[daff-stroked-button]', host: {
248
252
  'class': 'daff-stroked-button',
249
253
  '[class.elevated]': 'elevated',
250
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-stroked-button[disabled],.daff-stroked-button.disabled{cursor:not-allowed;opacity:.5}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:1}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.disabled):after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.disabled):hover:after,.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.disabled):active:after{opacity:1}.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-stroked-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-stroked-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-stroked-button.elevated[disabled]:hover,.daff-stroked-button.elevated.disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}\n"] }]
254
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:1}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):hover:after,.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):active:after{opacity:1}.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-stroked-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-stroked-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}.daff-stroked-button.elevated[disabled]:hover,.daff-stroked-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}\n"] }]
251
255
  }], propDecorators: { elevated: [{
252
256
  type: Input
253
257
  }] } });
@@ -273,13 +277,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
273
277
  /* eslint-disable quote-props */
274
278
  class DaffUnderlineButtonComponent extends DaffButtonBaseDirective {
275
279
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffUnderlineButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
276
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffUnderlineButtonComponent, isStandalone: true, selector: "button[daff-underline-button],a[daff-underline-button]", host: { classAttribute: "daff-underline-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-underline-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;background:transparent;border:0;border-radius:0;line-height:1.25rem;overflow:hidden;text-decoration:none;vertical-align:middle}.daff-underline-button[disabled],.daff-underline-button.disabled{cursor:not-allowed;opacity:.5}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:1}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button[disabled],.daff-underline-button.disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.disabled:hover:after,.daff-underline-button.disabled:active:after{animation:none}.daff-underline-button:after{bottom:0;content:\"\";height:2px;left:0;opacity:1;position:absolute;width:100%}.daff-underline-button:hover:after{animation:none}@media (min-width: 1024px){.daff-underline-button:hover:after{animation:underline-button-hover .7s ease}}.daff-underline-button.daff-sm{font-size:.875rem;height:1.25rem;padding:0 0 .25rem}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 .25rem}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 .5rem}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
280
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffUnderlineButtonComponent, isStandalone: true, selector: "button[daff-underline-button],a[daff-underline-button]", host: { classAttribute: "daff-underline-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-underline-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;background:transparent;border:0;border-radius:0;line-height:1.25rem;overflow:hidden;text-decoration:none;vertical-align:middle}.daff-underline-button[disabled],.daff-underline-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:1}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button[disabled],.daff-underline-button.daff-disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.daff-disabled:hover:after,.daff-underline-button.daff-disabled:active:after{animation:none}.daff-underline-button:after{bottom:0;content:\"\";height:2px;left:0;opacity:1;position:absolute;width:100%}.daff-underline-button:hover:after{animation:none}@media (min-width: 1024px){.daff-underline-button:hover:after{animation:underline-button-hover .7s ease}}.daff-underline-button.daff-sm{font-size:.875rem;height:1.25rem;padding:0 0 .25rem}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 .25rem}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 .5rem}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
277
281
  }
278
282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffUnderlineButtonComponent, decorators: [{
279
283
  type: Component,
280
284
  args: [{ selector: 'button[daff-underline-button]' + ',' + 'a[daff-underline-button]', host: {
281
285
  'class': 'daff-underline-button',
282
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-underline-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;background:transparent;border:0;border-radius:0;line-height:1.25rem;overflow:hidden;text-decoration:none;vertical-align:middle}.daff-underline-button[disabled],.daff-underline-button.disabled{cursor:not-allowed;opacity:.5}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:1}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button[disabled],.daff-underline-button.disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.disabled:hover:after,.daff-underline-button.disabled:active:after{animation:none}.daff-underline-button:after{bottom:0;content:\"\";height:2px;left:0;opacity:1;position:absolute;width:100%}.daff-underline-button:hover:after{animation:none}@media (min-width: 1024px){.daff-underline-button:hover:after{animation:underline-button-hover .7s ease}}.daff-underline-button.daff-sm{font-size:.875rem;height:1.25rem;padding:0 0 .25rem}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 .25rem}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 .5rem}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"] }]
286
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<span class=\"daff-button__content\"><ng-content></ng-content></span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-underline-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;background:transparent;border:0;border-radius:0;line-height:1.25rem;overflow:hidden;text-decoration:none;vertical-align:middle}.daff-underline-button[disabled],.daff-underline-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:1}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button[disabled],.daff-underline-button.daff-disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.daff-disabled:hover:after,.daff-underline-button.daff-disabled:active:after{animation:none}.daff-underline-button:after{bottom:0;content:\"\";height:2px;left:0;opacity:1;position:absolute;width:100%}.daff-underline-button:hover:after{animation:none}@media (min-width: 1024px){.daff-underline-button:hover:after{animation:underline-button-hover .7s ease}}.daff-underline-button.daff-sm{font-size:.875rem;height:1.25rem;padding:0 0 .25rem}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 .25rem}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 .5rem}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"] }]
283
287
  }] });
284
288
 
285
289
  /**