@daffodil/design 0.93.0 → 0.94.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 (138) hide show
  1. package/README.md +0 -1
  2. package/accordion/src/accordion-theme.scss +2 -2
  3. package/article/src/article/_stops-article-cascade.scss +5 -1
  4. package/article/src/article-theme.scss +2 -2
  5. package/badge/README.md +85 -0
  6. package/badge/src/badge-theme.scss +197 -0
  7. package/beacon/README.md +61 -0
  8. package/beacon/src/beacon-theme.scss +61 -0
  9. package/breadcrumb/src/breadcrumb-theme.scss +2 -2
  10. package/button/src/button/basic/button-theme.scss +2 -2
  11. package/button/src/button/flat/flat-theme.scss +2 -2
  12. package/button/src/button/icon/icon-theme.scss +2 -2
  13. package/button/src/button/raised/raised-theme.scss +13 -13
  14. package/button/src/button/stroked/stroked-theme.scss +2 -2
  15. package/button/src/button/underline/underline-theme.scss +2 -2
  16. package/callout/src/callout-theme.scss +12 -2
  17. package/card/src/card/stroked/stroked-theme.scss +14 -22
  18. package/card/src/card-base-theme.scss +4 -4
  19. package/card/src/card-base.scss +13 -16
  20. package/fesm2022/daffodil-design-accordion.mjs +9 -15
  21. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-article.mjs +2 -2
  23. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-badge.mjs +87 -0
  25. package/fesm2022/daffodil-design-badge.mjs.map +1 -0
  26. package/fesm2022/daffodil-design-beacon.mjs +48 -0
  27. package/fesm2022/daffodil-design-beacon.mjs.map +1 -0
  28. package/fesm2022/daffodil-design-breadcrumb.mjs +1 -1
  29. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-button.mjs +1 -1
  31. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-callout.mjs +2 -2
  33. package/fesm2022/daffodil-design-card.mjs +9 -11
  34. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  35. package/fesm2022/daffodil-design-form-field.mjs +95 -115
  36. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  37. package/fesm2022/daffodil-design-form.mjs +5 -7
  38. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  39. package/fesm2022/daffodil-design-image.mjs +41 -98
  40. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  41. package/fesm2022/daffodil-design-input.mjs +3 -3
  42. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  43. package/fesm2022/daffodil-design-list.mjs +16 -21
  44. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  45. package/fesm2022/daffodil-design-media-gallery.mjs +56 -61
  46. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  47. package/fesm2022/daffodil-design-menu.mjs +61 -38
  48. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  49. package/fesm2022/daffodil-design-modal.mjs +2 -2
  50. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  51. package/fesm2022/daffodil-design-native-select.mjs +3 -3
  52. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  53. package/fesm2022/daffodil-design-notification.mjs +17 -20
  54. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  55. package/fesm2022/daffodil-design-paginator.mjs +71 -76
  56. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  57. package/fesm2022/daffodil-design-progress-bar.mjs +33 -53
  58. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  59. package/fesm2022/daffodil-design-select.mjs +1 -1
  60. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  61. package/fesm2022/daffodil-design-sidebar.mjs +2 -2
  62. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  63. package/fesm2022/daffodil-design-spinner.mjs +17 -16
  64. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  65. package/fesm2022/daffodil-design-switch.mjs +20 -29
  66. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  67. package/fesm2022/daffodil-design-tabs.mjs +86 -88
  68. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  69. package/fesm2022/daffodil-design-tag.mjs +33 -28
  70. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  71. package/fesm2022/daffodil-design-text-snippet.mjs +18 -23
  72. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  73. package/fesm2022/daffodil-design-textarea.mjs +3 -3
  74. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  75. package/fesm2022/daffodil-design-toast.mjs +19 -20
  76. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  77. package/fesm2022/daffodil-design.mjs +111 -80
  78. package/fesm2022/daffodil-design.mjs.map +1 -1
  79. package/form/src/hint/hint-theme.scss +2 -2
  80. package/form-field/src/form-field-theme.scss +2 -2
  81. package/hero/src/hero-theme.scss +12 -2
  82. package/list/README.md +10 -0
  83. package/list/src/list-theme.scss +2 -2
  84. package/media-gallery/README.md +0 -5
  85. package/media-gallery/src/media-gallery-theme.scss +2 -2
  86. package/menu/README.md +5 -0
  87. package/menu/src/menu-theme.scss +4 -4
  88. package/notification/src/notification-theme.scss +2 -2
  89. package/package.json +1 -1
  90. package/paginator/src/paginator-theme.scss +2 -2
  91. package/progress-bar/README.md +1 -1
  92. package/progress-bar/src/progress-bar-theme.scss +2 -2
  93. package/scss/global.scss +4 -0
  94. package/scss/state/skeleton/_mixins.scss +2 -2
  95. package/scss/theme/default.scss +15 -0
  96. package/scss/theme.scss +4 -8
  97. package/scss/theming/_configure-palette.scss +5 -1
  98. package/scss/theming/_get-theme-mode.scss +1 -1
  99. package/scss/theming/_index.scss +2 -3
  100. package/scss/theming/_light-dark.scss +37 -12
  101. package/scss/theming/color-shift/_color-shift.scss +56 -0
  102. package/scss/theming/color-shift/_color-shift.spec.scss +107 -0
  103. package/scss/theming/color-shift/_index.scss +1 -0
  104. package/scss/theming/{_daff-theme.scss → default/_daff-theme.scss} +4 -4
  105. package/scss/theming/default/_index.scss +1 -0
  106. package/select/src/select-theme.scss +5 -3
  107. package/switch/src/switch-theme.scss +2 -2
  108. package/tabs/src/tabs-theme.scss +2 -2
  109. package/tag/README.md +10 -6
  110. package/tag/src/tag-theme.scss +102 -5
  111. package/toast/src/toast-theme.scss +2 -2
  112. package/tree/src/tree-theme.scss +2 -2
  113. package/types/daffodil-design-accordion.d.ts +4 -4
  114. package/types/daffodil-design-badge.d.ts +63 -0
  115. package/types/daffodil-design-beacon.d.ts +26 -0
  116. package/types/daffodil-design-card.d.ts +2 -2
  117. package/types/daffodil-design-form-field.d.ts +34 -31
  118. package/types/daffodil-design-form.d.ts +2 -2
  119. package/types/daffodil-design-image.d.ts +15 -28
  120. package/types/daffodil-design-list.d.ts +3 -3
  121. package/types/daffodil-design-media-gallery.d.ts +31 -20
  122. package/types/daffodil-design-menu.d.ts +51 -20
  123. package/types/daffodil-design-notification.d.ts +5 -6
  124. package/types/daffodil-design-paginator.d.ts +20 -25
  125. package/types/daffodil-design-progress-bar.d.ts +16 -21
  126. package/types/daffodil-design-spinner.d.ts +2 -2
  127. package/types/daffodil-design-switch.d.ts +7 -8
  128. package/types/daffodil-design-tabs.d.ts +29 -29
  129. package/types/daffodil-design-tag.d.ts +22 -16
  130. package/types/daffodil-design-text-snippet.d.ts +9 -9
  131. package/types/daffodil-design.d.ts +61 -41
  132. package/fesm2022/daffodil-design-loading-icon.mjs +0 -67
  133. package/fesm2022/daffodil-design-loading-icon.mjs.map +0 -1
  134. package/loading-icon/README.md +0 -59
  135. package/loading-icon/src/loading-icon-theme.scss +0 -103
  136. package/scss/theming/illuminate/illuminate.scss +0 -149
  137. package/scss/theming/illuminate/illuminate.spec.scss +0 -15
  138. package/types/daffodil-design-loading-icon.d.ts +0 -31
@@ -13,9 +13,11 @@
13
13
  }
14
14
 
15
15
  @media (hover: hover) {
16
- .daff-card__wrapper {
17
- &::after {
18
- opacity: 1;
16
+ &:hover {
17
+ .daff-card__wrapper {
18
+ &::after {
19
+ opacity: 1;
20
+ }
19
21
  }
20
22
  }
21
23
  }
@@ -61,7 +63,7 @@
61
63
  @include stroked-card-theme-variant(daff-color($neutral, 20));
62
64
  }
63
65
 
64
- @include light($mode) {
66
+ @include daff-light-mode($mode) {
65
67
  @include stroked-card-theme-variant(daff-color($neutral, 20));
66
68
  color: $base-contrast;
67
69
 
@@ -75,7 +77,7 @@
75
77
  }
76
78
  }
77
79
 
78
- @include dark($mode) {
80
+ @include daff-dark-mode($mode) {
79
81
  @include stroked-card-theme-variant(daff-color($neutral, 90));
80
82
  color: $base-contrast;
81
83
 
@@ -92,14 +94,14 @@
92
94
 
93
95
  a {
94
96
  &.daff-stroked-card {
95
- @include light($mode) {
97
+ @include daff-light-mode($mode) {
96
98
  @include linkable-stroked-card-theme-variant(
97
99
  daff-color($neutral, 20),
98
100
  0.2
99
101
  );
100
102
  }
101
103
 
102
- @include dark($mode) {
104
+ @include daff-dark-mode($mode) {
103
105
  @include linkable-stroked-card-theme-variant(
104
106
  daff-color($neutral, 90),
105
107
  0.2
@@ -107,33 +109,23 @@
107
109
  }
108
110
 
109
111
  &.daff-primary {
110
- @include linkable-stroked-card-theme-variant(
111
- daff-color($primary)
112
- );
112
+ @include linkable-stroked-card-theme-variant(daff-color($primary));
113
113
  }
114
114
 
115
115
  &.daff-secondary {
116
- @include linkable-stroked-card-theme-variant(
117
- daff-color($secondary)
118
- );
116
+ @include linkable-stroked-card-theme-variant(daff-color($secondary));
119
117
  }
120
118
 
121
119
  &.daff-tertiary {
122
- @include linkable-stroked-card-theme-variant(
123
- daff-color($tertiary)
124
- );
120
+ @include linkable-stroked-card-theme-variant(daff-color($tertiary));
125
121
  }
126
122
 
127
123
  &.daff-dark {
128
- @include linkable-stroked-card-theme-variant(
129
- daff-color($neutral, 90)
130
- );
124
+ @include linkable-stroked-card-theme-variant(daff-color($neutral, 90));
131
125
  }
132
126
 
133
127
  &.daff-light {
134
- @include linkable-stroked-card-theme-variant(
135
- daff-color($neutral, 20)
136
- );
128
+ @include linkable-stroked-card-theme-variant(daff-color($neutral, 20));
137
129
  }
138
130
  }
139
131
  }
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  .daff-card {
57
- @include light($mode) {
57
+ @include daff-light-mode($mode) {
58
58
  @include daff-basic-card-theme-variant(daff-color($neutral, 10));
59
59
 
60
60
  &.daff-primary {
@@ -70,7 +70,7 @@
70
70
  }
71
71
  }
72
72
 
73
- @include dark($mode) {
73
+ @include daff-dark-mode($mode) {
74
74
  @include daff-basic-card-theme-variant(daff-color($neutral, 90));
75
75
 
76
76
  &.daff-primary {
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  &.daff-card {
120
- @include light($mode) {
120
+ @include daff-light-mode($mode) {
121
121
  @include daff-linkable-card-theme-variant(daff-color($neutral, 20));
122
122
 
123
123
  &.daff-primary {
@@ -149,7 +149,7 @@
149
149
  }
150
150
  }
151
151
 
152
- @include dark($mode) {
152
+ @include daff-dark-mode($mode) {
153
153
  @include daff-linkable-card-theme-variant(daff-color($neutral, 80));
154
154
 
155
155
  &.daff-primary {
@@ -1,8 +1,7 @@
1
1
  @use '../../scss/typography' as t;
2
2
  @use '../../scss/layout';
3
3
 
4
- $card-border-radius: 8px;
5
- $card-inner-border-radius: calc(#{$card-border-radius} - 1px);
4
+ $card-border-radius: 0.5rem;
6
5
 
7
6
  @mixin daff-card-base {
8
7
  display: flex;
@@ -11,12 +10,16 @@ $card-inner-border-radius: calc(#{$card-border-radius} - 1px);
11
10
 
12
11
  .daff-card__image {
13
12
  display: inline-block;
13
+ overflow: hidden;
14
+ height: 100%;
14
15
  width: 100%;
15
16
  }
16
17
 
17
18
  .daff-card__wrapper {
18
19
  position: relative;
19
20
  height: 100%;
21
+ flex: 1 1 auto;
22
+ min-width: 0;
20
23
 
21
24
  &::after {
22
25
  content: '';
@@ -36,11 +39,10 @@ $card-inner-border-radius: calc(#{$card-border-radius} - 1px);
36
39
  flex-direction: column;
37
40
 
38
41
  .daff-card__image {
39
- border-radius: $card-inner-border-radius $card-inner-border-radius 0 0;
40
-
41
- img {
42
- border-radius: $card-inner-border-radius $card-inner-border-radius 0 0;
43
- }
42
+ border-top-left-radius: inherit;
43
+ border-top-right-radius: inherit;
44
+ border-bottom-right-radius: 0;
45
+ border-bottom-left-radius: 0;
44
46
  }
45
47
  }
46
48
 
@@ -53,15 +55,10 @@ $card-inner-border-radius: calc(#{$card-border-radius} - 1px);
53
55
  }
54
56
 
55
57
  .daff-card__image {
56
- border-radius: $card-inner-border-radius 0 0 $card-inner-border-radius;
57
-
58
- img {
59
- border-radius: $card-inner-border-radius 0 0 $card-inner-border-radius;
60
- object-fit: cover;
61
- object-position: center center;
62
- height: 100% !important; /* stylelint-disable-line declaration-no-important */
63
- width: 100%;
64
- }
58
+ border-top-left-radius: inherit;
59
+ border-top-right-radius: 0;
60
+ border-bottom-right-radius: 0;
61
+ border-bottom-left-radius: inherit;
65
62
  }
66
63
  }
67
64
 
@@ -1,6 +1,6 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, Directive, NgModule } from '@angular/core';
3
+ import { ChangeDetectionStrategy, Component, input, ViewEncapsulation, Directive, NgModule } from '@angular/core';
4
4
  import * as i1 from '@daffodil/design';
5
5
  import { DaffArticleEncapsulatedDirective, DaffOpenableDirective, DaffDisableableDirective } from '@daffodil/design';
6
6
 
@@ -53,7 +53,7 @@ class DaffAccordionItemComponent {
53
53
  * Internal function to access the disabled property of the DaffDisableableDirective
54
54
  */
55
55
  get disabled() {
56
- return this.disabledDirective.disabled;
56
+ return this.disabledDirective.disabled();
57
57
  }
58
58
  constructor(openDirective, disabledDirective) {
59
59
  this.openDirective = openDirective;
@@ -61,22 +61,22 @@ class DaffAccordionItemComponent {
61
61
  /**
62
62
  * The unique id of an accordion item. Defaults to an autogenerated value.
63
63
  */
64
- this.itemId = 'daff-accordion-item' + '-' + ++daffAccordionItemId;
64
+ this.itemId = input('daff-accordion-item' + '-' + ++daffAccordionItemId, ...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
65
65
  /**
66
66
  * The unique id of an accordion item content. Defaults to an autogenerated value.
67
67
  */
68
- this.contentId = 'daff-accordion-item-content' + '-' + ++daffAccordionItemContentId;
68
+ this.contentId = input('daff-accordion-item-content' + '-' + ++daffAccordionItemContentId, ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
69
69
  /**
70
70
  * Whether or not an accordion item is initially expanded by default.
71
71
  */
72
- this.initiallyExpanded = false;
72
+ this.initiallyExpanded = input(false, ...(ngDevMode ? [{ debugName: "initiallyExpanded" }] : /* istanbul ignore next */ []));
73
73
  this.openDirective.stateless = false;
74
74
  }
75
75
  /**
76
76
  * @docs-private
77
77
  */
78
78
  ngOnInit() {
79
- this.openDirective.open.update(() => this.initiallyExpanded ? this.initiallyExpanded : this.openDirective.open());
79
+ this.openDirective.open.update(() => this.initiallyExpanded() ? this.initiallyExpanded() : this.openDirective.open());
80
80
  }
81
81
  /**
82
82
  * @docs-private
@@ -103,7 +103,7 @@ class DaffAccordionItemComponent {
103
103
  this.openDirective.toggle();
104
104
  }
105
105
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionItemComponent, deps: [{ token: i1.DaffOpenableDirective }, { token: i1.DaffDisableableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
106
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffAccordionItemComponent, isStandalone: true, selector: "daff-accordion-item", inputs: { itemId: "itemId", contentId: "contentId", initiallyExpanded: "initiallyExpanded" }, host: { classAttribute: "daff-accordion-item" }, hostDirectives: [{ directive: i1.DaffOpenableDirective, outputs: ["toggled", "toggled"] }, { directive: i1.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0, template: "<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>", styles: [".daff-accordion-item{display:block}.daff-accordion-item__header{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;appearance:none;justify-content:space-between;gap:.5rem;background:none;border:none;inline-size:100%;margin:0;padding:1rem;position:relative}.daff-accordion-item__header:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-accordion-item.daff-open .daff-accordion-item__header:after{top:56%;transform:translateY(-50%) rotate(225deg)}.daff-accordion-item.daff-open .daff-accordion-item__content{height:auto;opacity:1;padding:0 1rem 1rem;visibility:visible}.daff-accordion-item.daff-disabled .daff-accordion-item__header{cursor:not-allowed;opacity:.5}.daff-accordion-item__title{font-size:1rem;line-height:1.5rem;font-weight:500;inline-size:100%;margin:0;padding:0 2rem 0 0;text-align:start}.daff-accordion-item__content{height:0;opacity:0;visibility:hidden;transition:opacity .15s ease-in}.daff-accordion-item__content>p{margin:0 0 1rem}.daff-accordion-item__content>p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
106
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DaffAccordionItemComponent, isStandalone: true, selector: "daff-accordion-item", inputs: { itemId: { classPropertyName: "itemId", publicName: "itemId", isSignal: true, isRequired: false, transformFunction: null }, contentId: { classPropertyName: "contentId", publicName: "contentId", isSignal: true, isRequired: false, transformFunction: null }, initiallyExpanded: { classPropertyName: "initiallyExpanded", publicName: "initiallyExpanded", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "daff-accordion-item" }, hostDirectives: [{ directive: i1.DaffOpenableDirective, outputs: ["toggled", "toggled"] }, { directive: i1.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0, template: "<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>", styles: [".daff-accordion-item{display:block}.daff-accordion-item__header{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;appearance:none;justify-content:space-between;gap:.5rem;background:none;border:none;inline-size:100%;margin:0;padding:1rem;position:relative}.daff-accordion-item__header:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-accordion-item.daff-open .daff-accordion-item__header:after{top:56%;transform:translateY(-50%) rotate(225deg)}.daff-accordion-item.daff-open .daff-accordion-item__content{height:auto;opacity:1;padding:0 1rem 1rem;visibility:visible}.daff-accordion-item.daff-disabled .daff-accordion-item__header{cursor:not-allowed;opacity:.5}.daff-accordion-item__title{font-size:1rem;line-height:1.5rem;font-weight:500;inline-size:100%;margin:0;padding:0 2rem 0 0;text-align:start}.daff-accordion-item__content{height:0;opacity:0;visibility:hidden;transition:opacity .15s ease-in}.daff-accordion-item__content>p{margin:0 0 1rem}.daff-accordion-item__content>p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
107
107
  }
108
108
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionItemComponent, decorators: [{
109
109
  type: Component,
@@ -118,14 +118,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
118
118
  },
119
119
  ], host: {
120
120
  'class': 'daff-accordion-item',
121
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<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>", styles: [".daff-accordion-item{display:block}.daff-accordion-item__header{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;appearance:none;justify-content:space-between;gap:.5rem;background:none;border:none;inline-size:100%;margin:0;padding:1rem;position:relative}.daff-accordion-item__header:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-accordion-item.daff-open .daff-accordion-item__header:after{top:56%;transform:translateY(-50%) rotate(225deg)}.daff-accordion-item.daff-open .daff-accordion-item__content{height:auto;opacity:1;padding:0 1rem 1rem;visibility:visible}.daff-accordion-item.daff-disabled .daff-accordion-item__header{cursor:not-allowed;opacity:.5}.daff-accordion-item__title{font-size:1rem;line-height:1.5rem;font-weight:500;inline-size:100%;margin:0;padding:0 2rem 0 0;text-align:start}.daff-accordion-item__content{height:0;opacity:0;visibility:hidden;transition:opacity .15s ease-in}.daff-accordion-item__content>p{margin:0 0 1rem}.daff-accordion-item__content>p:last-child{margin:0}\n"] }]
122
- }], ctorParameters: () => [{ type: i1.DaffOpenableDirective }, { type: i1.DaffDisableableDirective }], propDecorators: { itemId: [{
123
- type: Input
124
- }], contentId: [{
125
- type: Input
126
- }], initiallyExpanded: [{
127
- type: Input
128
- }] } });
121
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<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>", styles: [".daff-accordion-item{display:block}.daff-accordion-item__header{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;appearance:none;justify-content:space-between;gap:.5rem;background:none;border:none;inline-size:100%;margin:0;padding:1rem;position:relative}.daff-accordion-item__header:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-accordion-item.daff-open .daff-accordion-item__header:after{top:56%;transform:translateY(-50%) rotate(225deg)}.daff-accordion-item.daff-open .daff-accordion-item__content{height:auto;opacity:1;padding:0 1rem 1rem;visibility:visible}.daff-accordion-item.daff-disabled .daff-accordion-item__header{cursor:not-allowed;opacity:.5}.daff-accordion-item__title{font-size:1rem;line-height:1.5rem;font-weight:500;inline-size:100%;margin:0;padding:0 2rem 0 0;text-align:start}.daff-accordion-item__content{height:0;opacity:0;visibility:hidden;transition:opacity .15s ease-in}.daff-accordion-item__content>p{margin:0 0 1rem}.daff-accordion-item__content>p:last-child{margin:0}\n"] }]
122
+ }], ctorParameters: () => [{ type: i1.DaffOpenableDirective }, { type: i1.DaffDisableableDirective }], propDecorators: { itemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemId", required: false }] }], contentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentId", required: false }] }], initiallyExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "initiallyExpanded", required: false }] }] } });
129
123
 
130
124
  /* eslint-disable quote-props */
131
125
  /**
@@ -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 DaffDisableable,\n DaffDisableableDirective,\n DaffOpenable,\n DaffOpenableDirective,\n} from '@daffodil/design';\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, DaffDisableable {\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.update(() => 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,C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ordion.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 OnInit,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n input,\n} from '@angular/core';\n\nimport {\n DaffDisableable,\n DaffDisableableDirective,\n DaffOpenable,\n DaffOpenableDirective,\n} from '@daffodil/design';\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, DaffDisableable {\n /**\n * The unique id of an accordion item. Defaults to an autogenerated value.\n */\n itemId = input<string>('daff-accordion-item' + '-' + ++daffAccordionItemId);\n\n /**\n * The unique id of an accordion item content. Defaults to an autogenerated value.\n */\n contentId = input<string>('daff-accordion-item-content' + '-' + ++daffAccordionItemContentId);\n\n /**\n * Whether or not an accordion item is initially expanded by default.\n */\n initiallyExpanded = input(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.update(() => 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;AAAt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AA,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;;;;"}
@@ -271,7 +271,7 @@ class DaffArticleComponent {
271
271
  /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffArticleComponent, isStandalone: true, selector: "daff-article", host: { attributes: { "role": "article" }, classAttribute: "daff-article" }, providers: [
272
272
  DaffArticleCopyButtonService,
273
273
  DaffArticleHeadingLinkService,
274
- ], 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}@media(hover:hover){.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;overflow-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 h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.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:.5rem;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 }); }
274
+ ], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:500;text-decoration:none}@media(hover:hover){.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)):hover{text-decoration:underline}}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .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,:where(.daff-article .daff-ae *)){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)):first-child{margin-top:0}.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae,:where(.daff-article .daff-ae *)){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;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 }); }
275
275
  }
276
276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleComponent, decorators: [{
277
277
  type: Component,
@@ -281,7 +281,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
281
281
  }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
282
282
  DaffArticleCopyButtonService,
283
283
  DaffArticleHeadingLinkService,
284
- ], styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}@media(hover:hover){.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;overflow-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 h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.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:.5rem;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"] }]
284
+ ], styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:500;text-decoration:none}@media(hover:hover){.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)):hover{text-decoration:underline}}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .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,:where(.daff-article .daff-ae *)){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)):first-child{margin-top:0}.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae,:where(.daff-article .daff-ae *)){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;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"] }]
285
285
  }], ctorParameters: () => [{ type: DaffArticleCopyButtonService }, { type: DaffArticleHeadingLinkService }] });
286
286
 
287
287
  /* eslint-disable quote-props */
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-article.mjs","sources":["../../../libs/design/article/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-heading-link/heading-link/heading-link.component.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.html","../../../libs/design/article/src/article-heading-link/service/heading-link.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 styleUrl: './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 const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\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 inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(pre))) {\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","import {\n DOCUMENT,\n isPlatformBrowser,\n} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n NgZone,\n OnDestroy,\n signal,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n Router,\n RouterLink,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faLink,\n faCheck,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n@Component({\n selector: 'daff-article-heading-link',\n templateUrl: './heading-link.component.html',\n styleUrl: './heading-link.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n ],\n imports: [\n RouterLink,\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleHeadingLinkComponent implements OnDestroy {\n fragment = input.required<string>();\n label = input.required<string>();\n\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n protected copied = signal(false);\n\n protected readonly faLink = faLink; // default link icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n private _router = inject(Router);\n private _platformId = inject(PLATFORM_ID);\n private _document = inject(DOCUMENT);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyLink(): Promise<void> {\n if (!isPlatformBrowser(this._platformId)) {\n return;\n }\n\n try {\n // Get the URL to fragment\n const currentUrl = this._router.url.split('#')[0]; // Remove existing fragment if any\n const fullUrl = `${this._document.defaultView?.location.origin || ''}${currentUrl}#${this.fragment()}`;\n\n // Write full URL to clipboard\n await navigator.clipboard.writeText(fullUrl);\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 link to clipboard' : 'Copy link to clipboard';\n }\n}\n","<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleHeadingLinkComponent } from '../heading-link/heading-link.component';\n\ninterface LinkEntry {\n linkRef: ComponentRef<DaffArticleHeadingLinkComponent>;\n headingElement: HTMLHeadingElement;\n}\n\n@Injectable()\nexport class DaffArticleHeadingLinkService {\n private links: Array<LinkEntry> = [];\n\n /**\n * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.\n * @param hostElement - The host element to search for heading elements.\n * @param viewContainerRef - The view container to create the heading link components.\n */\n addLinksToHeadings(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const headings = hostElement.querySelectorAll('h2, h3, h4');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n headings.forEach((heading: HTMLHeadingElement) => {\n if (heading.querySelector('daff-article-heading-link')) {\n return;\n }\n\n // Skip if nolink attribute is present\n if (heading.hasAttribute('nolink')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(heading))) {\n return;\n }\n\n const textContent = heading.textContent?.trim() || '';\n const fragment = heading.id || this.generateFragment(textContent);\n\n // Set the id on the heading if it doesn't have one\n if (!heading.id) {\n heading.id = fragment;\n }\n\n // Create the heading link component and set its inputs\n const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);\n linkRef.setInput('fragment', fragment);\n linkRef.setInput('label', textContent);\n\n // Clear the heading's content and append the link component\n heading.innerHTML = '';\n heading.appendChild(linkRef.location.nativeElement);\n\n this.links.push({\n linkRef,\n headingElement: heading,\n });\n });\n }\n\n /**\n * Cleanup heading link references\n */\n cleanup(): void {\n this.links.forEach(({ linkRef }) => {\n linkRef.destroy();\n });\n this.links = [];\n }\n\n /**\n * Generates a URL-friendly fragment from heading text\n */\n private generateFragment(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/\\s+/g, '-')\n .replace(/-+/g, '-')\n .trim();\n }\n}\n","import {\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';\nimport { DaffArticleHeadingLinkService } from '../article-heading-link/service/heading-link.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 styleUrl: './article.component.scss',\n host: {\n class: 'daff-article',\n role: 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffArticleCopyButtonService,\n DaffArticleHeadingLinkService,\n ],\n})\nexport class DaffArticleComponent {\n constructor(\n private copyButtonService: DaffArticleCopyButtonService,\n private headingLinkService: DaffArticleHeadingLinkService,\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 this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);\n },\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n this.copyButtonService.cleanup();\n this.headingLinkService.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","i1.DaffArticleCopyButtonService","i2.DaffArticleHeadingLinkService"],"mappings":";;;;;;;;;;;AAiBA;;;;;;;;AAQG;MAWU,8BAA8B,CAAA;AAV3C,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAU;AAExB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;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,IA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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;;;;"}
1
+ {"version":3,"file":"daffodil-design-article.mjs","sources":["../../../libs/design/article/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-heading-link/heading-link/heading-link.component.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.html","../../../libs/design/article/src/article-heading-link/service/heading-link.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 styleUrl: './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 const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\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 inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(pre))) {\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","import {\n DOCUMENT,\n isPlatformBrowser,\n} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n NgZone,\n OnDestroy,\n signal,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n Router,\n RouterLink,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faLink,\n faCheck,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n@Component({\n selector: 'daff-article-heading-link',\n templateUrl: './heading-link.component.html',\n styleUrl: './heading-link.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n ],\n imports: [\n RouterLink,\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleHeadingLinkComponent implements OnDestroy {\n fragment = input.required<string>();\n label = input.required<string>();\n\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n protected copied = signal(false);\n\n protected readonly faLink = faLink; // default link icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n private _router = inject(Router);\n private _platformId = inject(PLATFORM_ID);\n private _document = inject(DOCUMENT);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyLink(): Promise<void> {\n if (!isPlatformBrowser(this._platformId)) {\n return;\n }\n\n try {\n // Get the URL to fragment\n const currentUrl = this._router.url.split('#')[0]; // Remove existing fragment if any\n const fullUrl = `${this._document.defaultView?.location.origin || ''}${currentUrl}#${this.fragment()}`;\n\n // Write full URL to clipboard\n await navigator.clipboard.writeText(fullUrl);\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 link to clipboard' : 'Copy link to clipboard';\n }\n}\n","<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleHeadingLinkComponent } from '../heading-link/heading-link.component';\n\ninterface LinkEntry {\n linkRef: ComponentRef<DaffArticleHeadingLinkComponent>;\n headingElement: HTMLHeadingElement;\n}\n\n@Injectable()\nexport class DaffArticleHeadingLinkService {\n private links: Array<LinkEntry> = [];\n\n /**\n * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.\n * @param hostElement - The host element to search for heading elements.\n * @param viewContainerRef - The view container to create the heading link components.\n */\n addLinksToHeadings(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const headings = hostElement.querySelectorAll('h2, h3, h4');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n headings.forEach((heading: HTMLHeadingElement) => {\n if (heading.querySelector('daff-article-heading-link')) {\n return;\n }\n\n // Skip if nolink attribute is present\n if (heading.hasAttribute('nolink')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(heading))) {\n return;\n }\n\n const textContent = heading.textContent?.trim() || '';\n const fragment = heading.id || this.generateFragment(textContent);\n\n // Set the id on the heading if it doesn't have one\n if (!heading.id) {\n heading.id = fragment;\n }\n\n // Create the heading link component and set its inputs\n const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);\n linkRef.setInput('fragment', fragment);\n linkRef.setInput('label', textContent);\n\n // Clear the heading's content and append the link component\n heading.innerHTML = '';\n heading.appendChild(linkRef.location.nativeElement);\n\n this.links.push({\n linkRef,\n headingElement: heading,\n });\n });\n }\n\n /**\n * Cleanup heading link references\n */\n cleanup(): void {\n this.links.forEach(({ linkRef }) => {\n linkRef.destroy();\n });\n this.links = [];\n }\n\n /**\n * Generates a URL-friendly fragment from heading text\n */\n private generateFragment(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/\\s+/g, '-')\n .replace(/-+/g, '-')\n .trim();\n }\n}\n","import {\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';\nimport { DaffArticleHeadingLinkService } from '../article-heading-link/service/heading-link.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 styleUrl: './article.component.scss',\n host: {\n class: 'daff-article',\n role: 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffArticleCopyButtonService,\n DaffArticleHeadingLinkService,\n ],\n})\nexport class DaffArticleComponent {\n constructor(\n private copyButtonService: DaffArticleCopyButtonService,\n private headingLinkService: DaffArticleHeadingLinkService,\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 this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);\n },\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n this.copyButtonService.cleanup();\n this.headingLinkService.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","i1.DaffArticleCopyButtonService","i2.DaffArticleHeadingLinkService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AA,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;;;;"}
@@ -0,0 +1,87 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, contentChild, input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import * as i2 from '@daffodil/design';
4
+ import { DaffSizableDirective, DaffPrefixDirective, DaffArticleEncapsulatedDirective, DaffColorableDirective, DaffStatusableDirective } from '@daffodil/design';
5
+
6
+ var DaffBadgeAppearanceEnum;
7
+ (function (DaffBadgeAppearanceEnum) {
8
+ DaffBadgeAppearanceEnum["Filled"] = "filled";
9
+ DaffBadgeAppearanceEnum["Outlined"] = "outlined";
10
+ })(DaffBadgeAppearanceEnum || (DaffBadgeAppearanceEnum = {}));
11
+
12
+ class DaffBadgeSizableDirective extends DaffSizableDirective {
13
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBadgeSizableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
14
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffBadgeSizableDirective, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBadgeSizableDirective, decorators: [{
17
+ type: Directive,
18
+ args: [{}]
19
+ }] });
20
+
21
+ /**
22
+ * DaffBadgeComponent is a compact visual label or indicator used to
23
+ * convey status or display short pieces of information.
24
+ *
25
+ * @example
26
+ * ```html
27
+ * <daff-badge color="primary" appearance="outlined">
28
+ * <fa-icon [icon]="faCircleCheck" daffPrefix></fa-icon>
29
+ * Verified
30
+ * </daff-badge>
31
+ * ```
32
+ */
33
+ class DaffBadgeComponent {
34
+ constructor(sizableDirective, colorableDirective) {
35
+ this.sizableDirective = sizableDirective;
36
+ this.colorableDirective = colorableDirective;
37
+ /**
38
+ * @docs-private
39
+ */
40
+ this._prefix = contentChild(DaffPrefixDirective, ...(ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []));
41
+ /**
42
+ * The visual style of the badge. Defaults to `filled`.
43
+ */
44
+ this.appearance = input(DaffBadgeAppearanceEnum.Filled, { ...(ngDevMode ? { debugName: "appearance" } : /* istanbul ignore next */ {}), transform: (value) => value || DaffBadgeAppearanceEnum.Filled });
45
+ this.sizableDirective.defaultSize = 'md';
46
+ this.colorableDirective.defaultColor = 'light';
47
+ }
48
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBadgeComponent, deps: [{ token: DaffBadgeSizableDirective }, { token: i2.DaffColorableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
49
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffBadgeComponent, isStandalone: true, selector: "daff-badge", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.outlined": "appearance() === \"outlined\"", "class.filled": "appearance() === \"filled\"" }, classAttribute: "daff-badge" }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: DaffBadgeSizableDirective, inputs: ["size", "size"] }], ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-badge__label\">\n <ng-content></ng-content>\n</div>", styles: [".daff-badge{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:.25rem;border:1px solid transparent;border-radius:1rem;font-weight:500;padding:0 .5rem;position:relative;width:fit-content}.daff-badge.daff-sm{font-size:.75rem;line-height:.75rem;height:1.25rem}.daff-badge.daff-md{font-size:.875rem;line-height:.875rem;height:1.5rem}.daff-badge.daff-lg{font-size:1rem;line-height:1rem;height:1.875rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
50
+ }
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBadgeComponent, decorators: [{
52
+ type: Component,
53
+ args: [{ selector: 'daff-badge', hostDirectives: [
54
+ { directive: DaffArticleEncapsulatedDirective },
55
+ {
56
+ directive: DaffColorableDirective,
57
+ inputs: ['color'],
58
+ },
59
+ {
60
+ directive: DaffStatusableDirective,
61
+ inputs: ['status'],
62
+ },
63
+ {
64
+ directive: DaffBadgeSizableDirective,
65
+ inputs: ['size'],
66
+ },
67
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
68
+ class: 'daff-badge',
69
+ '[class.outlined]': 'appearance() === "outlined"',
70
+ '[class.filled]': 'appearance() === "filled"',
71
+ }, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-badge__label\">\n <ng-content></ng-content>\n</div>", styles: [".daff-badge{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:.25rem;border:1px solid transparent;border-radius:1rem;font-weight:500;padding:0 .5rem;position:relative;width:fit-content}.daff-badge.daff-sm{font-size:.75rem;line-height:.75rem;height:1.25rem}.daff-badge.daff-md{font-size:.875rem;line-height:.875rem;height:1.5rem}.daff-badge.daff-lg{font-size:1rem;line-height:1rem;height:1.875rem}\n"] }]
72
+ }], ctorParameters: () => [{ type: DaffBadgeSizableDirective }, { type: i2.DaffColorableDirective }], propDecorators: { _prefix: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }] } });
73
+
74
+ /**
75
+ * @docs-private
76
+ */
77
+ const DAFF_BADGE_COMPONENTS = [
78
+ DaffBadgeComponent,
79
+ DaffPrefixDirective,
80
+ ];
81
+
82
+ /**
83
+ * Generated bundle index. Do not edit.
84
+ */
85
+
86
+ export { DAFF_BADGE_COMPONENTS, DaffBadgeComponent, DaffBadgeSizableDirective };
87
+ //# sourceMappingURL=daffodil-design-badge.mjs.map