@daffodil/design 0.91.0 → 0.92.3-rc.1

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 (142) hide show
  1. package/accordion/README.md +26 -38
  2. package/accordion/index.d.ts +2 -2
  3. package/article/README.md +66 -46
  4. package/article/index.d.ts +22 -1
  5. package/article/src/article-theme.scss +12 -0
  6. package/breadcrumb/README.md +6 -1
  7. package/breadcrumb/index.d.ts +65 -11
  8. package/breadcrumb/src/breadcrumb-theme.scss +1 -1
  9. package/button/README.md +36 -33
  10. package/button/index.d.ts +26 -5
  11. package/button/src/button/basic/button-theme.scss +4 -2
  12. package/button/src/button/button-base.scss +26 -3
  13. package/button/src/button/icon/icon-theme.scss +10 -6
  14. package/button/src/button/raised/raised-theme.scss +4 -2
  15. package/callout/README.md +15 -27
  16. package/card/README.md +36 -61
  17. package/container/README.md +18 -23
  18. package/fesm2022/daffodil-design-accordion.mjs +13 -13
  19. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-article.mjs +168 -26
  21. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +83 -42
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +23 -23
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +33 -33
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +13 -13
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +8 -8
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +26 -26
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +9 -9
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +23 -23
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image.mjs +8 -8
  41. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  42. package/fesm2022/daffodil-design-input.mjs +18 -14
  43. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-link-set.mjs +25 -17
  45. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +16 -16
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
  49. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
  51. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-menu.mjs +223 -60
  53. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-modal.mjs +33 -29
  55. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-native-select.mjs +47 -41
  57. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-navbar.mjs +25 -21
  59. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-notification.mjs +16 -16
  61. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-paginator.mjs +7 -7
  63. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
  65. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-quantity-field.mjs +17 -14
  67. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-radio.mjs +16 -16
  69. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-select.mjs +6 -6
  71. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-sidebar.mjs +25 -25
  73. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-spinner.mjs +99 -0
  75. package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
  76. package/fesm2022/daffodil-design-switch.mjs +3 -3
  77. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-tabs.mjs +15 -15
  79. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-tag.mjs +7 -7
  81. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
  83. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-textarea.mjs +6 -3
  85. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-toast.mjs +23 -25
  87. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-tree.mjs +152 -103
  89. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  90. package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
  91. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  92. package/fesm2022/daffodil-design.mjs +385 -326
  93. package/fesm2022/daffodil-design.mjs.map +1 -1
  94. package/form-field/README.md +50 -85
  95. package/form-field/index.d.ts +11 -9
  96. package/hero/README.md +5 -5
  97. package/image/README.md +2 -2
  98. package/index.d.ts +184 -270
  99. package/input/README.md +4 -4
  100. package/input/index.d.ts +4 -3
  101. package/link-set/index.d.ts +9 -1
  102. package/list/README.md +2 -2
  103. package/loading-icon/README.md +1 -1
  104. package/loading-icon/index.d.ts +1 -1
  105. package/media-gallery/README.md +3 -3
  106. package/menu/README.md +107 -10
  107. package/menu/index.d.ts +143 -11
  108. package/modal/README.md +1 -1
  109. package/modal/index.d.ts +23 -15
  110. package/native-select/README.md +4 -4
  111. package/native-select/index.d.ts +8 -7
  112. package/navbar/README.md +23 -17
  113. package/navbar/index.d.ts +12 -2
  114. package/navbar/src/navbar-theme.scss +4 -46
  115. package/notification/README.md +4 -4
  116. package/package.json +1 -1
  117. package/paginator/README.md +42 -6
  118. package/paginator/index.d.ts +4 -2
  119. package/progress-bar/README.md +3 -3
  120. package/quantity-field/README.md +4 -4
  121. package/quantity-field/index.d.ts +4 -1
  122. package/radio/README.md +1 -1
  123. package/scss/theme.scss +7 -1
  124. package/scss/theming/_color-palettes.scss +0 -6
  125. package/select/README.md +4 -4
  126. package/sidebar/README.md +6 -6
  127. package/spinner/README.md +57 -0
  128. package/spinner/index.d.ts +53 -0
  129. package/spinner/src/spinner-theme.scss +62 -0
  130. package/switch/README.md +4 -4
  131. package/switch/index.d.ts +2 -2
  132. package/tabs/README.md +1 -1
  133. package/tabs/index.d.ts +2 -2
  134. package/tag/README.md +24 -30
  135. package/tag/index.d.ts +1 -1
  136. package/text-snippet/README.md +1 -1
  137. package/text-snippet/src/text-snippet-theme.scss +12 -0
  138. package/textarea/README.md +4 -4
  139. package/textarea/index.d.ts +4 -4
  140. package/toast/README.md +4 -4
  141. package/tree/README.md +39 -22
  142. package/tree/index.d.ts +57 -90
@@ -1,10 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostBinding, Directive, NgModule, isDevMode, Input, Injectable, InjectionToken, inject, PLATFORM_ID, DOCUMENT, Inject, makeEnvironmentProviders, provideAppInitializer, EventEmitter, Output, afterNextRender } from '@angular/core';
2
+ import { HostBinding, Directive, NgModule, isDevMode, Input, Injectable, InjectionToken, inject, PLATFORM_ID, DOCUMENT, Inject, makeEnvironmentProviders, provideAppInitializer, EventEmitter, Output, afterNextRender, signal, input, computed, effect, forwardRef, Optional, SkipSelf } from '@angular/core';
3
3
  import { BreakpointObserver } from '@angular/cdk/layout';
4
4
  import { isPlatformBrowser } from '@angular/common';
5
5
  import { of, fromEventPattern, Subject, merge, fromEvent, EMPTY, combineLatest } from 'rxjs';
6
6
  import { startWith, map, catchError, filter, shareReplay } from 'rxjs/operators';
7
7
  import { DaffServerSafePersistenceServiceToken } from '@daffodil/core';
8
+ import * as i2 from '@angular/cdk/a11y';
9
+ import { CdkTrapFocus } from '@angular/cdk/a11y';
8
10
 
9
11
  /**
10
12
  * @deprecated in favor of the {@link DaffFormFieldLabelDirective}. Deprecated in version 0.86.0. Will be removed in version 1.0.0.
@@ -16,10 +18,10 @@ class DaffFormLabelDirective {
16
18
  */
17
19
  this.class = true;
18
20
  }
19
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
20
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffFormLabelDirective, isStandalone: true, selector: "[daffFormLabel]", host: { properties: { "class.daff-form-label": "this.class" } }, ngImport: i0 }); }
21
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
22
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffFormLabelDirective, isStandalone: true, selector: "[daffFormLabel]", host: { properties: { "class.daff-form-label": "this.class" } }, ngImport: i0 }); }
21
23
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormLabelDirective, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormLabelDirective, decorators: [{
23
25
  type: Directive,
24
26
  args: [{
25
27
  selector: '[daffFormLabel]',
@@ -33,11 +35,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
33
35
  * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
34
36
  */
35
37
  class DaffFormLabelModule {
36
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
37
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffFormLabelModule, imports: [DaffFormLabelDirective], exports: [DaffFormLabelDirective] }); }
38
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormLabelModule }); }
38
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
39
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffFormLabelModule, imports: [DaffFormLabelDirective], exports: [DaffFormLabelDirective] }); }
40
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormLabelModule }); }
39
41
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormLabelModule, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormLabelModule, decorators: [{
41
43
  type: NgModule,
42
44
  args: [{
43
45
  exports: [
@@ -54,10 +56,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
54
56
  * in components like `DaffFormFieldComponent` or `DaffListComponent`.
55
57
  */
56
58
  class DaffPrefixDirective {
57
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffPrefixDirective, isStandalone: true, selector: "[daffPrefix]", host: { classAttribute: "daff-prefix" }, ngImport: i0 }); }
59
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffPrefixDirective, isStandalone: true, selector: "[daffPrefix]", host: { classAttribute: "daff-prefix" }, ngImport: i0 }); }
59
61
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffPrefixDirective, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPrefixDirective, decorators: [{
61
63
  type: Directive,
62
64
  args: [{
63
65
  selector: '[daffPrefix]',
@@ -72,10 +74,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
72
74
  * in components like `DaffFormFieldComponent` or `DaffListComponent`.
73
75
  */
74
76
  class DaffSuffixDirective {
75
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffSuffixDirective, isStandalone: true, selector: "[daffSuffix]", host: { classAttribute: "daff-suffix" }, ngImport: i0 }); }
77
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
78
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffSuffixDirective, isStandalone: true, selector: "[daffSuffix]", host: { classAttribute: "daff-suffix" }, ngImport: i0 }); }
77
79
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSuffixDirective, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSuffixDirective, decorators: [{
79
81
  type: Directive,
80
82
  args: [{
81
83
  selector: '[daffSuffix]',
@@ -89,13 +91,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
89
91
  * @deprecated in favor of standalone components. Deprecated in version 0.91.0. Will be removed in version 1.0.0.
90
92
  */
91
93
  class DaffPrefixSuffixModule {
92
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffPrefixSuffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
93
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffPrefixSuffixModule, imports: [DaffPrefixDirective,
94
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPrefixSuffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
95
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffPrefixSuffixModule, imports: [DaffPrefixDirective,
94
96
  DaffSuffixDirective], exports: [DaffPrefixDirective,
95
97
  DaffSuffixDirective] }); }
96
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffPrefixSuffixModule }); }
98
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPrefixSuffixModule }); }
97
99
  }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffPrefixSuffixModule, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPrefixSuffixModule, decorators: [{
99
101
  type: NgModule,
100
102
  args: [{
101
103
  imports: [
@@ -115,121 +117,59 @@ const DAFF_PREFIX_SUFFIX_DIRECTIVES = [
115
117
  ];
116
118
 
117
119
  /**
118
- * Enumerates the available color palette options for a component.
119
- * These values can be used to apply specific color styles to components within the application.
120
+ * The available color options.
120
121
  */
121
- var DaffPaletteEnum;
122
- (function (DaffPaletteEnum) {
122
+ var DaffColorEnum;
123
+ (function (DaffColorEnum) {
123
124
  /**
124
- * Your primary color.
125
+ * The primary color.
125
126
  */
126
- DaffPaletteEnum["Primary"] = "primary";
127
+ DaffColorEnum["Primary"] = "primary";
127
128
  /**
128
- * Your secondary color.
129
+ * The secondary color.
129
130
  */
130
- DaffPaletteEnum["Secondary"] = "secondary";
131
+ DaffColorEnum["Secondary"] = "secondary";
131
132
  /**
132
- * Your tertiary color.
133
+ * The tertiary color.
133
134
  */
134
- DaffPaletteEnum["Tertiary"] = "tertiary";
135
+ DaffColorEnum["Tertiary"] = "tertiary";
135
136
  /**
136
- * A light color that does not change based on the defined theme.
137
+ * A light color that does not change based on the theme.
137
138
  */
138
- DaffPaletteEnum["Light"] = "light";
139
+ DaffColorEnum["Light"] = "light";
139
140
  /**
140
- * A dark color that does not change based on the defined theme.
141
+ * A dark color that does not change based on the theme.
141
142
  */
142
- DaffPaletteEnum["Dark"] = "dark";
143
+ DaffColorEnum["Dark"] = "dark";
143
144
  /**
144
- * A color that matches the defined theme.
145
+ * A color that matches the theme.
145
146
  */
146
- DaffPaletteEnum["Theme"] = "theme";
147
+ DaffColorEnum["Theme"] = "theme";
147
148
  /**
148
- * A color that contrasts against the defined theme.
149
+ * A color that contrasts against the theme.
149
150
  */
150
- DaffPaletteEnum["ThemeContrast"] = "theme-contrast";
151
+ DaffColorEnum["ThemeContrast"] = "theme-contrast";
151
152
  /**
152
153
  * @deprecated Deprecated in version 0.82.0. Will be removed in version 1.0.0.
153
- * Black. It's dark.
154
154
  */
155
- DaffPaletteEnum["Black"] = "black";
155
+ DaffColorEnum["Black"] = "black";
156
156
  /**
157
157
  * @deprecated Deprecated in version 0.82.0. Will be removed in version 1.0.0.
158
- * White. It's bright.
159
158
  */
160
- DaffPaletteEnum["White"] = "white";
161
- })(DaffPaletteEnum || (DaffPaletteEnum = {}));
159
+ DaffColorEnum["White"] = "white";
160
+ })(DaffColorEnum || (DaffColorEnum = {}));
162
161
 
163
- const colorInPalette = (color) => Object.values(DaffPaletteEnum).includes(color);
162
+ const isDaffColor = (color) => Object.values(DaffColorEnum).includes(color);
164
163
  const validateColor = (color) => {
165
164
  if (isDevMode()) {
166
- if (color !== undefined && !colorInPalette(color)) {
167
- console.warn(color + ' is not a valid color in DaffPalette');
165
+ if (color !== undefined && !isDaffColor(color)) {
166
+ console.warn(color + ' is not a valid color in DaffColor');
168
167
  }
169
168
  }
170
169
  };
171
170
  /**
172
- * `DaffColorableDirective` allows a component to conditionally apply color-specific
173
- * styles by setting CSS classes based on the specified color. This directive is useful
174
- * for applying different color palettes to a component in an Angular application.
175
- *
176
- * Supported colors: `primary | secondary | tertiary | light | dark | theme | theme-contrast`
177
- *
178
- * | Color | Class |
179
- * | -------- | ----- |
180
- * | `primary` | `.daff-primary`|
181
- * | `secondary` | `.daff-secondary`|
182
- * | `tertiary` | `.daff-tertiary`|
183
- * | `light` | `daff-light` |
184
- * | `dark` | `daff-dark` |
185
- * | `theme` | `daff-theme`|
186
- * | `theme-contrast` | `.daff-theme-contrast`|
187
- *
188
- * `white` and `black` have been deprecated in favor of `light` and `dark`.
189
- *
190
- * @example Implementing it as an attribute directive
191
- *
192
- * ```html
193
- * <div daffColorable [color]="primary">Colored content</div>
194
- * ```
195
- *
196
- * ```scss
197
- * .div {
198
- * &.daff-primary {
199
- * color: daff-color($primary);
200
- * }
201
- * }
202
- * ```
203
- *
204
- * In this example, the `daff-primary` class is applied to the `div` element, allowing you to
205
- * use the color class to style the `div`.
206
- *
207
- * @example Implementing it as an Angular host directive
208
- *
209
- * ```ts
210
- * @Component({
211
- * selector: 'custom-component',
212
- * template: 'custom-component.html',
213
- * hostDirectives: [
214
- * {
215
- * directive: DaffColorableDirective,
216
- * inputs: ['color'],
217
- * },
218
- * ],
219
- * })
220
- * export class CustomComponent {
221
- * @HostBinding('class.custom-component') class = true;
222
- * }
223
- * ```
224
- *
225
- * ```scss
226
- * .custom-component {
227
- * &.daff-primary {
228
- * background: daff-color($primary, 10);
229
- * color: daff-color($primary, 90);
230
- * }
231
- * }
232
- * ```
171
+ * Enforces consistent use of {@link DaffColor} on a component by applying
172
+ * color-specific CSS classes and validating the color in dev mode.
233
173
  */
234
174
  class DaffColorableDirective {
235
175
  /**
@@ -249,10 +189,10 @@ class DaffColorableDirective {
249
189
  this.color = this.defaultColor;
250
190
  }
251
191
  }
252
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffColorableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
253
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffColorableDirective, isStandalone: true, selector: "[daffColorable]", inputs: { color: "color" }, host: { properties: { "class.daff-primary": "color === \"primary\"", "class.daff-secondary": "color === \"secondary\"", "class.daff-tertiary": "color === \"tertiary\"", "class.daff-light": "color === \"light\"", "class.daff-dark": "color === \"dark\"", "class.daff-theme": "color === \"theme\"", "class.daff-theme-contrast": "color === \"theme-contrast\"", "class.daff-black": "color === \"black\"", "class.daff-white": "color === \"white\"" } }, usesOnChanges: true, ngImport: i0 }); }
192
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffColorableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
193
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffColorableDirective, isStandalone: true, selector: "[daffColorable]", inputs: { color: "color" }, host: { properties: { "class.daff-primary": "color === \"primary\"", "class.daff-secondary": "color === \"secondary\"", "class.daff-tertiary": "color === \"tertiary\"", "class.daff-light": "color === \"light\"", "class.daff-dark": "color === \"dark\"", "class.daff-theme": "color === \"theme\"", "class.daff-theme-contrast": "color === \"theme-contrast\"", "class.daff-black": "color === \"black\"", "class.daff-white": "color === \"white\"" } }, usesOnChanges: true, ngImport: i0 }); }
254
194
  }
255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffColorableDirective, decorators: [{
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffColorableDirective, decorators: [{
256
196
  type: Directive,
257
197
  args: [{
258
198
  selector: '[daffColorable]',
@@ -272,32 +212,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
272
212
  type: Input
273
213
  }] } });
274
214
 
215
+ /**
216
+ * Sensible breakpoints for layouts and interfaces used across `@daffodil/design` components.
217
+ */
275
218
  var DaffBreakpoints;
276
219
  (function (DaffBreakpoints) {
220
+ /** `min-width: 1920px` */
277
221
  DaffBreakpoints["DESKTOP"] = "(min-width: 1920px)";
222
+ /** `min-width: 1440px` */
278
223
  DaffBreakpoints["LAPTOP"] = "(min-width: 1440px)";
224
+ /** `min-width: 1200px` */
279
225
  DaffBreakpoints["SMALL_LAPTOP"] = "(min-width: 1200px)";
226
+ /** `min-width: 1024px` */
280
227
  DaffBreakpoints["BIG_TABLET"] = "(min-width: 1024px)";
228
+ /** `min-width: 768px` */
281
229
  DaffBreakpoints["TABLET"] = "(min-width: 768px)";
230
+ /** `min-width: 480px` */
282
231
  DaffBreakpoints["MOBILE"] = "(min-width: 480px)";
283
232
  })(DaffBreakpoints || (DaffBreakpoints = {}));
284
233
 
285
234
  /**
286
- * A stubbed out breakpoint observer service.
235
+ * A no-op implementation of Angular CDK's `BreakpointObserver` that always reports
236
+ * no breakpoints as matched. Useful for server-side rendering or testing contexts
237
+ * where browser layout APIs are unavailable.
287
238
  */
288
239
  class NoopBreakpointObserver {
240
+ /**
241
+ * @docs-private
242
+ */
289
243
  // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method, @angular-eslint/use-lifecycle-interface
290
244
  ngOnDestroy() { }
245
+ /**
246
+ * Always returns `false`, indicating that none of the given media queries are active.
247
+ */
291
248
  isMatched(value) {
292
249
  return false;
293
250
  }
251
+ /**
252
+ * Returns an observable that never emits a `BreakpointState`, making breakpoint-dependent logic inert.
253
+ */
294
254
  observe(value) {
295
255
  return of();
296
256
  }
297
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: NoopBreakpointObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
298
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: NoopBreakpointObserver, providedIn: 'root' }); }
257
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NoopBreakpointObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
258
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NoopBreakpointObserver, providedIn: 'root' }); }
299
259
  }
300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: NoopBreakpointObserver, decorators: [{
260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NoopBreakpointObserver, decorators: [{
301
261
  type: Injectable,
302
262
  args: [{
303
263
  providedIn: 'root',
@@ -399,10 +359,10 @@ class DaffStatusableDirective {
399
359
  this.status = this.defaultStatus;
400
360
  }
401
361
  }
402
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffStatusableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
403
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffStatusableDirective, isStandalone: true, selector: "[daffStatusable]", inputs: { status: "status" }, host: { properties: { "class.daff-info": "status === \"info\"", "class.daff-warn": "status === \"warn\"", "class.daff-critical": "status === \"critical\"", "class.daff-success": "status === \"success\"" } }, usesOnChanges: true, ngImport: i0 }); }
362
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffStatusableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
363
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffStatusableDirective, isStandalone: true, selector: "[daffStatusable]", inputs: { status: "status" }, host: { properties: { "class.daff-info": "status === \"info\"", "class.daff-warn": "status === \"warn\"", "class.daff-critical": "status === \"critical\"", "class.daff-success": "status === \"success\"" } }, usesOnChanges: true, ngImport: i0 }); }
404
364
  }
405
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffStatusableDirective, decorators: [{
365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffStatusableDirective, decorators: [{
406
366
  type: Directive,
407
367
  args: [{
408
368
  selector: '[daffStatusable]',
@@ -465,10 +425,10 @@ class DaffSkeletonableDirective {
465
425
  */
466
426
  this.skeleton = false;
467
427
  }
468
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSkeletonableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
469
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffSkeletonableDirective, isStandalone: true, selector: "[daffSkeletonable]", inputs: { skeleton: "skeleton" }, host: { properties: { "class.daff-skeleton": "skeleton" } }, ngImport: i0 }); }
428
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSkeletonableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
429
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffSkeletonableDirective, isStandalone: true, selector: "[daffSkeletonable]", inputs: { skeleton: "skeleton" }, host: { properties: { "class.daff-skeleton": "skeleton" } }, ngImport: i0 }); }
470
430
  }
471
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSkeletonableDirective, decorators: [{
431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSkeletonableDirective, decorators: [{
472
432
  type: Directive,
473
433
  args: [{
474
434
  selector: '[daffSkeletonable]',
@@ -480,6 +440,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
480
440
  type: Input
481
441
  }] } });
482
442
 
443
+ /**
444
+ * This enum will be removed from the public api in v1.0.0.
445
+ */
483
446
  var DaffTextAlignmentEnum;
484
447
  (function (DaffTextAlignmentEnum) {
485
448
  DaffTextAlignmentEnum["Left"] = "left";
@@ -496,49 +459,7 @@ const validateTextAlignment = (textAlignment) => {
496
459
  }
497
460
  };
498
461
  /**
499
- * `DaffTextAlignableDirective` allows for dynamic text alignment of a component by
500
- * setting CSS classes based on the specified text alignment. This directive is
501
- * useful when text alignment needs to be managed dynamically in an Angular component.
502
- *
503
- * ## Why not just use CSS?
504
- *
505
- * While the native CSS `text-align` property can be used for static text alignment,
506
- * the `DaffTextAlignableDirective` provides a structured and consistent way to handle
507
- * dynamic text alignment within Angular components in more complex use cases where the
508
- * application of `text-align: center;` would cause unexpected side effects.
509
- *
510
- * @example Implementing it as an attribute directive
511
- *
512
- * ```html
513
- * <div daffTextAlignable textAlignment="center">Aligned text</div>
514
- * ```
515
- *
516
- * In this example, the `daff-center` class is added to the `div` element, allowing
517
- * you to style the `div` as you wish using the class.
518
- *
519
- * @example Implementing it as an Angular host directive
520
- *
521
- * ```ts
522
- * @Component({
523
- * selector: 'custom-component',
524
- * template: 'custom-component.html',
525
- * hostDirectives: [
526
- * {
527
- * directive: DaffTextAlignableDirective,
528
- * inputs: ['textAlignment'],
529
- * },
530
- * ],
531
- * })
532
- * export class CustomComponent { }
533
- * ```
534
- *
535
- * ```scss
536
- * .custom-component {
537
- * &.daff-left {
538
- * text-align: left;
539
- * }
540
- * }
541
- * ```
462
+ * `DaffTextAlignableDirective` enforces consistent use of text alignment across components.
542
463
  */
543
464
  class DaffTextAlignableDirective {
544
465
  /**
@@ -558,10 +479,10 @@ class DaffTextAlignableDirective {
558
479
  this.textAlignment = this.defaultAlignment;
559
480
  }
560
481
  }
561
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTextAlignableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
562
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffTextAlignableDirective, isStandalone: true, selector: "[daffTextAlignable]", inputs: { textAlignment: "textAlignment" }, host: { properties: { "class.daff-left": "textAlignment === \"left\"", "class.daff-center": "textAlignment === \"center\"", "class.daff-right": "textAlignment === \"right\"" } }, usesOnChanges: true, ngImport: i0 }); }
482
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTextAlignableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
483
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffTextAlignableDirective, isStandalone: true, selector: "[daffTextAlignable]", inputs: { textAlignment: "textAlignment" }, host: { properties: { "class.daff-left": "textAlignment === \"left\"", "class.daff-center": "textAlignment === \"center\"", "class.daff-right": "textAlignment === \"right\"" } }, usesOnChanges: true, ngImport: i0 }); }
563
484
  }
564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTextAlignableDirective, decorators: [{
485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTextAlignableDirective, decorators: [{
565
486
  type: Directive,
566
487
  args: [{
567
488
  selector: '[daffTextAlignable]',
@@ -576,59 +497,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
576
497
  }] } });
577
498
 
578
499
  /**
579
- * `DaffCompactableDirective` allows a component to conditionally apply a compact
580
- * style by toggling a CSS class. This is useful for creating components that can
581
- * switch between regular and compact styles based on the `compact` property.
582
- *
583
- * @example Implementing it as an attribute directive
584
- *
585
- * ```html
586
- * <div daffCompactable [compact]="isCompact">Content goes here</div>
587
- * ```
588
- *
589
- * In this example, the `daff-compact` class is applied to the `div` element when
590
- * `isCompact` is `true`, making the `div` display its compact state.
591
- *
592
- * @example Implementing it as an Angular host directive
593
- *
594
- * ```ts
595
- * @Component({
596
- * selector: 'custom-component',
597
- * template: 'custom-component.html',
598
- * hostDirectives: [
599
- * {
600
- * directive: DaffCompactableDirective,
601
- * inputs: ['compact'],
602
- * },
603
- * ],
604
- * })
605
- * export class CustomComponent { }
606
- * ```
607
- *
608
- * The directive applies the `daff-compact` class to the component and
609
- * should be defined in your styles to display the compact state as desired.
610
- *
611
- * ```scss
612
- * :host {
613
- * padding: 8px 16px;
614
- *
615
- * &.daff-compact {
616
- * padding: 4px 8px;
617
- * }
618
- * }
619
- * ```
500
+ * Enforces consistent use of the compact property.
620
501
  */
621
502
  class DaffCompactableDirective {
622
503
  constructor() {
623
504
  /**
624
- * Controls whether the component is compact.
505
+ * Whether the component is compact.
625
506
  */
626
507
  this.compact = false;
627
508
  }
628
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompactableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
629
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffCompactableDirective, isStandalone: true, selector: "[daffCompactable]", inputs: { compact: "compact" }, host: { properties: { "class.daff-compact": "compact" } }, ngImport: i0 }); }
509
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCompactableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
510
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffCompactableDirective, isStandalone: true, selector: "[daffCompactable]", inputs: { compact: "compact" }, host: { properties: { "class.daff-compact": "compact" } }, ngImport: i0 }); }
630
511
  }
631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffCompactableDirective, decorators: [{
512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCompactableDirective, decorators: [{
632
513
  type: Directive,
633
514
  args: [{
634
515
  selector: '[daffCompactable]',
@@ -698,10 +579,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
698
579
  * This directive will apply the `daff-manage-container-layout` class to your component, ensuring that the styles set on `:host` are passed down to the container.
699
580
  */
700
581
  class DaffManageContainerLayoutDirective {
701
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffManageContainerLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
702
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffManageContainerLayoutDirective, isStandalone: true, selector: "[daffManageContainerLayout]", host: { classAttribute: "daff-manage-container-layout" }, ngImport: i0 }); }
582
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffManageContainerLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
583
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffManageContainerLayoutDirective, isStandalone: true, selector: "[daffManageContainerLayout]", host: { classAttribute: "daff-manage-container-layout" }, ngImport: i0 }); }
703
584
  }
704
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffManageContainerLayoutDirective, decorators: [{
585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffManageContainerLayoutDirective, decorators: [{
705
586
  type: Directive,
706
587
  args: [{
707
588
  selector: '[daffManageContainerLayout]',
@@ -712,33 +593,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
712
593
  }] });
713
594
 
714
595
  /**
715
- * `DaffArticleEncapsulatedDirective` is used to encapsulate custom components within an article,
716
- * preventing {@link DaffArticleComponent } styles from bleeding into the component.
717
- *
718
- * @example Implementing it as an attribute directive
719
- *
720
- * ```html
721
- * <my-custom-component daffArticleEncapsulated></my-custom-component>
722
- * ```
723
- *
724
- * @example Implementing it as an Angular host directive
725
- *
726
- * ```ts
727
- * @Component({
728
- * selector: 'custom-component',
729
- * template: 'custom-component.html',
730
- * hostDirectives: [{ directive: DaffArticleEncapsulatedDirective }],
731
- * })
732
- * export class CustomComponent { }
733
- * ```
734
- *
735
- * This directive will apply the `daff-ae` class to the component, ensuring that it is encapsulated from the article's styles.
596
+ * The `DaffArticleEncapsulatedDirective` prevents {@link DaffArticleComponent } styles from bleeding into custom components nested within an article.
736
597
  */
737
598
  class DaffArticleEncapsulatedDirective {
738
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleEncapsulatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
739
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffArticleEncapsulatedDirective, isStandalone: true, selector: "[daffArticleEncapsulated]", host: { classAttribute: "daff-ae" }, ngImport: i0 }); }
599
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleEncapsulatedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
600
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffArticleEncapsulatedDirective, isStandalone: true, selector: "[daffArticleEncapsulated]", host: { classAttribute: "daff-ae" }, ngImport: i0 }); }
740
601
  }
741
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleEncapsulatedDirective, decorators: [{
602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleEncapsulatedDirective, decorators: [{
742
603
  type: Directive,
743
604
  args: [{
744
605
  selector: '[daffArticleEncapsulated]',
@@ -788,10 +649,10 @@ class DaffOsThemeService {
788
649
  getThemePreference() {
789
650
  return this.preference$;
790
651
  }
791
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOsThemeService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
792
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOsThemeService, providedIn: 'root' }); }
652
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOsThemeService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
653
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOsThemeService, providedIn: 'root' }); }
793
654
  }
794
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOsThemeService, decorators: [{
655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOsThemeService, decorators: [{
795
656
  type: Injectable,
796
657
  args: [{
797
658
  providedIn: 'root',
@@ -845,10 +706,10 @@ class DaffThemeStorageService {
845
706
  this.progressStorageEvent(DaffTheme.None);
846
707
  this.storage.removeItem(THEME_STORAGE_KEY);
847
708
  }
848
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemeStorageService, deps: [{ token: DaffServerSafePersistenceServiceToken }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
849
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemeStorageService, providedIn: 'root' }); }
709
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemeStorageService, deps: [{ token: DaffServerSafePersistenceServiceToken }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
710
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemeStorageService, providedIn: 'root' }); }
850
711
  }
851
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemeStorageService, decorators: [{
712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemeStorageService, decorators: [{
852
713
  type: Injectable,
853
714
  args: [{
854
715
  providedIn: 'root',
@@ -919,10 +780,10 @@ class DaffThemingService {
919
780
  ? this.lightMode()
920
781
  : this.darkMode();
921
782
  }
922
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemingService, deps: [{ token: DaffOsThemeService }, { token: DaffThemeStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
923
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemingService, providedIn: 'root' }); }
783
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemingService, deps: [{ token: DaffOsThemeService }, { token: DaffThemeStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
784
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemingService, providedIn: 'root' }); }
924
785
  }
925
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemingService, decorators: [{
786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemingService, decorators: [{
926
787
  type: Injectable,
927
788
  args: [{
928
789
  providedIn: 'root',
@@ -965,10 +826,10 @@ class DaffThemeClassSetterService {
965
826
  this.renderer.removeClass(this.doc.body, DAFF_THEME_LIGHT_CSS_CLASS);
966
827
  this.renderer.removeClass(this.doc.body, DAFF_THEME_DARK_CSS_CLASS);
967
828
  }
968
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemeClassSetterService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }, { token: DaffThemingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
969
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemeClassSetterService }); }
829
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemeClassSetterService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }, { token: DaffThemingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
830
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemeClassSetterService }); }
970
831
  }
971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffThemeClassSetterService, decorators: [{
832
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffThemeClassSetterService, decorators: [{
972
833
  type: Injectable
973
834
  }], ctorParameters: () => [{ type: undefined, decorators: [{
974
835
  type: Inject,
@@ -1049,10 +910,10 @@ class DaffFocusStackService {
1049
910
  this.document.activeElement.blur();
1050
911
  return this.document.activeElement;
1051
912
  }
1052
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFocusStackService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1053
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFocusStackService, providedIn: 'root' }); }
913
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFocusStackService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
914
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFocusStackService, providedIn: 'root' }); }
1054
915
  }
1055
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFocusStackService, decorators: [{
916
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFocusStackService, decorators: [{
1056
917
  type: Injectable,
1057
918
  args: [{ providedIn: 'root' }]
1058
919
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1138,10 +999,10 @@ class DaffSizableDirective {
1138
999
  this.size = this.defaultSize;
1139
1000
  }
1140
1001
  }
1141
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1142
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffSizableDirective, isStandalone: true, selector: "[daffSizable]", inputs: { size: "size" }, host: { properties: { "class.daff-xs": "size === \"xs\"", "class.daff-sm": "size === \"sm\"", "class.daff-md": "size === \"md\"", "class.daff-lg": "size === \"lg\"", "class.daff-xl": "size === \"xl\"" } }, usesOnChanges: true, ngImport: i0 }); }
1002
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1003
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffSizableDirective, isStandalone: true, selector: "[daffSizable]", inputs: { size: "size" }, host: { properties: { "class.daff-xs": "size === \"xs\"", "class.daff-sm": "size === \"sm\"", "class.daff-md": "size === \"md\"", "class.daff-lg": "size === \"lg\"", "class.daff-xl": "size === \"xl\"" } }, usesOnChanges: true, ngImport: i0 }); }
1143
1004
  }
1144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSizableDirective, decorators: [{
1005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSizableDirective, decorators: [{
1145
1006
  type: Directive,
1146
1007
  args: [{
1147
1008
  selector: '[daffSizable]',
@@ -1264,10 +1125,10 @@ class DaffOpenableDirective {
1264
1125
  }
1265
1126
  }
1266
1127
  }
1267
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOpenableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1268
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffOpenableDirective, isStandalone: true, selector: "[daffOpenable]", inputs: { open: "open" }, outputs: { toggled: "toggled" }, host: { properties: { "class.daff-open": "open" } }, usesOnChanges: true, ngImport: i0 }); }
1128
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOpenableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1129
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffOpenableDirective, isStandalone: true, selector: "[daffOpenable]", inputs: { open: "open" }, outputs: { toggled: "toggled" }, host: { properties: { "class.daff-open": "open" } }, usesOnChanges: true, ngImport: i0 }); }
1269
1130
  }
1270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOpenableDirective, decorators: [{
1131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOpenableDirective, decorators: [{
1271
1132
  type: Directive,
1272
1133
  args: [{
1273
1134
  selector: '[daffOpenable]',
@@ -1281,6 +1142,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
1281
1142
  type: Output
1282
1143
  }] } });
1283
1144
 
1145
+ /**
1146
+ * This enum will be removed from the public api in v1.0.0.
1147
+ */
1284
1148
  var DaffOrientationEnum;
1285
1149
  (function (DaffOrientationEnum) {
1286
1150
  DaffOrientationEnum["Horizontal"] = "horizontal";
@@ -1296,43 +1160,7 @@ const validateOrientation = (orientation) => {
1296
1160
  }
1297
1161
  };
1298
1162
  /**
1299
- * `DaffOrientableDirective` allows for dynamic orientation of a component by
1300
- * setting CSS classes based on the specified orientation. This directive is
1301
- * useful when orientation needs to be managed dynamically in an Angular component.
1302
- *
1303
- * @example Implementing it as an attribute directive
1304
- *
1305
- * ```html
1306
- * <div daffOrientable [orientation]="horizontal"></div>
1307
- * ```
1308
- *
1309
- * In this example, the `daff-horizontal` class is added to the `div` element, allowing
1310
- * you to style the `div` as you wish using the class.
1311
- *
1312
- * @example Implementing it as an Angular host directive
1313
- *
1314
- * ```ts
1315
- * @Component({
1316
- * selector: 'custom-component',
1317
- * template: 'custom-component.html',
1318
- * hostDirectives: [
1319
- * {
1320
- * directive: DaffOrientableDirective,
1321
- * inputs: ['orientation'],
1322
- * },
1323
- * ],
1324
- * })
1325
- * export class CustomComponent { }
1326
- * ```
1327
- *
1328
- * ```scss
1329
- * .custom-component {
1330
- * &.daff-vertical {
1331
- * display: flex;
1332
- * flex-direction: column;
1333
- * }
1334
- * }
1335
- * ```
1163
+ * `DaffOrientableDirective`enforces consistent use of orientation across components.
1336
1164
  */
1337
1165
  class DaffOrientableDirective {
1338
1166
  /**
@@ -1352,10 +1180,10 @@ class DaffOrientableDirective {
1352
1180
  this.orientation = this.defaultOrientation;
1353
1181
  }
1354
1182
  }
1355
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOrientableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1356
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffOrientableDirective, isStandalone: true, selector: "[daffOrientable]", inputs: { orientation: "orientation" }, host: { properties: { "class.daff-horizontal": "orientation === \"horizontal\"", "class.daff-vertical": "orientation === \"vertical\"" } }, usesOnChanges: true, ngImport: i0 }); }
1183
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOrientableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1184
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffOrientableDirective, isStandalone: true, selector: "[daffOrientable]", inputs: { orientation: "orientation" }, host: { properties: { "class.daff-horizontal": "orientation === \"horizontal\"", "class.daff-vertical": "orientation === \"vertical\"" } }, usesOnChanges: true, ngImport: i0 }); }
1357
1185
  }
1358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffOrientableDirective, decorators: [{
1186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffOrientableDirective, decorators: [{
1359
1187
  type: Directive,
1360
1188
  args: [{
1361
1189
  selector: '[daffOrientable]',
@@ -1397,10 +1225,10 @@ class DaffSelectableDirective {
1397
1225
  this.cd.markForCheck();
1398
1226
  return this;
1399
1227
  }
1400
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSelectableDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1401
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffSelectableDirective, isStandalone: true, selector: "[daffSelected]", inputs: { selected: "selected" }, outputs: { becameSelected: "becameSelected" }, host: { properties: { "class.daff-selected": "selected" } }, ngImport: i0 }); }
1228
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSelectableDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1229
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffSelectableDirective, isStandalone: true, selector: "[daffSelected]", inputs: { selected: "selected" }, outputs: { becameSelected: "becameSelected" }, host: { properties: { "class.daff-selected": "selected" } }, ngImport: i0 }); }
1402
1230
  }
1403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffSelectableDirective, decorators: [{
1231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffSelectableDirective, decorators: [{
1404
1232
  type: Directive,
1405
1233
  args: [{
1406
1234
  selector: '[daffSelected]',
@@ -1534,10 +1362,10 @@ class DaffStickyTrackerDirective {
1534
1362
  this.renderer.removeChild(this.sentinelElement.parentElement, this.sentinelElement);
1535
1363
  }
1536
1364
  }
1537
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffStickyTrackerDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
1538
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffStickyTrackerDirective, isStandalone: true, selector: "[daffStickyTracker]", inputs: { sticky: "sticky" }, ngImport: i0 }); }
1365
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffStickyTrackerDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
1366
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffStickyTrackerDirective, isStandalone: true, selector: "[daffStickyTracker]", inputs: { sticky: "sticky" }, ngImport: i0 }); }
1539
1367
  }
1540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffStickyTrackerDirective, decorators: [{
1368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffStickyTrackerDirective, decorators: [{
1541
1369
  type: Directive,
1542
1370
  args: [{
1543
1371
  selector: '[daffStickyTracker]',
@@ -1550,17 +1378,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
1550
1378
  }] } });
1551
1379
 
1552
1380
  /**
1553
- * `DaffDisableableDirective` allows a component to display a disabled UI
1381
+ * Enforces consistent use of the disabled property.
1382
+ */
1383
+ class DaffDisableableDirective {
1384
+ constructor() {
1385
+ /**
1386
+ * Whether the component is disabled.
1387
+ */
1388
+ this.disabled = false;
1389
+ }
1390
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffDisableableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1391
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffDisableableDirective, isStandalone: true, selector: "[daffDisableable]", inputs: { disabled: "disabled" }, host: { properties: { "class.daff-disabled": "disabled" } }, ngImport: i0 }); }
1392
+ }
1393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffDisableableDirective, decorators: [{
1394
+ type: Directive,
1395
+ args: [{
1396
+ selector: '[daffDisableable]',
1397
+ host: {
1398
+ '[class.daff-disabled]': 'disabled',
1399
+ },
1400
+ }]
1401
+ }], propDecorators: { disabled: [{
1402
+ type: Input
1403
+ }] } });
1404
+
1405
+ /**
1406
+ * `DaffLoadableDirective` allows a component to display a loading UI
1554
1407
  * by conditionally applying a CSS class. This is useful for indicating to
1555
- * users that content is loading or being processed. This directive can be used to
1556
- * apply a disabled UI to any component by toggling the `disabled`
1557
- * input property. When `disabled` is `true`, the `daff-disabled` CSS class
1408
+ * users that a user action is being processed. This directive can be used to
1409
+ * apply a loading UI to any component by toggling the `loading`
1410
+ * input property. When `loading` is `true`, the `daff-loading` CSS class
1558
1411
  * is applied, which should style the component to look like it's not interactable.
1559
1412
  *
1560
1413
  * @example Implementing it as an attribute directive
1561
1414
  *
1562
1415
  * ```html
1563
- * <div daffDisableable [disabled]="isDisabled">Content</div>
1416
+ * <div daffLoadable [loading]="isLoading">Content</div>
1564
1417
  * ```
1565
1418
  *
1566
1419
  * @example Implementing it as an Angular host directive
@@ -1571,8 +1424,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
1571
1424
  * template: 'custom-component.html',
1572
1425
  * hostDirectives: [
1573
1426
  * {
1574
- * directive: DaffDisableableDirective,
1575
- * inputs: ['disabled'],
1427
+ * directive: DaffLoadableDirective,
1428
+ * inputs: ['loading'],
1576
1429
  * },
1577
1430
  * ],
1578
1431
  * })
@@ -1581,40 +1434,246 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
1581
1434
  *
1582
1435
  * ```scss
1583
1436
  * :host {
1584
- * .daff-disabled {
1585
- * cursor: not-allowed;
1586
- * opacity: 0.5;
1437
+ * .spinner {
1438
+ * opacity: 0;
1439
+ * }
1440
+ * .daff-loading {
1441
+ * .spinner {
1442
+ * opacity: 1;
1443
+ * }
1587
1444
  * }
1588
1445
  * }
1589
1446
  * ```
1590
1447
  *
1591
- * The directive applies the `daff-disabled` class to the component. The class should be
1448
+ * The directive applies the `daff-loading` class to the component. The class should be
1592
1449
  * defined in your styles to display the loading state as desired.
1593
1450
  */
1594
- class DaffDisableableDirective {
1451
+ class DaffLoadableDirective {
1595
1452
  constructor() {
1596
- this.disabled = false;
1453
+ this.loading = false;
1597
1454
  }
1598
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffDisableableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1599
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffDisableableDirective, isStandalone: true, selector: "[daffDisableable]", inputs: { disabled: "disabled" }, host: { properties: { "class.daff-disabled": "disabled" } }, ngImport: i0 }); }
1455
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffLoadableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1456
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffLoadableDirective, isStandalone: true, selector: "[daffLoadable]", inputs: { loading: "loading" }, host: { properties: { "class.daff-loading": "loading" } }, ngImport: i0 }); }
1600
1457
  }
1601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffDisableableDirective, decorators: [{
1458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffLoadableDirective, decorators: [{
1602
1459
  type: Directive,
1603
1460
  args: [{
1604
- selector: '[daffDisableable]',
1461
+ selector: '[daffLoadable]',
1605
1462
  host: {
1606
- '[class.daff-disabled]': 'disabled',
1463
+ '[class.daff-loading]': 'loading',
1607
1464
  },
1608
1465
  }]
1609
- }], propDecorators: { disabled: [{
1466
+ }], propDecorators: { loading: [{
1610
1467
  type: Input
1611
1468
  }] } });
1612
1469
 
1613
- class DaffErrorStateMatcher {
1614
- isErrorState(control, formSubmitted) {
1615
- return control.errors && (control.touched || formSubmitted);
1470
+ class DaffRovingTabIndexService {
1471
+ constructor(document) {
1472
+ this.document = document;
1473
+ this._hierarchy = [];
1474
+ this._group = signal('', ...(ngDevMode ? [{ debugName: "_group" }] : []));
1475
+ this.group = this._group.asReadonly();
1616
1476
  }
1477
+ enter(group) {
1478
+ if (this._group() !== group) {
1479
+ this._hierarchy.push(group);
1480
+ this._group.set(group);
1481
+ const el = this.document.querySelector(`[data-rti="${group}"]`);
1482
+ if (el) {
1483
+ this.document.activeElement.blur();
1484
+ el.focus();
1485
+ }
1486
+ }
1487
+ }
1488
+ leave() {
1489
+ const prev = this._hierarchy.pop();
1490
+ if (prev) {
1491
+ const group = this._hierarchy[this._hierarchy.length - 1] || '';
1492
+ this._group.set(group);
1493
+ this.document.activeElement.blur();
1494
+ const boundary = this.document.querySelector(`[data-rti-boundary="${prev}"][data-rti="${group}"]`);
1495
+ if (boundary) {
1496
+ boundary.focus();
1497
+ }
1498
+ else {
1499
+ console.warn(`The boundary for RTI group ${prev} does not have a reference to the parent group ${group}`);
1500
+ }
1501
+ }
1502
+ }
1503
+ next() {
1504
+ this._changeFocus();
1505
+ }
1506
+ previous() {
1507
+ this._changeFocus(true);
1508
+ }
1509
+ _changeFocus(up = false) {
1510
+ if (this._group()) {
1511
+ const ary = Array.from(this.document.querySelectorAll(`[data-rti="${this._group()}"]`));
1512
+ const index = ary.findIndex((el) => el === this.document.activeElement);
1513
+ this.document.activeElement.blur();
1514
+ (up
1515
+ ? ary[index === 0 ? ary.length - 1 : index - 1]
1516
+ : ary[index === ary.length - 1 ? 0 : index + 1]).focus();
1517
+ }
1518
+ }
1519
+ onKeydown(evt) {
1520
+ if ('key' in evt) {
1521
+ switch (evt.key) {
1522
+ case 'ArrowUp':
1523
+ case 'ArrowDown':
1524
+ if (this._group()) {
1525
+ evt.preventDefault();
1526
+ const ary = Array.from(this.document.querySelectorAll(`[data-rti="${this._group()}"]`));
1527
+ const index = ary.findIndex((el) => el === this.document.activeElement);
1528
+ this.document.activeElement.blur();
1529
+ (evt.key === 'ArrowUp'
1530
+ ? ary[index === 0 ? ary.length - 1 : index - 1]
1531
+ : ary[index === ary.length - 1 ? 0 : index + 1]).focus();
1532
+ }
1533
+ break;
1534
+ default:
1535
+ break;
1536
+ }
1537
+ }
1538
+ }
1539
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1540
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexService, providedIn: 'root' }); }
1541
+ }
1542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexService, decorators: [{
1543
+ type: Injectable,
1544
+ args: [{
1545
+ providedIn: 'root',
1546
+ }]
1547
+ }], ctorParameters: () => [{ type: Document, decorators: [{
1548
+ type: Inject,
1549
+ args: [DOCUMENT]
1550
+ }] }] });
1551
+
1552
+ /**
1553
+ * Defines the boundary of an RTI group.
1554
+ */
1555
+ class DaffRovingTabIndexBoundaryDirective {
1556
+ /**
1557
+ * Don't touch this directly. Use `_uniqueId`.
1558
+ */
1559
+ static { this._uniqueIdCounter = 0; }
1560
+ get _uniqueId() {
1561
+ if (!this._cachedUniqueId) {
1562
+ this._cachedUniqueId = `ε-rtiBoundary-${DaffRovingTabIndexBoundaryDirective._uniqueIdCounter++}`;
1563
+ }
1564
+ return this._cachedUniqueId;
1565
+ }
1566
+ constructor(groupService, focusTrap) {
1567
+ this.groupService = groupService;
1568
+ this.focusTrap = focusTrap;
1569
+ /**
1570
+ * The name of the group for which that this element will act as boundary.
1571
+ * Optional, will be autogenerated to a unique name if omitted.
1572
+ */
1573
+ this.rtiBoundary = input(null, ...(ngDevMode ? [{ debugName: "rtiBoundary" }] : []));
1574
+ /**
1575
+ * The name of the group defined by this boundary.
1576
+ */
1577
+ this.effectiveBoundary = computed(() => this.rtiBoundary() || this._uniqueId, ...(ngDevMode ? [{ debugName: "effectiveBoundary" }] : []));
1578
+ effect(() => {
1579
+ this.focusTrap.enabled = this.effectiveBoundary() === this.groupService.group();
1580
+ });
1581
+ }
1582
+ /**
1583
+ * @docs-private
1584
+ */
1585
+ enterGroup(evt) {
1586
+ evt.preventDefault();
1587
+ evt.stopPropagation();
1588
+ this.groupService.enter(this.effectiveBoundary());
1589
+ }
1590
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexBoundaryDirective, deps: [{ token: DaffRovingTabIndexService }, { token: i2.CdkTrapFocus }], target: i0.ɵɵFactoryTarget.Directive }); }
1591
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.18", type: DaffRovingTabIndexBoundaryDirective, isStandalone: true, selector: "[rtiBoundary]", inputs: { rtiBoundary: { classPropertyName: "rtiBoundary", publicName: "rtiBoundary", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.space": "enterGroup($event)" }, properties: { "attr.data-rti-boundary": "effectiveBoundary()" } }, hostDirectives: [{ directive: i2.CdkTrapFocus }, { directive: i0.forwardRef(() => DaffRovingTabIndexDirective) }], ngImport: i0 }); }
1592
+ }
1593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexBoundaryDirective, decorators: [{
1594
+ type: Directive,
1595
+ args: [{
1596
+ // eslint-disable-next-line @angular-eslint/directive-selector
1597
+ selector: '[rtiBoundary]',
1598
+ host: {
1599
+ '[attr.data-rti-boundary]': 'effectiveBoundary()',
1600
+ '(keydown.space)': 'enterGroup($event)',
1601
+ },
1602
+ hostDirectives: [
1603
+ CdkTrapFocus,
1604
+ forwardRef((() => DaffRovingTabIndexDirective)),
1605
+ ],
1606
+ }]
1607
+ }], ctorParameters: () => [{ type: DaffRovingTabIndexService }, { type: i2.CdkTrapFocus }], propDecorators: { rtiBoundary: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtiBoundary", required: false }] }] } });
1608
+
1609
+ /**
1610
+ * Declares that an element is an RTI target.
1611
+ * Automatically applied to `<a>` and `<button>` elements.
1612
+ */
1613
+ class DaffRovingTabIndexDirective {
1614
+ constructor(service, parent) {
1615
+ this.service = service;
1616
+ this.parent = parent;
1617
+ /**
1618
+ * Allows the RTI group to be overriden.
1619
+ * By default it will be the nearest ancestor or the default root group if no boundary ancestor exists.
1620
+ * @see {@link DaffRovingTabIndexBoundaryDirective}.
1621
+ */
1622
+ this.rti = input('', ...(ngDevMode ? [{ debugName: "rti" }] : []));
1623
+ /**
1624
+ * The group in which this RTI target resides.
1625
+ * See {@link DaffRovingTabIndexBoundaryDirective} to make an element act as the boundary of an RTI group.
1626
+ */
1627
+ this.group = computed(() => this.rti() || this.parent?.effectiveBoundary() || '', ...(ngDevMode ? [{ debugName: "group" }] : []));
1628
+ /**
1629
+ * @docs-private
1630
+ */
1631
+ this.tabindex = computed(() => this.service.group() === this.group()
1632
+ ? 0
1633
+ : -1, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
1634
+ }
1635
+ /**
1636
+ * @docs-private
1637
+ */
1638
+ leaveGroup(evt) {
1639
+ evt.stopPropagation();
1640
+ this.service.leave();
1641
+ }
1642
+ /**
1643
+ * @docs-private
1644
+ */
1645
+ next(evt) {
1646
+ evt.stopPropagation();
1647
+ this.service.next();
1648
+ }
1649
+ /**
1650
+ * @docs-private
1651
+ */
1652
+ previous(evt) {
1653
+ evt.stopPropagation();
1654
+ this.service.previous();
1655
+ }
1656
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexDirective, deps: [{ token: DaffRovingTabIndexService }, { token: DaffRovingTabIndexBoundaryDirective, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1657
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.18", type: DaffRovingTabIndexDirective, isStandalone: true, selector: "[rti],a,button", inputs: { rti: { classPropertyName: "rti", publicName: "rti", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.escape": "leaveGroup($event)", "keydown.arrowup": "previous($event)", "keydown.arrowdown": "next($event)" }, properties: { "attr.tabindex": "tabindex()", "attr.data-rti": "group()" } }, ngImport: i0 }); }
1617
1658
  }
1659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffRovingTabIndexDirective, decorators: [{
1660
+ type: Directive,
1661
+ args: [{
1662
+ // eslint-disable-next-line @angular-eslint/directive-selector
1663
+ selector: '[rti],a,button',
1664
+ host: {
1665
+ '[attr.tabindex]': 'tabindex()',
1666
+ '[attr.data-rti]': 'group()',
1667
+ '(keydown.escape)': 'leaveGroup($event)',
1668
+ '(keydown.arrowup)': 'previous($event)',
1669
+ '(keydown.arrowdown)': 'next($event)',
1670
+ },
1671
+ }]
1672
+ }], ctorParameters: () => [{ type: DaffRovingTabIndexService }, { type: DaffRovingTabIndexBoundaryDirective, decorators: [{
1673
+ type: Optional
1674
+ }, {
1675
+ type: SkipSelf
1676
+ }] }], propDecorators: { rti: [{ type: i0.Input, args: [{ isSignal: true, alias: "rti", required: false }] }] } });
1618
1677
 
1619
1678
  // Core
1620
1679
 
@@ -1632,5 +1691,5 @@ class DaffErrorStateMatcher {
1632
1691
  * Generated bundle index. Do not edit.
1633
1692
  */
1634
1693
 
1635
- export { DAFF_PREFIX_SUFFIX_DIRECTIVES, DAFF_THEME_INITIALIZER, DaffArticleEncapsulatedDirective, DaffBreakpoints, DaffColorableDirective, DaffCompactableDirective, DaffDisableableDirective, DaffErrorStateMatcher, DaffFocusStackService, DaffFormLabelDirective, DaffFormLabelModule, DaffManageContainerLayoutDirective, DaffOpenableDirective, DaffOrientableDirective, DaffOrientationEnum, DaffPrefixDirective, DaffPrefixSuffixModule, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffStickyTrackerDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector };
1694
+ export { DAFF_PREFIX_SUFFIX_DIRECTIVES, DAFF_THEME_INITIALIZER, DaffArticleEncapsulatedDirective, DaffBreakpoints, DaffColorableDirective, DaffCompactableDirective, DaffDisableableDirective, DaffFocusStackService, DaffFormLabelDirective, DaffFormLabelModule, DaffLoadableDirective, DaffManageContainerLayoutDirective, DaffOpenableDirective, DaffOrientableDirective, DaffOrientationEnum, DaffPrefixDirective, DaffPrefixSuffixModule, DaffRovingTabIndexBoundaryDirective, DaffRovingTabIndexDirective, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffStickyTrackerDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector };
1636
1695
  //# sourceMappingURL=daffodil-design.mjs.map