@taiga-ui/core 3.0.0-rc.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/abstract-driver.directive.d.ts +1 -1
- package/abstract/abstract-textfield-host.d.ts +3 -3
- package/bundles/taiga-ui-core-abstract.umd.js +17 -13
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +56 -37
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +24 -40
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +1 -2
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +52 -89
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +26 -27
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +2 -2
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +0 -10
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +186 -41
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +3 -253
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.js +4 -16
- package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-date.umd.js +77 -0
- package/bundles/taiga-ui-core-pipes-format-date.umd.js.map +1 -0
- package/bundles/taiga-ui-core-pipes.umd.js +10 -4
- package/bundles/taiga-ui-core-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +32 -35
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/components/button/button-options.d.ts +1 -1
- package/components/button/button.component.d.ts +9 -3
- package/components/expand/expand.module.d.ts +3 -4
- package/components/expand/index.d.ts +0 -1
- package/components/primitive-textfield/primitive-textfield.component.d.ts +4 -4
- package/components/primitive-textfield/primitive-textfield.directive.d.ts +2 -2
- package/components/primitive-textfield/primitive-textfield.module.d.ts +1 -2
- package/components/primitive-textfield/textfield/textfield.component.d.ts +4 -7
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -3
- package/components/scrollbar/scrollbar.component.d.ts +3 -1
- package/components/tooltip/tooltip.component.d.ts +2 -2
- package/constants/index.d.ts +0 -2
- package/directives/hint/hint-describe.directive.d.ts +18 -0
- package/directives/hint/hint-options.directive.d.ts +16 -0
- package/directives/hint/hint.component.d.ts +8 -5
- package/directives/hint/hint.directive.d.ts +1 -3
- package/directives/hint/hint.module.d.ts +6 -4
- package/directives/hint/index.d.ts +2 -0
- package/directives/index.d.ts +0 -2
- package/directives/textfield-controller/index.d.ts +0 -5
- package/directives/textfield-controller/textfield-controller.module.d.ts +7 -12
- package/directives/textfield-controller/textfield.controller.d.ts +2 -17
- package/esm2015/abstract/abstract-driver.directive.js +1 -1
- package/esm2015/abstract/abstract-textfield-host.js +5 -5
- package/esm2015/abstract/driver.js +2 -1
- package/esm2015/abstract/position-accessor.js +2 -1
- package/esm2015/abstract/rect-accessor.js +2 -1
- package/esm2015/abstract/vehicle.js +2 -1
- package/esm2015/components/button/button-options.js +1 -1
- package/esm2015/components/button/button.component.js +32 -15
- package/esm2015/components/expand/expand.component.js +22 -23
- package/esm2015/components/expand/expand.module.js +4 -5
- package/esm2015/components/expand/index.js +1 -2
- package/esm2015/components/hints-host/hints-host.component.js +2 -2
- package/esm2015/components/notification/notification.component.js +3 -4
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +28 -29
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield.module.js +3 -10
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +7 -28
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +4 -11
- package/esm2015/components/root/root.component.js +2 -2
- package/esm2015/components/scroll-controls/scroll-controls.component.js +8 -9
- package/esm2015/components/scrollbar/scrollbar.component.js +4 -4
- package/esm2015/components/tooltip/tooltip.component.js +4 -4
- package/esm2015/constants/index.js +1 -3
- package/esm2015/directives/hint/hint-describe.directive.js +60 -0
- package/esm2015/directives/hint/hint-hover.directive.js +6 -3
- package/esm2015/directives/hint/hint-options.directive.js +72 -0
- package/esm2015/directives/hint/hint.component.js +28 -15
- package/esm2015/directives/hint/hint.directive.js +3 -15
- package/esm2015/directives/hint/hint.module.js +13 -3
- package/esm2015/directives/hint/index.js +3 -1
- package/esm2015/directives/index.js +1 -3
- package/esm2015/directives/textfield-controller/index.js +1 -6
- package/esm2015/directives/textfield-controller/textfield-controller.module.js +3 -28
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +1 -11
- package/esm2015/directives/textfield-controller/textfield.controller.js +2 -22
- package/esm2015/interfaces/portal-item.js +1 -1
- package/esm2015/pipes/format-date/format-date.module.js +16 -0
- package/esm2015/pipes/format-date/format-date.pipe.js +24 -0
- package/esm2015/pipes/format-date/index.js +3 -0
- package/esm2015/pipes/format-date/taiga-ui-core-pipes-format-date.js +5 -0
- package/esm2015/pipes/index.js +2 -1
- package/esm2015/services/format-date.service.js +26 -0
- package/esm2015/services/hint.service.js +1 -31
- package/esm2015/services/index.js +2 -1
- package/fesm2015/taiga-ui-core-abstract.js +9 -5
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +32 -15
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +26 -38
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +2 -3
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +46 -80
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +3 -4
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +3 -3
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +2 -10
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +164 -35
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +4 -209
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives.js +0 -2
- package/fesm2015/taiga-ui-core-directives.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-date.js +44 -0
- package/fesm2015/taiga-ui-core-pipes-format-date.js.map +1 -0
- package/fesm2015/taiga-ui-core-pipes.js +1 -0
- package/fesm2015/taiga-ui-core-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +26 -33
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/interfaces/portal-item.d.ts +0 -1
- package/package.json +4 -4
- package/pipes/format-date/format-date.module.d.ts +7 -0
- package/pipes/format-date/format-date.pipe.d.ts +11 -0
- package/pipes/format-date/index.d.ts +2 -0
- package/pipes/format-date/package.json +10 -0
- package/{directives/described-by/taiga-ui-core-directives-described-by.d.ts → pipes/format-date/taiga-ui-core-pipes-format-date.d.ts} +1 -1
- package/pipes/index.d.ts +1 -0
- package/services/format-date.service.d.ts +9 -0
- package/services/hint.service.d.ts +0 -12
- package/services/index.d.ts +1 -0
- package/bundles/taiga-ui-core-directives-described-by.umd.js +0 -458
- package/bundles/taiga-ui-core-directives-described-by.umd.js.map +0 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +0 -478
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +0 -1
- package/components/expand/expand-content.directive.d.ts +0 -5
- package/constants/described-by.d.ts +0 -1
- package/constants/version.d.ts +0 -1
- package/directives/described-by/described-by.directive.d.ts +0 -13
- package/directives/described-by/described-by.module.d.ts +0 -7
- package/directives/described-by/described-by.providers.d.ts +0 -4
- package/directives/described-by/index.d.ts +0 -3
- package/directives/described-by/package.json +0 -10
- package/directives/hint-controller/hint-controller.directive.d.ts +0 -16
- package/directives/hint-controller/hint-controller.module.d.ts +0 -7
- package/directives/hint-controller/hint-controller.provider.d.ts +0 -4
- package/directives/hint-controller/hint-controller.token.d.ts +0 -3
- package/directives/hint-controller/index.d.ts +0 -4
- package/directives/hint-controller/package.json +0 -10
- package/directives/hint-controller/taiga-ui-core-directives-hint-controller.d.ts +0 -5
- package/directives/textfield-controller/textfield-autocomplete.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-example-text.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-input-mode.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-max-length.directive.d.ts +0 -9
- package/directives/textfield-controller/textfield-type.directive.d.ts +0 -9
- package/esm2015/components/expand/expand-content.directive.js +0 -14
- package/esm2015/constants/described-by.js +0 -2
- package/esm2015/constants/version.js +0 -7
- package/esm2015/directives/described-by/described-by.directive.js +0 -55
- package/esm2015/directives/described-by/described-by.module.js +0 -16
- package/esm2015/directives/described-by/described-by.providers.js +0 -20
- package/esm2015/directives/described-by/index.js +0 -4
- package/esm2015/directives/described-by/taiga-ui-core-directives-described-by.js +0 -5
- package/esm2015/directives/hint-controller/hint-controller.directive.js +0 -71
- package/esm2015/directives/hint-controller/hint-controller.module.js +0 -16
- package/esm2015/directives/hint-controller/hint-controller.provider.js +0 -26
- package/esm2015/directives/hint-controller/hint-controller.token.js +0 -7
- package/esm2015/directives/hint-controller/index.js +0 -5
- package/esm2015/directives/hint-controller/taiga-ui-core-directives-hint-controller.js +0 -5
- package/esm2015/directives/textfield-controller/textfield-autocomplete.directive.js +0 -35
- package/esm2015/directives/textfield-controller/textfield-example-text.directive.js +0 -35
- package/esm2015/directives/textfield-controller/textfield-input-mode.directive.js +0 -35
- package/esm2015/directives/textfield-controller/textfield-max-length.directive.js +0 -35
- package/esm2015/directives/textfield-controller/textfield-type.directive.js +0 -35
- package/fesm2015/taiga-ui-core-directives-described-by.js +0 -92
- package/fesm2015/taiga-ui-core-directives-described-by.js.map +0 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +0 -115
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +0 -1
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, ElementRef, Component, ChangeDetectionStrategy, Inject, ViewChild, HostBinding, HostListener, EventEmitter, Input, Output, ContentChildren, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { InjectionToken, ElementRef, Component, ChangeDetectionStrategy, Inject, ViewChild, HostBinding, HostListener, EventEmitter, Optional, Input, Output, ContentChildren, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import * as i6 from '@taiga-ui/cdk';
|
|
5
|
-
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, tuiIsNativeFocusedIn, tuiAsFocusableItemAccessor, tuiDefaultProp, tuiPure, TuiIdService, TuiFocusableModule,
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
import * as
|
|
9
|
-
import { TUI_TEXTFIELD_WATCHED_CONTROLLER
|
|
5
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, tuiIsNativeFocusedIn, tuiAsFocusableItemAccessor, tuiDefaultProp, tuiPure, TuiIdService, TuiFocusableModule, TuiAutofilledModule } from '@taiga-ui/cdk';
|
|
6
|
+
import * as i12 from '@taiga-ui/core/directives/hint';
|
|
7
|
+
import { TuiHintOptionsDirective } from '@taiga-ui/core/directives/hint';
|
|
8
|
+
import * as i11 from '@taiga-ui/core/directives/textfield-controller';
|
|
9
|
+
import { TUI_TEXTFIELD_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER } from '@taiga-ui/core/directives/textfield-controller';
|
|
10
10
|
import { MODE_PROVIDER } from '@taiga-ui/core/providers';
|
|
11
11
|
import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE, tuiAsTextfieldHost, TUI_TEXTFIELD_HOST } from '@taiga-ui/core/tokens';
|
|
12
12
|
import { tuiGetBorder } from '@taiga-ui/core/utils/miscellaneous';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i9 from '@tinkoff/ng-polymorpheus';
|
|
14
14
|
import { PolymorpheusOutletDirective, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i10 from 'rxjs';
|
|
16
16
|
import { BehaviorSubject, fromEvent } from 'rxjs';
|
|
17
17
|
import { delay, filter, distinctUntilChanged, map } from 'rxjs/operators';
|
|
18
|
-
import * as i1
|
|
18
|
+
import * as i1 from '@taiga-ui/core/components/svg';
|
|
19
19
|
import { TuiSvgModule } from '@taiga-ui/core/components/svg';
|
|
20
|
-
import * as i1 from '@taiga-ui/core/directives';
|
|
21
|
-
import { TUI_TEXTFIELD_WATCHED_CONTROLLER, TuiDescribedByDirective, TUI_DESCRIBED_BY_PROVIDERS, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1 } from '@taiga-ui/core/directives';
|
|
22
20
|
import * as i3 from '@taiga-ui/core/components/tooltip';
|
|
23
21
|
import { TuiTooltipModule } from '@taiga-ui/core/components/tooltip';
|
|
24
22
|
import * as i4 from '@angular/common';
|
|
@@ -29,9 +27,9 @@ import * as i7 from '@taiga-ui/core/directives/mask-accessor';
|
|
|
29
27
|
import { TuiMaskAccessorModule } from '@taiga-ui/core/directives/mask-accessor';
|
|
30
28
|
import * as i8 from '@angular/forms';
|
|
31
29
|
import { FormsModule } from '@angular/forms';
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
30
|
+
import { AbstractTuiTextfieldHost } from '@taiga-ui/core/abstract';
|
|
31
|
+
import * as i1$1 from '@taiga-ui/core/directives';
|
|
32
|
+
import { TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1 } from '@taiga-ui/core/directives';
|
|
35
33
|
|
|
36
34
|
/** Default values for primitive textfield options */
|
|
37
35
|
const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = {
|
|
@@ -46,9 +44,8 @@ const tuiPrimitiveTextfieldOptionsProvider = (options) => ({
|
|
|
46
44
|
});
|
|
47
45
|
|
|
48
46
|
class TuiValueDecorationComponent {
|
|
49
|
-
constructor(textfield
|
|
47
|
+
constructor(textfield) {
|
|
50
48
|
this.textfield = textfield;
|
|
51
|
-
this.controller = controller;
|
|
52
49
|
this.prefix$ = new BehaviorSubject(``);
|
|
53
50
|
this.pre$ = this.prefix$.pipe(delay(0), filter(() => { var _a; return !!((_a = this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.isConnected); }), distinctUntilChanged(), map(() => { var _a; return ((_a = this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 0; }));
|
|
54
51
|
}
|
|
@@ -79,8 +76,7 @@ class TuiValueDecorationComponent {
|
|
|
79
76
|
return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || ``;
|
|
80
77
|
}
|
|
81
78
|
get exampleText() {
|
|
82
|
-
|
|
83
|
-
return !this.value && this.focused ? exampleText : ``;
|
|
79
|
+
return !this.value && this.focused ? this.placeholder : ``;
|
|
84
80
|
}
|
|
85
81
|
get decorationsVisible() {
|
|
86
82
|
return !!this.value || this.focused;
|
|
@@ -94,7 +90,7 @@ class TuiValueDecorationComponent {
|
|
|
94
90
|
: this.textfield.postfix;
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
|
-
TuiValueDecorationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiValueDecorationComponent, deps: [{ token: TUI_FOCUSABLE_ITEM_ACCESSOR }
|
|
93
|
+
TuiValueDecorationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiValueDecorationComponent, deps: [{ token: TUI_FOCUSABLE_ITEM_ACCESSOR }], target: i0.ɵɵFactoryTarget.Component });
|
|
98
94
|
TuiValueDecorationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiValueDecorationComponent, selector: "tui-value-decoration", host: { listeners: { "animationstart": "ngDoCheck()" }, properties: { "class._table": "this.isContextTable" } }, viewQueries: [{ propertyName: "pre", first: true, predicate: ["pre"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<span\n #pre\n class=\"t-prefix\"\n [textContent]=\"prefix\"\n></span>\n<span\n class=\"t-ghost\"\n [textContent]=\"value\"\n></span>\n<span\n class=\"t-filler\"\n [textContent]=\"filler\"\n></span>\n<span\n class=\"t-postfix\"\n [textContent]=\"postfix\"\n></span>\n", styles: [":host{position:absolute;display:block;height:2.5rem;line-height:2.25;width:100%;margin:-1.15rem 0;box-sizing:content-box;color:var(--tui-text-03);-webkit-animation:tuiPresent 1s;animation:tuiPresent 1s;vertical-align:middle;text-overflow:ellipsis;white-space:nowrap}:host:after{content:\"\";display:inline-block;vertical-align:middle;height:100%}:host._table{position:static}:host-context(tui-textfield[data-mode=\"onDark\"]) :host{color:var(--tui-text-01-night)}.t-ghost{visibility:hidden;white-space:pre;text-overflow:clip}.t-prefix,.t-postfix{color:var(--tui-text-01);white-space:pre}.t-filler{text-overflow:ellipsis;max-width:100%;white-space:nowrap}:host-context(tui-textfield[data-mode=\"onDark\"]) .t-filler{color:var(--tui-text-03-night)}\n"], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
99
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiValueDecorationComponent, decorators: [{
|
|
100
96
|
type: Component,
|
|
@@ -108,9 +104,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
108
104
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
109
105
|
type: Inject,
|
|
110
106
|
args: [TUI_FOCUSABLE_ITEM_ACCESSOR]
|
|
111
|
-
}] }, { type: i1.TuiTextfieldController, decorators: [{
|
|
112
|
-
type: Inject,
|
|
113
|
-
args: [TUI_TEXTFIELD_WATCHED_CONTROLLER]
|
|
114
107
|
}] }]; }, propDecorators: { pre: [{
|
|
115
108
|
type: ViewChild,
|
|
116
109
|
args: [`pre`, { read: ElementRef, static: true }]
|
|
@@ -125,12 +118,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
125
118
|
const ICON_PADDING = 1.75;
|
|
126
119
|
const ICON_PADDING_S = 1.5;
|
|
127
120
|
class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
|
|
128
|
-
constructor(mode$, appearance, controller,
|
|
121
|
+
constructor(mode$, appearance, controller, hintOptions, options, elementRef) {
|
|
129
122
|
super();
|
|
130
123
|
this.mode$ = mode$;
|
|
131
124
|
this.appearance = appearance;
|
|
132
125
|
this.controller = controller;
|
|
133
|
-
this.
|
|
126
|
+
this.hintOptions = hintOptions;
|
|
134
127
|
this.options = options;
|
|
135
128
|
this.elementRef = elementRef;
|
|
136
129
|
this.editable = true;
|
|
@@ -149,10 +142,9 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
|
|
|
149
142
|
if (this.computedDisabled || !this.focusableElement) {
|
|
150
143
|
return null;
|
|
151
144
|
}
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
|
|
155
|
-
this.focusableElement.nativeElement);
|
|
145
|
+
const { nativeElement } = this.focusableElement;
|
|
146
|
+
return (nativeElement.previousElementSibling ||
|
|
147
|
+
nativeElement);
|
|
156
148
|
}
|
|
157
149
|
get focused() {
|
|
158
150
|
return tuiIsNativeFocusedIn(this.elementRef.nativeElement);
|
|
@@ -171,11 +163,14 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
|
|
|
171
163
|
return !!this.value;
|
|
172
164
|
}
|
|
173
165
|
get hasCleaner() {
|
|
174
|
-
return (this.controller.cleaner &&
|
|
166
|
+
return (this.controller.cleaner &&
|
|
167
|
+
this.hasValue &&
|
|
168
|
+
!this.computedDisabled &&
|
|
169
|
+
!this.readOnly);
|
|
175
170
|
}
|
|
176
171
|
get hasTooltip() {
|
|
177
172
|
var _a;
|
|
178
|
-
return !!((_a = this.
|
|
173
|
+
return !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && !this.computedDisabled;
|
|
179
174
|
}
|
|
180
175
|
get hasCustomContent() {
|
|
181
176
|
return !!this.controller.customContent;
|
|
@@ -187,10 +182,7 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
|
|
|
187
182
|
}
|
|
188
183
|
get placeholderVisible() {
|
|
189
184
|
var _a;
|
|
190
|
-
const hasDecor = this.
|
|
191
|
-
this.prefix ||
|
|
192
|
-
this.postfix ||
|
|
193
|
-
((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
|
|
185
|
+
const hasDecor = ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || this.prefix || this.postfix;
|
|
194
186
|
const showDecor = hasDecor && !this.readOnly && this.computedFocused;
|
|
195
187
|
return !this.hasValue && !showDecor;
|
|
196
188
|
}
|
|
@@ -216,7 +208,8 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
|
|
|
216
208
|
}
|
|
217
209
|
// Safari expiration date autofill workaround
|
|
218
210
|
get name() {
|
|
219
|
-
|
|
211
|
+
var _a;
|
|
212
|
+
return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.autocomplete) === `cc-exp`
|
|
220
213
|
? `ccexpiryyear`
|
|
221
214
|
: null;
|
|
222
215
|
}
|
|
@@ -267,13 +260,12 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
|
|
|
267
260
|
this.valueChange.emit(value);
|
|
268
261
|
}
|
|
269
262
|
}
|
|
270
|
-
TuiPrimitiveTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiPrimitiveTextfieldComponent, deps: [{ token: TUI_MODE }, { token: TUI_TEXTFIELD_APPEARANCE }, { token: TUI_TEXTFIELD_WATCHED_CONTROLLER
|
|
263
|
+
TuiPrimitiveTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiPrimitiveTextfieldComponent, deps: [{ token: TUI_MODE }, { token: TUI_TEXTFIELD_APPEARANCE }, { token: TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: TuiHintOptionsDirective, optional: true }, { token: TUI_PRIMITIVE_TEXTFIELD_OPTIONS }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
271
264
|
TuiPrimitiveTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: { editable: "editable", filler: "filler", iconCleaner: "iconCleaner", readOnly: "readOnly", invalid: "invalid", disabled: "disabled", prefix: "prefix", postfix: "postfix", value: "value" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "$.data-mode.attr": "mode$", "focusin": "onFocused(true)", "focusout": "onFocused(false)" }, properties: { "class._autofilled": "autofilled", "class._label-outside": "controller.labelOutside", "class._readonly": "this.readOnly", "attr.data-size": "this.size", "class._invalid": "this.computedInvalid", "class._hidden": "this.inputHidden", "style.--border-start.rem": "this.borderStart", "style.--border-end.rem": "this.borderEnd" } }, providers: [
|
|
272
265
|
tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
|
|
273
266
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
274
|
-
HINT_CONTROLLER_PROVIDER,
|
|
275
267
|
MODE_PROVIDER,
|
|
276
|
-
], queries: [{ propertyName: "content", predicate: PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<div\n tuiWrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (click.prevent.silent)=\"(0)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"t-input\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.maxLength]=\"controller.maxLength\"\n [attr.name]=\"name\"\n [attr.aria-placeholder]=\"controller.exampleText\"\n [attr.aria-invalid]=\"computedInvalid\"\n [autocomplete]=\"controller.autocomplete\"\n [type]=\"controller.type\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiInputMode]=\"controller.inputMode\"\n [tuiFocusable]=\"computedFocusable\"\n [tuiDescribedBy]=\"id\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"t-input t-input_template\"\n >\n <ng-content select=\"tuiContent\"></ng-content>\n </div>\n <div class=\"t-content\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <div class=\"t-wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <div class=\"t-wrapper-value-decoration\">\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [class.t-has-value]=\"value\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"t-custom-content\"\n >\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n class=\"t-custom-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner as src\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintController.content || ''\"\n [direction]=\"hintController.direction\"\n [appearance]=\"hintController.appearance\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size=s]{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size=m]{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size=l]{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host[data-size=s] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled .t-input,.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.125rem}:host[data-size=m]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input.t-input,.t-input :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:\"\";margin-right:-.25rem}:host[data-size=m] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font-size:.9375rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size=l][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size=m][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size=l][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}.t-cleaner:hover{color:var(--tui-text-02)}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-icon{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03)}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}.t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size=s] .t-icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}:host._autofilled[data-size=s]:not(._focused) .t-placeholder,:host._autofilled[data-size=m]:not(._focused) .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-icon{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}.t-icon:hover{color:var(--tui-text-02)}:host._readonly .t-icon,:host._disabled .t-icon{pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-icon:hover{color:var(--tui-text-01-night)}:host:hover:not(._readonly) .t-icon{color:var(--tui-text-02)}:host[data-mode=onDark]:hover:not(._readonly) .t-icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]:hover:not(._readonly) .t-icon{color:var(--tui-text-01)}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size=l]:not(._label-outside) .t-input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size=l]:not(._label-outside) .t-input::-webkit-credentials-auto-fill-button,:host[data-size=l]:not(._label-outside) .t-input::-webkit-contacts-auto-fill-button,:host[data-size=l]:not(._label-outside) .t-input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.t-input::-webkit-credentials-auto-fill-button:hover,.t-input::-webkit-contacts-auto-fill-button:hover,.t-input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}.t-value-decoration{overflow:hidden}.t-value-decoration.t-has-value{overflow:unset}\n"], components: [{ type: i1$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i6.TuiInputModeDirective, selector: "input[tuiInputMode]", inputs: ["tuiInputMode"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i9.TuiDescribedByDirective, selector: "[tuiDescribedBy]:not(ng-container)", inputs: ["tuiDescribedBy"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
268
|
+
], queries: [{ propertyName: "content", predicate: PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n tuiWrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (click.prevent.silent)=\"(0)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"t-input\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.name]=\"name\"\n [attr.aria-invalid]=\"computedInvalid\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"t-input t-input_template\"\n >\n <ng-content select=\"tuiContent\"></ng-content>\n </div>\n <div class=\"t-content\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <div class=\"t-wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <div class=\"t-wrapper-value-decoration\">\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [class.t-has-value]=\"value\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"t-custom-content\"\n >\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n class=\"t-custom-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner as src\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"hintOptions && hintOptions.content && !computedDisabled\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintOptions.content\"\n [direction]=\"hintOptions.direction\"\n [appearance]=\"hintOptions.appearance\"\n [showDelay]=\"hintOptions.showDelay\"\n [hideDelay]=\"hintOptions.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size=s]{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size=m]{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size=l]{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host[data-size=s] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled .t-input,.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.125rem}:host[data-size=m]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input.t-input,.t-input :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:\"\";margin-right:-.25rem}:host[data-size=m] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font-size:.9375rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size=l][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size=m][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size=l][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}.t-cleaner:hover{color:var(--tui-text-02)}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-icon{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03)}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}.t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size=s] .t-icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}:host._autofilled[data-size=s]:not(._focused) .t-placeholder,:host._autofilled[data-size=m]:not(._focused) .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-icon{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}.t-icon:hover{color:var(--tui-text-02)}:host._readonly .t-icon,:host._disabled .t-icon{pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-icon:hover{color:var(--tui-text-01-night)}:host:hover:not(._readonly) .t-icon{color:var(--tui-text-02)}:host[data-mode=onDark]:hover:not(._readonly) .t-icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]:hover:not(._readonly) .t-icon{color:var(--tui-text-01)}input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}input::placeholder{color:var(--tui-text-03);opacity:0}:host-context(tui-primitive-textfield[data-mode=\"onDark\"]) input::-ms-input-placeholder,:host-context(tui-text-area[data-mode=\"onDark\"]) input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield[data-mode=\"onDark\"]) input::placeholder,:host-context(tui-text-area[data-mode=\"onDark\"]) input::placeholder{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield._focused:not(._readonly)) input::-ms-input-placeholder,:host-context(tui-text-area._focused:not(._readonly)) input::-ms-input-placeholder{opacity:1}:host-context(tui-primitive-textfield._focused:not(._readonly)) input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) input::placeholder{opacity:1}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size=l]:not(._label-outside) .t-input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size=l]:not(._label-outside) .t-input::-webkit-credentials-auto-fill-button,:host[data-size=l]:not(._label-outside) .t-input::-webkit-contacts-auto-fill-button,:host[data-size=l]:not(._label-outside) .t-input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.t-input::-webkit-credentials-auto-fill-button:hover,.t-input::-webkit-contacts-auto-fill-button:hover,.t-input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}.t-value-decoration{overflow:hidden}.t-value-decoration.t-has-value{overflow:unset}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
277
269
|
__decorate([
|
|
278
270
|
tuiDefaultProp()
|
|
279
271
|
], TuiPrimitiveTextfieldComponent.prototype, "editable", void 0);
|
|
@@ -314,7 +306,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
314
306
|
providers: [
|
|
315
307
|
tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
|
|
316
308
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
317
|
-
HINT_CONTROLLER_PROVIDER,
|
|
318
309
|
MODE_PROVIDER,
|
|
319
310
|
],
|
|
320
311
|
host: {
|
|
@@ -323,18 +314,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
323
314
|
'[class._label-outside]': `controller.labelOutside`,
|
|
324
315
|
},
|
|
325
316
|
}]
|
|
326
|
-
}], ctorParameters: function () { return [{ type:
|
|
317
|
+
}], ctorParameters: function () { return [{ type: i10.Observable, decorators: [{
|
|
327
318
|
type: Inject,
|
|
328
319
|
args: [TUI_MODE]
|
|
329
320
|
}] }, { type: undefined, decorators: [{
|
|
330
321
|
type: Inject,
|
|
331
322
|
args: [TUI_TEXTFIELD_APPEARANCE]
|
|
332
|
-
}] }, { type:
|
|
323
|
+
}] }, { type: i11.TuiTextfieldController, decorators: [{
|
|
333
324
|
type: Inject,
|
|
334
|
-
args: [TUI_TEXTFIELD_WATCHED_CONTROLLER
|
|
335
|
-
}] }, { type:
|
|
325
|
+
args: [TUI_TEXTFIELD_WATCHED_CONTROLLER]
|
|
326
|
+
}] }, { type: i12.TuiHintOptionsDirective, decorators: [{
|
|
327
|
+
type: Optional
|
|
328
|
+
}, {
|
|
336
329
|
type: Inject,
|
|
337
|
-
args: [
|
|
330
|
+
args: [TuiHintOptionsDirective]
|
|
338
331
|
}] }, { type: undefined, decorators: [{
|
|
339
332
|
type: Inject,
|
|
340
333
|
args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS]
|
|
@@ -393,7 +386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
393
386
|
args: [`focusout`, [`false`]]
|
|
394
387
|
}], getIndent$: [] } });
|
|
395
388
|
|
|
396
|
-
class TuiPrimitiveTextfieldDirective extends
|
|
389
|
+
class TuiPrimitiveTextfieldDirective extends AbstractTuiTextfieldHost {
|
|
397
390
|
constructor(textfield) {
|
|
398
391
|
/**
|
|
399
392
|
* TuiPrimitiveTextfieldComponent satisfies all required parts of
|
|
@@ -424,40 +417,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
424
417
|
}] }]; } });
|
|
425
418
|
|
|
426
419
|
class TuiTextfieldComponent {
|
|
427
|
-
constructor(host, controller, elementRef,
|
|
420
|
+
constructor(host, controller, elementRef, idService) {
|
|
428
421
|
this.host = host;
|
|
429
422
|
this.controller = controller;
|
|
430
423
|
this.elementRef = elementRef;
|
|
431
|
-
this.describedBy = describedBy;
|
|
432
424
|
this.idService = idService;
|
|
433
425
|
this.host.process(this.elementRef.nativeElement);
|
|
434
426
|
}
|
|
435
|
-
get computedDescribedBy() {
|
|
436
|
-
return this.describedBy.computedDescribedBy;
|
|
437
|
-
}
|
|
438
427
|
get id() {
|
|
439
428
|
return this.elementRef.nativeElement.id || this.idService.generate();
|
|
440
429
|
}
|
|
441
|
-
ngDoCheck() {
|
|
442
|
-
this.describedBy.tuiDescribedBy = this.id;
|
|
443
|
-
}
|
|
444
430
|
}
|
|
445
|
-
TuiTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTextfieldComponent, deps: [{ token: TUI_TEXTFIELD_HOST }, { token: TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: ElementRef }, { token:
|
|
446
|
-
TuiTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]", host: { attributes: { "type": "text" }, listeners: { "input": "host.onValueChange($event.target.value)" }, properties: { "attr.aria-placeholder": "controller.exampleText", "attr.aria-invalid": "host.invalid", "attr.disabled": "host.disabled || null", "tabIndex": "host.focusable ? 0 : -1", "readOnly": "host.readOnly", "value": "host.value", "
|
|
447
|
-
TuiDescribedByDirective,
|
|
448
|
-
TUI_DESCRIBED_BY_PROVIDERS,
|
|
449
|
-
TEXTFIELD_CONTROLLER_PROVIDER$1,
|
|
450
|
-
], ngImport: i0, template: ``, isInline: true, styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}:host:-webkit-autofill,:host:-webkit-autofill:hover,:host:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-mode=onDark] :host:-webkit-autofill,:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill,:host :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill,:host[data-mode=onDark] :host:-webkit-autofill:hover,:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:hover,:host :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:hover,:host[data-mode=onDark] :host:-webkit-autofill:focus,:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:focus,:host :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host[data-size=s] :host,:host :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled :host,:host :host-context(tui-primitive-textfield._disabled),:host :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.125rem}:host[data-size=m]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input:host,:host :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}:host::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-caps-lock-indicator{margin-top:-1.25rem}:host::-webkit-credentials-auto-fill-button,:host::-webkit-contacts-auto-fill-button,:host::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-credentials-auto-fill-button,:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-contacts-auto-fill-button,:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}:host::-webkit-credentials-auto-fill-button:hover,:host::-webkit-contacts-auto-fill-button:hover,:host::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}:host::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}:host::placeholder{color:var(--tui-text-03);opacity:0}:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"])::-ms-input-placeholder,:host :host-context(tui-text-area[data-mode=\"onDark\"])::-ms-input-placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"])::placeholder,:host :host-context(tui-text-area[data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::-ms-input-placeholder,:host :host-context(tui-text-area._focused:not(._readonly))::-ms-input-placeholder{opacity:1}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::placeholder,:host :host-context(tui-text-area._focused:not(._readonly))::placeholder{opacity:1}textarea:host{white-space:normal}textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
431
|
+
TuiTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTextfieldComponent, deps: [{ token: TUI_TEXTFIELD_HOST }, { token: TUI_TEXTFIELD_WATCHED_CONTROLLER$1 }, { token: ElementRef }, { token: TuiIdService }], target: i0.ɵɵFactoryTarget.Component });
|
|
432
|
+
TuiTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]", host: { attributes: { "type": "text" }, listeners: { "input": "host.onValueChange($event.target.value)" }, properties: { "attr.aria-placeholder": "controller.exampleText", "attr.aria-invalid": "host.invalid", "attr.disabled": "host.disabled || null", "tabIndex": "host.focusable ? 0 : -1", "readOnly": "host.readOnly", "value": "host.value", "id": "this.id" } }, providers: [TEXTFIELD_CONTROLLER_PROVIDER$1], ngImport: i0, template: ``, isInline: true, styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}:host:-webkit-autofill,:host:-webkit-autofill:hover,:host:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-mode=onDark] :host:-webkit-autofill,:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill,:host :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill,:host[data-mode=onDark] :host:-webkit-autofill:hover,:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:hover,:host :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:hover,:host[data-mode=onDark] :host:-webkit-autofill:focus,:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:focus,:host :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host[data-size=s] :host,:host :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled :host,:host :host-context(tui-primitive-textfield._disabled),:host :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.125rem}:host[data-size=m]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input:host,:host :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}:host::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-caps-lock-indicator{margin-top:-1.25rem}:host::-webkit-credentials-auto-fill-button,:host::-webkit-contacts-auto-fill-button,:host::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-credentials-auto-fill-button,:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-contacts-auto-fill-button,:host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)) :host::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}:host::-webkit-credentials-auto-fill-button:hover,:host::-webkit-contacts-auto-fill-button:hover,:host::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}:host::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}:host::placeholder{color:var(--tui-text-03);opacity:0}:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"])::-ms-input-placeholder,:host :host-context(tui-text-area[data-mode=\"onDark\"])::-ms-input-placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield[data-mode=\"onDark\"])::placeholder,:host :host-context(tui-text-area[data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::-ms-input-placeholder,:host :host-context(tui-text-area._focused:not(._readonly))::-ms-input-placeholder{opacity:1}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::placeholder,:host :host-context(tui-text-area._focused:not(._readonly))::placeholder{opacity:1}textarea:host{white-space:normal}textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
451
433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTextfieldComponent, decorators: [{
|
|
452
434
|
type: Component,
|
|
453
435
|
args: [{
|
|
454
436
|
selector: `input[tuiTextfield], textarea[tuiTextfield]`,
|
|
455
437
|
template: ``,
|
|
456
|
-
providers: [
|
|
457
|
-
TuiDescribedByDirective,
|
|
458
|
-
TUI_DESCRIBED_BY_PROVIDERS,
|
|
459
|
-
TEXTFIELD_CONTROLLER_PROVIDER$1,
|
|
460
|
-
],
|
|
438
|
+
providers: [TEXTFIELD_CONTROLLER_PROVIDER$1],
|
|
461
439
|
host: {
|
|
462
440
|
type: `text`,
|
|
463
441
|
'[attr.aria-placeholder]': `controller.exampleText`,
|
|
@@ -474,22 +452,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
474
452
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
475
453
|
type: Inject,
|
|
476
454
|
args: [TUI_TEXTFIELD_HOST]
|
|
477
|
-
}] }, { type: i1.TuiTextfieldController, decorators: [{
|
|
455
|
+
}] }, { type: i1$1.TuiTextfieldController, decorators: [{
|
|
478
456
|
type: Inject,
|
|
479
|
-
args: [TUI_TEXTFIELD_WATCHED_CONTROLLER]
|
|
457
|
+
args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1]
|
|
480
458
|
}] }, { type: i0.ElementRef, decorators: [{
|
|
481
459
|
type: Inject,
|
|
482
460
|
args: [ElementRef]
|
|
483
|
-
}] }, { type: i1.TuiDescribedByDirective, decorators: [{
|
|
484
|
-
type: Inject,
|
|
485
|
-
args: [TuiDescribedByDirective]
|
|
486
461
|
}] }, { type: i6.TuiIdService, decorators: [{
|
|
487
462
|
type: Inject,
|
|
488
463
|
args: [TuiIdService]
|
|
489
|
-
}] }]; }, propDecorators: {
|
|
490
|
-
type: HostBinding,
|
|
491
|
-
args: [`attr.aria-describedby`]
|
|
492
|
-
}], id: [{
|
|
464
|
+
}] }]; }, propDecorators: { id: [{
|
|
493
465
|
type: HostBinding,
|
|
494
466
|
args: [`id`]
|
|
495
467
|
}] } });
|
|
@@ -505,12 +477,10 @@ TuiPrimitiveTextfieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0
|
|
|
505
477
|
PolymorpheusModule,
|
|
506
478
|
TuiMaskAccessorModule,
|
|
507
479
|
TuiFocusableModule,
|
|
508
|
-
TuiInputModeModule,
|
|
509
480
|
TuiWrapperModule,
|
|
510
481
|
TuiSvgModule,
|
|
511
482
|
TuiTooltipModule,
|
|
512
|
-
TuiAutofilledModule,
|
|
513
|
-
TuiDescribedByModule], exports: [TuiPrimitiveTextfieldComponent,
|
|
483
|
+
TuiAutofilledModule], exports: [TuiPrimitiveTextfieldComponent,
|
|
514
484
|
TuiPrimitiveTextfieldDirective,
|
|
515
485
|
TuiTextfieldComponent] });
|
|
516
486
|
TuiPrimitiveTextfieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiPrimitiveTextfieldModule, imports: [[
|
|
@@ -519,12 +489,10 @@ TuiPrimitiveTextfieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0
|
|
|
519
489
|
PolymorpheusModule,
|
|
520
490
|
TuiMaskAccessorModule,
|
|
521
491
|
TuiFocusableModule,
|
|
522
|
-
TuiInputModeModule,
|
|
523
492
|
TuiWrapperModule,
|
|
524
493
|
TuiSvgModule,
|
|
525
494
|
TuiTooltipModule,
|
|
526
495
|
TuiAutofilledModule,
|
|
527
|
-
TuiDescribedByModule,
|
|
528
496
|
]] });
|
|
529
497
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiPrimitiveTextfieldModule, decorators: [{
|
|
530
498
|
type: NgModule,
|
|
@@ -535,12 +503,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
535
503
|
PolymorpheusModule,
|
|
536
504
|
TuiMaskAccessorModule,
|
|
537
505
|
TuiFocusableModule,
|
|
538
|
-
TuiInputModeModule,
|
|
539
506
|
TuiWrapperModule,
|
|
540
507
|
TuiSvgModule,
|
|
541
508
|
TuiTooltipModule,
|
|
542
509
|
TuiAutofilledModule,
|
|
543
|
-
TuiDescribedByModule,
|
|
544
510
|
],
|
|
545
511
|
declarations: [
|
|
546
512
|
TuiPrimitiveTextfieldComponent,
|