@daffodil/design 0.94.1 → 0.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +1 -2
  2. package/accordion/src/accordion-theme.scss +4 -4
  3. package/article/README.md +4 -27
  4. package/article/src/article-theme.scss +14 -14
  5. package/badge/src/badge-theme.scss +0 -6
  6. package/button/README.md +0 -4
  7. package/button/src/button/basic/button-theme.scss +17 -42
  8. package/button/src/button/button-base.scss +12 -3
  9. package/button/src/button/flat/flat-theme.scss +14 -12
  10. package/button/src/button/icon/icon-theme.scss +19 -40
  11. package/button/src/button/stroked/stroked-theme.scss +22 -36
  12. package/card/src/card/stroked/stroked-theme.scss +1 -1
  13. package/card/src/card-base.scss +0 -1
  14. package/fesm2022/daffodil-design-accordion.mjs +285 -188
  15. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-article.mjs +578 -340
  17. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-badge.mjs +166 -84
  19. package/fesm2022/daffodil-design-badge.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-beacon.mjs +109 -47
  21. package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +541 -408
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +349 -224
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +496 -327
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +373 -313
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +103 -60
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +441 -352
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +155 -57
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +349 -234
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image-lite.mjs +60 -0
  41. package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
  42. package/fesm2022/daffodil-design-image.mjs +245 -107
  43. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-input.mjs +217 -164
  45. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +308 -170
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
  49. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-menu.mjs +525 -417
  51. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-modal.mjs +680 -450
  53. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-native-select.mjs +175 -166
  55. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-navbar.mjs +145 -68
  57. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-notification.mjs +376 -226
  59. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-paginator.mjs +296 -192
  61. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
  63. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-radio.mjs +382 -300
  65. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-select.mjs +424 -364
  67. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-sidebar.mjs +874 -887
  69. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-spinner.mjs +156 -99
  71. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-switch.mjs +176 -106
  73. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-tabs.mjs +685 -427
  75. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-tag.mjs +251 -133
  77. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-testing.mjs +4 -16
  79. package/fesm2022/daffodil-design-testing.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
  81. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-textarea.mjs +170 -150
  83. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-toast.mjs +658 -481
  85. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-tree.mjs +456 -469
  87. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
  89. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  90. package/fesm2022/daffodil-design.mjs +1628 -1650
  91. package/fesm2022/daffodil-design.mjs.map +1 -1
  92. package/form-field/README.md +0 -4
  93. package/form-field/src/form-field-theme.scss +12 -4
  94. package/image/README.md +4 -0
  95. package/image-lite/README.md +58 -0
  96. package/image-lite/src/image-theme.scss +18 -0
  97. package/list/src/list-base.scss +3 -4
  98. package/list/src/list-theme.scss +6 -5
  99. package/media-gallery/README.md +1 -1
  100. package/media-gallery/src/media-gallery-theme.scss +3 -3
  101. package/menu/src/menu-theme.scss +6 -2
  102. package/notification/src/notification-theme.scss +10 -10
  103. package/package.json +1 -1
  104. package/scss/global.scss +17 -11
  105. package/scss/theme.scss +2 -18
  106. package/scss/theming/_get-palette.scss +0 -3
  107. package/scss/theming/_index.scss +0 -1
  108. package/scss/theming/_light-dark.scss +2 -2
  109. package/scss/theming/_theme-css-variables.scss +1 -1
  110. package/scss/theming/create-theme/_create-theme.scss +2 -2
  111. package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
  112. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
  113. package/scss/typography/_classes.scss +0 -6
  114. package/scss/typography/_index.scss +0 -1
  115. package/scss/typography/mixins/_sizes.scss +0 -1
  116. package/scss/typography/utilities/_variables.scss +3 -0
  117. package/select/src/select-theme.scss +10 -14
  118. package/switch/src/switch-theme.scss +2 -2
  119. package/tabs/src/tabs-theme.scss +4 -4
  120. package/types/daffodil-design-accordion.d.ts +92 -67
  121. package/types/daffodil-design-article.d.ts +49 -56
  122. package/types/daffodil-design-badge.d.ts +56 -33
  123. package/types/daffodil-design-beacon.d.ts +35 -14
  124. package/types/daffodil-design-breadcrumb.d.ts +89 -85
  125. package/types/daffodil-design-button.d.ts +128 -146
  126. package/types/daffodil-design-callout.d.ts +55 -39
  127. package/types/daffodil-design-card.d.ts +66 -56
  128. package/types/daffodil-design-checkbox.d.ts +211 -167
  129. package/types/daffodil-design-container.d.ts +17 -16
  130. package/types/daffodil-design-form-field.d.ts +273 -240
  131. package/types/daffodil-design-form.d.ts +21 -21
  132. package/types/daffodil-design-hero.d.ts +55 -39
  133. package/types/daffodil-design-image-lite.d.ts +17 -0
  134. package/types/daffodil-design-image.d.ts +89 -55
  135. package/types/daffodil-design-input.d.ts +86 -72
  136. package/types/daffodil-design-list.d.ts +49 -43
  137. package/types/daffodil-design-media-gallery.d.ts +176 -148
  138. package/types/daffodil-design-menu.d.ts +177 -169
  139. package/types/daffodil-design-modal.d.ts +205 -205
  140. package/types/daffodil-design-native-select.d.ts +94 -84
  141. package/types/daffodil-design-navbar.d.ts +34 -24
  142. package/types/daffodil-design-notification.d.ts +82 -67
  143. package/types/daffodil-design-paginator.d.ts +140 -118
  144. package/types/daffodil-design-progress-bar.d.ts +92 -74
  145. package/types/daffodil-design-radio.d.ts +183 -144
  146. package/types/daffodil-design-select.d.ts +207 -178
  147. package/types/daffodil-design-sidebar.d.ts +270 -253
  148. package/types/daffodil-design-spinner.d.ts +49 -36
  149. package/types/daffodil-design-switch.d.ts +77 -46
  150. package/types/daffodil-design-tabs.d.ts +248 -198
  151. package/types/daffodil-design-tag.d.ts +91 -56
  152. package/types/daffodil-design-testing.d.ts +1 -3
  153. package/types/daffodil-design-text-snippet.d.ts +48 -37
  154. package/types/daffodil-design-textarea.d.ts +88 -79
  155. package/types/daffodil-design-toast.d.ts +175 -183
  156. package/types/daffodil-design-tree.d.ts +186 -169
  157. package/types/daffodil-design-youtube-player.d.ts +56 -52
  158. package/types/daffodil-design.d.ts +614 -695
  159. package/button/src/button/raised/raised-theme.scss +0 -92
  160. package/button/src/button/underline/underline-theme.scss +0 -141
  161. package/fesm2022/daffodil-design-link-set.mjs +0 -160
  162. package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
  164. package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
  165. package/link-set/README.md +0 -86
  166. package/quantity-field/README.md +0 -63
  167. package/scss/theming/_configure-theme.scss +0 -120
  168. package/scss/typography/mixins/_font-weight.scss +0 -14
  169. package/types/daffodil-design-link-set.d.ts +0 -72
  170. package/types/daffodil-design-quantity-field.d.ts +0 -171
@@ -1,357 +1,446 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive, computed, contentChild, signal, input, isDevMode, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
- import * as i1 from '@daffodil/design';
4
- import { DaffPrefixDirective, DaffSuffixDirective, DaffFormLabelDirective, DaffSkeletonableDirective, DaffFormLabelModule } from '@daffodil/design';
5
- import { DaffFormFieldLabelDirective, DaffHintComponent, DaffErrorMessageComponent } from '@daffodil/design/form';
6
- import { NgTemplateOutlet } from '@angular/common';
7
- import { BehaviorSubject } from 'rxjs';
8
-
9
- /**
10
- * DaffFormFieldActionDirective marks an element, typically a button, as an action attached to a form control inside `DaffFormFieldComponent`.
11
- */
12
- class DaffFormFieldActionDirective {
13
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
14
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffFormFieldActionDirective, isStandalone: true, selector: "[daffFormFieldAction]", host: { classAttribute: "daff-form-field-action" }, ngImport: i0 }); }
15
- }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldActionDirective, decorators: [{
17
- type: Directive,
18
- args: [{
19
- selector: '[daffFormFieldAction]',
20
- host: {
21
- class: 'daff-form-field-action',
22
- },
23
- }]
24
- }] });
25
-
26
- /**
27
- * Form controls must extend this class to be used inside `DaffFormFieldComponent`.
28
- *
29
- * > **Note**
30
- * > The control is defined as an abstract class instead of an interface to support Angular's dependency injection. Interfaces are erased during TypeScript compilation and cannot be used as DI tokens.
31
- * >
32
- * > By using an abstract class, the Angular DI container can match the class token for injection.
33
- */
34
- class DaffFormFieldControl {
35
- /**
36
- * Whether the label should be in the raised position.
37
- * By default, matches the focused state.
38
- */
39
- get raised() {
40
- return this.focused;
41
- }
42
- ;
43
- constructor(ngControl) {
44
- this.ngControl = ngControl;
45
- /**
46
- * Whether the control supports automatic label behavior.
47
- * When `true`, the form field will associate the label with the control using `for` and `id` attributes.
48
- *
49
- * Defaults to `true`.
50
- */
51
- this.supportsAutoLabelling = true;
52
- this._stateChanges = new BehaviorSubject({
53
- focused: false,
54
- filled: false,
55
- disabled: false,
56
- error: false,
57
- valid: true,
58
- });
59
- }
60
- /**
61
- * Computes the current state of the form field control.
62
- * Combines control properties and form validation state.
63
- */
64
- get state() {
65
- return {
66
- focused: this.focused,
67
- filled: !!this.value,
68
- disabled: this.ngControl?.disabled ?? this.disabled,
69
- error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),
70
- valid: !this.ngControl?.errors && this.ngControl?.dirty,
71
- };
72
- }
73
- /**
74
- * Emits the current state.
75
- */
76
- emitState(deferred = false) {
77
- if (deferred) {
78
- Promise.resolve().then(() => {
79
- this._stateChanges.next(this.state);
80
- });
81
- return;
82
- }
83
- this._stateChanges.next(this.state);
84
- }
85
- }
86
- ;
87
-
88
- let daffFormFieldId = 0;
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, NgModule, ViewEncapsulation, computed, contentChild, input, isDevMode, signal, viewChild } from "@angular/core";
3
+ import { DaffErrorMessageComponent, DaffFormFieldLabelDirective, DaffHintComponent } from "@daffodil/design/form";
4
+ import { NgTemplateOutlet } from "@angular/common";
5
+ import * as i1 from "@daffodil/design";
6
+ import { DaffPrefixDirective, DaffSkeletonableDirective, DaffSuffixDirective } from "@daffodil/design";
7
+ import { BehaviorSubject } from "rxjs";
8
+ var DaffFormFieldActionDirective = class DaffFormFieldActionDirective {
9
+ static {
10
+ this.ɵfac = i0.ɵɵngDeclareFactory({
11
+ minVersion: "12.0.0",
12
+ version: "22.2.4",
13
+ ngImport: i0,
14
+ type: DaffFormFieldActionDirective,
15
+ deps: [],
16
+ target: i0.ɵɵFactoryTarget.Directive
17
+ });
18
+ }
19
+ static {
20
+ this.ɵdir = i0.ɵɵngDeclareDirective({
21
+ minVersion: "14.0.0",
22
+ version: "22.2.4",
23
+ type: DaffFormFieldActionDirective,
24
+ isStandalone: true,
25
+ selector: "[daffFormFieldAction]",
26
+ host: { classAttribute: "daff-form-field-action" },
27
+ ngImport: i0
28
+ });
29
+ }
30
+ };
31
+ i0.ɵɵngDeclareClassMetadata({
32
+ minVersion: "12.0.0",
33
+ version: "22.2.4",
34
+ ngImport: i0,
35
+ type: DaffFormFieldActionDirective,
36
+ decorators: [{
37
+ type: Directive,
38
+ args: [{
39
+ selector: "[daffFormFieldAction]",
40
+ host: { class: "daff-form-field-action" }
41
+ }]
42
+ }]
43
+ });
44
+ var DaffFormFieldControl = class {
45
+ get raised() {
46
+ return this.focused;
47
+ }
48
+ get opened() {
49
+ return false;
50
+ }
51
+ constructor(ngControl) {
52
+ this.ngControl = ngControl;
53
+ this.supportsAutoLabelling = true;
54
+ this._stateChanges = new BehaviorSubject({
55
+ focused: false,
56
+ filled: false,
57
+ disabled: false,
58
+ error: false,
59
+ valid: true
60
+ });
61
+ }
62
+ get state() {
63
+ return {
64
+ focused: this.focused,
65
+ filled: !!this.value,
66
+ disabled: this.ngControl?.disabled ?? this.disabled,
67
+ error: this.ngControl?.invalid && (this.ngControl?.dirty || this.ngControl?.touched),
68
+ valid: this.ngControl?.valid && this.ngControl?.dirty
69
+ };
70
+ }
71
+ emitState(deferred = false) {
72
+ if (deferred) {
73
+ Promise.resolve().then(() => {
74
+ this._stateChanges.next(this.state);
75
+ });
76
+ return;
77
+ }
78
+ this._stateChanges.next(this.state);
79
+ }
80
+ };
89
81
  var DaffFormFieldAppearanceEnum;
90
- (function (DaffFormFieldAppearanceEnum) {
91
- DaffFormFieldAppearanceEnum["Fluid"] = "fluid";
92
- DaffFormFieldAppearanceEnum["Fixed"] = "fixed";
82
+ (function(DaffFormFieldAppearanceEnum) {
83
+ DaffFormFieldAppearanceEnum["Fluid"] = "fluid";
84
+ DaffFormFieldAppearanceEnum["Fixed"] = "fixed";
93
85
  })(DaffFormFieldAppearanceEnum || (DaffFormFieldAppearanceEnum = {}));
94
- const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';
95
- /**
96
- * DaffFormFieldComponent is a wrapping component that provides consistent styling and behavior for form control elements.
97
- */
98
- class DaffFormFieldComponent {
99
- constructor(cd, elementRef) {
100
- this.cd = cd;
101
- this.elementRef = elementRef;
102
- /** @docs-private */
103
- this.isNativeSelect = computed(() => this._control()?.controlType === 'native-select', ...(ngDevMode ? [{ debugName: "isNativeSelect" }] : /* istanbul ignore next */ []));
104
- /** @docs-private */
105
- this._prefix = contentChild(DaffPrefixDirective, ...(ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []));
106
- /** @docs-private */
107
- this._suffix = contentChild(DaffSuffixDirective, ...(ngDevMode ? [{ debugName: "_suffix" }] : /* istanbul ignore next */ []));
108
- /**
109
- * @docs-private
110
- *
111
- * The child form control that the form field manages.
112
- */
113
- this._control = contentChild(DaffFormFieldControl, ...(ngDevMode ? [{ debugName: "_control" }] : /* istanbul ignore next */ []));
114
- /**
115
- * @docs-private
116
- *
117
- * @deprecated Deprecated in version 0.86.0. Will be removed in version 1.0.0.
118
- */
119
- this._formLabelDirective = contentChild(DaffFormLabelDirective, ...(ngDevMode ? [{ debugName: "_formLabelDirective" }] : /* istanbul ignore next */ []));
120
- /**
121
- * @docs-private
122
- */
123
- this._formFieldLabelDirective = contentChild(DaffFormFieldLabelDirective, ...(ngDevMode ? [{ debugName: "_formFieldLabelDirective" }] : /* istanbul ignore next */ []));
124
- /**
125
- * @docs-private
126
- */
127
- this._action = contentChild(DaffFormFieldActionDirective, ...(ngDevMode ? [{ debugName: "_action" }] : /* istanbul ignore next */ []));
128
- /**
129
- * @docs-private
130
- */
131
- this._hint = contentChild(DaffHintComponent, ...(ngDevMode ? [{ debugName: "_hint" }] : /* istanbul ignore next */ []));
132
- /**
133
- * @docs-private
134
- */
135
- this._error = contentChild(DaffErrorMessageComponent, ...(ngDevMode ? [{ debugName: "_error" }] : /* istanbul ignore next */ []));
136
- /**
137
- * @docs-private
138
- *
139
- * Tracking property to keep a record of whether or not the
140
- * form field should be marked as error.
141
- */
142
- this.isError = signal(false, ...(ngDevMode ? [{ debugName: "isError" }] : /* istanbul ignore next */ []));
143
- /**
144
- * @docs-private
145
- *
146
- * Tracking property to keep a record of whether or not the
147
- * form field contains any user input.
148
- */
149
- this.isFilled = signal(false, ...(ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []));
150
- /**
151
- * @docs-private
152
- *
153
- * Tracking property to keep a record of whether or not the
154
- * form field should be marked as disabled.
155
- */
156
- this.isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
157
- /**
158
- * @docs-private
159
- *
160
- * Tracking property to keep a record of whether or not the
161
- * form field should be marked as valid.
162
- */
163
- this.isValid = signal(false, ...(ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []));
164
- /**
165
- * The appearance of the form field. Defaults to `fluid`.
166
- */
167
- this.appearance = input(DaffFormFieldAppearanceEnum.Fluid, { ...(ngDevMode ? { debugName: "appearance" } : /* istanbul ignore next */ {}), transform: (value) => value || DaffFormFieldAppearanceEnum.Fluid });
168
- /**
169
- * @docs-private
170
- */
171
- this.isFixed = computed(() => this.appearance() === DaffFormFieldAppearanceEnum.Fixed, ...(ngDevMode ? [{ debugName: "isFixed" }] : /* istanbul ignore next */ []));
172
- /**
173
- * The unique id of the form field. Defaults to an autogenerated value. When using this,
174
- * it's your responsibility to ensure that the id for each form field is unique.
175
- *
176
- * It gets assigned to the `for` attribute on the `<label>` inside of the form field.
177
- */
178
- this.id = input('daff-form-field-' + ++daffFormFieldId, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
179
- /**
180
- * @docs-private
181
- */
182
- this.hasHint = computed(() => !!this._hint(), ...(ngDevMode ? [{ debugName: "hasHint" }] : /* istanbul ignore next */ []));
183
- /**
184
- * @docs-private
185
- */
186
- this.hintId = computed(() => this.id() + '-hint', ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
187
- /**
188
- * @docs-private
189
- */
190
- this.hasErrorMessage = computed(() => !!this._error(), ...(ngDevMode ? [{ debugName: "hasErrorMessage" }] : /* istanbul ignore next */ []));
191
- /**
192
- * @docs-private
193
- */
194
- this.errorMessageId = computed(() => this.id() + '-error', ...(ngDevMode ? [{ debugName: "errorMessageId" }] : /* istanbul ignore next */ []));
195
- /**
196
- * @docs-private
197
- */
198
- this.autoLabelId = computed(() => this._control()?.supportsAutoLabelling ? this.id() : null, ...(ngDevMode ? [{ debugName: "autoLabelId" }] : /* istanbul ignore next */ []));
199
- /**
200
- * @docs-private
201
- */
202
- this.customId = computed(() => this._control()?.supportsAutoLabelling ? null : this.id(), ...(ngDevMode ? [{ debugName: "customId" }] : /* istanbul ignore next */ []));
203
- }
204
- /**
205
- * @docs-private
206
- *
207
- * Determines whether or not the form field should display its focused state.
208
- */
209
- get isFocused() {
210
- return this._control()?.focused;
211
- }
212
- /**
213
- * @docs-private
214
- */
215
- get isRaised() {
216
- return this._control()?.raised || this.isFilled();
217
- }
218
- /**
219
- * @docs-private
220
- *
221
- * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.
222
- */
223
- ngAfterViewInit() {
224
- if (isDevMode()) {
225
- if (!this._formFieldLabelDirective() && this._control()?.supportsAutoLabelling && !(this._control()?.id)) {
226
- console.warn(`Accessibility Warning: The form field with id "${this.id()}" uses a control that supports auto-labelling, but no <daff-form-label> component was found.\n\n` +
227
- `1. Add a <daff-form-label> component (recommended)\n` +
228
- `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\n\n` +
229
- `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`);
230
- }
231
- if (this._suffix() && this._action() && !this.isFixed()) {
232
- console.warn(`UI consideration for form field with id "${this.id()}":\n\n` + `In a fluid appearance, avoid using suffix alongside an action.`);
233
- }
234
- ;
235
- }
236
- }
237
- /**
238
- * Validates whether or not the form field is in a "usable" state.
239
- */
240
- _validateFormControl() {
241
- if (!this._control()) {
242
- throw new Error(DaffFormFieldMissingControlMessage);
243
- }
244
- }
245
- /**
246
- * @docs-private
247
- *
248
- * Lifecycle hook to verify that the form field has an acceptable
249
- * child control instance. Mostly useful for development-time
250
- * validation of usage.
251
- */
252
- ngAfterContentInit() {
253
- this._validateFormControl();
254
- this._control()?.stateChanges?.subscribe(({ filled, disabled, error, valid }) => {
255
- this.isFilled.set(filled);
256
- this.isError.set(error);
257
- this.isDisabled.set(disabled);
258
- this.isValid.set(valid);
259
- this.cd.markForCheck();
260
- });
261
- }
262
- /**
263
- * @docs-private
264
- *
265
- * Lifecycle hook to verify that the form field has an acceptable
266
- * child control instance. Mostly useful for development-time
267
- * validation of usage.
268
- */
269
- ngAfterContentChecked() {
270
- this._validateFormControl();
271
- }
272
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
273
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-native-select": "isNativeSelect()", "class.has-prefix": "_prefix()", "class.has-suffix": "_suffix()", "class.has-action": "_action()", "class.daff-error": "isError()", "class.daff-disabled": "isDisabled()", "class.daff-valid": "isValid()", "class.daff-focused": "isFocused", "class.daff-raised": "isRaised", "class.fluid": "appearance() === \"fluid\"", "class.fixed": "appearance() === \"fixed\"" }, classAttribute: "daff-form-field" }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, isSignal: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true, isSignal: true }, { propertyName: "_control", first: true, predicate: DaffFormFieldControl, descendants: true, isSignal: true }, { propertyName: "_formLabelDirective", first: true, predicate: DaffFormLabelDirective, descendants: true, isSignal: true }, { propertyName: "_formFieldLabelDirective", first: true, predicate: DaffFormFieldLabelDirective, descendants: true, isSignal: true }, { propertyName: "_action", first: true, predicate: DaffFormFieldActionDirective, descendants: true, isSignal: true }, { propertyName: "_hint", first: true, predicate: DaffHintComponent, descendants: true, isSignal: true }, { propertyName: "_error", first: true, predicate: DaffErrorMessageComponent, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "<ng-content />\n\n@if (isFixed()) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix()) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed()) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix()) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action() && !isFixed()) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action() && isFixed())) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId()\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId()\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective()) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective()) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId()\"\n [attr.id]=\"customId()\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control().required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>", styles: [".daff-form-field{display:flex;flex-direction:column;gap:.25rem;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-native-select .daff-form-field__control: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)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:calc(.75rem - 1px) 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid.has-action .daff-form-field__control{padding-right:0}.daff-form-field.fluid.has-action .daff-form-field__inner{padding-right:1rem}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s;white-space:nowrap}.daff-form-field.fluid label+input,.daff-form-field.fluid label+textarea,.daff-form-field.fluid label+select,.daff-form-field.fluid label~* input,.daff-form-field.fluid label~* textarea,.daff-form-field.fluid label~* select,.daff-form-field.fluid .daff-form-label+input,.daff-form-field.fluid .daff-form-label+textarea,.daff-form-field.fluid .daff-form-label+select,.daff-form-field.fluid .daff-form-label~* input,.daff-form-field.fluid .daff-form-label~* textarea,.daff-form-field.fluid .daff-form-label~* select,.daff-form-field.fluid .daff-form-field__label+input,.daff-form-field.fluid .daff-form-field__label+textarea,.daff-form-field.fluid .daff-form-field__label+select,.daff-form-field.fluid .daff-form-field__label~* input,.daff-form-field.fluid .daff-form-field__label~* textarea,.daff-form-field.fluid .daff-form-field__label~* select{padding:calc(1.5rem - 1px) 0 calc(.5rem - 1px)}.daff-form-field.fluid.daff-raised label,.daff-form-field.fluid.daff-raised .daff-form-label,.daff-form-field.fluid.daff-raised .daff-form-field__label{transform:translateY(-75%) scale(.75)}.daff-form-field.fluid.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-prefix,.daff-form-field.fluid .daff-suffix{height:3rem;min-width:3rem}.daff-form-field.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__inner{flex-grow:1;position:relative;overflow:hidden}.daff-form-field .daff-prefix,.daff-form-field .daff-suffix{display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:none;height:calc(3rem - 2px);min-width:calc(3rem - 2px)}.daff-form-field.daff-skeleton{display:flex;position:relative;height:3.5rem;width:100%;border-radius:.25rem}.daff-form-field.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:3.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-form-field.daff-skeleton>*{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
274
- }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldComponent, decorators: [{
276
- type: Component,
277
- args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
278
- NgTemplateOutlet,
279
- ], host: {
280
- class: 'daff-form-field',
281
- '[class.is-native-select]': 'isNativeSelect()',
282
- '[class.has-prefix]': '_prefix()',
283
- '[class.has-suffix]': '_suffix()',
284
- '[class.has-action]': '_action()',
285
- '[class.daff-error]': 'isError()',
286
- '[class.daff-disabled]': 'isDisabled()',
287
- '[class.daff-valid]': 'isValid()',
288
- '[class.daff-focused]': 'isFocused',
289
- '[class.daff-raised]': 'isRaised',
290
- '[class.fluid]': 'appearance() === "fluid"',
291
- '[class.fixed]': 'appearance() === "fixed"',
292
- }, hostDirectives: [
293
- {
294
- directive: DaffSkeletonableDirective,
295
- inputs: ['skeleton'],
296
- },
297
- ], template: "<ng-content />\n\n@if (isFixed()) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\">\n\t<div class=\"daff-form-field__control\">\n\t\t@if (_prefix()) {\n\t\t\t<ng-content select=\"[daffPrefix]\"></ng-content>\n\t\t}\n\t\t<div class=\"daff-form-field__inner\">\n\t\t\t@if (!isFixed()) {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n\t\t\t}\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (_suffix()) {\n\t\t\t<ng-content select=\"[daffSuffix]\"></ng-content>\n\t\t}\n\t\t@if (_action() && !isFixed()) {\n\t\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t\t}\n\t</div>\n\t@if ((_action() && isFixed())) {\n\t\t<ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n\t}\n</div>\n@if (hasHint()) {\n\t<div\n\t\tclass=\"daff-form-field__hint-wrapper\"\n\t\t[id]=\"hintId()\">\n\t\t<ng-content select=\"daff-hint\"></ng-content>\n\t</div>\n}\n@if (hasErrorMessage()) {\n\t<div\n\t\tclass=\"daff-form-field__error-wrapper\"\n\t\t[id]=\"errorMessageId()\">\n\t\t<ng-content select=\"daff-error-message\"></ng-content>\n\t</div>\n}\n\n<ng-template #actionTemplate>\n\t<ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formLabelDirective()) {\n <ng-content select=\"label[daffFormLabel]\"></ng-content>\n } @else if(_formFieldLabelDirective()) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId()\"\n [attr.id]=\"customId()\">\n <ng-content select=\"daff-form-label\"></ng-content>\n\t\t\t@if (_control().required) {\n\t\t\t<span aria-hidden=\"true\">*</span>\n\t\t\t}\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>", styles: [".daff-form-field{display:flex;flex-direction:column;gap:.25rem;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:1rem;line-height:1rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-native-select .daff-form-field__control: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)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:calc(.75rem - 1px) 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid.has-action .daff-form-field__control{padding-right:0}.daff-form-field.fluid.has-action .daff-form-field__inner{padding-right:1rem}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.25rem;pointer-events:none;transform-origin:left top;transition:transform .15s;white-space:nowrap}.daff-form-field.fluid label+input,.daff-form-field.fluid label+textarea,.daff-form-field.fluid label+select,.daff-form-field.fluid label~* input,.daff-form-field.fluid label~* textarea,.daff-form-field.fluid label~* select,.daff-form-field.fluid .daff-form-label+input,.daff-form-field.fluid .daff-form-label+textarea,.daff-form-field.fluid .daff-form-label+select,.daff-form-field.fluid .daff-form-label~* input,.daff-form-field.fluid .daff-form-label~* textarea,.daff-form-field.fluid .daff-form-label~* select,.daff-form-field.fluid .daff-form-field__label+input,.daff-form-field.fluid .daff-form-field__label+textarea,.daff-form-field.fluid .daff-form-field__label+select,.daff-form-field.fluid .daff-form-field__label~* input,.daff-form-field.fluid .daff-form-field__label~* textarea,.daff-form-field.fluid .daff-form-field__label~* select{padding:calc(1.5rem - 1px) 0 calc(.5rem - 1px)}.daff-form-field.fluid.daff-raised label,.daff-form-field.fluid.daff-raised .daff-form-label,.daff-form-field.fluid.daff-raised .daff-form-field__label{transform:translateY(-75%) scale(.75)}.daff-form-field.fluid.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-prefix,.daff-form-field.fluid .daff-suffix{height:3rem;min-width:3rem}.daff-form-field.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__inner{flex-grow:1;position:relative;overflow:hidden}.daff-form-field .daff-prefix,.daff-form-field .daff-suffix{display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:none;height:calc(3rem - 2px);min-width:calc(3rem - 2px)}.daff-form-field.daff-skeleton{display:flex;position:relative;height:3.5rem;width:100%;border-radius:.25rem}.daff-form-field.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:3.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-form-field.daff-skeleton>*{visibility:hidden}\n"] }]
298
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { _prefix: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }] }], _suffix: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffSuffixDirective), { isSignal: true }] }], _control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffFormFieldControl), { isSignal: true }] }], _formLabelDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffFormLabelDirective), { isSignal: true }] }], _formFieldLabelDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffFormFieldLabelDirective), { isSignal: true }] }], _action: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffFormFieldActionDirective), { isSignal: true }] }], _hint: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffHintComponent), { isSignal: true }] }], _error: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffErrorMessageComponent), { isSignal: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
299
-
300
- /**
301
- * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
302
- */
303
- class DaffFormFieldModule {
304
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
305
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldModule, imports: [DaffFormFieldComponent,
306
- DaffErrorMessageComponent,
307
- DaffHintComponent,
308
- DaffFormFieldLabelDirective,
309
- DaffFormLabelModule], exports: [DaffFormFieldComponent,
310
- DaffErrorMessageComponent,
311
- DaffHintComponent,
312
- DaffFormFieldLabelDirective,
313
- DaffFormLabelModule] }); }
314
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldModule, imports: [DaffErrorMessageComponent,
315
- DaffHintComponent,
316
- DaffFormLabelModule, DaffFormLabelModule] }); }
317
- }
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFormFieldModule, decorators: [{
319
- type: NgModule,
320
- args: [{
321
- imports: [
322
- DaffFormFieldComponent,
323
- DaffErrorMessageComponent,
324
- DaffHintComponent,
325
- DaffFormFieldLabelDirective,
326
- DaffFormLabelModule,
327
- ],
328
- exports: [
329
- DaffFormFieldComponent,
330
- DaffErrorMessageComponent,
331
- DaffHintComponent,
332
- DaffFormFieldLabelDirective,
333
- DaffFormLabelModule,
334
- ],
335
- }]
336
- }] });
337
-
338
- /**
339
- * @docs-private
340
- */
86
+ var DaffFormFieldControlTypesEnum;
87
+ (function(DaffFormFieldControlTypesEnum) {
88
+ DaffFormFieldControlTypesEnum["Input"] = "input";
89
+ DaffFormFieldControlTypesEnum["Dropdown"] = "dropdown";
90
+ })(DaffFormFieldControlTypesEnum || (DaffFormFieldControlTypesEnum = {}));
91
+ let daffFormFieldId = 0;
92
+ const DaffFormFieldMissingControlMessage = "A DaffFormFieldComponent must contain a DaffFormFieldControl";
93
+ var DaffFormFieldComponent = class DaffFormFieldComponent {
94
+ constructor(cd, elementRef) {
95
+ this.cd = cd;
96
+ this.elementRef = elementRef;
97
+ this.isDropdown = computed(() => this._control()?.controlType === DaffFormFieldControlTypesEnum.Dropdown, ...ngDevMode ? [{ debugName: "isDropdown" }] : /* istanbul ignore next */ []);
98
+ this._wrapper = viewChild("wrapper", ...ngDevMode ? [{ debugName: "_wrapper" }] : /* istanbul ignore next */ []);
99
+ this._prefix = contentChild(DaffPrefixDirective, ...ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []);
100
+ this._suffix = contentChild(DaffSuffixDirective, ...ngDevMode ? [{ debugName: "_suffix" }] : /* istanbul ignore next */ []);
101
+ this._control = contentChild(DaffFormFieldControl, ...ngDevMode ? [{ debugName: "_control" }] : /* istanbul ignore next */ []);
102
+ this._formFieldLabelDirective = contentChild(DaffFormFieldLabelDirective, ...ngDevMode ? [{ debugName: "_formFieldLabelDirective" }] : /* istanbul ignore next */ []);
103
+ this._action = contentChild(DaffFormFieldActionDirective, ...ngDevMode ? [{ debugName: "_action" }] : /* istanbul ignore next */ []);
104
+ this._hint = contentChild(DaffHintComponent, ...ngDevMode ? [{ debugName: "_hint" }] : /* istanbul ignore next */ []);
105
+ this._error = contentChild(DaffErrorMessageComponent, ...ngDevMode ? [{ debugName: "_error" }] : /* istanbul ignore next */ []);
106
+ this.isError = signal(false, ...ngDevMode ? [{ debugName: "isError" }] : /* istanbul ignore next */ []);
107
+ this.isFilled = signal(false, ...ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []);
108
+ this.isDisabled = signal(false, ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
109
+ this.isValid = signal(false, ...ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []);
110
+ this.appearance = input(DaffFormFieldAppearanceEnum.Fluid, {
111
+ ...ngDevMode ? { debugName: "appearance" } : /* istanbul ignore next */ {},
112
+ transform: (value) => value || DaffFormFieldAppearanceEnum.Fluid
113
+ });
114
+ this.isFixed = computed(() => this.appearance() === DaffFormFieldAppearanceEnum.Fixed, ...ngDevMode ? [{ debugName: "isFixed" }] : /* istanbul ignore next */ []);
115
+ this.id = input("daff-form-field-" + ++daffFormFieldId, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
116
+ this.hasHint = computed(() => !!this._hint(), ...ngDevMode ? [{ debugName: "hasHint" }] : /* istanbul ignore next */ []);
117
+ this.hintId = computed(() => this.id() + "-hint", ...ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []);
118
+ this.hasErrorMessage = computed(() => !!this._error(), ...ngDevMode ? [{ debugName: "hasErrorMessage" }] : /* istanbul ignore next */ []);
119
+ this.errorMessageId = computed(() => this.id() + "-error", ...ngDevMode ? [{ debugName: "errorMessageId" }] : /* istanbul ignore next */ []);
120
+ this.autoLabelId = computed(() => this._control()?.supportsAutoLabelling ? this.id() : null, ...ngDevMode ? [{ debugName: "autoLabelId" }] : /* istanbul ignore next */ []);
121
+ this.customId = computed(() => this._control()?.supportsAutoLabelling ? null : this.id(), ...ngDevMode ? [{ debugName: "customId" }] : /* istanbul ignore next */ []);
122
+ }
123
+ get isFocused() {
124
+ return this._control()?.focused;
125
+ }
126
+ get isRaised() {
127
+ return this._control()?.raised || this.isFilled();
128
+ }
129
+ get isOpen() {
130
+ return this._control()?.opened;
131
+ }
132
+ ngAfterViewInit() {
133
+ if (isDevMode()) {
134
+ if (!this._formFieldLabelDirective() && this._control()?.supportsAutoLabelling && !this._control()?.id) console.warn(`Accessibility Warning: The form field with id "${this.id()}" uses a control that supports auto-labelling, but no <daff-form-label> component was found.\n\n1. Add a <daff-form-label> component (recommended)\n2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\n\nWhy this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`);
135
+ if (this._suffix() && this._action() && !this.isFixed()) console.warn(`UI consideration for form field with id "${this.id()}":\n\nIn a fluid appearance, avoid using suffix alongside an action.`);
136
+ }
137
+ }
138
+ _validateFormControl() {
139
+ if (!this._control()) throw new Error(DaffFormFieldMissingControlMessage);
140
+ }
141
+ ngAfterContentInit() {
142
+ this._validateFormControl();
143
+ this._control()?.stateChanges?.subscribe(({ filled, disabled, error, valid }) => {
144
+ this.isFilled.set(filled);
145
+ this.isError.set(error);
146
+ this.isDisabled.set(disabled);
147
+ this.isValid.set(valid);
148
+ this.cd.markForCheck();
149
+ });
150
+ }
151
+ ngAfterContentChecked() {
152
+ this._validateFormControl();
153
+ }
154
+ static {
155
+ this.ɵfac = i0.ɵɵngDeclareFactory({
156
+ minVersion: "12.0.0",
157
+ version: "22.2.4",
158
+ ngImport: i0,
159
+ type: DaffFormFieldComponent,
160
+ deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }],
161
+ target: i0.ɵɵFactoryTarget.Component
162
+ });
163
+ }
164
+ static {
165
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
166
+ minVersion: "17.0.0",
167
+ version: "22.2.4",
168
+ type: DaffFormFieldComponent,
169
+ isStandalone: true,
170
+ selector: "daff-form-field",
171
+ inputs: {
172
+ appearance: {
173
+ classPropertyName: "appearance",
174
+ publicName: "appearance",
175
+ isSignal: true,
176
+ isRequired: false,
177
+ transformFunction: null
178
+ },
179
+ id: {
180
+ classPropertyName: "id",
181
+ publicName: "id",
182
+ isSignal: true,
183
+ isRequired: false,
184
+ transformFunction: null
185
+ }
186
+ },
187
+ host: {
188
+ properties: {
189
+ "class.is-dropdown": "isDropdown()",
190
+ "class.has-prefix": "_prefix()",
191
+ "class.has-suffix": "_suffix()",
192
+ "class.has-action": "_action()",
193
+ "class.daff-error": "isError()",
194
+ "class.daff-disabled": "isDisabled()",
195
+ "class.daff-valid": "isValid()",
196
+ "class.daff-focused": "isFocused",
197
+ "class.daff-raised": "isRaised",
198
+ "class.daff-open": "isOpen",
199
+ "class.fluid": "appearance() === \"fluid\"",
200
+ "class.fixed": "appearance() === \"fixed\""
201
+ },
202
+ classAttribute: "daff-form-field"
203
+ },
204
+ queries: [
205
+ {
206
+ propertyName: "_prefix",
207
+ first: true,
208
+ predicate: DaffPrefixDirective,
209
+ descendants: true,
210
+ isSignal: true
211
+ },
212
+ {
213
+ propertyName: "_suffix",
214
+ first: true,
215
+ predicate: DaffSuffixDirective,
216
+ descendants: true,
217
+ isSignal: true
218
+ },
219
+ {
220
+ propertyName: "_control",
221
+ first: true,
222
+ predicate: DaffFormFieldControl,
223
+ descendants: true,
224
+ isSignal: true
225
+ },
226
+ {
227
+ propertyName: "_formFieldLabelDirective",
228
+ first: true,
229
+ predicate: DaffFormFieldLabelDirective,
230
+ descendants: true,
231
+ isSignal: true
232
+ },
233
+ {
234
+ propertyName: "_action",
235
+ first: true,
236
+ predicate: DaffFormFieldActionDirective,
237
+ descendants: true,
238
+ isSignal: true
239
+ },
240
+ {
241
+ propertyName: "_hint",
242
+ first: true,
243
+ predicate: DaffHintComponent,
244
+ descendants: true,
245
+ isSignal: true
246
+ },
247
+ {
248
+ propertyName: "_error",
249
+ first: true,
250
+ predicate: DaffErrorMessageComponent,
251
+ descendants: true,
252
+ isSignal: true
253
+ }
254
+ ],
255
+ viewQueries: [{
256
+ propertyName: "_wrapper",
257
+ first: true,
258
+ predicate: ["wrapper"],
259
+ descendants: true,
260
+ isSignal: true
261
+ }],
262
+ hostDirectives: [{
263
+ directive: i1.DaffSkeletonableDirective,
264
+ inputs: ["skeleton", "skeleton"]
265
+ }],
266
+ ngImport: i0,
267
+ template: "<ng-content />\n\n@if (isFixed()) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\" #wrapper>\n <div class=\"daff-form-field__control\">\n @if (_prefix()) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n }\n <div class=\"daff-form-field__inner\">\n @if (!isFixed()) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n }\n <ng-content></ng-content>\n </div>\n @if (_suffix()) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n }\n @if (_action() && !isFixed()) {\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n }\n </div>\n @if ((_action() && isFixed())) {\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n }\n</div>\n@if (hasHint()) {\n <div\n class=\"daff-form-field__hint-wrapper\"\n [id]=\"hintId()\">\n <ng-content select=\"daff-hint\"></ng-content>\n </div>\n}\n@if (hasErrorMessage()) {\n <div\n class=\"daff-form-field__error-wrapper\"\n [id]=\"errorMessageId()\">\n <ng-content select=\"daff-error-message\"></ng-content>\n </div>\n}\n\n<ng-template #actionTemplate>\n <ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formFieldLabelDirective()) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId()\"\n [attr.id]=\"customId()\">\n <ng-content select=\"daff-form-label\"></ng-content>\n @if (_control().required) {\n <span aria-hidden=\"true\">*</span>\n }\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>",
268
+ styles: [".daff-form-field{display:inline-flex;flex-direction:column;gap:.25rem;min-width:0;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem;width:0;min-width:100%}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:var(--daff-font-size-base);line-height:1.25rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-dropdown .daff-form-field__control: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-form-field.is-dropdown label,.daff-form-field.is-dropdown .daff-form-label,.daff-form-field.is-dropdown .daff-form-field__label{padding-right:1rem}.daff-form-field.is-dropdown.daff-open .daff-form-field__control:after{top:56%;transform:translateY(-50%) rotate(225deg)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:.6875rem 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid.has-action .daff-form-field__control{padding-right:0}.daff-form-field.fluid.has-action .daff-form-field__inner{padding-right:1rem}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.125rem;max-width:100%;pointer-events:none;transform-origin:left top;transition:transform .15s;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-form-field.fluid label+input,.daff-form-field.fluid label+textarea,.daff-form-field.fluid label+select,.daff-form-field.fluid label~* input,.daff-form-field.fluid label~* textarea,.daff-form-field.fluid label~* select,.daff-form-field.fluid .daff-form-label+input,.daff-form-field.fluid .daff-form-label+textarea,.daff-form-field.fluid .daff-form-label+select,.daff-form-field.fluid .daff-form-label~* input,.daff-form-field.fluid .daff-form-label~* textarea,.daff-form-field.fluid .daff-form-label~* select,.daff-form-field.fluid .daff-form-field__label+input,.daff-form-field.fluid .daff-form-field__label+textarea,.daff-form-field.fluid .daff-form-field__label+select,.daff-form-field.fluid .daff-form-field__label~* input,.daff-form-field.fluid .daff-form-field__label~* textarea,.daff-form-field.fluid .daff-form-field__label~* select{padding:1.4375rem 0 .4375rem}.daff-form-field.fluid.daff-raised label,.daff-form-field.fluid.daff-raised .daff-form-label,.daff-form-field.fluid.daff-raised .daff-form-field__label{max-width:133.3333333333%;transform:translateY(-50%) scale(.75)}.daff-form-field.fluid.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-prefix,.daff-form-field.fluid .daff-suffix{height:3rem;min-width:3rem}.daff-form-field.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__inner{flex:auto;min-width:0;width:12rem;position:relative;overflow:hidden}.daff-form-field__inner:has(textarea[cols]){width:auto}.daff-form-field .daff-prefix,.daff-form-field .daff-suffix{display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:none;height:2.875rem;min-width:2.875rem}.daff-form-field.daff-skeleton{display:flex;position:relative;height:3.5rem;width:100%;border-radius:.25rem}.daff-form-field.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:3.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-form-field.daff-skeleton>*{visibility:hidden}\n"],
269
+ dependencies: [{
270
+ kind: "directive",
271
+ type: NgTemplateOutlet,
272
+ selector: "[ngTemplateOutlet]",
273
+ inputs: [
274
+ "ngTemplateOutletContext",
275
+ "ngTemplateOutlet",
276
+ "ngTemplateOutletInjector"
277
+ ]
278
+ }],
279
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
280
+ encapsulation: i0.ViewEncapsulation.None
281
+ });
282
+ }
283
+ };
284
+ i0.ɵɵngDeclareClassMetadata({
285
+ minVersion: "12.0.0",
286
+ version: "22.2.4",
287
+ ngImport: i0,
288
+ type: DaffFormFieldComponent,
289
+ decorators: [{
290
+ type: Component,
291
+ args: [{
292
+ selector: "daff-form-field",
293
+ encapsulation: ViewEncapsulation.None,
294
+ changeDetection: ChangeDetectionStrategy.OnPush,
295
+ imports: [NgTemplateOutlet],
296
+ host: {
297
+ class: "daff-form-field",
298
+ "[class.is-dropdown]": "isDropdown()",
299
+ "[class.has-prefix]": "_prefix()",
300
+ "[class.has-suffix]": "_suffix()",
301
+ "[class.has-action]": "_action()",
302
+ "[class.daff-error]": "isError()",
303
+ "[class.daff-disabled]": "isDisabled()",
304
+ "[class.daff-valid]": "isValid()",
305
+ "[class.daff-focused]": "isFocused",
306
+ "[class.daff-raised]": "isRaised",
307
+ "[class.daff-open]": "isOpen",
308
+ "[class.fluid]": "appearance() === \"fluid\"",
309
+ "[class.fixed]": "appearance() === \"fixed\""
310
+ },
311
+ hostDirectives: [{
312
+ directive: DaffSkeletonableDirective,
313
+ inputs: ["skeleton"]
314
+ }],
315
+ template: "<ng-content />\n\n@if (isFixed()) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n}\n<div class=\"daff-form-field__wrapper\" #wrapper>\n <div class=\"daff-form-field__control\">\n @if (_prefix()) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n }\n <div class=\"daff-form-field__inner\">\n @if (!isFixed()) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n }\n <ng-content></ng-content>\n </div>\n @if (_suffix()) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n }\n @if (_action() && !isFixed()) {\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n }\n </div>\n @if ((_action() && isFixed())) {\n <ng-container *ngTemplateOutlet=\"actionTemplate\"></ng-container>\n }\n</div>\n@if (hasHint()) {\n <div\n class=\"daff-form-field__hint-wrapper\"\n [id]=\"hintId()\">\n <ng-content select=\"daff-hint\"></ng-content>\n </div>\n}\n@if (hasErrorMessage()) {\n <div\n class=\"daff-form-field__error-wrapper\"\n [id]=\"errorMessageId()\">\n <ng-content select=\"daff-error-message\"></ng-content>\n </div>\n}\n\n<ng-template #actionTemplate>\n <ng-content select=\"[daffFormFieldAction]\"></ng-content>\n</ng-template>\n\n<ng-template #labelTemplate>\n @if (_formFieldLabelDirective()) {\n <label class=\"daff-form-field__label\"\n [attr.for]=\"autoLabelId()\"\n [attr.id]=\"customId()\">\n <ng-content select=\"daff-form-label\"></ng-content>\n @if (_control().required) {\n <span aria-hidden=\"true\">*</span>\n }\n </label>\n } @else {\n <ng-content select=\"label\"></ng-content>\n }\n</ng-template>",
316
+ styles: [".daff-form-field{display:inline-flex;flex-direction:column;gap:.25rem;min-width:0;position:relative}.daff-form-field.has-prefix .daff-form-field__control{padding-left:0}.daff-form-field.has-suffix .daff-form-field__control{padding-right:0}.daff-form-field__hint-wrapper,.daff-form-field__error-wrapper{display:flex;flex-direction:column;gap:.25rem;width:0;min-width:100%}.daff-form-field__wrapper{display:flex;gap:.25rem}.daff-form-field__control{display:flex;align-items:center;border-radius:.25rem;font-size:var(--daff-font-size-base);line-height:1.25rem;padding:0 1rem;position:relative;width:100%}.daff-form-field__control+.daff-hint,.daff-form-field__control+.daff-error-message{margin-top:.5rem}.daff-form-field.is-dropdown .daff-form-field__control: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-form-field.is-dropdown label,.daff-form-field.is-dropdown .daff-form-label,.daff-form-field.is-dropdown .daff-form-field__label{padding-right:1rem}.daff-form-field.is-dropdown.daff-open .daff-form-field__control:after{top:56%;transform:translateY(-50%) rotate(225deg)}.daff-form-field.fixed input,.daff-form-field.fixed textarea,.daff-form-field.fixed select{font-size:1rem;line-height:1.5rem;padding:.6875rem 0}.daff-form-field.fixed input * ::-webkit-input-placeholder,.daff-form-field.fixed textarea * ::-webkit-input-placeholder,.daff-form-field.fixed select * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.daff-form-field.fluid.has-action .daff-form-field__control{padding-right:0}.daff-form-field.fluid.has-action .daff-form-field__inner{padding-right:1rem}.daff-form-field.fluid .daff-form-field-action{margin-right:.25rem}.daff-form-field.fluid input,.daff-form-field.fluid textarea,.daff-form-field.fluid select{font-size:1rem;line-height:1.5rem;padding:1rem 0}.daff-form-field.fluid label,.daff-form-field.fluid .daff-form-label,.daff-form-field.fluid .daff-form-field__label{position:absolute;left:0;top:1.125rem;max-width:100%;pointer-events:none;transform-origin:left top;transition:transform .15s;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-form-field.fluid label+input,.daff-form-field.fluid label+textarea,.daff-form-field.fluid label+select,.daff-form-field.fluid label~* input,.daff-form-field.fluid label~* textarea,.daff-form-field.fluid label~* select,.daff-form-field.fluid .daff-form-label+input,.daff-form-field.fluid .daff-form-label+textarea,.daff-form-field.fluid .daff-form-label+select,.daff-form-field.fluid .daff-form-label~* input,.daff-form-field.fluid .daff-form-label~* textarea,.daff-form-field.fluid .daff-form-label~* select,.daff-form-field.fluid .daff-form-field__label+input,.daff-form-field.fluid .daff-form-field__label+textarea,.daff-form-field.fluid .daff-form-field__label+select,.daff-form-field.fluid .daff-form-field__label~* input,.daff-form-field.fluid .daff-form-field__label~* textarea,.daff-form-field.fluid .daff-form-field__label~* select{padding:1.4375rem 0 .4375rem}.daff-form-field.fluid.daff-raised label,.daff-form-field.fluid.daff-raised .daff-form-label,.daff-form-field.fluid.daff-raised .daff-form-field__label{max-width:133.3333333333%;transform:translateY(-50%) scale(.75)}.daff-form-field.fluid.daff-raised * ::-webkit-input-placeholder{opacity:1}.daff-form-field.fluid .daff-prefix,.daff-form-field.fluid .daff-suffix{height:3rem;min-width:3rem}.daff-form-field.daff-disabled{cursor:not-allowed;opacity:.5}.daff-form-field__inner{flex:auto;min-width:0;width:12rem;position:relative;overflow:hidden}.daff-form-field__inner:has(textarea[cols]){width:auto}.daff-form-field .daff-prefix,.daff-form-field .daff-suffix{display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:none;height:2.875rem;min-width:2.875rem}.daff-form-field.daff-skeleton{display:flex;position:relative;height:3.5rem;width:100%;border-radius:.25rem}.daff-form-field.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:3.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-form-field.daff-skeleton>*{visibility:hidden}\n"]
317
+ }]
318
+ }],
319
+ ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }],
320
+ propDecorators: {
321
+ _wrapper: [{
322
+ type: i0.ViewChild,
323
+ args: ["wrapper", { isSignal: true }]
324
+ }],
325
+ _prefix: [{
326
+ type: i0.ContentChild,
327
+ args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }]
328
+ }],
329
+ _suffix: [{
330
+ type: i0.ContentChild,
331
+ args: [i0.forwardRef(() => DaffSuffixDirective), { isSignal: true }]
332
+ }],
333
+ _control: [{
334
+ type: i0.ContentChild,
335
+ args: [i0.forwardRef(() => DaffFormFieldControl), { isSignal: true }]
336
+ }],
337
+ _formFieldLabelDirective: [{
338
+ type: i0.ContentChild,
339
+ args: [i0.forwardRef(() => DaffFormFieldLabelDirective), { isSignal: true }]
340
+ }],
341
+ _action: [{
342
+ type: i0.ContentChild,
343
+ args: [i0.forwardRef(() => DaffFormFieldActionDirective), { isSignal: true }]
344
+ }],
345
+ _hint: [{
346
+ type: i0.ContentChild,
347
+ args: [i0.forwardRef(() => DaffHintComponent), { isSignal: true }]
348
+ }],
349
+ _error: [{
350
+ type: i0.ContentChild,
351
+ args: [i0.forwardRef(() => DaffErrorMessageComponent), { isSignal: true }]
352
+ }],
353
+ appearance: [{
354
+ type: i0.Input,
355
+ args: [{
356
+ isSignal: true,
357
+ alias: "appearance",
358
+ required: false
359
+ }]
360
+ }],
361
+ id: [{
362
+ type: i0.Input,
363
+ args: [{
364
+ isSignal: true,
365
+ alias: "id",
366
+ required: false
367
+ }]
368
+ }]
369
+ }
370
+ });
371
+ var DaffFormFieldModule = class DaffFormFieldModule {
372
+ static {
373
+ this.ɵfac = i0.ɵɵngDeclareFactory({
374
+ minVersion: "12.0.0",
375
+ version: "22.2.4",
376
+ ngImport: i0,
377
+ type: DaffFormFieldModule,
378
+ deps: [],
379
+ target: i0.ɵɵFactoryTarget.NgModule
380
+ });
381
+ }
382
+ static {
383
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
384
+ minVersion: "14.0.0",
385
+ version: "22.2.4",
386
+ ngImport: i0,
387
+ type: DaffFormFieldModule,
388
+ imports: [
389
+ DaffFormFieldComponent,
390
+ DaffErrorMessageComponent,
391
+ DaffHintComponent,
392
+ DaffFormFieldLabelDirective
393
+ ],
394
+ exports: [
395
+ DaffFormFieldComponent,
396
+ DaffErrorMessageComponent,
397
+ DaffHintComponent,
398
+ DaffFormFieldLabelDirective
399
+ ]
400
+ });
401
+ }
402
+ static {
403
+ this.ɵinj = i0.ɵɵngDeclareInjector({
404
+ minVersion: "12.0.0",
405
+ version: "22.2.4",
406
+ ngImport: i0,
407
+ type: DaffFormFieldModule,
408
+ imports: [DaffErrorMessageComponent, DaffHintComponent]
409
+ });
410
+ }
411
+ };
412
+ i0.ɵɵngDeclareClassMetadata({
413
+ minVersion: "12.0.0",
414
+ version: "22.2.4",
415
+ ngImport: i0,
416
+ type: DaffFormFieldModule,
417
+ decorators: [{
418
+ type: NgModule,
419
+ args: [{
420
+ imports: [
421
+ DaffFormFieldComponent,
422
+ DaffErrorMessageComponent,
423
+ DaffHintComponent,
424
+ DaffFormFieldLabelDirective
425
+ ],
426
+ exports: [
427
+ DaffFormFieldComponent,
428
+ DaffErrorMessageComponent,
429
+ DaffHintComponent,
430
+ DaffFormFieldLabelDirective
431
+ ]
432
+ }]
433
+ }]
434
+ });
341
435
  const DAFF_FORM_FIELD_COMPONENTS = [
342
- DaffFormFieldComponent,
343
- DaffFormLabelDirective,
344
- DaffPrefixDirective,
345
- DaffSuffixDirective,
346
- DaffFormFieldActionDirective,
347
- DaffHintComponent,
348
- DaffFormFieldLabelDirective,
349
- DaffErrorMessageComponent,
436
+ DaffFormFieldComponent,
437
+ DaffPrefixDirective,
438
+ DaffSuffixDirective,
439
+ DaffFormFieldActionDirective,
440
+ DaffHintComponent,
441
+ DaffFormFieldLabelDirective,
442
+ DaffErrorMessageComponent
350
443
  ];
444
+ export { DAFF_FORM_FIELD_COMPONENTS, DaffFormFieldActionDirective, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldControlTypesEnum, DaffFormFieldModule };
351
445
 
352
- /**
353
- * Generated bundle index. Do not edit.
354
- */
355
-
356
- export { DAFF_FORM_FIELD_COMPONENTS, DaffFormFieldActionDirective, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldModule };
357
- //# sourceMappingURL=daffodil-design-form-field.mjs.map
446
+ //# sourceMappingURL=daffodil-design-form-field.mjs.map