@daffodil/design 0.87.1 → 0.88.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion/accordion-item/accordion-item.component.d.ts +1 -9
- package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +0 -4
- package/article/article/article.component.d.ts +0 -8
- package/article/article-meta/article-meta.directive.d.ts +0 -4
- package/atoms/form/form-field/form-field/form-field.component.d.ts +3 -2
- package/atoms/form/form-field/form-field-control.d.ts +3 -1
- package/atoms/form/native-select/native-select.component.d.ts +11 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +0 -4
- package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +0 -12
- package/button/button/basic/button.component.d.ts +0 -4
- package/button/button/button-base.directive.d.ts +0 -18
- package/button/button/flat/flat.component.d.ts +0 -4
- package/button/button/icon/icon.component.d.ts +0 -4
- package/button/button/stroked/stroked.component.d.ts +0 -4
- package/button/button/underline/underline.component.d.ts +0 -4
- package/button/src/button/button-base.scss +3 -3
- package/callout/README.md +38 -40
- package/callout/callout/callout.component.d.ts +13 -5
- package/callout/callout-body/callout-body.directive.d.ts +9 -4
- package/callout/callout-icon/callout-icon.directive.d.ts +9 -4
- package/callout/callout-subtitle/callout-subtitle.directive.d.ts +8 -4
- package/callout/callout-tagline/callout-tagline.directive.d.ts +8 -4
- package/callout/callout-title/callout-title.directive.d.ts +8 -4
- package/card/README.md +52 -44
- package/card/card/basic/basic.component.d.ts +18 -4
- package/card/card/raised/raised.component.d.ts +3 -4
- package/card/card/stroked/stroked.component.d.ts +18 -4
- package/card/card-actions/card-actions.directive.d.ts +8 -4
- package/card/card-base.directive.d.ts +8 -16
- package/card/card-content/card-content.directive.d.ts +9 -4
- package/card/card-icon/card-icon.directive.d.ts +8 -4
- package/card/card-image/card-image.directive.d.ts +8 -4
- package/card/card-tagline/card-tagline.directive.d.ts +8 -4
- package/card/card-title/card-title.directive.d.ts +8 -4
- package/card/card.d.ts +1 -0
- package/card/examples/elevated-card/elevated-card.component.d.ts +5 -0
- package/card/examples/public_api.d.ts +3 -3
- package/card/helpers/card-orientation.d.ts +17 -0
- package/card/public_api.d.ts +9 -8
- package/card/src/card-base-theme.scss +40 -58
- package/container/container/container.component.d.ts +0 -4
- package/core/public_api.d.ts +1 -0
- package/core/sticky/public_api.d.ts +1 -0
- package/core/sticky/sticky-tracker.directive.d.ts +23 -0
- package/fesm2022/daffodil-design-accordion.mjs +13 -55
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +14 -32
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +15 -38
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +41 -108
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +91 -73
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +17 -32
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +167 -145
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +7 -13
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field-examples.mjs +7 -7
- package/fesm2022/daffodil-design-form-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +18 -1
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +102 -71
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +5 -12
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input-examples.mjs +6 -6
- package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +60 -35
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +14 -10
- package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +111 -98
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +7 -17
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +26 -63
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +63 -130
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +7 -20
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +16 -41
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +112 -116
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -21
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +6 -6
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +74 -115
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +11 -3
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-select-examples.mjs +4 -4
- package/fesm2022/daffodil-design-select-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +50 -117
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +29 -3
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +39 -78
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-sticky-examples.mjs +25 -0
- package/fesm2022/daffodil-design-sticky-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-tabs.mjs +54 -131
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +17 -8
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea-examples.mjs +3 -3
- package/fesm2022/daffodil-design-textarea-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +49 -25
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +42 -128
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +26 -70
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +164 -17
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/README.md +39 -25
- package/hero/examples/basic-hero/basic-hero.component.d.ts +6 -0
- package/hero/examples/public_api.d.ts +1 -0
- package/hero/hero/hero.component.d.ts +21 -4
- package/hero/hero-body/hero-body.directive.d.ts +10 -4
- package/hero/hero-icon/hero-icon.directive.d.ts +10 -4
- package/hero/hero-subtitle/hero-subtitle.directive.d.ts +8 -4
- package/hero/hero-tagline/hero-tagline.directive.d.ts +8 -4
- package/hero/hero-title/hero-title.directive.d.ts +8 -4
- package/image/image/image.component.d.ts +0 -4
- package/input/input.component.d.ts +29 -9
- package/list/README.md +43 -13
- package/list/examples/multiline-list/multiline-list.component.d.ts +1 -0
- package/list/list/list.component.d.ts +12 -24
- package/list/list-item/list-item.component.d.ts +13 -20
- package/list/list-item-title/list-item-title.directive.d.ts +13 -0
- package/list/list.d.ts +8 -2
- package/list/list.module.d.ts +4 -3
- package/list/nav-list/nav-list.component.d.ts +17 -0
- package/list/public_api.d.ts +5 -2
- package/list/src/list-base.scss +40 -0
- package/list/src/list-theme.scss +5 -0
- package/media-gallery/media-gallery/media-gallery.component.d.ts +0 -6
- package/menu/menu/menu.component.d.ts +0 -12
- package/menu/menu-activator/menu-activator.component.d.ts +4 -5
- package/menu/menu-item/menu-item.component.d.ts +0 -10
- package/modal/modal/modal.component.d.ts +12 -33
- package/modal/modal-actions/modal-actions.component.d.ts +0 -4
- package/modal/modal-close/modal-close.directive.d.ts +1 -8
- package/modal/modal-content/modal-content.component.d.ts +0 -4
- package/modal/modal-header/modal-header.component.d.ts +0 -4
- package/modal/modal-title/modal-title.directive.d.ts +0 -11
- package/navbar/navbar/navbar.component.d.ts +0 -8
- package/navbar/src/navbar-theme.scss +2 -1
- package/notification/README.md +39 -24
- package/notification/examples/default-notification/default-notification.component.d.ts +0 -2
- package/notification/examples/public_api.d.ts +1 -5
- package/notification/helpers/notification-orientation.d.ts +17 -0
- package/notification/notification/notification.component.d.ts +39 -23
- package/notification/notification-actions/notification-actions.directive.d.ts +11 -4
- package/notification/notification-message/notification-message.directive.d.ts +9 -4
- package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -4
- package/notification/notification-title/notification-title.directive.d.ts +8 -4
- package/notification/public_api.d.ts +6 -5
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.d.ts +0 -11
- package/progress-bar/README.md +31 -8
- package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +9 -5
- package/progress-bar/progress-bar.component.d.ts +39 -35
- package/progress-bar/public_api.d.ts +2 -2
- package/quantity-field/quantity-field.component.d.ts +10 -0
- package/scss/global.scss +0 -1
- package/select/select/select.component.d.ts +13 -25
- package/select/select.d.ts +1 -2
- package/sidebar/README.md +67 -72
- package/sidebar/examples/over-and-under-sidebars/over-and-under-sidebars.component.d.ts +0 -1
- package/sidebar/examples/sidebar-sides/sidebar-sides.component.d.ts +11 -0
- package/sidebar/sidebar/sidebar.component.d.ts +0 -9
- package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +0 -4
- package/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.d.ts +3 -0
- package/sidebar/sidebar-header/sidebar-header.component.d.ts +0 -4
- package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +0 -17
- package/sticky/examples/basic-sticky/basic-sticky.component.d.ts +5 -0
- package/sticky/examples/index.d.ts +1 -0
- package/sticky/examples/public_api.d.ts +2 -0
- package/tabs/README.md +38 -14
- package/tabs/tabs/tab/tab.component.d.ts +4 -16
- package/tabs/tabs/tab-activator/tab-activator.component.d.ts +6 -27
- package/tabs/tabs/tab-label/tab-label.component.d.ts +5 -2
- package/tabs/tabs/tab-panel/tab-panel.component.d.ts +7 -24
- package/tabs/tabs/tabs.component.d.ts +5 -11
- package/text-snippet/README.md +31 -3
- package/text-snippet/text-snippet.component.d.ts +17 -2
- package/textarea/textarea.component.d.ts +25 -5
- package/toast/README.md +47 -21
- package/toast/interfaces/toast-action.d.ts +4 -5
- package/toast/interfaces/toast-options.d.ts +3 -1
- package/toast/interfaces/toast.d.ts +22 -7
- package/toast/service/toast.service.d.ts +3 -3
- package/toast/toast/toast-config.d.ts +7 -3
- package/toast/toast/toast-template.component.d.ts +1 -1
- package/toast/toast/toast.component.d.ts +0 -2
- package/toast/toast-actions/toast-actions.directive.d.ts +0 -4
- package/toast/toast-message/toast-message.directive.d.ts +0 -4
- package/toast/toast-title/toast-title.directive.d.ts +0 -4
- package/tree/tree/tree.component.d.ts +0 -6
- package/tree/tree-item/tree-item.directive.d.ts +7 -35
- package/accordion/accordion/animation/accordion-animation-state.d.ts +0 -1
- package/accordion/accordion/animation/accordion-animation.d.ts +0 -4
- package/card/examples/raised-card/raised-card.component.d.ts +0 -11
- package/notification/examples/notification-with-actions/notification-with-actions.component.d.ts +0 -8
- package/progress-bar/animation/progress-bar-animation.d.ts +0 -4
- package/select/animation/select-animation-state.d.ts +0 -7
- package/select/animation/select-animation.d.ts +0 -4
- package/select/animation/state.enum.d.ts +0 -4
@@ -8,7 +8,7 @@ import { UntypedFormControl, ReactiveFormsModule, Validators } from '@angular/fo
|
|
8
8
|
|
9
9
|
class BasicTextareaComponent {
|
10
10
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: BasicTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
11
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: BasicTextareaComponent, isStandalone: true, selector: "basic-textarea", ngImport: i0, template: "<daff-form-field>\n\t<daff-form-label for=\"comments\">Comments</daff-form-label>\n\t<textarea daff-textarea type=\"text\" name=\"comments\"></textarea>\n</daff-form-field>", dependencies: [{ kind: "component", type: DaffTextareaComponent, selector: "textarea[daff-textarea]" }, { kind: "component", type: i1.DaffFormFieldComponent, selector: "daff-form-field", inputs: ["appearance", "id"] }, { kind: "directive", type: i1.DaffFormFieldLabelDirective, selector: "daff-form-label" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
11
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: BasicTextareaComponent, isStandalone: true, selector: "basic-textarea", ngImport: i0, template: "<daff-form-field>\n\t<daff-form-label for=\"comments\">Comments</daff-form-label>\n\t<textarea daff-textarea type=\"text\" name=\"comments\"></textarea>\n</daff-form-field>", dependencies: [{ kind: "component", type: DaffTextareaComponent, selector: "textarea[daff-textarea]", inputs: ["disabled", "required"] }, { kind: "component", type: i1.DaffFormFieldComponent, selector: "daff-form-field", inputs: ["appearance", "id"] }, { kind: "directive", type: i1.DaffFormFieldLabelDirective, selector: "daff-form-label" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
12
12
|
}
|
13
13
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: BasicTextareaComponent, decorators: [{
|
14
14
|
type: Component,
|
@@ -23,7 +23,7 @@ class TextareaDisabledComponent {
|
|
23
23
|
this.disabled = new UntypedFormControl({ value: '', disabled: true });
|
24
24
|
}
|
25
25
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TextareaDisabledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
26
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: TextareaDisabledComponent, isStandalone: true, selector: "textarea-disabled", ngImport: i0, template: "<daff-form-field>\n <daff-form-label>Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" name=\"comments\" [formControl]=\"disabled\"></textarea>\n</daff-form-field>", styles: ["daff-form-field{max-width:320px}\n"], dependencies: [{ kind: "component", type: i1.DaffFormFieldComponent, selector: "daff-form-field", inputs: ["appearance", "id"] }, { kind: "directive", type: i1.DaffFormFieldLabelDirective, selector: "daff-form-label" }, { kind: "component", type: DaffTextareaComponent, selector: "textarea[daff-textarea]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
26
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: TextareaDisabledComponent, isStandalone: true, selector: "textarea-disabled", ngImport: i0, template: "<daff-form-field>\n <daff-form-label>Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" name=\"comments\" [formControl]=\"disabled\"></textarea>\n</daff-form-field>", styles: ["daff-form-field{max-width:320px}\n"], dependencies: [{ kind: "component", type: i1.DaffFormFieldComponent, selector: "daff-form-field", inputs: ["appearance", "id"] }, { kind: "directive", type: i1.DaffFormFieldLabelDirective, selector: "daff-form-label" }, { kind: "component", type: DaffTextareaComponent, selector: "textarea[daff-textarea]", inputs: ["disabled", "required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
27
27
|
}
|
28
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TextareaDisabledComponent, decorators: [{
|
29
29
|
type: Component,
|
@@ -41,7 +41,7 @@ class TextareaErrorComponent {
|
|
41
41
|
]);
|
42
42
|
}
|
43
43
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TextareaErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
44
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: TextareaErrorComponent, isStandalone: true, selector: "textarea-error", ngImport: i0, template: "<daff-form-field>\n <daff-form-label for=\"error-textarea\">Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" placeholder=\"Comments\" name=\"comments\" [formControl]=\"control\"></textarea>\n @if (control.errors?.required) {\n <daff-error-message>Comments is a required field.</daff-error-message>\n }\n</daff-form-field>\n", styles: ["daff-form-field{max-width:320px}\n"], dependencies: [{ kind: "component", type: i1.DaffFormFieldComponent, selector: "daff-form-field", inputs: ["appearance", "id"] }, { kind: "component", type: i1.DaffErrorMessageComponent, selector: "daff-error-message" }, { kind: "directive", type: i1.DaffFormFieldLabelDirective, selector: "daff-form-label" }, { kind: "component", type: DaffTextareaComponent, selector: "textarea[daff-textarea]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
44
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: TextareaErrorComponent, isStandalone: true, selector: "textarea-error", ngImport: i0, template: "<daff-form-field>\n <daff-form-label for=\"error-textarea\">Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" placeholder=\"Comments\" name=\"comments\" [formControl]=\"control\"></textarea>\n @if (control.errors?.required) {\n <daff-error-message>Comments is a required field.</daff-error-message>\n }\n</daff-form-field>\n", styles: ["daff-form-field{max-width:320px}\n"], dependencies: [{ kind: "component", type: i1.DaffFormFieldComponent, selector: "daff-form-field", inputs: ["appearance", "id"] }, { kind: "component", type: i1.DaffErrorMessageComponent, selector: "daff-error-message" }, { kind: "directive", type: i1.DaffFormFieldLabelDirective, selector: "daff-form-label" }, { kind: "component", type: DaffTextareaComponent, selector: "textarea[daff-textarea]", inputs: ["disabled", "required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
45
45
|
}
|
46
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TextareaErrorComponent, decorators: [{
|
47
47
|
type: Component,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-design-textarea-examples.mjs","sources":["../../../libs/design/textarea/examples/src/basic-textarea/basic-textarea.component.ts","../../../libs/design/textarea/examples/src/basic-textarea/basic-textarea.component.html","../../../libs/design/textarea/examples/src/textarea-disabled/textarea-disabled.component.ts","../../../libs/design/textarea/examples/src/textarea-disabled/textarea-disabled.component.html","../../../libs/design/textarea/examples/src/textarea-error/textarea-error.component.ts","../../../libs/design/textarea/examples/src/textarea-error/textarea-error.component.html","../../../libs/design/textarea/examples/src/examples.ts","../../../libs/design/textarea/examples/src/daffodil-design-textarea-examples.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { DAFF_FORM_FIELD_COMPONENTS } from '@daffodil/design';\nimport { DaffTextareaComponent } from '@daffodil/design/textarea';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'basic-textarea',\n templateUrl: './basic-textarea.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DaffTextareaComponent,\n DAFF_FORM_FIELD_COMPONENTS,\n ],\n})\nexport class BasicTextareaComponent {\n\n}\n","<daff-form-field>\n\t<daff-form-label for=\"comments\">Comments</daff-form-label>\n\t<textarea daff-textarea type=\"text\" name=\"comments\"></textarea>\n</daff-form-field>","import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\nimport {\n ReactiveFormsModule,\n UntypedFormControl,\n} from '@angular/forms';\n\nimport { DAFF_FORM_FIELD_COMPONENTS } from '@daffodil/design';\nimport { DaffTextareaComponent } from '@daffodil/design/textarea';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'textarea-disabled',\n templateUrl: './textarea-disabled.component.html',\n styles: [`\n daff-form-field {\n max-width: 320px;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DAFF_FORM_FIELD_COMPONENTS,\n DaffTextareaComponent,\n ReactiveFormsModule,\n ],\n})\nexport class TextareaDisabledComponent {\n disabled = new UntypedFormControl({ value : '' , disabled: true });\n}\n","<daff-form-field>\n <daff-form-label>Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" name=\"comments\" [formControl]=\"disabled\"></textarea>\n</daff-form-field>","import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\nimport {\n UntypedFormControl,\n Validators,\n ReactiveFormsModule,\n} from '@angular/forms';\n\nimport { DAFF_FORM_FIELD_COMPONENTS } from '@daffodil/design';\nimport { DaffTextareaComponent } from '@daffodil/design/textarea';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'textarea-error',\n templateUrl: './textarea-error.component.html',\n styles: [`\n daff-form-field {\n max-width: 320px;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DAFF_FORM_FIELD_COMPONENTS,\n DaffTextareaComponent,\n ReactiveFormsModule,\n ],\n})\nexport class TextareaErrorComponent {\n control: UntypedFormControl = new UntypedFormControl('', [\n Validators.required,\n ]);\n}\n","<daff-form-field>\n <daff-form-label for=\"error-textarea\">Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" placeholder=\"Comments\" name=\"comments\" [formControl]=\"control\"></textarea>\n @if (control.errors?.required) {\n <daff-error-message>Comments is a required field.</daff-error-message>\n }\n</daff-form-field>\n","import { BasicTextareaComponent } from './basic-textarea/basic-textarea.component';\nimport { TextareaDisabledComponent } from './textarea-disabled/textarea-disabled.component';\nimport { TextareaErrorComponent } from './textarea-error/textarea-error.component';\n\nexport const TEXTAREA_EXAMPLES = [\n BasicTextareaComponent,\n TextareaErrorComponent,\n TextareaDisabledComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAkBa,sBAAsB,CAAA;kIAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;sHAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBnC,8KAGkB,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDWd,qBAAqB,EAAA,QAAA,EAAA,yBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,IAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,2BAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAIZ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AAEE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAET,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACtC,OAAA,EAAA;wBACP,qBAAqB;wBACrB,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,8KAAA,EAAA;;;MEYU,yBAAyB,CAAA;AAhBtC,IAAA,WAAA,GAAA;AAiBE,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,kBAAkB,CAAC,EAAE,KAAK,EAAG,EAAE,EAAG,QAAQ,EAAE,IAAI,EAAE,CAAC;AACnE;kIAFY,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,EC5BtC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,wLAGkB,EDqBd,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,IAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,2BAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,
|
1
|
+
{"version":3,"file":"daffodil-design-textarea-examples.mjs","sources":["../../../libs/design/textarea/examples/src/basic-textarea/basic-textarea.component.ts","../../../libs/design/textarea/examples/src/basic-textarea/basic-textarea.component.html","../../../libs/design/textarea/examples/src/textarea-disabled/textarea-disabled.component.ts","../../../libs/design/textarea/examples/src/textarea-disabled/textarea-disabled.component.html","../../../libs/design/textarea/examples/src/textarea-error/textarea-error.component.ts","../../../libs/design/textarea/examples/src/textarea-error/textarea-error.component.html","../../../libs/design/textarea/examples/src/examples.ts","../../../libs/design/textarea/examples/src/daffodil-design-textarea-examples.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { DAFF_FORM_FIELD_COMPONENTS } from '@daffodil/design';\nimport { DaffTextareaComponent } from '@daffodil/design/textarea';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'basic-textarea',\n templateUrl: './basic-textarea.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DaffTextareaComponent,\n DAFF_FORM_FIELD_COMPONENTS,\n ],\n})\nexport class BasicTextareaComponent {\n\n}\n","<daff-form-field>\n\t<daff-form-label for=\"comments\">Comments</daff-form-label>\n\t<textarea daff-textarea type=\"text\" name=\"comments\"></textarea>\n</daff-form-field>","import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\nimport {\n ReactiveFormsModule,\n UntypedFormControl,\n} from '@angular/forms';\n\nimport { DAFF_FORM_FIELD_COMPONENTS } from '@daffodil/design';\nimport { DaffTextareaComponent } from '@daffodil/design/textarea';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'textarea-disabled',\n templateUrl: './textarea-disabled.component.html',\n styles: [`\n daff-form-field {\n max-width: 320px;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DAFF_FORM_FIELD_COMPONENTS,\n DaffTextareaComponent,\n ReactiveFormsModule,\n ],\n})\nexport class TextareaDisabledComponent {\n disabled = new UntypedFormControl({ value : '' , disabled: true });\n}\n","<daff-form-field>\n <daff-form-label>Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" name=\"comments\" [formControl]=\"disabled\"></textarea>\n</daff-form-field>","import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\nimport {\n UntypedFormControl,\n Validators,\n ReactiveFormsModule,\n} from '@angular/forms';\n\nimport { DAFF_FORM_FIELD_COMPONENTS } from '@daffodil/design';\nimport { DaffTextareaComponent } from '@daffodil/design/textarea';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'textarea-error',\n templateUrl: './textarea-error.component.html',\n styles: [`\n daff-form-field {\n max-width: 320px;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DAFF_FORM_FIELD_COMPONENTS,\n DaffTextareaComponent,\n ReactiveFormsModule,\n ],\n})\nexport class TextareaErrorComponent {\n control: UntypedFormControl = new UntypedFormControl('', [\n Validators.required,\n ]);\n}\n","<daff-form-field>\n <daff-form-label for=\"error-textarea\">Comments</daff-form-label>\n <textarea daff-textarea type=\"text\" placeholder=\"Comments\" name=\"comments\" [formControl]=\"control\"></textarea>\n @if (control.errors?.required) {\n <daff-error-message>Comments is a required field.</daff-error-message>\n }\n</daff-form-field>\n","import { BasicTextareaComponent } from './basic-textarea/basic-textarea.component';\nimport { TextareaDisabledComponent } from './textarea-disabled/textarea-disabled.component';\nimport { TextareaErrorComponent } from './textarea-error/textarea-error.component';\n\nexport const TEXTAREA_EXAMPLES = [\n BasicTextareaComponent,\n TextareaErrorComponent,\n TextareaDisabledComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAkBa,sBAAsB,CAAA;kIAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;sHAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBnC,8KAGkB,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDWd,qBAAqB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,IAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,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gBAAgB,EAOT,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACtC,OAAA,EAAA;wBACP,0BAA0B;wBAC1B,qBAAqB;wBACrB,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EAAA,8VAAA,EAAA,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA;;;AEvBU,MAAA,iBAAiB,GAAG;IAC/B,sBAAsB;IACtB,sBAAsB;IACtB,yBAAyB;;;ACP3B;;AAEG;;;;"}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { booleanAttribute, Input, Optional, Self, ChangeDetectionStrategy, Component } from '@angular/core';
|
3
3
|
import * as i1 from '@angular/forms';
|
4
|
-
import {
|
4
|
+
import { Validators } from '@angular/forms';
|
5
|
+
import { merge, of, map, tap } from 'rxjs';
|
5
6
|
import * as i2 from '@daffodil/design';
|
6
7
|
import { DaffFormFieldControl } from '@daffodil/design';
|
7
8
|
|
@@ -19,6 +20,29 @@ class DaffTextareaComponent extends DaffFormFieldControl {
|
|
19
20
|
get internalId() {
|
20
21
|
return this._id;
|
21
22
|
}
|
23
|
+
/**
|
24
|
+
* @docs-private
|
25
|
+
*/
|
26
|
+
get disabledAttribute() {
|
27
|
+
return this.disabled || null;
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* @docs-private
|
31
|
+
*
|
32
|
+
* Implemented as part of DaffFormFieldControl.
|
33
|
+
*/
|
34
|
+
get required() {
|
35
|
+
return this.ngControl?.control?.hasValidator(Validators.required) ?? this._required;
|
36
|
+
}
|
37
|
+
set required(value) {
|
38
|
+
this._required = value;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* @docs-private
|
42
|
+
*/
|
43
|
+
get requiredAttribute() {
|
44
|
+
return this.required || null;
|
45
|
+
}
|
22
46
|
/**
|
23
47
|
* @docs-private
|
24
48
|
*/
|
@@ -31,7 +55,7 @@ class DaffTextareaComponent extends DaffFormFieldControl {
|
|
31
55
|
*/
|
32
56
|
blur() {
|
33
57
|
this.focused = false;
|
34
|
-
this.emitState();
|
58
|
+
this.emitState(true);
|
35
59
|
}
|
36
60
|
/**
|
37
61
|
* @docs-private
|
@@ -61,15 +85,18 @@ class DaffTextareaComponent extends DaffFormFieldControl {
|
|
61
85
|
/**
|
62
86
|
* @docs-private
|
63
87
|
*/
|
64
|
-
this.
|
88
|
+
this.focused = false;
|
65
89
|
/**
|
66
90
|
* @docs-private
|
91
|
+
*
|
92
|
+
* Implemented as part of DaffFormFieldControl.
|
67
93
|
*/
|
68
|
-
this.
|
94
|
+
this.disabled = false;
|
95
|
+
this._required = false;
|
69
96
|
}
|
70
97
|
/** @docs-private */
|
71
98
|
ngOnInit() {
|
72
|
-
this.stateChanges = merge(this._stateChanges.asObservable(), this.ngControl ? this.ngControl.statusChanges : of(undefined)).pipe(map(() => this.state));
|
99
|
+
this.stateChanges = merge(this._stateChanges.asObservable(), this.ngControl ? this.ngControl.statusChanges : of(undefined)).pipe(map(() => this.state), tap((state) => this.disabled = state.disabled));
|
73
100
|
}
|
74
101
|
/**
|
75
102
|
* @docs-private
|
@@ -84,36 +111,33 @@ class DaffTextareaComponent extends DaffFormFieldControl {
|
|
84
111
|
return this._elementRef.nativeElement.value;
|
85
112
|
}
|
86
113
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTextareaComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i2.DaffFormFieldComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
87
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
114
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.11", type: DaffTextareaComponent, isStandalone: true, selector: "textarea[daff-textarea]", inputs: { disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute] }, host: { listeners: { "focus": "focus()", "blur": "blur()" }, properties: { "attr.id": "internalId", "disabled": "disabledAttribute", "required": "requiredAttribute", "attr.aria-describedby": "ariaDescribedBy" }, classAttribute: "daff-textarea" }, providers: [
|
89
115
|
{ provide: DaffFormFieldControl, useExisting: DaffTextareaComponent },
|
90
116
|
], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{background:none;border:none;box-shadow:none;margin:0;padding:0;resize:vertical;min-height:3.5rem;width:100%;box-sizing:border-box}:host:focus{border:none;box-shadow:none;outline:none}:host:disabled{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
91
117
|
}
|
92
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTextareaComponent, decorators: [{
|
93
119
|
type: Component,
|
94
120
|
args: [{ selector: 'textarea[daff-textarea]', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
96
121
|
{ provide: DaffFormFieldControl, useExisting: DaffTextareaComponent },
|
97
|
-
],
|
122
|
+
], host: {
|
123
|
+
class: 'daff-textarea',
|
124
|
+
'[attr.id]': 'internalId',
|
125
|
+
'[disabled]': 'disabledAttribute',
|
126
|
+
'[required]': 'requiredAttribute',
|
127
|
+
'(focus)': 'focus()',
|
128
|
+
'(blur)': 'blur()',
|
129
|
+
'[attr.aria-describedby]': 'ariaDescribedBy',
|
130
|
+
}, styles: [":host{background:none;border:none;box-shadow:none;margin:0;padding:0;resize:vertical;min-height:3.5rem;width:100%;box-sizing:border-box}:host:focus{border:none;box-shadow:none;outline:none}:host:disabled{cursor:not-allowed}\n"] }]
|
98
131
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
99
132
|
type: Optional
|
100
133
|
}, {
|
101
134
|
type: Self
|
102
|
-
}] }, { type: i0.ElementRef }, { type: i2.DaffFormFieldComponent }], propDecorators: {
|
103
|
-
type:
|
104
|
-
args: [
|
105
|
-
}],
|
106
|
-
type:
|
107
|
-
args: [
|
108
|
-
}], focus: [{
|
109
|
-
type: HostListener,
|
110
|
-
args: ['focus']
|
111
|
-
}], blur: [{
|
112
|
-
type: HostListener,
|
113
|
-
args: ['blur']
|
114
|
-
}], ariaDescribedBy: [{
|
115
|
-
type: HostBinding,
|
116
|
-
args: ['attr.aria-describedby']
|
135
|
+
}] }, { type: i0.ElementRef }, { type: i2.DaffFormFieldComponent }], propDecorators: { disabled: [{
|
136
|
+
type: Input,
|
137
|
+
args: [{ transform: booleanAttribute }]
|
138
|
+
}], required: [{
|
139
|
+
type: Input,
|
140
|
+
args: [{ transform: booleanAttribute }]
|
117
141
|
}] } });
|
118
142
|
|
119
143
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-design-textarea.mjs","sources":["../../../libs/design/textarea/src/textarea.component.ts","../../../libs/design/textarea/src/daffodil-design-textarea.ts"],"sourcesContent":["import {\n Component,\n Optional,\n Self,\n ElementRef,\n
|
1
|
+
{"version":3,"file":"daffodil-design-textarea.mjs","sources":["../../../libs/design/textarea/src/textarea.component.ts","../../../libs/design/textarea/src/daffodil-design-textarea.ts"],"sourcesContent":["import {\n Component,\n Optional,\n Self,\n ElementRef,\n ChangeDetectionStrategy,\n OnInit,\n Input,\n booleanAttribute,\n} from '@angular/core';\nimport {\n NgControl,\n Validators,\n} from '@angular/forms';\nimport {\n map,\n merge,\n of,\n tap,\n} from 'rxjs';\n\nimport {\n DaffFormFieldComponent,\n DaffFormFieldControl,\n} from '@daffodil/design';\n\n/**\n * DaffTextareaComponent provides the same functionality as a native `<textarea>` and contains custom styling and functionality.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'textarea[daff-textarea]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./textarea.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n\n { provide: DaffFormFieldControl, useExisting: DaffTextareaComponent },\n ],\n host: {\n class: 'daff-textarea',\n '[attr.id]': 'internalId',\n '[disabled]': 'disabledAttribute',\n '[required]': 'requiredAttribute',\n '(focus)': 'focus()',\n '(blur)': 'blur()',\n '[attr.aria-describedby]': 'ariaDescribedBy',\n },\n})\nexport class DaffTextareaComponent extends DaffFormFieldControl<string> implements DaffFormFieldControl<string>, OnInit {\n /** @docs-private */\n controlType = 'native-textarea';\n\n /**\n * @docs-private\n */\n focused = false;\n\n private get _id() {\n return this.formField?.id;\n };\n\n /**\n * @docs-private\n */\n get internalId() {\n return this._id;\n }\n\n /**\n * @docs-private\n */\n get disabledAttribute() {\n return this.disabled || null;\n }\n\n /**\n * @docs-private\n *\n * Implemented as part of DaffFormFieldControl.\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n private _required = false;\n\n /**\n * @docs-private\n *\n * Implemented as part of DaffFormFieldControl.\n */\n @Input({ transform: booleanAttribute })\n get required(): boolean {\n return this.ngControl?.control?.hasValidator(Validators.required) ?? this._required;\n }\n set required(value: boolean) {\n this._required = value;\n }\n\n /**\n * @docs-private\n */\n get requiredAttribute() {\n return this.required || null;\n }\n\n /**\n * @docs-private\n */\n focus() {\n this.focused = true;\n this.emitState();\n }\n\n /**\n * @docs-private\n */\n blur() {\n this.focused = false;\n this.emitState(true);\n }\n\n /**\n * @docs-private\n */\n get ariaDescribedBy() {\n if(this.formField.hasErrorMessage()) {\n return this.formField.errorMessageId;\n } else if(this.formField.hasHint()) {\n return this.formField.hintId;\n } else {\n return null;\n }\n }\n\n constructor(\n /**\n * @docs-private\n */\n @Optional() @Self() public ngControl: NgControl,\n private _elementRef: ElementRef<HTMLInputElement>,\n private formField: DaffFormFieldComponent,\n ) {\n super(ngControl);\n }\n\n /** @docs-private */\n ngOnInit() {\n this.stateChanges = merge(\n this._stateChanges.asObservable(),\n this.ngControl ? this.ngControl.statusChanges : of(undefined),\n ).pipe(\n map(() => this.state),\n tap((state) => this.disabled = state.disabled),\n );\n }\n\n /**\n * @docs-private\n */\n onFocus() {\n this._elementRef.nativeElement.focus();\n }\n\n /**\n * @docs-private\n */\n get value() {\n return this._elementRef.nativeElement.value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA0BA;;AAEG;AAqBG,MAAO,qBAAsB,SAAQ,oBAA4B,CAAA;AASrE,IAAA,IAAY,GAAG,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,EAAE;;;AAG3B;;AAEG;AACH,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,GAAG;;AAGjB;;AAEG;AACH,IAAA,IAAI,iBAAiB,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI;;AAY9B;;;;AAIG;AACH,IAAA,IACI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,SAAS;;IAErF,IAAI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;;AAGxB;;AAEG;AACH,IAAA,IAAI,iBAAiB,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI;;AAG9B;;AAEG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;QACnB,IAAI,CAAC,SAAS,EAAE;;AAGlB;;AAEG;IACH,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACpB,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;;AAGtB;;AAEG;AACH,IAAA,IAAI,eAAe,GAAA;AACjB,QAAA,IAAG,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,EAAE;AACnC,YAAA,OAAO,I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pB,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AAET,wBAAA,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,uBAAuB,EAAE;qBACtE,EACK,IAAA,EAAA;AACJ,wBAAA,KAAK,EAAE,eAAe;AACtB,wBAAA,WAAW,EAAE,YAAY;AACzB,wBAAA,YAAY,EAAE,mBAAmB;AACjC,wBAAA,YAAY,EAAE,mBAAmB;AACjC,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,QAAQ,EAAE,QAAQ;AAClB,wBAAA,yBAAyB,EAAE,iBAAiB;AAC7C,qBAAA,EAAA,MAAA,EAAA,CAAA,mOAAA,CAAA,EAAA;;0BA2FE;;0BAAY;uGAzDyB,QAAQ,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBAUlC,QAAQ,EAAA,CAAA;sBADX,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;;AC1FxC;;AAEG;;;;"}
|
@@ -3,14 +3,13 @@ import * as i1$2 from '@angular/cdk/overlay';
|
|
3
3
|
import { GlobalPositionStrategy } from '@angular/cdk/overlay';
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
5
5
|
import * as i0 from '@angular/core';
|
6
|
-
import { Inject, Injectable,
|
6
|
+
import { Inject, Injectable, Directive, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, EventEmitter, Output, Optional, SkipSelf } from '@angular/core';
|
7
7
|
import { merge, of, EMPTY } from 'rxjs';
|
8
8
|
import { filter, map, tap, delay, take } from 'rxjs/operators';
|
9
9
|
import * as i2 from '@daffodil/design';
|
10
10
|
import { DaffBreakpoints, DaffPrefixDirective, DaffArticleEncapsulatedDirective, DaffStatusableDirective } from '@daffodil/design';
|
11
11
|
import { createConfigInjectionToken } from '@daffodil/core';
|
12
|
-
import {
|
13
|
-
import { NgIf, NgFor, SlicePipe, NgTemplateOutlet } from '@angular/common';
|
12
|
+
import { NgFor, SlicePipe, NgTemplateOutlet } from '@angular/common';
|
14
13
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
15
14
|
import { faTimes } from '@fortawesome/free-solid-svg-icons';
|
16
15
|
import * as i2$1 from '@daffodil/design/button';
|
@@ -59,13 +58,6 @@ const daffToastDefaultOptions = {
|
|
59
58
|
const result = createConfigInjectionToken(daffToastDefaultOptions, 'DAFF_TOAST_OPTIONS');
|
60
59
|
const provideDaffToastOptions = result.provider;
|
61
60
|
const DAFF_TOAST_OPTIONS = result.token;
|
62
|
-
// export const {
|
63
|
-
// token: DAFF_TOAST_OPTIONS,
|
64
|
-
// /**
|
65
|
-
// * Provider function for {@link DAFF_TOAST_OPTIONS}.
|
66
|
-
// */
|
67
|
-
// provider: provideDaffToastOptions,
|
68
|
-
// } = createConfigInjectionToken<DaffToastOptions>(daffToastDefaultOptions, 'DAFF_TOAST_OPTIONS');
|
69
61
|
|
70
62
|
class DaffToastPositionService {
|
71
63
|
constructor(options, mediaQuery) {
|
@@ -104,26 +96,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
104
96
|
|
105
97
|
const daffDefaultToastConfiguration = {};
|
106
98
|
|
99
|
+
/* eslint-disable quote-props */
|
107
100
|
class DaffToastActionsDirective {
|
108
|
-
constructor() {
|
109
|
-
/**
|
110
|
-
* @docs-private
|
111
|
-
*/
|
112
|
-
this.class = true;
|
113
|
-
}
|
114
101
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
115
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffToastActionsDirective, isStandalone: true, selector: "[daffToastActions]", host: {
|
102
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffToastActionsDirective, isStandalone: true, selector: "[daffToastActions]", host: { classAttribute: "daff-toast__actions" }, ngImport: i0 }); }
|
116
103
|
}
|
117
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastActionsDirective, decorators: [{
|
118
105
|
type: Directive,
|
119
106
|
args: [{
|
120
107
|
selector: '[daffToastActions]',
|
108
|
+
host: {
|
109
|
+
'class': 'daff-toast__actions',
|
110
|
+
},
|
121
111
|
}]
|
122
|
-
}]
|
123
|
-
type: HostBinding,
|
124
|
-
args: ['class.daff-toast__actions']
|
125
|
-
}] } });
|
112
|
+
}] });
|
126
113
|
|
114
|
+
/* eslint-disable quote-props */
|
127
115
|
/**
|
128
116
|
* @docs-private
|
129
117
|
*
|
@@ -141,8 +129,6 @@ class DaffToastComponent {
|
|
141
129
|
this._elementRef = _elementRef;
|
142
130
|
this._focusTrapFactory = _focusTrapFactory;
|
143
131
|
this._focusStack = _focusStack;
|
144
|
-
/** @docs-private */
|
145
|
-
this.class = true;
|
146
132
|
}
|
147
133
|
/**
|
148
134
|
* @docs-private
|
@@ -170,7 +156,7 @@ class DaffToastComponent {
|
|
170
156
|
}
|
171
157
|
}
|
172
158
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ConfigurableFocusTrapFactory }, { token: i2.DaffFocusStackService }], target: i0.ɵɵFactoryTarget.Component }); }
|
173
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffToastComponent, isStandalone: true, selector: "daff-toast", inputs: { toast: "toast" }, host: { listeners: { "keydown.escape": "onEscape()" },
|
159
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffToastComponent, isStandalone: true, selector: "daff-toast", inputs: { toast: "toast" }, host: { listeners: { "keydown.escape": "onEscape()" }, classAttribute: "daff-toast" }, queries: [{ propertyName: "_actions", first: true, predicate: DaffToastActionsDirective, descendants: true }, { propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }], ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-toast__details\">\n <div class=\"daff-toast__content\">\n <ng-content select=\"[daffToastTitle]\"></ng-content>\n <ng-content select=\"[daffToastMessage]\"></ng-content>\n </div>\n <ng-content select=\"[daffToastActions]\"></ng-content>\n</div>\n<ng-content></ng-content>\n", styles: [".daff-toast{display:flex;border-radius:.25rem;font-size:1rem;line-height:1.5rem;position:relative;min-width:15rem;max-width:90vw}@media (min-width: 480px){.daff-toast{max-width:22rem}}.daff-toast+div+.daff-toast{margin-top:.75rem}.daff-toast+div+div+.daff-toast{margin-top:.75rem}.daff-toast+.daff-toast{margin-top:.75rem}.daff-toast:before{content:\"\";border-radius:.25rem 0 0 .25rem;position:absolute;height:100%;left:0;top:0;width:.25rem}.daff-toast .daff-prefix{padding:1rem 0 1rem 1rem}.daff-toast__close-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-toast__details{display:block;font-size:1rem;line-height:1.5rem;width:100%}.daff-toast__content{display:flex;flex-direction:column;gap:.25rem;padding:1rem}.daff-toast__title{font-weight:600}.daff-toast__message{font-weight:400;line-height:1.25rem}.daff-toast__actions{display:flex;align-items:center;gap:.5rem;min-height:3rem;padding:0 1rem 1rem}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideInTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}.daff-toast.slide-in-left{animation:slideInLeft .3s ease-out}.daff-toast.slide-in-right{animation:slideInRight .3s ease-out}.daff-toast.slide-in-top{animation:slideInTop .3s ease-out}.daff-toast.slide-in-bottom{animation:slideInBottom .3s ease-out}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
174
160
|
}
|
175
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastComponent, decorators: [{
|
176
162
|
type: Component,
|
@@ -180,13 +166,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
180
166
|
directive: DaffStatusableDirective,
|
181
167
|
inputs: ['status'],
|
182
168
|
},
|
183
|
-
],
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
args: ['class.daff-toast']
|
189
|
-
}], _actions: [{
|
169
|
+
], host: {
|
170
|
+
'class': 'daff-toast',
|
171
|
+
'(keydown.escape)': 'onEscape()',
|
172
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-toast__details\">\n <div class=\"daff-toast__content\">\n <ng-content select=\"[daffToastTitle]\"></ng-content>\n <ng-content select=\"[daffToastMessage]\"></ng-content>\n </div>\n <ng-content select=\"[daffToastActions]\"></ng-content>\n</div>\n<ng-content></ng-content>\n", styles: [".daff-toast{display:flex;border-radius:.25rem;font-size:1rem;line-height:1.5rem;position:relative;min-width:15rem;max-width:90vw}@media (min-width: 480px){.daff-toast{max-width:22rem}}.daff-toast+div+.daff-toast{margin-top:.75rem}.daff-toast+div+div+.daff-toast{margin-top:.75rem}.daff-toast+.daff-toast{margin-top:.75rem}.daff-toast:before{content:\"\";border-radius:.25rem 0 0 .25rem;position:absolute;height:100%;left:0;top:0;width:.25rem}.daff-toast .daff-prefix{padding:1rem 0 1rem 1rem}.daff-toast__close-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-toast__details{display:block;font-size:1rem;line-height:1.5rem;width:100%}.daff-toast__content{display:flex;flex-direction:column;gap:.25rem;padding:1rem}.daff-toast__title{font-weight:600}.daff-toast__message{font-weight:400;line-height:1.25rem}.daff-toast__actions{display:flex;align-items:center;gap:.5rem;min-height:3rem;padding:0 1rem 1rem}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideInTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}.daff-toast.slide-in-left{animation:slideInLeft .3s ease-out}.daff-toast.slide-in-right{animation:slideInRight .3s ease-out}.daff-toast.slide-in-top{animation:slideInTop .3s ease-out}.daff-toast.slide-in-bottom{animation:slideInBottom .3s ease-out}\n"] }]
|
173
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }, { type: i2.DaffFocusStackService }], propDecorators: { _actions: [{
|
190
174
|
type: ContentChild,
|
191
175
|
args: [DaffToastActionsDirective]
|
192
176
|
}], _prefix: [{
|
@@ -194,50 +178,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
194
178
|
args: [DaffPrefixDirective]
|
195
179
|
}], toast: [{
|
196
180
|
type: Input
|
197
|
-
}], onEscape: [{
|
198
|
-
type: HostListener,
|
199
|
-
args: ['keydown.escape']
|
200
181
|
}] } });
|
201
182
|
|
183
|
+
/* eslint-disable quote-props */
|
202
184
|
class DaffToastMessageDirective {
|
203
|
-
constructor() {
|
204
|
-
/**
|
205
|
-
* @docs-private
|
206
|
-
*/
|
207
|
-
this.class = true;
|
208
|
-
}
|
209
185
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastMessageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
210
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffToastMessageDirective, isStandalone: true, selector: "[daffToastMessage]", host: {
|
186
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffToastMessageDirective, isStandalone: true, selector: "[daffToastMessage]", host: { classAttribute: "daff-toast__message" }, ngImport: i0 }); }
|
211
187
|
}
|
212
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastMessageDirective, decorators: [{
|
213
189
|
type: Directive,
|
214
190
|
args: [{
|
215
191
|
selector: '[daffToastMessage]',
|
192
|
+
host: {
|
193
|
+
'class': 'daff-toast__message',
|
194
|
+
},
|
216
195
|
}]
|
217
|
-
}]
|
218
|
-
type: HostBinding,
|
219
|
-
args: ['class.daff-toast__message']
|
220
|
-
}] } });
|
196
|
+
}] });
|
221
197
|
|
198
|
+
/* eslint-disable quote-props */
|
222
199
|
class DaffToastTitleDirective {
|
223
|
-
constructor() {
|
224
|
-
/**
|
225
|
-
* @docs-private
|
226
|
-
*/
|
227
|
-
this.class = true;
|
228
|
-
}
|
229
200
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
230
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffToastTitleDirective, isStandalone: true, selector: "[daffToastTitle]", host: {
|
201
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffToastTitleDirective, isStandalone: true, selector: "[daffToastTitle]", host: { classAttribute: "daff-toast__title" }, ngImport: i0 }); }
|
231
202
|
}
|
232
203
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastTitleDirective, decorators: [{
|
233
204
|
type: Directive,
|
234
205
|
args: [{
|
235
206
|
selector: '[daffToastTitle]',
|
207
|
+
host: {
|
208
|
+
'class': 'daff-toast__title',
|
209
|
+
},
|
236
210
|
}]
|
237
|
-
}]
|
238
|
-
type: HostBinding,
|
239
|
-
args: ['class.daff-toast__title']
|
240
|
-
}] } });
|
211
|
+
}] });
|
241
212
|
|
242
213
|
class DaffToastTemplateComponent {
|
243
214
|
constructor(cd, options, toastPosition) {
|
@@ -251,50 +222,21 @@ class DaffToastTemplateComponent {
|
|
251
222
|
onCloseToast(event) {
|
252
223
|
this.closeToast.emit();
|
253
224
|
}
|
254
|
-
|
255
|
-
|
225
|
+
getAnimationDirection() {
|
226
|
+
const position = this.toastPosition.config.horizontal + '-' + this.toastPosition.config.vertical;
|
227
|
+
switch (position) {
|
256
228
|
case 'left-top':
|
257
229
|
case 'left-bottom':
|
258
|
-
return
|
259
|
-
value: 0,
|
260
|
-
params: {
|
261
|
-
startX: '-100%',
|
262
|
-
endX: '0',
|
263
|
-
startY: '0',
|
264
|
-
endY: '0',
|
265
|
-
},
|
266
|
-
};
|
230
|
+
return 'left';
|
267
231
|
case 'right-top':
|
268
232
|
case 'right-bottom':
|
269
|
-
return
|
270
|
-
value: 0,
|
271
|
-
params: {
|
272
|
-
startX: '100%',
|
273
|
-
endX: '0',
|
274
|
-
startY: '0',
|
275
|
-
endY: '0',
|
276
|
-
},
|
277
|
-
};
|
233
|
+
return 'right';
|
278
234
|
case 'center-top':
|
279
|
-
return
|
280
|
-
value: 0,
|
281
|
-
params: {
|
282
|
-
startX: '0',
|
283
|
-
endX: '0',
|
284
|
-
startY: '-100%',
|
285
|
-
endY: '0',
|
286
|
-
},
|
287
|
-
};
|
235
|
+
return 'top';
|
288
236
|
case 'center-bottom':
|
289
|
-
return
|
290
|
-
|
291
|
-
|
292
|
-
startX: '0',
|
293
|
-
endX: '0',
|
294
|
-
startY: '100%',
|
295
|
-
endY: '0',
|
296
|
-
},
|
297
|
-
};
|
237
|
+
return 'bottom';
|
238
|
+
default:
|
239
|
+
return 'left';
|
298
240
|
}
|
299
241
|
}
|
300
242
|
get items() {
|
@@ -311,7 +253,7 @@ class DaffToastTemplateComponent {
|
|
311
253
|
[toast]="item"
|
312
254
|
[status]="item.status ?? null"
|
313
255
|
(closeToast)="item.dismiss()"
|
314
|
-
[
|
256
|
+
[class]="'slide-in-' + getAnimationDirection()"
|
315
257
|
[attr.role]="item.actions ? 'alertdialog' : 'status'"
|
316
258
|
[attr.aria-labelledby]="item.actions ? item.title : undefined"
|
317
259
|
[attr.aria-describedby]="item.actions ? item.message : undefined">
|
@@ -378,19 +320,7 @@ class DaffToastTemplateComponent {
|
|
378
320
|
}
|
379
321
|
}
|
380
322
|
</ng-template>
|
381
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i2$1.DaffButtonComponent, selector: "button[daff-button],a[daff-button]", inputs: ["elevated"] }, { kind: "component", type: i2$1.DaffFlatButtonComponent, selector: "button[daff-flat-button],a[daff-flat-button]" }, { kind: "component", type: i2$1.DaffIconButtonComponent, selector: "button[daff-icon-button],a[daff-icon-button]" }, { kind: "component", type: i2$1.DaffStrokedButtonComponent, selector: "button[daff-stroked-button],a[daff-stroked-button]", inputs: ["elevated"] }, { kind: "component", type: i2$1.DaffUnderlineButtonComponent, selector: "button[daff-underline-button],a[daff-underline-button]" }, { kind: "component", type: DaffToastComponent, selector: "daff-toast", inputs: ["toast"] }, { kind: "directive", type: DaffToastActionsDirective, selector: "[daffToastActions]" }, { kind: "directive", type: DaffToastTitleDirective, selector: "[daffToastTitle]" }, { kind: "directive", type: DaffToastMessageDirective, selector: "[daffToastMessage]" }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }],
|
382
|
-
trigger('slideIn', [
|
383
|
-
transition(':enter', [
|
384
|
-
style({ opacity: '0', transform: 'translate({{startX}}, {{startY}})' }),
|
385
|
-
animate('300ms ease-out', style({ opacity: '1', transform: 'translate({{endX}}, {{endY}})' })),
|
386
|
-
], { params: {
|
387
|
-
startX: '0',
|
388
|
-
startY: '0',
|
389
|
-
endX: '0',
|
390
|
-
endY: '0',
|
391
|
-
} }),
|
392
|
-
]),
|
393
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
323
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i2$1.DaffButtonComponent, selector: "button[daff-button],a[daff-button]", inputs: ["elevated"] }, { kind: "component", type: i2$1.DaffFlatButtonComponent, selector: "button[daff-flat-button],a[daff-flat-button]" }, { kind: "component", type: i2$1.DaffIconButtonComponent, selector: "button[daff-icon-button],a[daff-icon-button]" }, { kind: "component", type: i2$1.DaffStrokedButtonComponent, selector: "button[daff-stroked-button],a[daff-stroked-button]", inputs: ["elevated"] }, { kind: "component", type: i2$1.DaffUnderlineButtonComponent, selector: "button[daff-underline-button],a[daff-underline-button]" }, { kind: "component", type: DaffToastComponent, selector: "daff-toast", inputs: ["toast"] }, { kind: "directive", type: DaffToastActionsDirective, selector: "[daffToastActions]" }, { kind: "directive", type: DaffToastTitleDirective, selector: "[daffToastTitle]" }, { kind: "directive", type: DaffToastMessageDirective, selector: "[daffToastMessage]" }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
394
324
|
}
|
395
325
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffToastTemplateComponent, decorators: [{
|
396
326
|
type: Component,
|
@@ -402,7 +332,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
402
332
|
[toast]="item"
|
403
333
|
[status]="item.status ?? null"
|
404
334
|
(closeToast)="item.dismiss()"
|
405
|
-
[
|
335
|
+
[class]="'slide-in-' + getAnimationDirection()"
|
406
336
|
[attr.role]="item.actions ? 'alertdialog' : 'status'"
|
407
337
|
[attr.aria-labelledby]="item.actions ? item.title : undefined"
|
408
338
|
[attr.aria-describedby]="item.actions ? item.message : undefined">
|
@@ -470,19 +400,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
470
400
|
}
|
471
401
|
</ng-template>
|
472
402
|
`,
|
473
|
-
animations: [
|
474
|
-
trigger('slideIn', [
|
475
|
-
transition(':enter', [
|
476
|
-
style({ opacity: '0', transform: 'translate({{startX}}, {{startY}})' }),
|
477
|
-
animate('300ms ease-out', style({ opacity: '1', transform: 'translate({{endX}}, {{endY}})' })),
|
478
|
-
], { params: {
|
479
|
-
startX: '0',
|
480
|
-
startY: '0',
|
481
|
-
endX: '0',
|
482
|
-
endY: '0',
|
483
|
-
} }),
|
484
|
-
]),
|
485
|
-
],
|
486
403
|
imports: [
|
487
404
|
DAFF_BUTTON_COMPONENTS,
|
488
405
|
DaffToastComponent,
|
@@ -583,10 +500,10 @@ class DaffToastService {
|
|
583
500
|
});
|
584
501
|
}
|
585
502
|
/**
|
586
|
-
* Opens
|
503
|
+
* Opens a toast.
|
587
504
|
*
|
588
505
|
* @param toast Data that can be shown on a toast.
|
589
|
-
* @param configuration Additional configuration options such as duration. The default duration is set to 5000ms
|
506
|
+
* @param configuration Additional configuration options such as duration. The default duration is set to `5000ms`.
|
590
507
|
*/
|
591
508
|
open(toast, configuration) {
|
592
509
|
if (this._parentToast && this.options.useParent) {
|
@@ -622,7 +539,7 @@ class DaffToastService {
|
|
622
539
|
return _toastPlus;
|
623
540
|
}
|
624
541
|
/**
|
625
|
-
* Closes
|
542
|
+
* Closes a toast.
|
626
543
|
*
|
627
544
|
* @param toast The instance of toast that you wish to close.
|
628
545
|
*/
|
@@ -640,9 +557,6 @@ class DaffToastService {
|
|
640
557
|
}
|
641
558
|
this._toasts = this._toasts.filter(m => m !== toast);
|
642
559
|
this._template.instance.items = [...this._toasts];
|
643
|
-
// This currently overrides the ":leave" animation as we currently
|
644
|
-
// remove the animating element immediately after there are no more toasts,
|
645
|
-
// without waiting for the animation to complete.
|
646
560
|
if (this._toasts.length === 0) {
|
647
561
|
this._overlayRef.dispose();
|
648
562
|
this._template.destroy();
|