aeb-ui-kit 10.0.0-preview.1202 → 10.0.0-preview.1207
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/fesm2022/aeb-ui-kit.mjs +59 -23
- package/package.json +1 -1
- package/types/aeb-ui-kit.d.ts +6 -1
package/fesm2022/aeb-ui-kit.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, viewChild, input, computed, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, Directive, inject, ElementRef, contentChild, output, forwardRef, Input, EnvironmentInjector, ApplicationRef, RendererFactory2, createComponent, Injectable, Renderer2, DestroyRef, Pipe, viewChildren, LOCALE_ID, contentChildren, TemplateRef,
|
|
2
|
+
import { signal, viewChild, input, computed, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, Directive, inject, ElementRef, contentChild, output, forwardRef, Input, ChangeDetectorRef, EnvironmentInjector, ApplicationRef, RendererFactory2, createComponent, Injectable, Renderer2, DestroyRef, Pipe, viewChildren, LOCALE_ID, contentChildren, TemplateRef, Injector } from '@angular/core';
|
|
3
3
|
import { NgClass, DOCUMENT, TitleCasePipe, DatePipe, NgStyle, NgTemplateOutlet, DecimalPipe, formatDate, formatNumber } from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, FormBuilder, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
6
|
-
import { Subject, timer, map, takeUntil, Subscription, filter, fromEvent, debounce, debounceTime } from 'rxjs';
|
|
7
|
-
import { trigger,
|
|
6
|
+
import { Subject, timer, map, takeUntil, merge, Subscription, filter, fromEvent, debounce, debounceTime } from 'rxjs';
|
|
7
|
+
import { trigger, state, style, transition, animate, query, stagger } from '@angular/animations';
|
|
8
8
|
import '@angular/common/locales/global/ru';
|
|
9
9
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
10
10
|
|
|
@@ -502,11 +502,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
502
502
|
class FormFieldDirective {
|
|
503
503
|
constructor() {
|
|
504
504
|
this.elementRef = inject(ElementRef);
|
|
505
|
+
this.focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
505
506
|
this._value = '';
|
|
506
507
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
507
|
-
this.isFocused = false;
|
|
508
508
|
this.hasValue = false;
|
|
509
509
|
}
|
|
510
|
+
get isFocused() {
|
|
511
|
+
return this.focused();
|
|
512
|
+
}
|
|
510
513
|
get isDisabled() {
|
|
511
514
|
if (this.ngControl) {
|
|
512
515
|
return this.ngControl?.disabled || null;
|
|
@@ -543,10 +546,10 @@ class FormFieldDirective {
|
|
|
543
546
|
this.value = target.value;
|
|
544
547
|
}
|
|
545
548
|
focus() {
|
|
546
|
-
this.
|
|
549
|
+
this.focused.set(true);
|
|
547
550
|
}
|
|
548
551
|
blur() {
|
|
549
|
-
this.
|
|
552
|
+
this.focused.set(false);
|
|
550
553
|
}
|
|
551
554
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
552
555
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.12", type: FormFieldDirective, isStandalone: true, selector: "input[aebInput], textarea[aebTextarea]", inputs: { value: "value" }, host: { listeners: { "input": " change($any($event.target))", "focus": "focus()", "blur": "blur()" }, properties: { "attr.disabled": "isDisabled" }, classAttribute: "aeb-input" }, ngImport: i0 }); }
|
|
@@ -594,6 +597,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
594
597
|
class FormField {
|
|
595
598
|
constructor() {
|
|
596
599
|
this._formField = contentChild(FormFieldDirective, ...(ngDevMode ? [{ debugName: "_formField" }] : /* istanbul ignore next */ []));
|
|
600
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
597
601
|
this.showDescription = input(false, ...(ngDevMode ? [{ debugName: "showDescription" }] : /* istanbul ignore next */ []));
|
|
598
602
|
this.showErrorMessage = input(true, ...(ngDevMode ? [{ debugName: "showErrorMessage" }] : /* istanbul ignore next */ []));
|
|
599
603
|
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -603,6 +607,15 @@ class FormField {
|
|
|
603
607
|
effect(() => {
|
|
604
608
|
this.applyDisabledState();
|
|
605
609
|
});
|
|
610
|
+
effect((onCleanup) => {
|
|
611
|
+
const control = this.formField?.ngControl?.control;
|
|
612
|
+
if (!control) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
const events = control.events ?? merge(control.statusChanges, control.valueChanges);
|
|
616
|
+
const subscription = events.subscribe(() => this.changeDetectorRef.markForCheck());
|
|
617
|
+
onCleanup(() => subscription.unsubscribe());
|
|
618
|
+
});
|
|
606
619
|
}
|
|
607
620
|
get formField() {
|
|
608
621
|
return this._formField();
|
|
@@ -637,6 +650,15 @@ class FormField {
|
|
|
637
650
|
}
|
|
638
651
|
return false;
|
|
639
652
|
}
|
|
653
|
+
get errorMessageVisible() {
|
|
654
|
+
return (this.showErrorMessage() &&
|
|
655
|
+
this.error &&
|
|
656
|
+
!this.isDisabled &&
|
|
657
|
+
!this.isFocused);
|
|
658
|
+
}
|
|
659
|
+
get descriptionVisible() {
|
|
660
|
+
return this.showDescription() && !this.error && !this.isDisabled;
|
|
661
|
+
}
|
|
640
662
|
get isDisabled() {
|
|
641
663
|
if (this.disabled()) {
|
|
642
664
|
return true;
|
|
@@ -668,13 +690,17 @@ class FormField {
|
|
|
668
690
|
}
|
|
669
691
|
}
|
|
670
692
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormField, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
671
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
693
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: FormField, isStandalone: true, selector: "aeb-form-field", inputs: { showDescription: { classPropertyName: "showDescription", publicName: "showDescription", isSignal: true, isRequired: false, transformFunction: null }, showErrorMessage: { classPropertyName: "showErrorMessage", publicName: "showErrorMessage", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, validateOnDirty: { classPropertyName: "validateOnDirty", publicName: "validateOnDirty", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.aeb-form-field--focused": "focused", "class.aeb-form-field--has-value": "hasValue", "class.aeb-form-field--error": "error", "class.aeb-form-field--disabled": "isDisabled", "class.aeb-form-field--has-icon": "hasIcon" }, classAttribute: "aeb-form-field" }, queries: [{ propertyName: "_formField", first: true, predicate: FormFieldDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n<ng-content select=\"[aebIcon]\" />\n<div\n [@labelVisibility]=\"errorMessageVisible ? 'visible' : 'hidden'\"\n class=\"aeb-form-field--error-message\"\n>\n <ng-content select=\"[errorMessage]\" />\n</div>\n<div\n [@labelVisibility]=\"descriptionVisible ? 'visible' : 'hidden'\"\n class=\"aeb-form-field--description\"\n>\n <ng-content select=\"[description]\" />\n</div>\n", styles: [".aeb-form-field{--border-color-default: var(--c-bg-surface-medium);--border-color-hovered: var(--c-bg-surface);--border-color-active: var(--c-btn-p-default);--border-color-disabled: var(--c-bg-surface-medium);--border-color-warning-default: var(--c-btn-ws-pressed);--border-color-warning-hovered: var(--c-btn-ws-default);--border-color-warning-focused: var(--c-btn-w-default);--border-color-warning-disabled: var(--c-btn-ws-pressed);--background-color-default: var(--c-bg-surface-medium);--background-color-hovered: var(--c-bg-surface);--background-color-focused: var(--c-bg-default);--background-color-disabled: var(--c-bg-surface-medium);--background-color-warning-default: var(--c-btn-ws-pressed);--background-color-warning-hovered: var(--c-btn-ws-default);--background-color-warning-focused: var(--c-bg-default);--background-color-warning-disabled: var(--c-btn-ws-pressed);--label-color-default: var(--c-t-secondary);--label-color-active: var(--c-t-secondary);--label-color-disabled: var(--c-t-secondary);--input-text-color-default: var(--c-t-primary);--input-text-color-disabled: var(--c-t-secondary);--error-text-color: var(--c-t-critical);position:relative;display:flex;flex-direction:column;color:var(--label-color-default)}.aeb-form-field.aeb-form-field--error .aeb-input{border-color:var(--border-color-warning-default);background-color:var(--background-color-warning-default)}.aeb-form-field.aeb-form-field--error .aeb-input:hover{border-color:var(--border-color-warning-hovered);background-color:var(--background-color-warning-hovered)}.aeb-form-field.aeb-form-field--error .aeb-input:focus{border-color:var(--border-color-warning-focused);background-color:var(--background-color-warning-focused)}.aeb-form-field.aeb-form-field--error .aeb-input:disabled{border-color:var(--border-color-warning-disabled);background-color:var(--background-color-warning-disabled)}.aeb-form-field.aeb-form-field--error .aeb-label__container{color:var(--label-color-error)}.aeb-form-field--focused .aeb-form-field--description{color:var(--label-color-active)}.aeb-form-field--error-message{padding:8px 0;font-size:var(--font-size-xxs);color:var(--error-text-color);overflow-wrap:break-word}.aeb-form-field--error-message:has(*:empty){display:none}.aeb-form-field--description{padding:8px 0;font-size:var(--font-size-xxs);color:var(--input-text-color-disabled);overflow-wrap:break-word}.aeb-form-field.aeb-form-field--disabled .aeb-input{border:var(--border-thin) solid var(--border-color-disabled);color:var(--input-text-color-disabled);background-color:var(--background-color-disabled)}.aeb-form-field.aeb-form-field--disabled .aeb-label__container{color:var(--label-color-disabled)}.aeb-form-field .aeb-input{display:block;box-sizing:border-box;width:100%;min-height:auto;color:var(--input-text-color-default);padding:24px 16px 7px;font-size:16px;border:var(--border-thin) solid var(--border-color-default);background-color:var(--background-color-default);border-radius:var(--border-medium-rounded);box-shadow:none;transition:all ease-in-out .2s linear;font-weight:300}.aeb-form-field .aeb-input:hover{background-color:var(--background-color-hovered);border:var(--border-thin) solid var(--border-color-hovered)}.aeb-form-field .aeb-input:focus{outline:none;background-color:var(--background-color-focused);border:var(--border-thin) solid var(--background-color-focused)}.aeb-form-field .aeb-input,.aeb-form-field .aeb-input::-webkit-search-cancel-button,.aeb-form-field .aeb-input::-webkit-search-decoration,.aeb-form-field .aeb-input::-webkit-search-results-button,.aeb-form-field .aeb-input::-webkit-search-results-decoration{appearance:none}.aeb-form-field .aeb-input::-webkit-contacts-auto-fill-button,.aeb-form-field .aeb-input::-webkit-caps-lock-indicator,.aeb-form-field .aeb-input::-webkit-credentials-auto-fill-button{visibility:hidden}.aeb-form-field .aeb-input::-webkit-outer-spin-button,.aeb-form-field .aeb-input::-webkit-inner-spin-button{appearance:none;margin:0}.aeb-form-field .aeb-input[type=number]{appearance:textfield}.aeb-form-field textarea{resize:vertical;cursor:auto;scroll-behavior:smooth}.aeb-form-field textarea.aeb-input{min-height:70px;scrollbar-color:var(--color-blue-50) transparent;scrollbar-width:thin}.aeb-form-field textarea.aeb-input::-webkit-scrollbar{width:16px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-thumb{border:6px solid rgba(0,0,0,0);background-color:var(--color-blue-50);background-clip:padding-box;border-radius:9999px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-corner{background-color:transparent}.aeb-form-field textarea.aeb-input::-webkit-resizer{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNSIgaGVpZ2h0PSI1IiB2aWV3Qm94PSIwIDAgNSA1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHBhdGggZD0iTTMuMjc5NTMgNC44Mzg1NkMzLjA2NDI3IDUuMDUzODEgMi43MTUyNyA1LjA1MzgxIDIuNTAwMDEgNC44Mzg1NkMyLjI4NDc1IDQuNjIzMyAyLjI4NDc1IDQuMjc0MyAyLjUwMDAxIDQuMDU5MDVMNC4wNTkwNCAyLjUwMDAzQzQuMjc0MyAyLjI4NDc3IDQuNjIzMyAyLjI4NDc3IDQuODM4NTYgMi41MDAwM0M1LjA1MzgxIDIuNzE1MjggNS4wNTM4MSAzLjA2NDI4IDQuODM4NTYgMy4yNzk1NEwzLjI3OTUzIDQuODM4NTZaIiBmaWxsPSIjM0I0MDRBIi8+DQo8cGF0aCBkPSJNMC45NDA5NTkgNC4wNTlDMC43MjU3MDIgNC4yNzQyNSAwLjM3NjcgNC4yNzQyNSAwLjE2MTQ0MyA0LjA1OUMtMC4wNTM4MTQzIDMuODQzNzQgLTAuMDUzODE0NCAzLjQ5NDc0IDAuMTYxNDQzIDMuMjc5NDlMMy4yNzk1MSAwLjE2MTQ0MkMzLjQ5NDc2IC0wLjA1MzgxNCAzLjg0Mzc2IC0wLjA1MzgxNCA0LjA1OTAyIDAuMTYxNDQyQzQuMjc0MjggMC4zNzY2OTggNC4yNzQyOCAwLjcyNTY5NyA0LjA1OTAyIDAuOTQwOTUzTDAuOTQwOTU5IDQuMDU5WiIgZmlsbD0iIzNCNDA0QSIvPg0KPC9zdmc+DQo=);background-repeat:no-repeat;background-position:center}.aeb-form-field .aeb-label__container{display:inline-block;position:absolute;top:16px;left:16px;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;pointer-events:none;background-color:#0000;transition:all .2s ease-out;box-sizing:border-box;-webkit-user-select:none;user-select:none;font-weight:300}.aeb-form-field.aeb-form-field--focused .aeb-label__container,.aeb-form-field.aeb-form-field--has-value .aeb-label__container{line-height:14px;top:8px;font-size:var(--font-size-xxs)}.aeb-form-field.aeb-form-field--focused .aeb-input{border-color:var(--border-color-active)}.aeb-form-field.aeb-form-field--focused .aeb-label__container{color:var(--label-color-active)}.aeb-form-field.aeb-form-field--has-icon .aeb-input{padding-right:38px}.aeb-form-field.aeb-form-field--has-icon .aeb-label__container{max-width:calc(100% - 56px)}.aeb-form-field:not(.aeb-form-field--has-icon) *[aebIcon]{display:none}.aeb-form-field *[aebIcon]{position:absolute;top:16px;right:12px;width:24px;height:24px;-webkit-user-select:none;user-select:none}.aeb-form-field *[aebIcon] img{width:24px;height:24px}\n"], animations: [
|
|
672
694
|
trigger('labelVisibility', [
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
695
|
+
state('visible', style({ display: 'block', 'font-size': 'var(--font-size-xxs)' })),
|
|
696
|
+
state('hidden', style({ display: 'none', 'font-size': '0' })),
|
|
697
|
+
transition('void => visible, hidden => visible', [
|
|
698
|
+
style({ display: 'block', 'font-size': '0' }),
|
|
699
|
+
animate('.1s')
|
|
676
700
|
]),
|
|
677
|
-
transition('
|
|
701
|
+
transition('visible => hidden', [
|
|
702
|
+
animate('.05s', style({ 'font-size': '0' }))
|
|
703
|
+
])
|
|
678
704
|
])
|
|
679
705
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
680
706
|
}
|
|
@@ -689,13 +715,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
689
715
|
'[class.aeb-form-field--has-icon]': 'hasIcon'
|
|
690
716
|
}, animations: [
|
|
691
717
|
trigger('labelVisibility', [
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
718
|
+
state('visible', style({ display: 'block', 'font-size': 'var(--font-size-xxs)' })),
|
|
719
|
+
state('hidden', style({ display: 'none', 'font-size': '0' })),
|
|
720
|
+
transition('void => visible, hidden => visible', [
|
|
721
|
+
style({ display: 'block', 'font-size': '0' }),
|
|
722
|
+
animate('.1s')
|
|
695
723
|
]),
|
|
696
|
-
transition('
|
|
724
|
+
transition('visible => hidden', [
|
|
725
|
+
animate('.05s', style({ 'font-size': '0' }))
|
|
726
|
+
])
|
|
697
727
|
])
|
|
698
|
-
], template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n
|
|
728
|
+
], template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n<ng-content select=\"[aebIcon]\" />\n<div\n [@labelVisibility]=\"errorMessageVisible ? 'visible' : 'hidden'\"\n class=\"aeb-form-field--error-message\"\n>\n <ng-content select=\"[errorMessage]\" />\n</div>\n<div\n [@labelVisibility]=\"descriptionVisible ? 'visible' : 'hidden'\"\n class=\"aeb-form-field--description\"\n>\n <ng-content select=\"[description]\" />\n</div>\n", styles: [".aeb-form-field{--border-color-default: var(--c-bg-surface-medium);--border-color-hovered: var(--c-bg-surface);--border-color-active: var(--c-btn-p-default);--border-color-disabled: var(--c-bg-surface-medium);--border-color-warning-default: var(--c-btn-ws-pressed);--border-color-warning-hovered: var(--c-btn-ws-default);--border-color-warning-focused: var(--c-btn-w-default);--border-color-warning-disabled: var(--c-btn-ws-pressed);--background-color-default: var(--c-bg-surface-medium);--background-color-hovered: var(--c-bg-surface);--background-color-focused: var(--c-bg-default);--background-color-disabled: var(--c-bg-surface-medium);--background-color-warning-default: var(--c-btn-ws-pressed);--background-color-warning-hovered: var(--c-btn-ws-default);--background-color-warning-focused: var(--c-bg-default);--background-color-warning-disabled: var(--c-btn-ws-pressed);--label-color-default: var(--c-t-secondary);--label-color-active: var(--c-t-secondary);--label-color-disabled: var(--c-t-secondary);--input-text-color-default: var(--c-t-primary);--input-text-color-disabled: var(--c-t-secondary);--error-text-color: var(--c-t-critical);position:relative;display:flex;flex-direction:column;color:var(--label-color-default)}.aeb-form-field.aeb-form-field--error .aeb-input{border-color:var(--border-color-warning-default);background-color:var(--background-color-warning-default)}.aeb-form-field.aeb-form-field--error .aeb-input:hover{border-color:var(--border-color-warning-hovered);background-color:var(--background-color-warning-hovered)}.aeb-form-field.aeb-form-field--error .aeb-input:focus{border-color:var(--border-color-warning-focused);background-color:var(--background-color-warning-focused)}.aeb-form-field.aeb-form-field--error .aeb-input:disabled{border-color:var(--border-color-warning-disabled);background-color:var(--background-color-warning-disabled)}.aeb-form-field.aeb-form-field--error .aeb-label__container{color:var(--label-color-error)}.aeb-form-field--focused .aeb-form-field--description{color:var(--label-color-active)}.aeb-form-field--error-message{padding:8px 0;font-size:var(--font-size-xxs);color:var(--error-text-color);overflow-wrap:break-word}.aeb-form-field--error-message:has(*:empty){display:none}.aeb-form-field--description{padding:8px 0;font-size:var(--font-size-xxs);color:var(--input-text-color-disabled);overflow-wrap:break-word}.aeb-form-field.aeb-form-field--disabled .aeb-input{border:var(--border-thin) solid var(--border-color-disabled);color:var(--input-text-color-disabled);background-color:var(--background-color-disabled)}.aeb-form-field.aeb-form-field--disabled .aeb-label__container{color:var(--label-color-disabled)}.aeb-form-field .aeb-input{display:block;box-sizing:border-box;width:100%;min-height:auto;color:var(--input-text-color-default);padding:24px 16px 7px;font-size:16px;border:var(--border-thin) solid var(--border-color-default);background-color:var(--background-color-default);border-radius:var(--border-medium-rounded);box-shadow:none;transition:all ease-in-out .2s linear;font-weight:300}.aeb-form-field .aeb-input:hover{background-color:var(--background-color-hovered);border:var(--border-thin) solid var(--border-color-hovered)}.aeb-form-field .aeb-input:focus{outline:none;background-color:var(--background-color-focused);border:var(--border-thin) solid var(--background-color-focused)}.aeb-form-field .aeb-input,.aeb-form-field .aeb-input::-webkit-search-cancel-button,.aeb-form-field .aeb-input::-webkit-search-decoration,.aeb-form-field .aeb-input::-webkit-search-results-button,.aeb-form-field .aeb-input::-webkit-search-results-decoration{appearance:none}.aeb-form-field .aeb-input::-webkit-contacts-auto-fill-button,.aeb-form-field .aeb-input::-webkit-caps-lock-indicator,.aeb-form-field .aeb-input::-webkit-credentials-auto-fill-button{visibility:hidden}.aeb-form-field .aeb-input::-webkit-outer-spin-button,.aeb-form-field .aeb-input::-webkit-inner-spin-button{appearance:none;margin:0}.aeb-form-field .aeb-input[type=number]{appearance:textfield}.aeb-form-field textarea{resize:vertical;cursor:auto;scroll-behavior:smooth}.aeb-form-field textarea.aeb-input{min-height:70px;scrollbar-color:var(--color-blue-50) transparent;scrollbar-width:thin}.aeb-form-field textarea.aeb-input::-webkit-scrollbar{width:16px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-thumb{border:6px solid rgba(0,0,0,0);background-color:var(--color-blue-50);background-clip:padding-box;border-radius:9999px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-corner{background-color:transparent}.aeb-form-field textarea.aeb-input::-webkit-resizer{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNSIgaGVpZ2h0PSI1IiB2aWV3Qm94PSIwIDAgNSA1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHBhdGggZD0iTTMuMjc5NTMgNC44Mzg1NkMzLjA2NDI3IDUuMDUzODEgMi43MTUyNyA1LjA1MzgxIDIuNTAwMDEgNC44Mzg1NkMyLjI4NDc1IDQuNjIzMyAyLjI4NDc1IDQuMjc0MyAyLjUwMDAxIDQuMDU5MDVMNC4wNTkwNCAyLjUwMDAzQzQuMjc0MyAyLjI4NDc3IDQuNjIzMyAyLjI4NDc3IDQuODM4NTYgMi41MDAwM0M1LjA1MzgxIDIuNzE1MjggNS4wNTM4MSAzLjA2NDI4IDQuODM4NTYgMy4yNzk1NEwzLjI3OTUzIDQuODM4NTZaIiBmaWxsPSIjM0I0MDRBIi8+DQo8cGF0aCBkPSJNMC45NDA5NTkgNC4wNTlDMC43MjU3MDIgNC4yNzQyNSAwLjM3NjcgNC4yNzQyNSAwLjE2MTQ0MyA0LjA1OUMtMC4wNTM4MTQzIDMuODQzNzQgLTAuMDUzODE0NCAzLjQ5NDc0IDAuMTYxNDQzIDMuMjc5NDlMMy4yNzk1MSAwLjE2MTQ0MkMzLjQ5NDc2IC0wLjA1MzgxNCAzLjg0Mzc2IC0wLjA1MzgxNCA0LjA1OTAyIDAuMTYxNDQyQzQuMjc0MjggMC4zNzY2OTggNC4yNzQyOCAwLjcyNTY5NyA0LjA1OTAyIDAuOTQwOTUzTDAuOTQwOTU5IDQuMDU5WiIgZmlsbD0iIzNCNDA0QSIvPg0KPC9zdmc+DQo=);background-repeat:no-repeat;background-position:center}.aeb-form-field .aeb-label__container{display:inline-block;position:absolute;top:16px;left:16px;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;pointer-events:none;background-color:#0000;transition:all .2s ease-out;box-sizing:border-box;-webkit-user-select:none;user-select:none;font-weight:300}.aeb-form-field.aeb-form-field--focused .aeb-label__container,.aeb-form-field.aeb-form-field--has-value .aeb-label__container{line-height:14px;top:8px;font-size:var(--font-size-xxs)}.aeb-form-field.aeb-form-field--focused .aeb-input{border-color:var(--border-color-active)}.aeb-form-field.aeb-form-field--focused .aeb-label__container{color:var(--label-color-active)}.aeb-form-field.aeb-form-field--has-icon .aeb-input{padding-right:38px}.aeb-form-field.aeb-form-field--has-icon .aeb-label__container{max-width:calc(100% - 56px)}.aeb-form-field:not(.aeb-form-field--has-icon) *[aebIcon]{display:none}.aeb-form-field *[aebIcon]{position:absolute;top:16px;right:12px;width:24px;height:24px;-webkit-user-select:none;user-select:none}.aeb-form-field *[aebIcon] img{width:24px;height:24px}\n"] }]
|
|
699
729
|
}], ctorParameters: () => [], propDecorators: { _formField: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FormFieldDirective), { isSignal: true }] }], showDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDescription", required: false }] }], showErrorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showErrorMessage", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "isInvalid", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], validateOnDirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "validateOnDirty", required: false }] }] } });
|
|
700
730
|
|
|
701
731
|
class FormFieldModule {
|
|
@@ -2095,8 +2125,9 @@ class Datepicker {
|
|
|
2095
2125
|
if (!erase) {
|
|
2096
2126
|
this.inputValue = targetDate;
|
|
2097
2127
|
this.lastValidInput = this.inputValue;
|
|
2098
|
-
|
|
2099
|
-
this.
|
|
2128
|
+
const date = new Date(this.woDaysYear, this.woDaysMonth, 1);
|
|
2129
|
+
this.writeValue(date);
|
|
2130
|
+
this.emitDateChange(date);
|
|
2100
2131
|
}
|
|
2101
2132
|
}
|
|
2102
2133
|
woDaysYearSet(value) {
|
|
@@ -2124,8 +2155,9 @@ class Datepicker {
|
|
|
2124
2155
|
if (!erase) {
|
|
2125
2156
|
this.inputValue = targetDate;
|
|
2126
2157
|
this.lastValidInput = this.inputValue;
|
|
2127
|
-
|
|
2128
|
-
this.
|
|
2158
|
+
const date = new Date(this.woDaysYear, this.woDaysMonth, 1);
|
|
2159
|
+
this.writeValue(date);
|
|
2160
|
+
this.emitDateChange(date);
|
|
2129
2161
|
}
|
|
2130
2162
|
}
|
|
2131
2163
|
isExcluded(date) {
|
|
@@ -2145,7 +2177,7 @@ class Datepicker {
|
|
|
2145
2177
|
// Handle empty input
|
|
2146
2178
|
if (!eventValue || eventValue.trim() === '') {
|
|
2147
2179
|
this.writeValue(null);
|
|
2148
|
-
this.
|
|
2180
|
+
this.emitDateChange(null);
|
|
2149
2181
|
this.core()?.setMonth(this._utils.getMonth(new Date()), true);
|
|
2150
2182
|
this.core()?.setYear(this._utils.getYear(new Date()), true);
|
|
2151
2183
|
return;
|
|
@@ -2183,7 +2215,7 @@ class Datepicker {
|
|
|
2183
2215
|
this.core()?.setYear(this._utils.getYear(parsedDate));
|
|
2184
2216
|
// Emit the change
|
|
2185
2217
|
this.writeValue(parsedDate);
|
|
2186
|
-
this.
|
|
2218
|
+
this.emitDateChange(parsedDate);
|
|
2187
2219
|
}
|
|
2188
2220
|
handleOpen() {
|
|
2189
2221
|
this.isOpen = !this.isOpen;
|
|
@@ -2197,7 +2229,7 @@ class Datepicker {
|
|
|
2197
2229
|
this.lastValidInput = this.inputValue;
|
|
2198
2230
|
this.internalDate = date;
|
|
2199
2231
|
this.writeValue(date);
|
|
2200
|
-
this.
|
|
2232
|
+
this.emitDateChange(date);
|
|
2201
2233
|
if (this.collapseOnChange()) {
|
|
2202
2234
|
this.isOpen = false;
|
|
2203
2235
|
}
|
|
@@ -2229,6 +2261,10 @@ class Datepicker {
|
|
|
2229
2261
|
setDisabledState(disabled) {
|
|
2230
2262
|
this.disabled = disabled;
|
|
2231
2263
|
}
|
|
2264
|
+
emitDateChange(value) {
|
|
2265
|
+
this._onChange(value);
|
|
2266
|
+
this.dateChange.emit(value);
|
|
2267
|
+
}
|
|
2232
2268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: Datepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2233
2269
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: Datepicker, isStandalone: true, selector: "aeb-datepicker", inputs: { hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, excludedDates: { classPropertyName: "excludedDates", publicName: "excludedDates", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, collapseOnChange: { classPropertyName: "collapseOnChange", publicName: "collapseOnChange", isSignal: true, isRequired: false, transformFunction: null }, withoutDays: { classPropertyName: "withoutDays", publicName: "withoutDays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange" }, host: { listeners: { "clickOutside": "clickOutsideHandler()" }, properties: { "class.aeb-datepicker": "true", "class.aeb-datepicker--disabled": "disabled" } }, providers: [
|
|
2234
2270
|
{
|
package/package.json
CHANGED
package/types/aeb-ui-kit.d.ts
CHANGED
|
@@ -192,10 +192,11 @@ declare class SidebarModule {
|
|
|
192
192
|
|
|
193
193
|
declare class FormFieldDirective {
|
|
194
194
|
private elementRef;
|
|
195
|
+
private readonly focused;
|
|
195
196
|
_value: string;
|
|
196
197
|
ngControl: NgControl | null;
|
|
197
|
-
isFocused: boolean;
|
|
198
198
|
hasValue: boolean;
|
|
199
|
+
get isFocused(): boolean;
|
|
199
200
|
get isDisabled(): true | null | undefined;
|
|
200
201
|
get value(): string;
|
|
201
202
|
set value(value: string);
|
|
@@ -210,6 +211,7 @@ declare class FormFieldDirective {
|
|
|
210
211
|
|
|
211
212
|
declare class FormField {
|
|
212
213
|
private readonly _formField;
|
|
214
|
+
private readonly changeDetectorRef;
|
|
213
215
|
readonly showDescription: _angular_core.InputSignal<boolean>;
|
|
214
216
|
readonly showErrorMessage: _angular_core.InputSignal<boolean>;
|
|
215
217
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -221,6 +223,8 @@ declare class FormField {
|
|
|
221
223
|
get focused(): boolean;
|
|
222
224
|
get hasValue(): boolean;
|
|
223
225
|
get error(): boolean;
|
|
226
|
+
get errorMessageVisible(): boolean;
|
|
227
|
+
get descriptionVisible(): boolean;
|
|
224
228
|
get isDisabled(): boolean;
|
|
225
229
|
get hasIcon(): boolean;
|
|
226
230
|
get isFocused(): boolean;
|
|
@@ -927,6 +931,7 @@ declare class Datepicker implements OnInit, ControlValueAccessor {
|
|
|
927
931
|
registerOnTouched(fn: () => void): void;
|
|
928
932
|
registerOnChange(fn: (_: Date | null) => void): void;
|
|
929
933
|
setDisabledState(disabled: boolean): void;
|
|
934
|
+
private emitDateChange;
|
|
930
935
|
private _onTouch;
|
|
931
936
|
private _onChange;
|
|
932
937
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Datepicker, never>;
|