@daffodil/design 0.94.1-rc.0 → 0.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +1 -2
  2. package/accordion/src/accordion-theme.scss +4 -4
  3. package/article/README.md +4 -27
  4. package/article/src/article-theme.scss +14 -14
  5. package/badge/src/badge-theme.scss +0 -6
  6. package/button/README.md +0 -4
  7. package/button/src/button/basic/button-theme.scss +17 -42
  8. package/button/src/button/button-base.scss +12 -3
  9. package/button/src/button/flat/flat-theme.scss +14 -12
  10. package/button/src/button/icon/icon-theme.scss +19 -40
  11. package/button/src/button/stroked/stroked-theme.scss +22 -36
  12. package/card/src/card/stroked/stroked-theme.scss +1 -1
  13. package/card/src/card-base.scss +0 -1
  14. package/fesm2022/daffodil-design-accordion.mjs +285 -188
  15. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-article.mjs +578 -340
  17. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-badge.mjs +166 -84
  19. package/fesm2022/daffodil-design-badge.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-beacon.mjs +109 -47
  21. package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +541 -408
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +349 -224
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +496 -327
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +373 -313
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +103 -60
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +441 -352
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +155 -57
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +349 -234
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image-lite.mjs +60 -0
  41. package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
  42. package/fesm2022/daffodil-design-image.mjs +245 -107
  43. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-input.mjs +217 -164
  45. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +308 -170
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
  49. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-menu.mjs +525 -417
  51. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-modal.mjs +680 -450
  53. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-native-select.mjs +175 -166
  55. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-navbar.mjs +145 -68
  57. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-notification.mjs +376 -226
  59. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-paginator.mjs +296 -192
  61. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
  63. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-radio.mjs +382 -300
  65. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-select.mjs +424 -364
  67. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-sidebar.mjs +874 -887
  69. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-spinner.mjs +156 -99
  71. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-switch.mjs +176 -106
  73. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-tabs.mjs +685 -427
  75. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-tag.mjs +251 -133
  77. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-testing.mjs +4 -16
  79. package/fesm2022/daffodil-design-testing.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
  81. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-textarea.mjs +170 -150
  83. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-toast.mjs +658 -481
  85. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-tree.mjs +456 -469
  87. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
  89. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  90. package/fesm2022/daffodil-design.mjs +1628 -1650
  91. package/fesm2022/daffodil-design.mjs.map +1 -1
  92. package/form-field/README.md +0 -4
  93. package/form-field/src/form-field-theme.scss +12 -4
  94. package/image/README.md +4 -0
  95. package/image-lite/README.md +58 -0
  96. package/image-lite/src/image-theme.scss +18 -0
  97. package/list/src/list-base.scss +3 -4
  98. package/list/src/list-theme.scss +6 -5
  99. package/media-gallery/README.md +1 -1
  100. package/media-gallery/src/media-gallery-theme.scss +3 -3
  101. package/menu/src/menu-theme.scss +6 -2
  102. package/notification/src/notification-theme.scss +10 -10
  103. package/package.json +1 -1
  104. package/scss/global.scss +17 -11
  105. package/scss/theme.scss +2 -18
  106. package/scss/theming/_get-palette.scss +0 -3
  107. package/scss/theming/_index.scss +0 -1
  108. package/scss/theming/_light-dark.scss +2 -2
  109. package/scss/theming/_theme-css-variables.scss +1 -1
  110. package/scss/theming/create-theme/_create-theme.scss +2 -2
  111. package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
  112. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
  113. package/scss/typography/_classes.scss +0 -6
  114. package/scss/typography/_index.scss +0 -1
  115. package/scss/typography/mixins/_sizes.scss +0 -1
  116. package/scss/typography/utilities/_variables.scss +3 -0
  117. package/select/src/select-theme.scss +10 -14
  118. package/switch/src/switch-theme.scss +2 -2
  119. package/tabs/src/tabs-theme.scss +4 -4
  120. package/types/daffodil-design-accordion.d.ts +92 -67
  121. package/types/daffodil-design-article.d.ts +49 -56
  122. package/types/daffodil-design-badge.d.ts +56 -33
  123. package/types/daffodil-design-beacon.d.ts +35 -14
  124. package/types/daffodil-design-breadcrumb.d.ts +89 -85
  125. package/types/daffodil-design-button.d.ts +128 -146
  126. package/types/daffodil-design-callout.d.ts +55 -39
  127. package/types/daffodil-design-card.d.ts +66 -56
  128. package/types/daffodil-design-checkbox.d.ts +211 -167
  129. package/types/daffodil-design-container.d.ts +17 -16
  130. package/types/daffodil-design-form-field.d.ts +273 -240
  131. package/types/daffodil-design-form.d.ts +21 -21
  132. package/types/daffodil-design-hero.d.ts +55 -39
  133. package/types/daffodil-design-image-lite.d.ts +17 -0
  134. package/types/daffodil-design-image.d.ts +89 -55
  135. package/types/daffodil-design-input.d.ts +86 -72
  136. package/types/daffodil-design-list.d.ts +49 -43
  137. package/types/daffodil-design-media-gallery.d.ts +176 -148
  138. package/types/daffodil-design-menu.d.ts +177 -169
  139. package/types/daffodil-design-modal.d.ts +205 -205
  140. package/types/daffodil-design-native-select.d.ts +94 -84
  141. package/types/daffodil-design-navbar.d.ts +34 -24
  142. package/types/daffodil-design-notification.d.ts +82 -67
  143. package/types/daffodil-design-paginator.d.ts +140 -118
  144. package/types/daffodil-design-progress-bar.d.ts +92 -74
  145. package/types/daffodil-design-radio.d.ts +183 -144
  146. package/types/daffodil-design-select.d.ts +207 -178
  147. package/types/daffodil-design-sidebar.d.ts +270 -253
  148. package/types/daffodil-design-spinner.d.ts +49 -36
  149. package/types/daffodil-design-switch.d.ts +77 -46
  150. package/types/daffodil-design-tabs.d.ts +248 -198
  151. package/types/daffodil-design-tag.d.ts +91 -56
  152. package/types/daffodil-design-testing.d.ts +1 -3
  153. package/types/daffodil-design-text-snippet.d.ts +48 -37
  154. package/types/daffodil-design-textarea.d.ts +88 -79
  155. package/types/daffodil-design-toast.d.ts +175 -183
  156. package/types/daffodil-design-tree.d.ts +186 -169
  157. package/types/daffodil-design-youtube-player.d.ts +56 -52
  158. package/types/daffodil-design.d.ts +614 -695
  159. package/button/src/button/raised/raised-theme.scss +0 -92
  160. package/button/src/button/underline/underline-theme.scss +0 -141
  161. package/fesm2022/daffodil-design-link-set.mjs +0 -160
  162. package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
  164. package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
  165. package/link-set/README.md +0 -86
  166. package/quantity-field/README.md +0 -63
  167. package/scss/theming/_configure-theme.scss +0 -120
  168. package/scss/typography/mixins/_font-weight.scss +0 -14
  169. package/types/daffodil-design-link-set.d.ts +0 -72
  170. package/types/daffodil-design-quantity-field.d.ts +0 -171
@@ -1,193 +1,290 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { ChangeDetectionStrategy, Component, input, ViewEncapsulation, Directive, NgModule } from '@angular/core';
4
- import * as i1 from '@daffodil/design';
5
- import { DaffArticleEncapsulatedDirective, DaffOpenableDirective, DaffDisableableDirective } from '@daffodil/design';
6
-
7
- /**
8
- * Groups accordion items.
9
- *
10
- * @example
11
- * ```html
12
- * <daff-accordion>
13
- * <daff-accordion-item>
14
- * <div daffAccordionItemTitle>Title</div>
15
- * <div>Expandable content</div>
16
- * </daff-accordion-item>
17
- * <daff-accordion-item>
18
- * <div daffAccordionItemTitle>Title</div>
19
- * <div>Expandable content</div>
20
- * </daff-accordion-item>
21
- * </daff-accordion>
22
- * ```
23
- */
24
- class DaffAccordionComponent {
25
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
26
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffAccordionComponent, isStandalone: true, selector: "daff-accordion", hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionComponent, decorators: [{
29
- type: Component,
30
- args: [{ selector: 'daff-accordion', template: '<ng-content></ng-content>', hostDirectives: [{
31
- directive: DaffArticleEncapsulatedDirective,
32
- }], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
33
- }] });
34
-
35
- /* eslint-disable quote-props */
1
+ import { CommonModule } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, Directive, NgModule, ViewEncapsulation, input } from "@angular/core";
4
+ import * as i1 from "@daffodil/design";
5
+ import { DaffArticleEncapsulatedDirective, DaffDisableableDirective, DaffOpenableDirective } from "@daffodil/design";
6
+ var DaffAccordionComponent = class DaffAccordionComponent {
7
+ static {
8
+ this.ɵfac = i0.ɵɵngDeclareFactory({
9
+ minVersion: "12.0.0",
10
+ version: "22.2.4",
11
+ ngImport: i0,
12
+ type: DaffAccordionComponent,
13
+ deps: [],
14
+ target: i0.ɵɵFactoryTarget.Component
15
+ });
16
+ }
17
+ static {
18
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
19
+ minVersion: "14.0.0",
20
+ version: "22.2.4",
21
+ type: DaffAccordionComponent,
22
+ isStandalone: true,
23
+ selector: "daff-accordion",
24
+ hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }],
25
+ ngImport: i0,
26
+ template: "<ng-content></ng-content>",
27
+ isInline: true,
28
+ styles: [":host{display:block}\n"],
29
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
30
+ });
31
+ }
32
+ };
33
+ i0.ɵɵngDeclareClassMetadata({
34
+ minVersion: "12.0.0",
35
+ version: "22.2.4",
36
+ ngImport: i0,
37
+ type: DaffAccordionComponent,
38
+ decorators: [{
39
+ type: Component,
40
+ args: [{
41
+ selector: "daff-accordion",
42
+ template: "<ng-content></ng-content>",
43
+ hostDirectives: [{ directive: DaffArticleEncapsulatedDirective }],
44
+ changeDetection: ChangeDetectionStrategy.OnPush,
45
+ styles: [":host{display:block}\n"]
46
+ }]
47
+ }]
48
+ });
36
49
  let daffAccordionItemId = 0;
37
50
  let daffAccordionItemContentId = 0;
38
- /**
39
- * 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>`.
40
- *
41
- * @example
42
- * ```html
43
- * <daff-accordion-item>
44
- * <div daffAccordionItemTitle>Title</div>
45
- * <div>Accordion content</div>
46
- * </daff-accordion-item>
47
- * ```
48
- */
49
- class DaffAccordionItemComponent {
50
- /**
51
- * @docs-private
52
- *
53
- * Internal function to access the disabled property of the DaffDisableableDirective
54
- */
55
- get disabled() {
56
- return this.disabledDirective.disabled();
57
- }
58
- constructor(openDirective, disabledDirective) {
59
- this.openDirective = openDirective;
60
- this.disabledDirective = disabledDirective;
61
- /**
62
- * The unique id of an accordion item. Defaults to an autogenerated value.
63
- */
64
- this.itemId = input('daff-accordion-item' + '-' + ++daffAccordionItemId, ...(ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []));
65
- /**
66
- * The unique id of an accordion item content. Defaults to an autogenerated value.
67
- */
68
- this.contentId = input('daff-accordion-item-content' + '-' + ++daffAccordionItemContentId, ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
69
- /**
70
- * Whether or not an accordion item is initially expanded by default.
71
- */
72
- this.initiallyExpanded = input(false, ...(ngDevMode ? [{ debugName: "initiallyExpanded" }] : /* istanbul ignore next */ []));
73
- this.openDirective.stateless = false;
74
- }
75
- /**
76
- * @docs-private
77
- */
78
- ngOnInit() {
79
- this.openDirective.open.update(() => this.initiallyExpanded() ? this.initiallyExpanded() : this.openDirective.open());
80
- }
81
- /**
82
- * @docs-private
83
- */
84
- get open() {
85
- return this.openDirective.open;
86
- }
87
- /**
88
- * Reveals the contents of the accordion item.
89
- */
90
- reveal() {
91
- this.openDirective.reveal();
92
- }
93
- /**
94
- * Hides the contents of the accordion item.
95
- */
96
- hide() {
97
- this.openDirective.hide();
98
- }
99
- /**
100
- * Toggles the visibility of the contents of the accordion item.
101
- */
102
- toggle() {
103
- this.openDirective.toggle();
104
- }
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: "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
- }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionItemComponent, decorators: [{
109
- type: Component,
110
- args: [{ selector: 'daff-accordion-item', hostDirectives: [
111
- {
112
- directive: DaffOpenableDirective,
113
- outputs: ['toggled'],
114
- },
115
- {
116
- directive: DaffDisableableDirective,
117
- inputs: ['disabled'],
118
- },
119
- ], host: {
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: [{ 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 }] }] } });
123
-
124
- /* eslint-disable quote-props */
125
- /**
126
- * Used to provide a high level overview of the panel content. It should be wrapped by a `<daff-accordion-item>`.
127
- *
128
- * @example
129
- * ```html
130
- * <div daffAccordionItemTitle>Title</div>
131
- * ```
132
- */
133
- class DaffAccordionItemTitleDirective {
134
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionItemTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
135
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffAccordionItemTitleDirective, isStandalone: true, selector: "[daffAccordionItemTitle]", host: { classAttribute: "daff-accordion-item__title" }, ngImport: i0 }); }
136
- }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionItemTitleDirective, decorators: [{
138
- type: Directive,
139
- args: [{
140
- selector: '[daffAccordionItemTitle]',
141
- host: {
142
- 'class': 'daff-accordion-item__title',
143
- },
144
- }]
145
- }] });
146
-
147
- /**
148
- * @deprecated in favor of {@link DAFF_ACCORDION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
149
- */
150
- class DaffAccordionModule {
151
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
152
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionModule, imports: [CommonModule,
153
- DaffAccordionComponent,
154
- DaffAccordionItemComponent,
155
- DaffAccordionItemTitleDirective], exports: [DaffAccordionComponent,
156
- DaffAccordionItemComponent,
157
- DaffAccordionItemTitleDirective] }); }
158
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionModule, imports: [CommonModule] }); }
159
- }
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffAccordionModule, decorators: [{
161
- type: NgModule,
162
- args: [{
163
- imports: [
164
- CommonModule,
165
- DaffAccordionComponent,
166
- DaffAccordionItemComponent,
167
- DaffAccordionItemTitleDirective,
168
- ],
169
- exports: [
170
- DaffAccordionComponent,
171
- DaffAccordionItemComponent,
172
- DaffAccordionItemTitleDirective,
173
- ],
174
- }]
175
- }] });
176
-
177
- /**
178
- * @docs-private
179
- *
180
- * `DAFF_ACCORDION_COMPONENTS` imports all the available components and directives related to the component.
181
- */
51
+ var DaffAccordionItemComponent = class DaffAccordionItemComponent {
52
+ get disabled() {
53
+ return this.disabledDirective.disabled();
54
+ }
55
+ constructor(openDirective, disabledDirective) {
56
+ this.openDirective = openDirective;
57
+ this.disabledDirective = disabledDirective;
58
+ this.itemId = input("daff-accordion-item-" + ++daffAccordionItemId, ...ngDevMode ? [{ debugName: "itemId" }] : /* istanbul ignore next */ []);
59
+ this.contentId = input("daff-accordion-item-content-" + ++daffAccordionItemContentId, ...ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []);
60
+ this.initiallyExpanded = input(false, ...ngDevMode ? [{ debugName: "initiallyExpanded" }] : /* istanbul ignore next */ []);
61
+ this.openDirective.stateless = false;
62
+ }
63
+ ngOnInit() {
64
+ this.openDirective.open.update(() => this.initiallyExpanded() ? this.initiallyExpanded() : this.openDirective.open());
65
+ }
66
+ get open() {
67
+ return this.openDirective.open;
68
+ }
69
+ reveal() {
70
+ this.openDirective.reveal();
71
+ }
72
+ hide() {
73
+ this.openDirective.hide();
74
+ }
75
+ toggle() {
76
+ this.openDirective.toggle();
77
+ }
78
+ static {
79
+ this.ɵfac = i0.ɵɵngDeclareFactory({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.4",
82
+ ngImport: i0,
83
+ type: DaffAccordionItemComponent,
84
+ deps: [{ token: i1.DaffOpenableDirective }, { token: i1.DaffDisableableDirective }],
85
+ target: i0.ɵɵFactoryTarget.Component
86
+ });
87
+ }
88
+ static {
89
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
90
+ minVersion: "17.1.0",
91
+ version: "22.2.4",
92
+ type: DaffAccordionItemComponent,
93
+ isStandalone: true,
94
+ selector: "daff-accordion-item",
95
+ inputs: {
96
+ itemId: {
97
+ classPropertyName: "itemId",
98
+ publicName: "itemId",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ contentId: {
104
+ classPropertyName: "contentId",
105
+ publicName: "contentId",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ },
110
+ initiallyExpanded: {
111
+ classPropertyName: "initiallyExpanded",
112
+ publicName: "initiallyExpanded",
113
+ isSignal: true,
114
+ isRequired: false,
115
+ transformFunction: null
116
+ }
117
+ },
118
+ host: { classAttribute: "daff-accordion-item" },
119
+ hostDirectives: [{
120
+ directive: i1.DaffOpenableDirective,
121
+ outputs: ["toggled", "toggled"]
122
+ }, {
123
+ directive: i1.DaffDisableableDirective,
124
+ inputs: ["disabled", "disabled"]
125
+ }],
126
+ ngImport: i0,
127
+ 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>",
128
+ 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:.125rem solid currentColor;border-bottom:.125rem 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"],
129
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
130
+ encapsulation: i0.ViewEncapsulation.None
131
+ });
132
+ }
133
+ };
134
+ i0.ɵɵngDeclareClassMetadata({
135
+ minVersion: "12.0.0",
136
+ version: "22.2.4",
137
+ ngImport: i0,
138
+ type: DaffAccordionItemComponent,
139
+ decorators: [{
140
+ type: Component,
141
+ args: [{
142
+ selector: "daff-accordion-item",
143
+ hostDirectives: [{
144
+ directive: DaffOpenableDirective,
145
+ outputs: ["toggled"]
146
+ }, {
147
+ directive: DaffDisableableDirective,
148
+ inputs: ["disabled"]
149
+ }],
150
+ host: { "class": "daff-accordion-item" },
151
+ encapsulation: ViewEncapsulation.None,
152
+ changeDetection: ChangeDetectionStrategy.OnPush,
153
+ 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>",
154
+ 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:.125rem solid currentColor;border-bottom:.125rem 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"]
155
+ }]
156
+ }],
157
+ ctorParameters: () => [{ type: i1.DaffOpenableDirective }, { type: i1.DaffDisableableDirective }],
158
+ propDecorators: {
159
+ itemId: [{
160
+ type: i0.Input,
161
+ args: [{
162
+ isSignal: true,
163
+ alias: "itemId",
164
+ required: false
165
+ }]
166
+ }],
167
+ contentId: [{
168
+ type: i0.Input,
169
+ args: [{
170
+ isSignal: true,
171
+ alias: "contentId",
172
+ required: false
173
+ }]
174
+ }],
175
+ initiallyExpanded: [{
176
+ type: i0.Input,
177
+ args: [{
178
+ isSignal: true,
179
+ alias: "initiallyExpanded",
180
+ required: false
181
+ }]
182
+ }]
183
+ }
184
+ });
185
+ var DaffAccordionItemTitleDirective = class DaffAccordionItemTitleDirective {
186
+ static {
187
+ this.ɵfac = i0.ɵɵngDeclareFactory({
188
+ minVersion: "12.0.0",
189
+ version: "22.2.4",
190
+ ngImport: i0,
191
+ type: DaffAccordionItemTitleDirective,
192
+ deps: [],
193
+ target: i0.ɵɵFactoryTarget.Directive
194
+ });
195
+ }
196
+ static {
197
+ this.ɵdir = i0.ɵɵngDeclareDirective({
198
+ minVersion: "14.0.0",
199
+ version: "22.2.4",
200
+ type: DaffAccordionItemTitleDirective,
201
+ isStandalone: true,
202
+ selector: "[daffAccordionItemTitle]",
203
+ host: { classAttribute: "daff-accordion-item__title" },
204
+ ngImport: i0
205
+ });
206
+ }
207
+ };
208
+ i0.ɵɵngDeclareClassMetadata({
209
+ minVersion: "12.0.0",
210
+ version: "22.2.4",
211
+ ngImport: i0,
212
+ type: DaffAccordionItemTitleDirective,
213
+ decorators: [{
214
+ type: Directive,
215
+ args: [{
216
+ selector: "[daffAccordionItemTitle]",
217
+ host: { "class": "daff-accordion-item__title" }
218
+ }]
219
+ }]
220
+ });
221
+ var DaffAccordionModule = class DaffAccordionModule {
222
+ static {
223
+ this.ɵfac = i0.ɵɵngDeclareFactory({
224
+ minVersion: "12.0.0",
225
+ version: "22.2.4",
226
+ ngImport: i0,
227
+ type: DaffAccordionModule,
228
+ deps: [],
229
+ target: i0.ɵɵFactoryTarget.NgModule
230
+ });
231
+ }
232
+ static {
233
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
234
+ minVersion: "14.0.0",
235
+ version: "22.2.4",
236
+ ngImport: i0,
237
+ type: DaffAccordionModule,
238
+ imports: [
239
+ CommonModule,
240
+ DaffAccordionComponent,
241
+ DaffAccordionItemComponent,
242
+ DaffAccordionItemTitleDirective
243
+ ],
244
+ exports: [
245
+ DaffAccordionComponent,
246
+ DaffAccordionItemComponent,
247
+ DaffAccordionItemTitleDirective
248
+ ]
249
+ });
250
+ }
251
+ static {
252
+ this.ɵinj = i0.ɵɵngDeclareInjector({
253
+ minVersion: "12.0.0",
254
+ version: "22.2.4",
255
+ ngImport: i0,
256
+ type: DaffAccordionModule,
257
+ imports: [CommonModule]
258
+ });
259
+ }
260
+ };
261
+ i0.ɵɵngDeclareClassMetadata({
262
+ minVersion: "12.0.0",
263
+ version: "22.2.4",
264
+ ngImport: i0,
265
+ type: DaffAccordionModule,
266
+ decorators: [{
267
+ type: NgModule,
268
+ args: [{
269
+ imports: [
270
+ CommonModule,
271
+ DaffAccordionComponent,
272
+ DaffAccordionItemComponent,
273
+ DaffAccordionItemTitleDirective
274
+ ],
275
+ exports: [
276
+ DaffAccordionComponent,
277
+ DaffAccordionItemComponent,
278
+ DaffAccordionItemTitleDirective
279
+ ]
280
+ }]
281
+ }]
282
+ });
182
283
  const DAFF_ACCORDION_COMPONENTS = [
183
- DaffAccordionComponent,
184
- DaffAccordionItemComponent,
185
- DaffAccordionItemTitleDirective,
284
+ DaffAccordionComponent,
285
+ DaffAccordionItemComponent,
286
+ DaffAccordionItemTitleDirective
186
287
  ];
187
-
188
- /**
189
- * Generated bundle index. Do not edit.
190
- */
191
-
192
288
  export { DAFF_ACCORDION_COMPONENTS, DaffAccordionComponent, DaffAccordionItemComponent, DaffAccordionItemTitleDirective, DaffAccordionModule };
193
- //# sourceMappingURL=daffodil-design-accordion.mjs.map
289
+
290
+ //# sourceMappingURL=daffodil-design-accordion.mjs.map
@@ -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 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,EA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AA,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
+ {"version":3,"file":"daffodil-design-accordion.mjs","names":[],"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"],"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"],"mappings":";;;;;AAsCA,IAAa,yBAAb,MAAa,uBAAsB;CAAtB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,iCAAA,CAAA;GAAA,UAAA;GAAA,UAZvB;GAA2B,UAAA;GAAA,QAAA,CAAA,wBAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA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