@daffodil/design 0.87.2 → 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
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { HostBinding, Directive, Input, ChangeDetectionStrategy, Component, isDevMode, ContentChild, ViewEncapsulation, NgModule, HostListener, Optional, Self, EventEmitter, ElementRef, Output, ViewChild, ContentChildren, Injectable, InjectionToken, inject, PLATFORM_ID, Inject, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
2
|
+
import { HostBinding, Directive, Input, ChangeDetectionStrategy, Component, isDevMode, ContentChild, ViewEncapsulation, NgModule, HostListener, Optional, Self, EventEmitter, ElementRef, Output, ViewChild, ContentChildren, Injectable, InjectionToken, inject, PLATFORM_ID, Inject, makeEnvironmentProviders, provideAppInitializer, afterNextRender, AfterRenderPhase } from '@angular/core';
|
3
3
|
import { NgTemplateOutlet, CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
|
4
4
|
import { BehaviorSubject, of, fromEventPattern, Subject, merge, fromEvent, EMPTY, combineLatest } from 'rxjs';
|
5
5
|
import * as i1 from '@angular/forms';
|
@@ -255,12 +255,18 @@ class DaffFormFieldControl {
|
|
255
255
|
return {
|
256
256
|
focused: this.focused,
|
257
257
|
filled: !!this.value,
|
258
|
-
disabled: this.ngControl?.disabled,
|
258
|
+
disabled: this.ngControl?.disabled ?? this.disabled,
|
259
259
|
error: this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),
|
260
260
|
valid: !this.ngControl?.errors && (this.ngControl?.dirty || this.ngControl?.touched),
|
261
261
|
};
|
262
262
|
}
|
263
|
-
emitState() {
|
263
|
+
emitState(deferred = false) {
|
264
|
+
if (deferred) {
|
265
|
+
Promise.resolve().then(() => {
|
266
|
+
this._stateChanges.next(this.state);
|
267
|
+
});
|
268
|
+
return;
|
269
|
+
}
|
264
270
|
this._stateChanges.next(this.state);
|
265
271
|
}
|
266
272
|
}
|
@@ -291,8 +297,9 @@ class DaffFormFieldComponent {
|
|
291
297
|
get isSelectField() {
|
292
298
|
return this._control.controlType === 'native-select';
|
293
299
|
}
|
294
|
-
constructor(cd) {
|
300
|
+
constructor(cd, elementRef) {
|
295
301
|
this.cd = cd;
|
302
|
+
this.elementRef = elementRef;
|
296
303
|
/** @docs-private */
|
297
304
|
this.class = true;
|
298
305
|
/**
|
@@ -501,8 +508,8 @@ class DaffFormFieldComponent {
|
|
501
508
|
ngAfterContentChecked() {
|
502
509
|
this._validateFormControl();
|
503
510
|
}
|
504
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
505
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", inputs: { appearance: "appearance", id: "id" }, host: { properties: { "class.daff-form-field": "this.class", "class.has-prefix": "this.hasPrefixClass", "class.has-suffix": "this.hasSuffixClass", "class.daff-error": "this.errorClass", "class.daff-disabled": "this.disabledClass", "class.daff-valid": "this.validClass", "class.daff-focused": "this.focusedClass", "class.daff-raised": "this.raisedClass", "class.fluid": "this.fluidClass", "class.fixed": "this.fixedClass" } }, 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: 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 (isSelectField) {\n\t\t\t<div class=\"daff-form-field__icon\"></div>\n\t\t}\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 </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.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;overflow:hidden;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 .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{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__icon{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-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 }); }
|
511
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
512
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffFormFieldComponent, isStandalone: true, selector: "daff-form-field", inputs: { appearance: "appearance", id: "id" }, host: { properties: { "class.daff-form-field": "this.class", "class.has-prefix": "this.hasPrefixClass", "class.has-suffix": "this.hasSuffixClass", "class.daff-error": "this.errorClass", "class.daff-disabled": "this.disabledClass", "class.daff-valid": "this.validClass", "class.daff-focused": "this.focusedClass", "class.daff-raised": "this.raisedClass", "class.fluid": "this.fluidClass", "class.fixed": "this.fixedClass" } }, 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: 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 (isSelectField) {\n\t\t\t<div class=\"daff-form-field__icon\"></div>\n\t\t}\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.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;overflow:hidden;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 .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{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__icon{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-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 }); }
|
506
513
|
}
|
507
514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffFormFieldComponent, decorators: [{
|
508
515
|
type: Component,
|
@@ -513,8 +520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
513
520
|
directive: DaffSkeletonableDirective,
|
514
521
|
inputs: ['skeleton'],
|
515
522
|
},
|
516
|
-
], 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 (isSelectField) {\n\t\t\t<div class=\"daff-form-field__icon\"></div>\n\t\t}\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 </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.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;overflow:hidden;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 .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{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__icon{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-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"] }]
|
517
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { class: [{
|
523
|
+
], 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 (isSelectField) {\n\t\t\t<div class=\"daff-form-field__icon\"></div>\n\t\t}\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.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;overflow:hidden;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 .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{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__icon{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-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"] }]
|
524
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { class: [{
|
518
525
|
type: HostBinding,
|
519
526
|
args: ['class.daff-form-field']
|
520
527
|
}], _prefix: [{
|
@@ -690,6 +697,17 @@ class DaffNativeSelectComponent extends DaffFormFieldControl {
|
|
690
697
|
*/
|
691
698
|
this.class = true;
|
692
699
|
this.focused = false;
|
700
|
+
/**
|
701
|
+
* @docs-private
|
702
|
+
*
|
703
|
+
* TODO: Update functionality to match other control during refactor.
|
704
|
+
*/
|
705
|
+
this.disabled = false;
|
706
|
+
/**
|
707
|
+
* @docs-private
|
708
|
+
* TODO: Update functionality to match other control during refactor.
|
709
|
+
*/
|
710
|
+
this.required = false;
|
693
711
|
}
|
694
712
|
onFocus() {
|
695
713
|
this._elementRef.nativeElement.focus();
|
@@ -699,14 +717,12 @@ class DaffNativeSelectComponent extends DaffFormFieldControl {
|
|
699
717
|
}
|
700
718
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
701
719
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffNativeSelectComponent, isStandalone: false, selector: "select[daff-native-select]", inputs: { formSubmitted: "formSubmitted" }, host: { listeners: { "focus": "focus()", "blur": "blur()" }, properties: { "class.daff-native-select": "this.class" } }, providers: [
|
702
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
703
720
|
{ provide: DaffFormFieldControl, useExisting: DaffNativeSelectComponent },
|
704
721
|
], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-native-select{appearance:none;background:transparent;background-clip:padding-box;border:0;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;min-width:45px;width:100%}.daff-native-select:focus{border:0;box-shadow:none;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
705
722
|
}
|
706
723
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNativeSelectComponent, decorators: [{
|
707
724
|
type: Component,
|
708
725
|
args: [{ selector: 'select[daff-native-select]', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
709
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
710
726
|
{ provide: DaffFormFieldControl, useExisting: DaffNativeSelectComponent },
|
711
727
|
], standalone: false, styles: [".daff-native-select{appearance:none;background:transparent;background-clip:padding-box;border:0;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;min-width:45px;width:100%}.daff-native-select:focus{border:0;box-shadow:none;outline:none}\n"] }]
|
712
728
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
@@ -1213,7 +1229,7 @@ class DaffRadioRegistry {
|
|
1213
1229
|
*/
|
1214
1230
|
remove(accessor) {
|
1215
1231
|
for (let i = this._accessors.length - 1; i >= 0; --i) {
|
1216
|
-
if (this._accessors[i]
|
1232
|
+
if (this._accessors[i].accessor === accessor) {
|
1217
1233
|
this._accessors.splice(i, 1);
|
1218
1234
|
return;
|
1219
1235
|
}
|
@@ -1225,17 +1241,17 @@ class DaffRadioRegistry {
|
|
1225
1241
|
*/
|
1226
1242
|
select(accessor) {
|
1227
1243
|
this._accessors.forEach((c) => {
|
1228
|
-
if (this._isSameGroup(c, accessor) && c
|
1229
|
-
c
|
1244
|
+
if (this._isSameGroup(c, accessor) && c.accessor !== accessor) {
|
1245
|
+
c.accessor.fireDeselect();
|
1230
1246
|
}
|
1231
1247
|
});
|
1232
1248
|
}
|
1233
1249
|
_isSameGroup(controlPair, accessor) {
|
1234
|
-
if (!controlPair
|
1250
|
+
if (!controlPair.control.control) {
|
1235
1251
|
return false;
|
1236
1252
|
}
|
1237
|
-
return controlPair
|
1238
|
-
&& controlPair
|
1253
|
+
return controlPair.control.control.parent === accessor._control.control.parent
|
1254
|
+
&& controlPair.accessor.name === accessor.name;
|
1239
1255
|
}
|
1240
1256
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1241
1257
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffRadioRegistry, providedIn: 'root' }); }
|
@@ -2581,6 +2597,137 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
2581
2597
|
type: Output
|
2582
2598
|
}] } });
|
2583
2599
|
|
2600
|
+
class DaffStickyTrackerDirective {
|
2601
|
+
constructor(elementRef, renderer, document) {
|
2602
|
+
this.elementRef = elementRef;
|
2603
|
+
this.renderer = renderer;
|
2604
|
+
this.document = document;
|
2605
|
+
this.sticky = undefined;
|
2606
|
+
this.className = 'is-pinned';
|
2607
|
+
this.lastPinnedState = null;
|
2608
|
+
afterNextRender(() => {
|
2609
|
+
this.createSentinel();
|
2610
|
+
}, { phase: AfterRenderPhase.Write });
|
2611
|
+
afterNextRender(() => {
|
2612
|
+
this.scheduleObserverCreation();
|
2613
|
+
}, { phase: AfterRenderPhase.Read });
|
2614
|
+
}
|
2615
|
+
get isBottomSticky() {
|
2616
|
+
return this.sticky === 'bottom';
|
2617
|
+
}
|
2618
|
+
scheduleObserverCreation() {
|
2619
|
+
const defaultView = this.document.defaultView;
|
2620
|
+
if (defaultView?.requestIdleCallback) {
|
2621
|
+
this.idleCallbackId = defaultView.requestIdleCallback(() => {
|
2622
|
+
this.createSentinelObserver();
|
2623
|
+
});
|
2624
|
+
}
|
2625
|
+
else {
|
2626
|
+
this.idleCallbackId = defaultView?.setTimeout(() => {
|
2627
|
+
this.createSentinelObserver();
|
2628
|
+
}, 0);
|
2629
|
+
}
|
2630
|
+
}
|
2631
|
+
findScrollableParent() {
|
2632
|
+
let parent = this.elementRef.nativeElement.parentElement;
|
2633
|
+
while (parent && parent !== this.document.body) {
|
2634
|
+
const computedStyle = this.document.defaultView?.getComputedStyle(parent);
|
2635
|
+
const overflowY = computedStyle?.overflowY;
|
2636
|
+
if (overflowY === 'auto' || overflowY === 'scroll') {
|
2637
|
+
return parent;
|
2638
|
+
}
|
2639
|
+
parent = parent.parentElement;
|
2640
|
+
}
|
2641
|
+
return null;
|
2642
|
+
}
|
2643
|
+
createSentinel() {
|
2644
|
+
const stickyElement = this.elementRef.nativeElement;
|
2645
|
+
const parentElement = stickyElement.parentElement;
|
2646
|
+
if (!parentElement) {
|
2647
|
+
throw new Error('DaffStickyTracker: Sticky element must have a parent element');
|
2648
|
+
}
|
2649
|
+
this.sentinelElement = this.renderer.createElement('div');
|
2650
|
+
this.renderer.setStyle(this.sentinelElement, 'width', '1px');
|
2651
|
+
this.renderer.setStyle(this.sentinelElement, 'height', '1px');
|
2652
|
+
this.renderer.setStyle(this.sentinelElement, 'opacity', '0');
|
2653
|
+
this.renderer.setStyle(this.sentinelElement, 'pointer-events', 'none');
|
2654
|
+
this.renderer.setStyle(this.sentinelElement, 'margin', '0');
|
2655
|
+
this.renderer.setStyle(this.sentinelElement, 'padding', '0');
|
2656
|
+
this.renderer.setStyle(this.sentinelElement, 'border', 'none');
|
2657
|
+
this.renderer.setStyle(this.sentinelElement, 'overflow', 'hidden');
|
2658
|
+
this.renderer.setStyle(this.sentinelElement, 'font-size', '0');
|
2659
|
+
this.renderer.setStyle(this.sentinelElement, 'line-height', '0');
|
2660
|
+
if (this.isBottomSticky) {
|
2661
|
+
this.renderer.insertBefore(parentElement, this.sentinelElement, stickyElement.nextSibling);
|
2662
|
+
}
|
2663
|
+
else {
|
2664
|
+
this.renderer.insertBefore(parentElement, this.sentinelElement, stickyElement);
|
2665
|
+
}
|
2666
|
+
}
|
2667
|
+
createSentinelObserver() {
|
2668
|
+
const scrollableParent = this.findScrollableParent();
|
2669
|
+
const stickyElement = this.elementRef.nativeElement;
|
2670
|
+
this.sentinelObserver = new IntersectionObserver(([entry]) => {
|
2671
|
+
const shouldBePinned = !entry.isIntersecting;
|
2672
|
+
if (this.lastPinnedState !== shouldBePinned) {
|
2673
|
+
if (this.debounceTimeout) {
|
2674
|
+
clearTimeout(this.debounceTimeout);
|
2675
|
+
}
|
2676
|
+
this.debounceTimeout = this.document.defaultView?.setTimeout(() => {
|
2677
|
+
if (shouldBePinned) {
|
2678
|
+
this.renderer.addClass(stickyElement, this.className);
|
2679
|
+
}
|
2680
|
+
else {
|
2681
|
+
this.renderer.removeClass(stickyElement, this.className);
|
2682
|
+
}
|
2683
|
+
this.lastPinnedState = shouldBePinned;
|
2684
|
+
}, 5);
|
2685
|
+
}
|
2686
|
+
}, {
|
2687
|
+
root: scrollableParent,
|
2688
|
+
threshold: 0,
|
2689
|
+
rootMargin: '1px',
|
2690
|
+
});
|
2691
|
+
if (this.sentinelElement) {
|
2692
|
+
this.sentinelObserver.observe(this.sentinelElement);
|
2693
|
+
}
|
2694
|
+
}
|
2695
|
+
ngOnDestroy() {
|
2696
|
+
if (this.idleCallbackId !== undefined) {
|
2697
|
+
const defaultView = this.document.defaultView;
|
2698
|
+
if (defaultView?.cancelIdleCallback) {
|
2699
|
+
defaultView.cancelIdleCallback(this.idleCallbackId);
|
2700
|
+
}
|
2701
|
+
else {
|
2702
|
+
defaultView?.clearTimeout(this.idleCallbackId);
|
2703
|
+
}
|
2704
|
+
}
|
2705
|
+
if (this.debounceTimeout) {
|
2706
|
+
clearTimeout(this.debounceTimeout);
|
2707
|
+
}
|
2708
|
+
if (this.sentinelObserver && this.sentinelElement) {
|
2709
|
+
this.sentinelObserver.unobserve(this.sentinelElement);
|
2710
|
+
}
|
2711
|
+
this.sentinelObserver?.disconnect();
|
2712
|
+
if (this.sentinelElement && this.sentinelElement.parentElement) {
|
2713
|
+
this.renderer.removeChild(this.sentinelElement.parentElement, this.sentinelElement);
|
2714
|
+
}
|
2715
|
+
}
|
2716
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffStickyTrackerDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
|
2717
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffStickyTrackerDirective, isStandalone: true, selector: "[daffStickyTracker]", inputs: { sticky: "sticky" }, ngImport: i0 }); }
|
2718
|
+
}
|
2719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffStickyTrackerDirective, decorators: [{
|
2720
|
+
type: Directive,
|
2721
|
+
args: [{
|
2722
|
+
selector: '[daffStickyTracker]',
|
2723
|
+
}]
|
2724
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: Document, decorators: [{
|
2725
|
+
type: Inject,
|
2726
|
+
args: [DOCUMENT]
|
2727
|
+
}] }], propDecorators: { sticky: [{
|
2728
|
+
type: Input
|
2729
|
+
}] } });
|
2730
|
+
|
2584
2731
|
// Core
|
2585
2732
|
|
2586
2733
|
/*
|
@@ -2597,5 +2744,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
2597
2744
|
* Generated bundle index. Do not edit.
|
2598
2745
|
*/
|
2599
2746
|
|
2600
|
-
export { DAFF_FORM_FIELD_COMPONENTS, DAFF_THEME_INITIALIZER, DaffArticleEncapsulatedDirective, DaffBreakpoints, DaffCheckboxComponent, DaffCheckboxControlValueAccessorDirective, DaffCheckboxModule, DaffCheckboxSetComponent, DaffColorableDirective, DaffCompactableDirective, DaffErrorMessageComponent, DaffErrorMessageModule, DaffErrorStateMatcher, DaffFocusStackService, DaffFormFieldActionDirective, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldLabelDirective, DaffFormFieldModule, DaffFormLabelDirective, DaffFormLabelModule, DaffHintComponent, DaffManageContainerLayoutDirective, DaffNativeSelectComponent, DaffNativeSelectModule, DaffOpenableDirective, DaffPrefixDirective, DaffPrefixSuffixModule, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector };
|
2747
|
+
export { DAFF_FORM_FIELD_COMPONENTS, DAFF_THEME_INITIALIZER, DaffArticleEncapsulatedDirective, DaffBreakpoints, DaffCheckboxComponent, DaffCheckboxControlValueAccessorDirective, DaffCheckboxModule, DaffCheckboxSetComponent, DaffColorableDirective, DaffCompactableDirective, DaffErrorMessageComponent, DaffErrorMessageModule, DaffErrorStateMatcher, DaffFocusStackService, DaffFormFieldActionDirective, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldLabelDirective, DaffFormFieldModule, DaffFormLabelDirective, DaffFormLabelModule, DaffHintComponent, DaffManageContainerLayoutDirective, DaffNativeSelectComponent, DaffNativeSelectModule, DaffOpenableDirective, DaffPrefixDirective, DaffPrefixSuffixModule, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSelectableDirective, DaffSizableDirective, DaffSizableEnum, DaffSkeletonableDirective, DaffStatusEnum, DaffStatusableDirective, DaffStickyTrackerDirective, DaffSuffixDirective, DaffTextAlignableDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, NoopBreakpointObserver, SERVER_SAFE_BREAKPOINT_OBSERVER, daffFocusableElementsSelector };
|
2601
2748
|
//# sourceMappingURL=daffodil-design.mjs.map
|