@daffodil/design 0.90.0 → 0.92.3-rc.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.
- package/accordion/README.md +26 -38
- package/accordion/index.d.ts +9 -6
- package/article/README.md +66 -46
- package/article/index.d.ts +41 -0
- package/article/src/article-theme.scss +22 -0
- package/breadcrumb/README.md +6 -1
- package/breadcrumb/index.d.ts +65 -11
- package/breadcrumb/src/breadcrumb-theme.scss +1 -1
- package/button/README.md +36 -33
- package/button/index.d.ts +27 -6
- package/button/src/button/basic/button-theme.scss +4 -2
- package/button/src/button/button-base.scss +29 -6
- package/button/src/button/icon/icon-theme.scss +10 -6
- package/button/src/button/raised/raised-theme.scss +6 -4
- package/callout/README.md +15 -27
- package/card/README.md +36 -69
- package/card/index.d.ts +7 -41
- package/card/src/card-base-theme.scss +2 -5
- package/card/src/card-base.scss +2 -2
- package/checkbox/README.md +0 -0
- package/checkbox/index.d.ts +177 -0
- package/container/README.md +18 -23
- package/fesm2022/daffodil-design-accordion.mjs +34 -25
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +283 -17
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +90 -45
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +23 -23
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +43 -90
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +317 -0
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -0
- package/fesm2022/daffodil-design-container.mjs +8 -8
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +56 -86
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +62 -0
- package/fesm2022/daffodil-design-form.mjs.map +1 -0
- package/fesm2022/daffodil-design-hero.mjs +23 -23
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +19 -11
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +18 -14
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +25 -17
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +16 -16
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +223 -60
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +86 -83
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +47 -41
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +25 -21
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +28 -64
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +11 -16
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +19 -18
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +27 -56
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +6 -6
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +30 -60
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +99 -0
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
- package/fesm2022/daffodil-design-switch.mjs +49 -106
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +35 -27
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +7 -7
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +6 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +79 -80
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +152 -112
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +559 -711
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form/README.md +75 -0
- package/form/index.d.ts +27 -0
- package/form-field/README.md +74 -99
- package/form-field/index.d.ts +64 -42
- package/hero/README.md +5 -5
- package/image/README.md +27 -19
- package/image/index.d.ts +6 -1
- package/index.d.ts +282 -447
- package/input/README.md +36 -16
- package/input/index.d.ts +4 -3
- package/link-set/index.d.ts +9 -1
- package/list/README.md +2 -2
- package/loading-icon/README.md +1 -1
- package/loading-icon/index.d.ts +1 -1
- package/media-gallery/README.md +3 -3
- package/menu/README.md +107 -10
- package/menu/index.d.ts +143 -11
- package/modal/README.md +107 -17
- package/modal/index.d.ts +72 -35
- package/native-select/README.md +52 -15
- package/native-select/index.d.ts +8 -7
- package/navbar/README.md +23 -17
- package/navbar/index.d.ts +12 -2
- package/navbar/src/navbar-theme.scss +4 -46
- package/notification/README.md +4 -4
- package/notification/index.d.ts +7 -38
- package/package.json +1 -1
- package/paginator/README.md +42 -6
- package/paginator/index.d.ts +5 -9
- package/progress-bar/README.md +3 -3
- package/quantity-field/README.md +4 -4
- package/quantity-field/index.d.ts +4 -1
- package/radio/README.md +1 -1
- package/radio/index.d.ts +0 -16
- package/scss/layout/_breakpoint.scss +1 -1
- package/scss/theme.scss +9 -5
- package/scss/theming/_color-palettes.scss +19 -11
- package/scss/theming/_configure-theme.scss +11 -10
- package/scss/theming/_daff-theme.scss +5 -14
- package/scss/theming/_get-base-color.scss +2 -2
- package/scss/theming/_get-palette.scss +2 -2
- package/scss/theming/_get-theme-mode.scss +3 -3
- package/scss/theming/_index.scss +2 -1
- package/scss/theming/contrast/max-contrast/max-contrast.scss +3 -3
- package/scss/theming/contrast/text-contrast/text-contrast.scss +22 -16
- package/scss/theming/contrast/text-contrast/text-contrast.spec.scss +57 -0
- package/scss/theming/create-theme/_create-theme.scss +330 -0
- package/scss/theming/create-theme/_create-theme.spec.scss +122 -0
- package/scss/theming/create-theme/_index.scss +1 -0
- package/scss/theming/get-font-colors/_get-font-colors.scss +36 -0
- package/scss/theming/get-font-colors/_get-font-colors.spec.scss +72 -0
- package/scss/typography/mixins/_font-weight.scss +8 -14
- package/select/README.md +107 -4
- package/sidebar/README.md +6 -14
- package/sidebar/index.d.ts +3 -15
- package/spinner/README.md +57 -0
- package/spinner/index.d.ts +53 -0
- package/spinner/src/spinner-theme.scss +62 -0
- package/switch/README.md +21 -29
- package/switch/index.d.ts +18 -48
- package/switch/src/switch-theme.scss +26 -18
- package/tabs/README.md +1 -1
- package/tabs/index.d.ts +8 -5
- package/tag/README.md +24 -30
- package/tag/index.d.ts +1 -1
- package/tag/src/tag-theme.scss +11 -9
- package/text-snippet/README.md +1 -1
- package/text-snippet/src/text-snippet-theme.scss +12 -0
- package/textarea/README.md +36 -6
- package/textarea/index.d.ts +4 -4
- package/toast/README.md +4 -4
- package/tree/README.md +39 -22
- package/tree/index.d.ts +57 -96
- package/tree/src/tree-theme.scss +0 -4
- package/accordion/examples/index.d.ts +0 -20
- package/article/examples/index.d.ts +0 -50
- package/breadcrumb/examples/index.d.ts +0 -10
- package/button/examples/index.d.ts +0 -67
- package/callout/examples/index.d.ts +0 -41
- package/card/examples/index.d.ts +0 -62
- package/card/src/card/raised/raised-theme.scss +0 -28
- package/checkbox/examples/index.d.ts +0 -32
- package/container/examples/index.d.ts +0 -16
- package/fesm2022/daffodil-design-accordion-examples.mjs +0 -50
- package/fesm2022/daffodil-design-accordion-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-article-examples.mjs +0 -134
- package/fesm2022/daffodil-design-article-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs +0 -46
- package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-button-examples.mjs +0 -178
- package/fesm2022/daffodil-design-button-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +0 -116
- package/fesm2022/daffodil-design-callout-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-card-examples.mjs +0 -168
- package/fesm2022/daffodil-design-card-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +0 -76
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-container-examples.mjs +0 -41
- package/fesm2022/daffodil-design-container-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-form-field-examples.mjs +0 -96
- package/fesm2022/daffodil-design-form-field-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +0 -121
- package/fesm2022/daffodil-design-hero-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-image-examples.mjs +0 -58
- package/fesm2022/daffodil-design-image-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-input-examples.mjs +0 -108
- package/fesm2022/daffodil-design-input-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-list-examples.mjs +0 -77
- package/fesm2022/daffodil-design-list-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-loading-icon-examples.mjs +0 -44
- package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-media-gallery-examples.mjs +0 -104
- package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-menu-examples.mjs +0 -50
- package/fesm2022/daffodil-design-menu-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-modal-examples.mjs +0 -51
- package/fesm2022/daffodil-design-modal-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-native-select-examples.mjs +0 -71
- package/fesm2022/daffodil-design-native-select-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-navbar-examples.mjs +0 -88
- package/fesm2022/daffodil-design-navbar-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +0 -102
- package/fesm2022/daffodil-design-notification-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-paginator-examples.mjs +0 -59
- package/fesm2022/daffodil-design-paginator-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +0 -57
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +0 -85
- package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-radio-examples.mjs +0 -34
- package/fesm2022/daffodil-design-radio-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-select-examples.mjs +0 -117
- package/fesm2022/daffodil-design-select-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +0 -109
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-sticky-examples.mjs +0 -25
- package/fesm2022/daffodil-design-sticky-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-switch-examples.mjs +0 -110
- package/fesm2022/daffodil-design-switch-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-tabs-examples.mjs +0 -115
- package/fesm2022/daffodil-design-tabs-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-tag-examples.mjs +0 -125
- package/fesm2022/daffodil-design-tag-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-text-snippet-examples.mjs +0 -25
- package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-textarea-examples.mjs +0 -66
- package/fesm2022/daffodil-design-textarea-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +0 -147
- package/fesm2022/daffodil-design-toast-examples.mjs.map +0 -1
- package/fesm2022/daffodil-design-tree-examples.mjs +0 -104
- package/fesm2022/daffodil-design-tree-examples.mjs.map +0 -1
- package/form-field/examples/index.d.ts +0 -18
- package/hero/examples/index.d.ts +0 -45
- package/image/examples/index.d.ts +0 -10
- package/input/examples/index.d.ts +0 -10
- package/list/examples/index.d.ts +0 -29
- package/loading-icon/examples/index.d.ts +0 -16
- package/media-gallery/examples/index.d.ts +0 -38
- package/menu/examples/index.d.ts +0 -20
- package/modal/examples/index.d.ts +0 -15
- package/native-select/examples/index.d.ts +0 -10
- package/navbar/examples/index.d.ts +0 -31
- package/notification/examples/index.d.ts +0 -12
- package/paginator/examples/index.d.ts +0 -26
- package/progress-bar/examples/index.d.ts +0 -10
- package/quantity-field/examples/index.d.ts +0 -30
- package/radio/examples/index.d.ts +0 -13
- package/select/examples/index.d.ts +0 -28
- package/sidebar/examples/index.d.ts +0 -10
- package/sticky/examples/index.d.ts +0 -10
- package/switch/examples/index.d.ts +0 -46
- package/tabs/examples/index.d.ts +0 -12
- package/tag/examples/index.d.ts +0 -50
- package/text-snippet/examples/index.d.ts +0 -10
- package/textarea/examples/index.d.ts +0 -10
- package/toast/examples/index.d.ts +0 -56
- package/tree/examples/index.d.ts +0 -18
- /package/{form-field → form}/src/error-message/error-message-theme.scss +0 -0
- /package/{form-field → form}/src/hint/hint-theme.scss +0 -0
|
@@ -1,60 +1,53 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Directive, isDevMode, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@daffodil/design';
|
|
4
4
|
import { DaffPrefixDirective, DaffSuffixDirective, DaffFormLabelDirective, DaffSkeletonableDirective, DaffFormLabelModule } from '@daffodil/design';
|
|
5
|
+
import { DaffFormFieldLabelDirective, DaffHintComponent, DaffErrorMessageComponent } from '@daffodil/design/form';
|
|
5
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
6
7
|
import { BehaviorSubject } from 'rxjs';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffErrorMessageComponent, decorators: [{
|
|
13
|
-
type: Component,
|
|
14
|
-
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', host: {
|
|
15
|
-
class: 'daff-error-message',
|
|
16
|
-
'aria-live': 'polite',
|
|
17
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"] }]
|
|
18
|
-
}] });
|
|
19
|
-
|
|
9
|
+
/**
|
|
10
|
+
* DaffFormFieldActionDirective marks an element, typically a button, as an action attached to a form control inside `DaffFormFieldComponent`.
|
|
11
|
+
*/
|
|
20
12
|
class DaffFormFieldActionDirective {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* @docs-private
|
|
24
|
-
*/
|
|
25
|
-
this.class = true;
|
|
26
|
-
}
|
|
27
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormFieldActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
28
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffFormFieldActionDirective, isStandalone: true, selector: "[daffFormFieldAction]", host: { properties: { "class.daff-form-field-action": "this.class" } }, ngImport: i0 }); }
|
|
13
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
14
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffFormFieldActionDirective, isStandalone: true, selector: "[daffFormFieldAction]", host: { classAttribute: "daff-form-field-action" }, ngImport: i0 }); }
|
|
29
15
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldActionDirective, decorators: [{
|
|
31
17
|
type: Directive,
|
|
32
18
|
args: [{
|
|
33
19
|
selector: '[daffFormFieldAction]',
|
|
20
|
+
host: {
|
|
21
|
+
class: 'daff-form-field-action',
|
|
22
|
+
},
|
|
34
23
|
}]
|
|
35
|
-
}]
|
|
36
|
-
type: HostBinding,
|
|
37
|
-
args: ['class.daff-form-field-action']
|
|
38
|
-
}] } });
|
|
24
|
+
}] });
|
|
39
25
|
|
|
40
26
|
/**
|
|
27
|
+
* Form controls must extend this class to be used inside `DaffFormFieldComponent`.
|
|
41
28
|
*
|
|
42
|
-
*
|
|
43
|
-
* used
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* We do this so that the Angular DI container can match the class token. A typical
|
|
47
|
-
* interface would be "more accurate" here, but since interfaces don't exist
|
|
48
|
-
* in javascript, they get thrown out by the typescript compiler and cannot
|
|
49
|
-
* be used for the necessary dependency injection.
|
|
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.
|
|
50
33
|
*/
|
|
51
34
|
class DaffFormFieldControl {
|
|
35
|
+
/**
|
|
36
|
+
* Whether the label should be in the raised position.
|
|
37
|
+
* By default, matches the focused state.
|
|
38
|
+
*/
|
|
52
39
|
get raised() {
|
|
53
40
|
return this.focused;
|
|
54
41
|
}
|
|
55
42
|
;
|
|
56
43
|
constructor(ngControl) {
|
|
57
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
|
+
*/
|
|
58
51
|
this.supportsAutoLabelling = true;
|
|
59
52
|
this._stateChanges = new BehaviorSubject({
|
|
60
53
|
focused: false,
|
|
@@ -64,6 +57,10 @@ class DaffFormFieldControl {
|
|
|
64
57
|
valid: true,
|
|
65
58
|
});
|
|
66
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Computes the current state of the form field control.
|
|
62
|
+
* Combines control properties and form validation state.
|
|
63
|
+
*/
|
|
67
64
|
get state() {
|
|
68
65
|
return {
|
|
69
66
|
focused: this.focused,
|
|
@@ -73,6 +70,9 @@ class DaffFormFieldControl {
|
|
|
73
70
|
valid: !this.ngControl?.errors && this.ngControl?.dirty,
|
|
74
71
|
};
|
|
75
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Emits the current state.
|
|
75
|
+
*/
|
|
76
76
|
emitState(deferred = false) {
|
|
77
77
|
if (deferred) {
|
|
78
78
|
Promise.resolve().then(() => {
|
|
@@ -85,45 +85,6 @@ class DaffFormFieldControl {
|
|
|
85
85
|
}
|
|
86
86
|
;
|
|
87
87
|
|
|
88
|
-
class DaffHintComponent {
|
|
89
|
-
constructor() {
|
|
90
|
-
/**
|
|
91
|
-
* @docs-private
|
|
92
|
-
*/
|
|
93
|
-
this.class = true;
|
|
94
|
-
/**
|
|
95
|
-
* Displays a validated hint UI.
|
|
96
|
-
* */
|
|
97
|
-
this.validated = false;
|
|
98
|
-
}
|
|
99
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
100
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffHintComponent, isStandalone: true, selector: "daff-hint", inputs: { validated: "validated" }, host: { properties: { "class.daff-hint": "this.class", "class.validated": "this.validated" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
101
|
-
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffHintComponent, decorators: [{
|
|
103
|
-
type: Component,
|
|
104
|
-
args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"] }]
|
|
105
|
-
}], propDecorators: { class: [{
|
|
106
|
-
type: HostBinding,
|
|
107
|
-
args: ['class.daff-hint']
|
|
108
|
-
}], validated: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}, {
|
|
111
|
-
type: HostBinding,
|
|
112
|
-
args: ['class.validated']
|
|
113
|
-
}] } });
|
|
114
|
-
|
|
115
|
-
class DaffFormFieldLabelDirective {
|
|
116
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormFieldLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
117
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffFormFieldLabelDirective, isStandalone: true, selector: "daff-form-label", ngImport: i0 }); }
|
|
118
|
-
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffFormFieldLabelDirective, decorators: [{
|
|
120
|
-
type: Directive,
|
|
121
|
-
args: [{
|
|
122
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
123
|
-
selector: 'daff-form-label',
|
|
124
|
-
}]
|
|
125
|
-
}] });
|
|
126
|
-
|
|
127
88
|
let daffFormFieldId = 0;
|
|
128
89
|
var DaffFormFieldApperanaceEnum;
|
|
129
90
|
(function (DaffFormFieldApperanaceEnum) {
|
|
@@ -131,6 +92,9 @@ var DaffFormFieldApperanaceEnum;
|
|
|
131
92
|
DaffFormFieldApperanaceEnum["Fixed"] = "fixed";
|
|
132
93
|
})(DaffFormFieldApperanaceEnum || (DaffFormFieldApperanaceEnum = {}));
|
|
133
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
|
+
*/
|
|
134
98
|
class DaffFormFieldComponent {
|
|
135
99
|
/** @docs-private */
|
|
136
100
|
get isNativeSelect() {
|
|
@@ -199,7 +163,7 @@ class DaffFormFieldComponent {
|
|
|
199
163
|
return this._control?.raised || this.isFilled;
|
|
200
164
|
}
|
|
201
165
|
/**
|
|
202
|
-
* The appearance
|
|
166
|
+
* The appearance of the form field. Defaults to `fluid`.
|
|
203
167
|
*/
|
|
204
168
|
get appearance() {
|
|
205
169
|
return this._appearance;
|
|
@@ -297,10 +261,10 @@ class DaffFormFieldComponent {
|
|
|
297
261
|
ngAfterContentChecked() {
|
|
298
262
|
this._validateFormControl();
|
|
299
263
|
}
|
|
300
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
301
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
264
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
265
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", inputs: { appearance: "appearance", id: "id" }, host: { properties: { "class.is-native-select": "isNativeSelect", "class.has-prefix": "_prefix", "class.has-suffix": "_suffix || 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 }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true }, { propertyName: "_control", first: true, predicate: DaffFormFieldControl, descendants: true }, { propertyName: "_formLabelDirective", first: true, predicate: DaffFormLabelDirective, descendants: true }, { propertyName: "_formFieldLabelDirective", first: true, predicate: DaffFormFieldLabelDirective, descendants: true }, { propertyName: "_action", first: true, predicate: DaffFormFieldActionDirective, descendants: true }, { propertyName: "_hint", first: true, predicate: DaffHintComponent, descendants: true }, { propertyName: "_error", first: true, predicate: DaffErrorMessageComponent, descendants: 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{padding-right:0}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.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 }); }
|
|
302
266
|
}
|
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldComponent, decorators: [{
|
|
304
268
|
type: Component,
|
|
305
269
|
args: [{ selector: 'daff-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
306
270
|
NgTemplateOutlet,
|
|
@@ -321,7 +285,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
321
285
|
directive: DaffSkeletonableDirective,
|
|
322
286
|
inputs: ['skeleton'],
|
|
323
287
|
},
|
|
324
|
-
], 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 .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;
|
|
288
|
+
], 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{padding-right:0}.daff-form-field.fluid .daff-form-field__control * ::-webkit-input-placeholder{opacity:0}.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"] }]
|
|
325
289
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { _prefix: [{
|
|
326
290
|
type: ContentChild,
|
|
327
291
|
args: [DaffPrefixDirective]
|
|
@@ -356,29 +320,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
356
320
|
* @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.
|
|
357
321
|
*/
|
|
358
322
|
class DaffFormFieldModule {
|
|
359
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
360
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
323
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
324
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, imports: [DaffFormFieldComponent,
|
|
361
325
|
DaffErrorMessageComponent,
|
|
362
326
|
DaffHintComponent,
|
|
327
|
+
DaffFormFieldLabelDirective,
|
|
363
328
|
DaffFormLabelModule], exports: [DaffFormFieldComponent,
|
|
364
329
|
DaffErrorMessageComponent,
|
|
365
330
|
DaffHintComponent,
|
|
331
|
+
DaffFormFieldLabelDirective,
|
|
366
332
|
DaffFormLabelModule] }); }
|
|
367
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
333
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, imports: [DaffErrorMessageComponent,
|
|
334
|
+
DaffHintComponent,
|
|
335
|
+
DaffFormLabelModule, DaffFormLabelModule] }); }
|
|
368
336
|
}
|
|
369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldModule, decorators: [{
|
|
370
338
|
type: NgModule,
|
|
371
339
|
args: [{
|
|
372
340
|
imports: [
|
|
373
341
|
DaffFormFieldComponent,
|
|
374
342
|
DaffErrorMessageComponent,
|
|
375
343
|
DaffHintComponent,
|
|
344
|
+
DaffFormFieldLabelDirective,
|
|
376
345
|
DaffFormLabelModule,
|
|
377
346
|
],
|
|
378
347
|
exports: [
|
|
379
348
|
DaffFormFieldComponent,
|
|
380
349
|
DaffErrorMessageComponent,
|
|
381
350
|
DaffHintComponent,
|
|
351
|
+
DaffFormFieldLabelDirective,
|
|
382
352
|
DaffFormLabelModule,
|
|
383
353
|
],
|
|
384
354
|
}]
|
|
@@ -389,18 +359,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
389
359
|
*/
|
|
390
360
|
const DAFF_FORM_FIELD_COMPONENTS = [
|
|
391
361
|
DaffFormFieldComponent,
|
|
392
|
-
DaffErrorMessageComponent,
|
|
393
362
|
DaffFormLabelDirective,
|
|
394
|
-
DaffHintComponent,
|
|
395
363
|
DaffPrefixDirective,
|
|
396
364
|
DaffSuffixDirective,
|
|
397
|
-
DaffFormFieldLabelDirective,
|
|
398
365
|
DaffFormFieldActionDirective,
|
|
366
|
+
DaffHintComponent,
|
|
367
|
+
DaffFormFieldLabelDirective,
|
|
368
|
+
DaffErrorMessageComponent,
|
|
399
369
|
];
|
|
400
370
|
|
|
401
371
|
/**
|
|
402
372
|
* Generated bundle index. Do not edit.
|
|
403
373
|
*/
|
|
404
374
|
|
|
405
|
-
export { DAFF_FORM_FIELD_COMPONENTS,
|
|
375
|
+
export { DAFF_FORM_FIELD_COMPONENTS, DaffFormFieldActionDirective, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldModule };
|
|
406
376
|
//# sourceMappingURL=daffodil-design-form-field.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-form-field.mjs","sources":["../../../libs/design/form-field/src/error-message/error-message.component.ts","../../../libs/design/form-field/src/action/action.directive.ts","../../../libs/design/form-field/src/form-field-control.ts","../../../libs/design/form-field/src/hint/hint.component.ts","../../../libs/design/form-field/src/label/label.directive.ts","../../../libs/design/form-field/src/form-field/form-field.component.ts","../../../libs/design/form-field/src/form-field/form-field.component.html","../../../libs/design/form-field/src/form-field.module.ts","../../../libs/design/form-field/src/form-field.ts","../../../libs/design/form-field/src/daffodil-design-form-field.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-error-message',\n template: '<ng-content></ng-content>',\n styleUrls: ['./error-message.component.scss'],\n host: {\n class: 'daff-error-message',\n 'aria-live': 'polite',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffErrorMessageComponent {}\n","import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffFormFieldAction]',\n})\nexport class DaffFormFieldActionDirective {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-form-field-action') class = true;\n}\n","import { NgControl } from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\n\nimport { DaffFormFieldState } from './form-field-state';\n\n/**\n *\n * The class that a form control must **implement** in order to be\n * used with the DaffFormFieldComponent.\n *\n * You may ask: \"Why are you implementing an abstract class, not extending it?\"\n * We do this so that the Angular DI container can match the class token. A typical\n * interface would be \"more accurate\" here, but since interfaces don't exist\n * in javascript, they get thrown out by the typescript compiler and cannot\n * be used for the necessary dependency injection.\n */\nexport abstract class DaffFormFieldControl<T> {\n abstract readonly controlType?: any;\n\n readonly supportsAutoLabelling?: boolean = true;\n\n abstract readonly focused: boolean;\n\n abstract readonly required: boolean;\n\n abstract readonly disabled: boolean;\n\n readonly id?: string;\n\n get raised() {\n return this.focused;\n };\n\n abstract focus(event?: Event): void;\n\n abstract readonly value: T;\n\n constructor(public ngControl: NgControl | null) {\n }\n\n get state(): DaffFormFieldState {\n return {\n focused: this.focused,\n filled: !!this.value,\n disabled: this.ngControl?.disabled ?? this.disabled,\n error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),\n valid: !this.ngControl?.errors && this.ngControl?.dirty,\n };\n }\n\n _stateChanges = new BehaviorSubject({\n focused: false,\n filled: false,\n disabled: false,\n error: false,\n valid: true,\n });\n\n stateChanges: Observable<DaffFormFieldState>;\n\n emitState(deferred = false) {\n if(deferred) {\n Promise.resolve().then(() => {\n this._stateChanges.next(this.state);\n });\n return;\n }\n\n this._stateChanges.next(this.state);\n }\n};\n","import {\n Component,\n ChangeDetectionStrategy,\n HostBinding,\n Input,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-hint',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hint.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class DaffHintComponent {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-hint') class = true;\n\n /**\n * Displays a validated hint UI.\n * */\n @Input() @HostBinding('class.validated') validated = false;\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-form-label',\n})\nexport class DaffFormFieldLabelDirective {}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ContentChild,\n AfterContentInit,\n AfterContentChecked,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Input,\n AfterViewInit,\n isDevMode,\n ElementRef,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffSkeletonableDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\n\nimport { DaffFormFieldActionDirective } from '../action/action.directive';\nimport { DaffErrorMessageComponent } from '../error-message/error-message.component';\nimport { DaffFormFieldControl } from '../form-field-control';\nimport { DaffHintComponent } from '../hint/hint.component';\nimport { DaffFormFieldLabelDirective } from '../label/label.directive';\n\nlet daffFormFieldId = 0;\n\nexport type DaffFormFieldApperanace = 'fluid' | 'fixed';\n\nenum DaffFormFieldApperanaceEnum {\n Fluid = 'fluid',\n Fixed = 'fixed',\n}\n\nexport const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';\n\n@Component({\n selector: 'daff-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n ],\n host: {\n class: 'daff-form-field',\n '[class.is-native-select]': 'isNativeSelect',\n '[class.has-prefix]': '_prefix',\n '[class.has-suffix]': '_suffix || action',\n '[class.daff-error]': 'isError',\n '[class.daff-disabled]': 'isDisabled',\n '[class.daff-valid]': 'isValid',\n '[class.daff-focused]': 'isFocused',\n '[class.daff-raised]': 'isRaised',\n '[class.fluid]': 'appearance === \"fluid\"',\n '[class.fixed]': 'appearance === \"fixed\"',\n },\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n})\nexport class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n /** @docs-private */\n get isNativeSelect() {\n return this._control.controlType === 'native-select';\n }\n\n constructor(private cd: ChangeDetectorRef, public elementRef: ElementRef) {}\n\n /** @docs-private */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /** @docs-private */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n\n /**\n * @docs-private\n *\n * The child form control that the form field manages.\n */\n @ContentChild(DaffFormFieldControl) _control: DaffFormFieldControl<unknown>;\n\n /**\n * @docs-private\n * @deprecated Deprecated in version 0.86.0. Will be removed in v1.0.0. Deprecated in version 0.89.0. Will be removed in version 0.92.0.\n */\n @ContentChild(DaffFormLabelDirective) _formLabelDirective: DaffFormLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldLabelDirective) _formFieldLabelDirective: DaffFormFieldLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldActionDirective) _action: DaffFormFieldActionDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffHintComponent) private _hint: DaffHintComponent;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffErrorMessageComponent) private _error: DaffErrorMessageComponent;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as error.\n */\n isError = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field contains any user input.\n */\n isFilled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as disabled.\n */\n isDisabled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as valid.\n */\n isValid = false;\n\n /**\n * @docs-private\n *\n * Determines whether or not the form field should display its focused state.\n */\n get isFocused() {\n return this._control?.focused;\n }\n\n /**\n * @docs-private\n */\n get isRaised() {\n return this._control?.raised || this.isFilled;\n }\n\n private _appearance: DaffFormFieldApperanace = DaffFormFieldApperanaceEnum.Fluid;\n\n /**\n * The appearance style of a form field, whether the label is fluid or fixed.\n */\n @Input()\n get appearance() {\n return this._appearance;\n }\n\n set appearance(value: DaffFormFieldApperanace) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._appearance = DaffFormFieldApperanaceEnum.Fluid;\n } else {\n this._appearance = value;\n }\n };\n\n /**\n * @docs-private\n */\n get isFixed() {\n return this._appearance === DaffFormFieldApperanaceEnum.Fixed;\n }\n\n /**\n * The unique id of the form field. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each form field is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the form field.\n */\n @Input() id = 'daff-form-field-' + ++daffFormFieldId;\n\n /**\n * @docs-private\n */\n hasHint() {\n return this._hint ? true : false;\n }\n\n /**\n * @docs-private\n */\n hintId = this.id + '-hint';\n\n /**\n * @docs-private\n */\n hasErrorMessage() {\n return this._error ? true : false;\n }\n\n /**\n * @docs-private\n */\n errorMessageId = this.id + '-error';\n\n /**\n * @docs-private\n */\n get autoLabelId() {\n return this._control.supportsAutoLabelling ? this.id : null;\n }\n\n /**\n * @docs-private\n */\n get customId() {\n return this._control.supportsAutoLabelling ? null : this.id;\n }\n\n /**\n * @docs-private\n *\n * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.\n */\n ngAfterViewInit() {\n if (isDevMode()) {\n if (!this._formFieldLabelDirective && this._control.supportsAutoLabelling && !(this._control.id)) {\n console.warn(\n `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` +\n `1. Add a <daff-form-label> component (recommended)\\n` +\n `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\\n\\n` +\n `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`,\n );\n }\n\n if(this._suffix && this._action && !this.isFixed) {\n console.warn(\n `UI consideration for form field with id \"${this.id}\":\\n\\n` + `In a fluid appearance, avoid using suffix alongside an action.`,\n );\n };\n }\n }\n\n /**\n * Validates whether or not the form field is in a \"usable\" state.\n */\n private _validateFormControl() {\n if (!this._control) {\n throw new Error(DaffFormFieldMissingControlMessage);\n }\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentInit() {\n this._validateFormControl();\n\n this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {\n this.isFilled = filled;\n this.isError = error;\n this.isDisabled = disabled;\n this.isValid = valid;\n\n this.cd.markForCheck();\n });\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentChecked() {\n this._validateFormControl();\n }\n}\n","<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>","import { NgModule } from '@angular/core';\n\nimport { DaffFormLabelModule } from '@daffodil/design';\n\nimport { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\nimport { DaffHintComponent } from './hint/hint.component';\n\n/**\n * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormLabelModule,\n ],\n exports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormLabelModule,\n ],\n})\nexport class DaffFormFieldModule { }\n","import {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\n\nimport { DaffFormFieldActionDirective } from './action/action.directive';\nimport { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\nimport { DaffHintComponent } from './hint/hint.component';\nimport { DaffFormFieldLabelDirective } from './label/label.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_FIELD_COMPONENTS = <const> [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffFormLabelDirective,\n DaffHintComponent,\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormFieldLabelDirective,\n DaffFormFieldActionDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAea,yBAAyB,CAAA;iIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,qKAR1B,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;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B,iBAAiB;AACjB,YAAA,mBAAmB,aAGnB,sBAAsB;YACtB,yBAAyB;YACzB,iBAAiB;YACjB,mBAAmB,CAAA,EAAA,CAAA,CAAA;kIAGV,mBAAmB,EAAA,OAAA,EAAA,CAT5B,mBAAmB,EAMnB,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAGV,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAd/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,mBAAmB;AACpB,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;AACI,MAAM,0BAA0B,GAAW;IAChD,sBAAsB;IACtB,yBAAyB;IACzB,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,2BAA2B;IAC3B,4BAA4B;;;ACvB9B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-form-field.mjs","sources":["../../../libs/design/form-field/src/action/action.directive.ts","../../../libs/design/form-field/src/form-field-control.ts","../../../libs/design/form-field/src/form-field/form-field.component.ts","../../../libs/design/form-field/src/form-field/form-field.component.html","../../../libs/design/form-field/src/form-field.module.ts","../../../libs/design/form-field/src/form-field.ts","../../../libs/design/form-field/src/daffodil-design-form-field.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * DaffFormFieldActionDirective marks an element, typically a button, as an action attached to a form control inside `DaffFormFieldComponent`.\n */\n@Directive({\n selector: '[daffFormFieldAction]',\n host: {\n class: 'daff-form-field-action',\n },\n})\nexport class DaffFormFieldActionDirective {}\n","import { NgControl } from '@angular/forms';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\n\nimport { DaffFormFieldState } from './form-field-state';\n\n/**\n * Form controls must extend this class to be used inside `DaffFormFieldComponent`.\n *\n * > **Note**\n * > 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.\n * >\n * > By using an abstract class, the Angular DI container can match the class token for injection.\n */\nexport abstract class DaffFormFieldControl<T> {\n /**\n * The type of the control (e.g., 'input', 'select', 'textarea').\n * Used to apply control-specific styling or behavior.\n */\n abstract readonly controlType?: any;\n\n /**\n * Whether the control supports automatic label behavior.\n * When `true`, the form field will associate the label with the control using `for` and `id` attributes.\n *\n * Defaults to `true`.\n */\n readonly supportsAutoLabelling?: boolean = true;\n\n /**\n * Whether the control currently has focus.\n */\n abstract readonly focused: boolean;\n\n /**\n * Whether the control is required for form validation.\n */\n abstract readonly required: boolean;\n\n /**\n * Whether the control is disabled.\n */\n abstract readonly disabled: boolean;\n\n /**\n * The unique identifier for the control element.\n */\n readonly id?: string;\n\n /**\n * Whether the label should be in the raised position.\n * By default, matches the focused state.\n */\n get raised() {\n return this.focused;\n };\n\n /**\n * Sets focus on the control.\n *\n * @param event - Optional event that triggers the focus.\n */\n abstract focus(event?: Event): void;\n\n /**\n * The current value of the control.\n */\n abstract readonly value: T;\n\n constructor(public ngControl: NgControl | null) {}\n\n /**\n * Computes the current state of the form field control.\n * Combines control properties and form validation state.\n */\n get state(): DaffFormFieldState {\n return {\n focused: this.focused,\n filled: !!this.value,\n disabled: this.ngControl?.disabled ?? this.disabled,\n error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),\n valid: !this.ngControl?.errors && this.ngControl?.dirty,\n };\n }\n\n _stateChanges = new BehaviorSubject({\n focused: false,\n filled: false,\n disabled: false,\n error: false,\n valid: true,\n });\n\n /**\n * Observable stream of state changes for the form field control.\n */\n stateChanges: Observable<DaffFormFieldState>;\n\n /**\n * Emits the current state.\n */\n emitState(deferred = false) {\n if(deferred) {\n Promise.resolve().then(() => {\n this._stateChanges.next(this.state);\n });\n return;\n }\n\n this._stateChanges.next(this.state);\n }\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ContentChild,\n AfterContentInit,\n AfterContentChecked,\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Input,\n AfterViewInit,\n isDevMode,\n ElementRef,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffSkeletonableDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from '../action/action.directive';\nimport { DaffFormFieldControl } from '../form-field-control';\n\nlet daffFormFieldId = 0;\n\nexport type DaffFormFieldApperanace = 'fluid' | 'fixed';\n\nenum DaffFormFieldApperanaceEnum {\n Fluid = 'fluid',\n Fixed = 'fixed',\n}\n\nexport const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';\n\n/**\n * DaffFormFieldComponent is a wrapping component that provides consistent styling and behavior for form control elements.\n */\n@Component({\n selector: 'daff-form-field',\n templateUrl: './form-field.component.html',\n styleUrl: './form-field.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n ],\n host: {\n class: 'daff-form-field',\n '[class.is-native-select]': 'isNativeSelect',\n '[class.has-prefix]': '_prefix',\n '[class.has-suffix]': '_suffix || action',\n '[class.daff-error]': 'isError',\n '[class.daff-disabled]': 'isDisabled',\n '[class.daff-valid]': 'isValid',\n '[class.daff-focused]': 'isFocused',\n '[class.daff-raised]': 'isRaised',\n '[class.fluid]': 'appearance === \"fluid\"',\n '[class.fixed]': 'appearance === \"fixed\"',\n },\n hostDirectives: [\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n})\nexport class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n /** @docs-private */\n get isNativeSelect() {\n return this._control.controlType === 'native-select';\n }\n\n constructor(private cd: ChangeDetectorRef, public elementRef: ElementRef) {}\n\n /** @docs-private */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /** @docs-private */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n\n /**\n * @docs-private\n *\n * The child form control that the form field manages.\n */\n @ContentChild(DaffFormFieldControl) _control: DaffFormFieldControl<unknown>;\n\n /**\n * @docs-private\n * @deprecated Deprecated in version 0.86.0. Will be removed in version 1.0.0.\n */\n @ContentChild(DaffFormLabelDirective) _formLabelDirective: DaffFormLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldLabelDirective) _formFieldLabelDirective: DaffFormFieldLabelDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffFormFieldActionDirective) _action: DaffFormFieldActionDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffHintComponent) private _hint: DaffHintComponent;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffErrorMessageComponent) private _error: DaffErrorMessageComponent;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as error.\n */\n isError = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field contains any user input.\n */\n isFilled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as disabled.\n */\n isDisabled = false;\n\n /**\n * @docs-private\n *\n * Tracking property to keep a record of whether or not the\n * form field should be marked as valid.\n */\n isValid = false;\n\n /**\n * @docs-private\n *\n * Determines whether or not the form field should display its focused state.\n */\n get isFocused() {\n return this._control?.focused;\n }\n\n /**\n * @docs-private\n */\n get isRaised() {\n return this._control?.raised || this.isFilled;\n }\n\n private _appearance: DaffFormFieldApperanace = DaffFormFieldApperanaceEnum.Fluid;\n\n /**\n * The appearance of the form field. Defaults to `fluid`.\n */\n @Input()\n get appearance() {\n return this._appearance;\n }\n\n set appearance(value: DaffFormFieldApperanace) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._appearance = DaffFormFieldApperanaceEnum.Fluid;\n } else {\n this._appearance = value;\n }\n };\n\n /**\n * @docs-private\n */\n get isFixed() {\n return this._appearance === DaffFormFieldApperanaceEnum.Fixed;\n }\n\n /**\n * The unique id of the form field. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each form field is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the form field.\n */\n @Input() id = 'daff-form-field-' + ++daffFormFieldId;\n\n /**\n * @docs-private\n */\n hasHint() {\n return this._hint ? true : false;\n }\n\n /**\n * @docs-private\n */\n hintId = this.id + '-hint';\n\n /**\n * @docs-private\n */\n hasErrorMessage() {\n return this._error ? true : false;\n }\n\n /**\n * @docs-private\n */\n errorMessageId = this.id + '-error';\n\n /**\n * @docs-private\n */\n get autoLabelId() {\n return this._control.supportsAutoLabelling ? this.id : null;\n }\n\n /**\n * @docs-private\n */\n get customId() {\n return this._control.supportsAutoLabelling ? null : this.id;\n }\n\n /**\n * @docs-private\n *\n * Displays a console warning if the `DaffFormFieldLabelDirective` is not used on controls (native HTML control elements) that support auto-labelling.\n */\n ngAfterViewInit() {\n if (isDevMode()) {\n if (!this._formFieldLabelDirective && this._control.supportsAutoLabelling && !(this._control.id)) {\n console.warn(\n `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` +\n `1. Add a <daff-form-label> component (recommended)\\n` +\n `2. OR manually set an 'id' on your input and matching 'for' attribute on your <label>.\\n\\n` +\n `Why this matters: Proper labelling ensures assistive technologies can identify form fields correctly.`,\n );\n }\n\n if(this._suffix && this._action && !this.isFixed) {\n console.warn(\n `UI consideration for form field with id \"${this.id}\":\\n\\n` + `In a fluid appearance, avoid using suffix alongside an action.`,\n );\n };\n }\n }\n\n /**\n * Validates whether or not the form field is in a \"usable\" state.\n */\n private _validateFormControl() {\n if (!this._control) {\n throw new Error(DaffFormFieldMissingControlMessage);\n }\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentInit() {\n this._validateFormControl();\n\n this._control.stateChanges?.subscribe(({ focused, filled, disabled, error, valid }) => {\n this.isFilled = filled;\n this.isError = error;\n this.isDisabled = disabled;\n this.isValid = valid;\n\n this.cd.markForCheck();\n });\n }\n\n /**\n * @docs-private\n *\n * Lifecycle hook to verify that the form field has an acceptable\n * child control instance. Mostly useful for development-time\n * validation of usage.\n */\n ngAfterContentChecked() {\n this._validateFormControl();\n }\n}\n","<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>","import { NgModule } from '@angular/core';\n\nimport { DaffFormLabelModule } from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n exports: [\n DaffFormFieldComponent,\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffFormLabelModule,\n ],\n})\nexport class DaffFormFieldModule { }\n","import {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormLabelDirective,\n} from '@daffodil/design';\nimport {\n DaffErrorMessageComponent,\n DaffFormFieldLabelDirective,\n DaffHintComponent,\n} from '@daffodil/design/form';\n\nimport { DaffFormFieldActionDirective } from './action/action.directive';\nimport { DaffFormFieldComponent } from './form-field/form-field.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_FIELD_COMPONENTS = <const> [\n DaffFormFieldComponent,\n DaffFormLabelDirective,\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffFormFieldActionDirective,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n DaffErrorMessageComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n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wBACzB,iBAAiB;wBACjB,2BAA2B;wBAC3B,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,yBAAyB;wBACzB,iBAAiB;wBACjB,2BAA2B;wBAC3B,mBAAmB;AACpB,qBAAA;AACF,iBAAA;;;ACfD;;AAEG;AACI,MAAM,0BAA0B,GAAW;IAChD,sBAAsB;IACtB,sBAAsB;IACtB,mBAAmB;IACnB,mBAAmB;IACnB,4BAA4B;IAC5B,iBAAiB;IACjB,2BAA2B;IAC3B,yBAAyB;;;ACzB3B;;AAEG;;;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input, Directive } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class DaffErrorMessageComponent {
|
|
5
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffErrorMessageComponent, isStandalone: true, selector: "daff-error-message", host: { attributes: { "aria-live": "polite" }, classAttribute: "daff-error-message" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
|
+
}
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffErrorMessageComponent, decorators: [{
|
|
9
|
+
type: Component,
|
|
10
|
+
args: [{ selector: 'daff-error-message', template: '<ng-content></ng-content>', host: {
|
|
11
|
+
class: 'daff-error-message',
|
|
12
|
+
'aria-live': 'polite',
|
|
13
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;font-size:.875rem;line-height:1rem}\n"] }]
|
|
14
|
+
}] });
|
|
15
|
+
|
|
16
|
+
class DaffHintComponent {
|
|
17
|
+
constructor() {
|
|
18
|
+
/**
|
|
19
|
+
* Displays a validated hint UI.
|
|
20
|
+
* */
|
|
21
|
+
this.validated = false;
|
|
22
|
+
}
|
|
23
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffHintComponent, isStandalone: true, selector: "daff-hint", inputs: { validated: "validated" }, host: { properties: { "class.validated": "validated" }, classAttribute: "daff-hint" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffHintComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{ selector: 'daff-hint', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
29
|
+
class: 'daff-hint',
|
|
30
|
+
'[class.validated]': 'validated',
|
|
31
|
+
}, styles: [":host{display:flex;gap:.25rem;font-size:.875rem;line-height:1rem}\n"] }]
|
|
32
|
+
}], propDecorators: { validated: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}] } });
|
|
35
|
+
|
|
36
|
+
class DaffFormFieldLabelDirective {
|
|
37
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffFormFieldLabelDirective, isStandalone: true, selector: "daff-form-label", ngImport: i0 }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffFormFieldLabelDirective, decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{
|
|
43
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
44
|
+
selector: 'daff-form-label',
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @docs-private
|
|
50
|
+
*/
|
|
51
|
+
const DAFF_FORM_HELPER_COMPONENTS = [
|
|
52
|
+
DaffErrorMessageComponent,
|
|
53
|
+
DaffHintComponent,
|
|
54
|
+
DaffFormFieldLabelDirective,
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Generated bundle index. Do not edit.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
export { DAFF_FORM_HELPER_COMPONENTS, DaffErrorMessageComponent, DaffFormFieldLabelDirective, DaffHintComponent };
|
|
62
|
+
//# sourceMappingURL=daffodil-design-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daffodil-design-form.mjs","sources":["../../../libs/design/form/src/error-message/error-message.component.ts","../../../libs/design/form/src/hint/hint.component.ts","../../../libs/design/form/src/label/label.directive.ts","../../../libs/design/form/src/form.ts","../../../libs/design/form/src/daffodil-design-form.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-error-message',\n template: '<ng-content></ng-content>',\n styleUrls: ['./error-message.component.scss'],\n host: {\n class: 'daff-error-message',\n 'aria-live': 'polite',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffErrorMessageComponent {}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n} from '@angular/core';\n\n@Component({\n selector: 'daff-hint',\n template: '<ng-content></ng-content>',\n styleUrls: ['./hint.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'daff-hint',\n '[class.validated]': 'validated',\n },\n})\nexport class DaffHintComponent {\n /**\n * Displays a validated hint UI.\n * */\n @Input() validated = false;\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'daff-form-label',\n})\nexport class DaffFormFieldLabelDirective {}\n","import { DaffErrorMessageComponent } from './error-message/error-message.component';\nimport { DaffHintComponent } from './hint/hint.component';\nimport { DaffFormFieldLabelDirective } from './label/label.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_FORM_HELPER_COMPONENTS = <const> [\n DaffErrorMessageComponent,\n DaffHintComponent,\n DaffFormFieldLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,yBAAyB,CAAA;kIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,qKAR1B,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAQ1B,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAVrC,SAAS;+BACE,oBAAoB,EAAA,QAAA,EACpB,2BAA2B,EAAA,IAAA,EAE/B;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AA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