@taiga-ui/core 2.32.0 → 2.33.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-dropdown.d.ts +2 -1
- package/abstract/abstract-textfield-host.d.ts +13 -0
- package/abstract/index.d.ts +1 -0
- package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-core-abstract.umd.js +63 -0
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +5 -2
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +201 -42
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -6
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +2 -2
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.js +4 -12
- package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +3 -0
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js +2 -2
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
- package/components/loader/loader.directive.d.ts +3 -0
- package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
- package/components/primitive-textfield/index.d.ts +2 -0
- package/components/primitive-textfield/primitive-textfield.component.d.ts +12 -8
- package/components/primitive-textfield/primitive-textfield.directive.d.ts +8 -0
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/primitive-textfield/textfield/textfield.component.d.ts +15 -0
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -0
- package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
- package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/dropdown/taiga-ui-core-directives-dropdown.metadata.json +1 -1
- package/directives/index.d.ts +0 -1
- package/directives/taiga-ui-core-directives.metadata.json +1 -1
- package/esm2015/abstract/abstract-dropdown.js +12 -1
- package/esm2015/abstract/abstract-textfield-host.js +34 -0
- package/esm2015/abstract/index.js +2 -1
- package/esm2015/components/dialog/dialog.component.js +1 -1
- package/esm2015/components/dropdown-box/dropdown-box.component.js +1 -1
- package/esm2015/components/label/label.component.js +1 -1
- package/esm2015/components/loader/loader.component.js +1 -1
- package/esm2015/components/loader/loader.directive.js +5 -2
- package/esm2015/components/primitive-textfield/index.js +3 -1
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +54 -29
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +40 -0
- package/esm2015/components/primitive-textfield/primitive-textfield.module.js +15 -7
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +68 -0
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -5
- package/esm2015/components/theme-night/theme-night.component.js +1 -1
- package/esm2015/components/tooltip/tooltip.component.js +1 -1
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/dropdown/dropdown.directive.js +2 -7
- package/esm2015/directives/index.js +1 -2
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/interfaces/textfield-host.js +1 -0
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/textfield-host.js +3 -0
- package/esm2015/utils/format/format-number.js +2 -2
- package/esm5/abstract/abstract-dropdown.js +12 -1
- package/esm5/abstract/abstract-textfield-host.js +55 -0
- package/esm5/abstract/index.js +2 -1
- package/esm5/components/dialog/dialog.component.js +1 -1
- package/esm5/components/dropdown-box/dropdown-box.component.js +1 -1
- package/esm5/components/label/label.component.js +1 -1
- package/esm5/components/loader/loader.component.js +1 -1
- package/esm5/components/loader/loader.directive.js +5 -2
- package/esm5/components/primitive-textfield/index.js +3 -1
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +58 -33
- package/esm5/components/primitive-textfield/primitive-textfield.directive.js +49 -0
- package/esm5/components/primitive-textfield/primitive-textfield.module.js +15 -7
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +77 -0
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +16 -5
- package/esm5/components/theme-night/theme-night.component.js +1 -1
- package/esm5/components/tooltip/tooltip.component.js +1 -1
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/dropdown/dropdown.directive.js +2 -7
- package/esm5/directives/index.js +1 -2
- package/esm5/interfaces/index.js +1 -1
- package/esm5/interfaces/textfield-host.js +1 -0
- package/esm5/tokens/index.js +2 -1
- package/esm5/tokens/textfield-host.js +3 -0
- package/esm5/utils/format/format-number.js +2 -2
- package/fesm2015/taiga-ui-core-abstract.js +45 -4
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +5 -2
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +175 -40
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -6
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives.js +0 -1
- package/fesm2015/taiga-ui-core-directives.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +3 -1
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +66 -4
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm5/taiga-ui-core-components-label.js +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +5 -2
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +201 -44
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-theme-night.js +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +1 -1
- package/fesm5/taiga-ui-core-constants.js +1 -1
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown.js +1 -6
- package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-directives.js +0 -1
- package/fesm5/taiga-ui-core-directives.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +3 -1
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +1 -1
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/interfaces/index.d.ts +1 -0
- package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
- package/interfaces/textfield-host.d.ts +9 -0
- package/package.json +10 -9
- package/styles/markup/tui-island.less +1 -0
- package/styles/mixins/textfield.less +40 -27
- package/styles/mixins/textfield.scss +0 -9
- package/styles/theme/variables.less +2 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
- package/tokens/textfield-host.d.ts +3 -0
- package/bundles/taiga-ui-core-directives-border.umd.js +0 -291
- package/bundles/taiga-ui-core-directives-border.umd.js.map +0 -1
- package/bundles/taiga-ui-core-directives-border.umd.min.js +0 -16
- package/bundles/taiga-ui-core-directives-border.umd.min.js.map +0 -1
- package/directives/border/border.directive.d.ts +0 -9
- package/directives/border/border.module.d.ts +0 -2
- package/directives/border/index.d.ts +0 -2
- package/directives/border/package.json +0 -13
- package/directives/border/taiga-ui-core-directives-border.d.ts +0 -4
- package/directives/border/taiga-ui-core-directives-border.metadata.json +0 -1
- package/esm2015/directives/border/border.directive.js +0 -42
- package/esm2015/directives/border/border.module.js +0 -13
- package/esm2015/directives/border/index.js +0 -3
- package/esm2015/directives/border/taiga-ui-core-directives-border.js +0 -5
- package/esm5/directives/border/border.directive.js +0 -51
- package/esm5/directives/border/border.module.js +0 -16
- package/esm5/directives/border/index.js +0 -3
- package/esm5/directives/border/taiga-ui-core-directives-border.js +0 -5
- package/fesm2015/taiga-ui-core-directives-border.js +0 -57
- package/fesm2015/taiga-ui-core-directives-border.js.map +0 -1
- package/fesm5/taiga-ui-core-directives-border.js +0 -69
- package/fesm5/taiga-ui-core-directives-border.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { __extends, __decorate, __param } from 'tslib';
|
|
2
|
-
import { forwardRef, InjectionToken, EventEmitter, Inject, ViewChild, Input, HostBinding, Output, ContentChildren, Component, ChangeDetectionStrategy,
|
|
3
|
-
import { TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
2
|
+
import { forwardRef, InjectionToken, EventEmitter, Inject, ElementRef, ViewChild, Input, HostBinding, Output, ContentChildren, HostListener, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, isNativeFocusedIn, setNativeFocused, tuiDefaultProp, tuiPure, AbstractTuiInteractive, TuiIdService, TuiFocusableModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule, TuiPreventDefaultModule } from '@taiga-ui/cdk';
|
|
4
4
|
import { HINT_CONTROLLER_PROVIDER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/hint-controller';
|
|
5
5
|
import { TEXTFIELD_CONTROLLER_PROVIDER, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/textfield-controller';
|
|
6
|
-
import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE } from '@taiga-ui/core/tokens';
|
|
6
|
+
import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST } from '@taiga-ui/core/tokens';
|
|
7
7
|
import { getBorder } from '@taiga-ui/core/utils/miscellaneous';
|
|
8
8
|
import { PolymorpheusOutletComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
9
9
|
import { fromEvent, Observable, defer, EMPTY } from 'rxjs';
|
|
10
10
|
import { map, startWith, distinctUntilChanged } from 'rxjs/operators';
|
|
11
11
|
import { MODE_PROVIDER } from '@taiga-ui/core/providers';
|
|
12
|
+
import { TuiAbstractTextfieldHost } from '@taiga-ui/core/abstract';
|
|
12
13
|
import { CommonModule } from '@angular/common';
|
|
13
14
|
import { FormsModule } from '@angular/forms';
|
|
14
15
|
import { MutationObserverDirective, MutationObserverModule } from '@ng-web-apis/mutation-observer';
|
|
15
16
|
import { TuiSvgModule } from '@taiga-ui/core/components/svg';
|
|
16
17
|
import { TuiTooltipModule } from '@taiga-ui/core/components/tooltip';
|
|
17
18
|
import { TuiWrapperModule } from '@taiga-ui/core/components/wrapper';
|
|
18
|
-
import { TuiBorderModule } from '@taiga-ui/core/directives/border';
|
|
19
19
|
import { TuiDescribedByModule } from '@taiga-ui/core/directives/described-by';
|
|
20
20
|
import { TuiMaskAccessorModule } from '@taiga-ui/core/directives/mask-accessor';
|
|
21
|
-
import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1 } from '@taiga-ui/core/directives';
|
|
21
|
+
import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1, TuiDescribedByDirective, TUI_DESCRIBED_BY_PROVIDERS, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1 } from '@taiga-ui/core/directives';
|
|
22
22
|
|
|
23
23
|
var TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
|
|
24
24
|
{
|
|
@@ -45,13 +45,14 @@ var ICON_PADDING = 1.75;
|
|
|
45
45
|
var ICON_PADDING_S = 1.5;
|
|
46
46
|
var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
47
47
|
__extends(TuiPrimitiveTextfieldComponent, _super);
|
|
48
|
-
function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController, options) {
|
|
48
|
+
function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController, options, elementRef) {
|
|
49
49
|
var _this = _super.call(this) || this;
|
|
50
50
|
_this.mode$ = mode$;
|
|
51
51
|
_this.appearance = appearance;
|
|
52
52
|
_this.controller = controller;
|
|
53
53
|
_this.hintController = hintController;
|
|
54
54
|
_this.options = options;
|
|
55
|
+
_this.elementRef = elementRef;
|
|
55
56
|
_this.editable = true;
|
|
56
57
|
_this.filler = '';
|
|
57
58
|
_this.iconAlign = _this.options.iconAlign;
|
|
@@ -65,22 +66,29 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
65
66
|
_this.postfix = '';
|
|
66
67
|
_this.value = '';
|
|
67
68
|
_this.valueChange = new EventEmitter();
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated TODO: remove in 3.0
|
|
71
|
+
*/
|
|
68
72
|
_this.autofilledChange = new EventEmitter();
|
|
69
73
|
_this.autofilled = false;
|
|
70
74
|
return _this;
|
|
71
75
|
}
|
|
72
76
|
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "nativeFocusableElement", {
|
|
73
77
|
get: function () {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
if (this.computedDisabled || !this.focusableElement) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
// TODO: Refactor this after we drop built-in input element
|
|
82
|
+
return (this.focusableElement.nativeElement
|
|
83
|
+
.previousElementSibling ||
|
|
84
|
+
this.focusableElement.nativeElement);
|
|
77
85
|
},
|
|
78
86
|
enumerable: true,
|
|
79
87
|
configurable: true
|
|
80
88
|
});
|
|
81
89
|
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "focused", {
|
|
82
90
|
get: function () {
|
|
83
|
-
return
|
|
91
|
+
return isNativeFocusedIn(this.elementRef.nativeElement);
|
|
84
92
|
},
|
|
85
93
|
enumerable: true,
|
|
86
94
|
configurable: true
|
|
@@ -92,13 +100,6 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
92
100
|
enumerable: true,
|
|
93
101
|
configurable: true
|
|
94
102
|
});
|
|
95
|
-
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "labelOutside", {
|
|
96
|
-
get: function () {
|
|
97
|
-
return this.controller.labelOutside;
|
|
98
|
-
},
|
|
99
|
-
enumerable: true,
|
|
100
|
-
configurable: true
|
|
101
|
-
});
|
|
102
103
|
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", {
|
|
103
104
|
get: function () {
|
|
104
105
|
return !this.readOnly && !this.disabled && this.invalid;
|
|
@@ -145,7 +146,10 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
145
146
|
});
|
|
146
147
|
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasPlaceholder", {
|
|
147
148
|
get: function () {
|
|
148
|
-
var
|
|
149
|
+
var _a;
|
|
150
|
+
var hasDecor = this.controller.exampleText ||
|
|
151
|
+
this.prefix ||
|
|
152
|
+
this.postfix || ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
|
|
149
153
|
var showDecor = hasDecor && !this.readOnly && this.computedFocused;
|
|
150
154
|
var placeholderVisible = !this.hasValue && !showDecor;
|
|
151
155
|
return this.placeholderRaisable || placeholderVisible;
|
|
@@ -161,14 +165,14 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
161
165
|
enumerable: true,
|
|
162
166
|
configurable: true
|
|
163
167
|
});
|
|
164
|
-
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "
|
|
168
|
+
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderStart", {
|
|
165
169
|
get: function () {
|
|
166
170
|
return this.iconAlignLeft ? this.iconPaddingLeft : 0;
|
|
167
171
|
},
|
|
168
172
|
enumerable: true,
|
|
169
173
|
configurable: true
|
|
170
174
|
});
|
|
171
|
-
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "
|
|
175
|
+
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderEnd", {
|
|
172
176
|
get: function () {
|
|
173
177
|
return getBorder(this.iconAlignRight, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
|
|
174
178
|
},
|
|
@@ -199,6 +203,17 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
199
203
|
enumerable: true,
|
|
200
204
|
configurable: true
|
|
201
205
|
});
|
|
206
|
+
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedId", {
|
|
207
|
+
get: function () {
|
|
208
|
+
var _a;
|
|
209
|
+
return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
|
|
210
|
+
},
|
|
211
|
+
enumerable: true,
|
|
212
|
+
configurable: true
|
|
213
|
+
});
|
|
214
|
+
TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
|
|
215
|
+
this.updateFocused(focused);
|
|
216
|
+
};
|
|
202
217
|
TuiPrimitiveTextfieldComponent.prototype.getIndent$ = function (element) {
|
|
203
218
|
return fromEvent(element, 'scroll').pipe(map(function () { return -1 * element.scrollLeft; }));
|
|
204
219
|
};
|
|
@@ -209,12 +224,12 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
209
224
|
this.updateValue('');
|
|
210
225
|
};
|
|
211
226
|
TuiPrimitiveTextfieldComponent.prototype.onMouseDown = function (event) {
|
|
212
|
-
|
|
213
|
-
|
|
227
|
+
var nativeFocusableElement = this.nativeFocusableElement;
|
|
228
|
+
if (!nativeFocusableElement || event.target === nativeFocusableElement) {
|
|
214
229
|
return;
|
|
215
230
|
}
|
|
216
231
|
event.preventDefault();
|
|
217
|
-
setNativeFocused(
|
|
232
|
+
setNativeFocused(nativeFocusableElement);
|
|
218
233
|
};
|
|
219
234
|
TuiPrimitiveTextfieldComponent.prototype.onModelChange = function (value) {
|
|
220
235
|
this.updateValue(value);
|
|
@@ -222,9 +237,6 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
222
237
|
TuiPrimitiveTextfieldComponent.prototype.onHovered = function (hovered) {
|
|
223
238
|
this.updateHovered(hovered);
|
|
224
239
|
};
|
|
225
|
-
TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
|
|
226
|
-
this.updateFocused(focused);
|
|
227
|
-
};
|
|
228
240
|
TuiPrimitiveTextfieldComponent.prototype.onAutofilled = function (autofilled) {
|
|
229
241
|
this.updateAutofilled(autofilled);
|
|
230
242
|
};
|
|
@@ -237,7 +249,7 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
237
249
|
});
|
|
238
250
|
Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaisable", {
|
|
239
251
|
get: function () {
|
|
240
|
-
return this.size !== 's' && !this.labelOutside;
|
|
252
|
+
return this.size !== 's' && !this.controller.labelOutside;
|
|
241
253
|
},
|
|
242
254
|
enumerable: true,
|
|
243
255
|
configurable: true
|
|
@@ -265,7 +277,8 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
265
277
|
{ type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] },
|
|
266
278
|
{ type: TuiTextfieldController, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
|
|
267
279
|
{ type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] },
|
|
268
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] }
|
|
280
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] },
|
|
281
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
269
282
|
]; };
|
|
270
283
|
__decorate([
|
|
271
284
|
ViewChild('focusableElement')
|
|
@@ -325,38 +338,164 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
|
|
|
325
338
|
ContentChildren(PolymorpheusOutletComponent)
|
|
326
339
|
], TuiPrimitiveTextfieldComponent.prototype, "content", void 0);
|
|
327
340
|
__decorate([
|
|
328
|
-
HostBinding('attr.data-
|
|
341
|
+
HostBinding('attr.data-size')
|
|
329
342
|
], TuiPrimitiveTextfieldComponent.prototype, "size", null);
|
|
330
|
-
__decorate([
|
|
331
|
-
HostBinding('class._label-outside')
|
|
332
|
-
], TuiPrimitiveTextfieldComponent.prototype, "labelOutside", null);
|
|
333
343
|
__decorate([
|
|
334
344
|
HostBinding('class._invalid')
|
|
335
345
|
], TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", null);
|
|
346
|
+
__decorate([
|
|
347
|
+
HostBinding('class._hidden')
|
|
348
|
+
], TuiPrimitiveTextfieldComponent.prototype, "inputHidden", null);
|
|
349
|
+
__decorate([
|
|
350
|
+
HostBinding('style.--border-start.rem')
|
|
351
|
+
], TuiPrimitiveTextfieldComponent.prototype, "borderStart", null);
|
|
352
|
+
__decorate([
|
|
353
|
+
HostBinding('style.--border-end.rem')
|
|
354
|
+
], TuiPrimitiveTextfieldComponent.prototype, "borderEnd", null);
|
|
355
|
+
__decorate([
|
|
356
|
+
HostListener('focusin', ['true']),
|
|
357
|
+
HostListener('focusout', ['false'])
|
|
358
|
+
], TuiPrimitiveTextfieldComponent.prototype, "onFocused", null);
|
|
336
359
|
__decorate([
|
|
337
360
|
tuiPure
|
|
338
361
|
], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
|
|
339
362
|
TuiPrimitiveTextfieldComponent = __decorate([
|
|
340
363
|
Component({
|
|
341
364
|
selector: 'tui-primitive-textfield',
|
|
342
|
-
template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<tui-wrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiPreventDefault=\"click\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (
|
|
365
|
+
template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<tui-wrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiPreventDefault=\"click\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\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=\"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=\"input input_template\"\n >\n <ng-content select=\"[polymorpheus-outlet]\"></ng-content>\n </div>\n <div class=\"content\">\n <div\n *ngIf=\"iconAlignLeft\"\n polymorpheus-outlet\n class=\"icon icon_left\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <div class=\"wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"custom-content\"\n [content]=\"controller.customContent\"\n >\n <ng-template let-iconSrc>\n <tui-svg class=\"custom-icon\" [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"cleaner\"\n [content]=\"iconCleaner\"\n (click.stop)=\"clear()\"\n >\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\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 [mode]=\"hintController.mode\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconAlignRight\"\n polymorpheus-outlet\n class=\"icon\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n </div>\n</tui-wrapper>\n",
|
|
343
366
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
344
367
|
providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,
|
|
345
368
|
host: {
|
|
346
369
|
'($.data-mode.attr)': 'mode$',
|
|
347
370
|
'[class._autofilled]': 'autofilled',
|
|
371
|
+
'[class._label-outside]': 'controller.labelOutside',
|
|
348
372
|
},
|
|
349
|
-
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-
|
|
373
|
+
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-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-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-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-webkit-autofill:hover{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 1000px var(--tui-autofill) inset!important}.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .input:-webkit-autofill,:host[data-mode=onDark] .input:-webkit-autofill:focus,:host[data-mode=onDark] .input:-webkit-autofill:hover{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 1000px var(--tui-autofill-night) inset!important}.input :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host[data-size='s'] .input{padding:0 var(--tui-padding-s)}.input :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host[data-size='l'] .input{padding:0 var(--tui-padding-l)}.input :host-context(tui-primitive-textfield._disabled),:host._disabled .input{pointer-events:none}.input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .input{padding-top:1.25rem}.input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .input{padding-top:1.125rem}.input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.input :host-context(tui-primitive-textfield._hidden),:host._hidden input.input{opacity:0;text-indent:-10em;-webkit-user-select:none}.filler{vertical-align:middle}.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'] .content{padding:0 var(--tui-padding-s)}:host[data-size='l'] .content{padding:0 var(--tui-padding-l)}.content:after{content:'';margin-right:-.25rem}:host[data-size='m'] .content:after{display:none}.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}.placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);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%;font-size:.8125rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none}.placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-size='l']._focused._label-outside .placeholder,:host[data-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-size='l'] .placeholder{font-size:.9375rem}:host[data-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .placeholder,:host[data-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.placeholder{transition-property:transform,color,letter-spacing}}.cleaner{transition-duration:var(--tui-duration,300ms);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}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;align-items:center;justify-content:center;color:var(--tui-text-03)}.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'] .icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration{display:none}.custom-content{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.custom-icon{width:100%;height:100%}.icon{transition-duration:var(--tui-duration,300ms);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}.icon:hover{color:var(--tui-text-02)}:host._disabled .icon,:host._readonly .icon{pointer-events:none}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .icon:hover{color:var(--tui-text-01-night)}:host._hovered:not(._readonly) .icon{color:var(--tui-text-02)}:host[data-mode=onDark]._hovered:not(._readonly) .icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]._hovered:not(._readonly) .icon{color:var(--tui-text-01)}.input:not(:first-child){display:none}:host[data-size] .input_template{display:flex;width:100%;max-width:100%;align-items:center;pointer-events:none}.input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size='l']:not(._label-outside) .input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button,.input::-webkit-credentials-auto-fill-button,.input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size='l']:not(._label-outside) .input::-webkit-contacts-auto-fill-button,:host[data-size='l']:not(._label-outside) .input::-webkit-credentials-auto-fill-button,:host[data-size='l']:not(._label-outside) .input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button:hover,.input::-webkit-credentials-auto-fill-button:hover,.input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.input:-webkit-autofill,.input:-webkit-autofill::first-line{font-size:inherit;line-height:inherit}.text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
|
|
350
374
|
}),
|
|
351
375
|
__param(0, Inject(TUI_MODE)),
|
|
352
376
|
__param(1, Inject(TUI_TEXTFIELD_APPEARANCE)),
|
|
353
377
|
__param(2, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)),
|
|
354
378
|
__param(3, Inject(TUI_HINT_WATCHED_CONTROLLER)),
|
|
355
|
-
__param(4, Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS))
|
|
379
|
+
__param(4, Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)),
|
|
380
|
+
__param(5, Inject(ElementRef))
|
|
356
381
|
], TuiPrimitiveTextfieldComponent);
|
|
357
382
|
return TuiPrimitiveTextfieldComponent;
|
|
358
383
|
}(AbstractTuiInteractive));
|
|
359
384
|
|
|
385
|
+
var TuiPrimitiveTextfieldDirective = /** @class */ (function (_super) {
|
|
386
|
+
__extends(TuiPrimitiveTextfieldDirective, _super);
|
|
387
|
+
function TuiPrimitiveTextfieldDirective(textfield) {
|
|
388
|
+
var _this =
|
|
389
|
+
/**
|
|
390
|
+
* TuiPrimitiveTextfieldComponent satisfies all required parts of
|
|
391
|
+
* AbstractTuiControl interface. A new interface is not introduced
|
|
392
|
+
* so AbstractTuiControl is automatically injected for all other controls.
|
|
393
|
+
*/
|
|
394
|
+
_super.call(this, textfield) || this;
|
|
395
|
+
_this.textfield = textfield;
|
|
396
|
+
return _this;
|
|
397
|
+
}
|
|
398
|
+
TuiPrimitiveTextfieldDirective_1 = TuiPrimitiveTextfieldDirective;
|
|
399
|
+
Object.defineProperty(TuiPrimitiveTextfieldDirective.prototype, "readOnly", {
|
|
400
|
+
get: function () {
|
|
401
|
+
return this.textfield.readOnly || !this.textfield.editable;
|
|
402
|
+
},
|
|
403
|
+
enumerable: true,
|
|
404
|
+
configurable: true
|
|
405
|
+
});
|
|
406
|
+
TuiPrimitiveTextfieldDirective.prototype.onValueChange = function (value) {
|
|
407
|
+
this.textfield.onModelChange(value);
|
|
408
|
+
};
|
|
409
|
+
var TuiPrimitiveTextfieldDirective_1;
|
|
410
|
+
TuiPrimitiveTextfieldDirective.ctorParameters = function () { return [
|
|
411
|
+
{ type: TuiPrimitiveTextfieldComponent, decorators: [{ type: Inject, args: [TuiPrimitiveTextfieldComponent,] }] }
|
|
412
|
+
]; };
|
|
413
|
+
TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = __decorate([
|
|
414
|
+
Directive({
|
|
415
|
+
selector: 'tui-primitive-textfield',
|
|
416
|
+
providers: [
|
|
417
|
+
{
|
|
418
|
+
provide: TUI_TEXTFIELD_HOST,
|
|
419
|
+
useExisting: forwardRef(function () { return TuiPrimitiveTextfieldDirective_1; }),
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
}),
|
|
423
|
+
__param(0, Inject(TuiPrimitiveTextfieldComponent))
|
|
424
|
+
], TuiPrimitiveTextfieldDirective);
|
|
425
|
+
return TuiPrimitiveTextfieldDirective;
|
|
426
|
+
}(TuiAbstractTextfieldHost));
|
|
427
|
+
|
|
428
|
+
// @dynamic
|
|
429
|
+
var TuiTextfieldComponent = /** @class */ (function () {
|
|
430
|
+
function TuiTextfieldComponent(host, controller, elementRef, describedBy, idService) {
|
|
431
|
+
this.host = host;
|
|
432
|
+
this.controller = controller;
|
|
433
|
+
this.elementRef = elementRef;
|
|
434
|
+
this.describedBy = describedBy;
|
|
435
|
+
this.idService = idService;
|
|
436
|
+
this.host.process(this.elementRef.nativeElement);
|
|
437
|
+
}
|
|
438
|
+
Object.defineProperty(TuiTextfieldComponent.prototype, "computedDescribedBy", {
|
|
439
|
+
get: function () {
|
|
440
|
+
return this.describedBy.computedDescribedBy;
|
|
441
|
+
},
|
|
442
|
+
enumerable: true,
|
|
443
|
+
configurable: true
|
|
444
|
+
});
|
|
445
|
+
Object.defineProperty(TuiTextfieldComponent.prototype, "id", {
|
|
446
|
+
get: function () {
|
|
447
|
+
return this.elementRef.nativeElement.id || this.idService.generate();
|
|
448
|
+
},
|
|
449
|
+
enumerable: true,
|
|
450
|
+
configurable: true
|
|
451
|
+
});
|
|
452
|
+
TuiTextfieldComponent.prototype.ngDoCheck = function () {
|
|
453
|
+
this.describedBy.tuiDescribedBy = this.id;
|
|
454
|
+
};
|
|
455
|
+
TuiTextfieldComponent.ctorParameters = function () { return [
|
|
456
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_HOST,] }] },
|
|
457
|
+
{ type: TuiTextfieldController$1, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1,] }] },
|
|
458
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
459
|
+
{ type: TuiDescribedByDirective, decorators: [{ type: Inject, args: [TuiDescribedByDirective,] }] },
|
|
460
|
+
{ type: TuiIdService, decorators: [{ type: Inject, args: [TuiIdService,] }] }
|
|
461
|
+
]; };
|
|
462
|
+
__decorate([
|
|
463
|
+
HostBinding('attr.aria-describedby')
|
|
464
|
+
], TuiTextfieldComponent.prototype, "computedDescribedBy", null);
|
|
465
|
+
__decorate([
|
|
466
|
+
HostBinding('id')
|
|
467
|
+
], TuiTextfieldComponent.prototype, "id", null);
|
|
468
|
+
TuiTextfieldComponent = __decorate([
|
|
469
|
+
Component({
|
|
470
|
+
selector: 'input[tuiTextfield]',
|
|
471
|
+
template: '',
|
|
472
|
+
providers: [
|
|
473
|
+
TuiDescribedByDirective,
|
|
474
|
+
TUI_DESCRIBED_BY_PROVIDERS,
|
|
475
|
+
TEXTFIELD_CONTROLLER_PROVIDER$1,
|
|
476
|
+
],
|
|
477
|
+
host: {
|
|
478
|
+
type: 'text',
|
|
479
|
+
'[attr.aria-placeholder]': 'controller.exampleText',
|
|
480
|
+
'[attr.aria-invalid]': 'host.invalid',
|
|
481
|
+
'[attr.disabled]': 'host.disabled || null',
|
|
482
|
+
'[tabIndex]': 'host.focusable ? 0 : -1',
|
|
483
|
+
'[readOnly]': 'host.readOnly',
|
|
484
|
+
'[value]': 'host.value',
|
|
485
|
+
'(input)': 'host.onValueChange($event.target.value)',
|
|
486
|
+
},
|
|
487
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
488
|
+
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-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-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}:host:-webkit-autofill,:host:-webkit-autofill:focus,:host:-webkit-autofill:hover{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 1000px var(--tui-autofill) inset!important}:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] :host:-webkit-autofill,:host[data-mode=onDark] :host:-webkit-autofill:focus,:host[data-mode=onDark] :host:-webkit-autofill:hover{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 1000px var(--tui-autofill-night) inset!important}:host :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host[data-size='s'] :host{padding:0 var(--tui-padding-s)}:host :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host[data-size='l'] :host{padding:0 var(--tui-padding-l)}:host :host-context(tui-primitive-textfield._disabled),:host._disabled :host{pointer-events:none}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) :host{padding-top:1.25rem}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) :host{padding-top:1.125rem}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host :host-context(tui-primitive-textfield._hidden),:host._hidden input:host{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-contacts-auto-fill-button,:host::-webkit-credentials-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-contacts-auto-fill-button,: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-credit-card-auto-fill-button{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button:hover,:host::-webkit-credentials-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{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield[data-mode=onDark])::placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::-ms-input-placeholder{opacity:1}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::placeholder{opacity:1}"]
|
|
489
|
+
}),
|
|
490
|
+
__param(0, Inject(TUI_TEXTFIELD_HOST)),
|
|
491
|
+
__param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1)),
|
|
492
|
+
__param(2, Inject(ElementRef)),
|
|
493
|
+
__param(3, Inject(TuiDescribedByDirective)),
|
|
494
|
+
__param(4, Inject(TuiIdService))
|
|
495
|
+
], TuiTextfieldComponent);
|
|
496
|
+
return TuiTextfieldComponent;
|
|
497
|
+
}());
|
|
498
|
+
|
|
360
499
|
var TuiValueDecorationComponent = /** @class */ (function () {
|
|
361
500
|
function TuiValueDecorationComponent(textfield, controller) {
|
|
362
501
|
var _this = this;
|
|
@@ -380,9 +519,11 @@ var TuiValueDecorationComponent = /** @class */ (function () {
|
|
|
380
519
|
});
|
|
381
520
|
Object.defineProperty(TuiValueDecorationComponent.prototype, "filler", {
|
|
382
521
|
get: function () {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
522
|
+
var _a = this, focused = _a.focused, placeholder = _a.placeholder, exampleText = _a.exampleText, value = _a.value, textfield = _a.textfield;
|
|
523
|
+
if (focused && placeholder && exampleText) {
|
|
524
|
+
return '';
|
|
525
|
+
}
|
|
526
|
+
return focused ? exampleText || textfield.filler.slice(value.length) : '';
|
|
386
527
|
},
|
|
387
528
|
enumerable: true,
|
|
388
529
|
configurable: true
|
|
@@ -401,9 +542,18 @@ var TuiValueDecorationComponent = /** @class */ (function () {
|
|
|
401
542
|
enumerable: true,
|
|
402
543
|
configurable: true
|
|
403
544
|
});
|
|
545
|
+
Object.defineProperty(TuiValueDecorationComponent.prototype, "placeholder", {
|
|
546
|
+
get: function () {
|
|
547
|
+
var _a;
|
|
548
|
+
return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
|
|
549
|
+
},
|
|
550
|
+
enumerable: true,
|
|
551
|
+
configurable: true
|
|
552
|
+
});
|
|
404
553
|
Object.defineProperty(TuiValueDecorationComponent.prototype, "exampleText", {
|
|
405
554
|
get: function () {
|
|
406
|
-
|
|
555
|
+
var exampleText = this.controller.exampleText || this.placeholder;
|
|
556
|
+
return !this.value && this.focused ? exampleText : '';
|
|
407
557
|
},
|
|
408
558
|
enumerable: true,
|
|
409
559
|
configurable: true
|
|
@@ -468,7 +618,6 @@ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
|
|
|
468
618
|
FormsModule,
|
|
469
619
|
TuiMaskAccessorModule,
|
|
470
620
|
TuiFocusableModule,
|
|
471
|
-
TuiFocusedModule,
|
|
472
621
|
TuiHoveredModule,
|
|
473
622
|
TuiInputModeModule,
|
|
474
623
|
PolymorpheusModule,
|
|
@@ -478,11 +627,19 @@ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
|
|
|
478
627
|
TuiAutofilledModule,
|
|
479
628
|
TuiDescribedByModule,
|
|
480
629
|
TuiPreventDefaultModule,
|
|
481
|
-
TuiBorderModule,
|
|
482
630
|
MutationObserverModule,
|
|
483
631
|
],
|
|
484
|
-
declarations: [
|
|
485
|
-
|
|
632
|
+
declarations: [
|
|
633
|
+
TuiPrimitiveTextfieldComponent,
|
|
634
|
+
TuiPrimitiveTextfieldDirective,
|
|
635
|
+
TuiTextfieldComponent,
|
|
636
|
+
TuiValueDecorationComponent,
|
|
637
|
+
],
|
|
638
|
+
exports: [
|
|
639
|
+
TuiPrimitiveTextfieldComponent,
|
|
640
|
+
TuiPrimitiveTextfieldDirective,
|
|
641
|
+
TuiTextfieldComponent,
|
|
642
|
+
],
|
|
486
643
|
})
|
|
487
644
|
], TuiPrimitiveTextfieldModule);
|
|
488
645
|
return TuiPrimitiveTextfieldModule;
|
|
@@ -492,5 +649,5 @@ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
|
|
|
492
649
|
* Generated bundle index. Do not edit.
|
|
493
650
|
*/
|
|
494
651
|
|
|
495
|
-
export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldModule, TuiValueDecorationComponent };
|
|
652
|
+
export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent };
|
|
496
653
|
//# sourceMappingURL=taiga-ui-core-components-primitive-textfield.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield-options.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {InjectionToken} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiPrimitiveTextfieldOptions {\n readonly iconAlign: TuiHorizontalDirection;\n readonly iconCleaner: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';\n\n/** Default values for primitive textfield options */\nexport const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS: TuiPrimitiveTextfieldOptions = {\n iconAlign: 'right',\n iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,\n};\n\nexport const TUI_PRIMITIVE_TEXTFIELD_OPTIONS =\n new InjectionToken<TuiPrimitiveTextfieldOptions>(\n 'Default parameters for primitive textfield component',\n {\n factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,\n },\n );\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n setNativeFocused,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\nimport {\n TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n TuiPrimitiveTextfieldOptions,\n} from './primitive-textfield-options';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._autofilled]': 'autofilled',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiPrimitiveTextfieldOptions['iconAlign'] = this.options.iconAlign;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconCleaner: TuiPrimitiveTextfieldOptions['iconCleaner'] = this.options.iconCleaner;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n autofilled = false;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)\n readonly options: TuiPrimitiveTextfieldOptions,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor = this.controller.exampleText || this.prefix || this.postfix;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n get borderLeft(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n get borderRight(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n if (\n !this.focusableElement ||\n event.target === this.focusableElement.nativeElement\n ) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.focusableElement.nativeElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n return this.focused\n ? this.exampleText || this.textfield.filler.slice(this.value.length)\n : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get exampleText(): string {\n return !this.value && this.focused ? this.controller.exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiBorderModule} from '@taiga-ui/core/directives/border';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n TuiBorderModule,\n MutationObserverModule,\n ],\n declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],\n exports: [TuiPrimitiveTextfieldComponent],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQa,iCAAiC,GAAG;IAC7C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,8BAA8B,GAAA,CAAC;KAChE;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ACNjB;IACa,oCAAoC,GAAG,oBAAoB;AAExE;IACa,uCAAuC,GAAiC;IACjF,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,oCAAoC;EACnD;IAEW,+BAA+B,GACxC,IAAI,cAAc,CACd,sDAAsD,EACtD;IACI,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AO;;SACnD,CAAC;QAeO,WAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;QAEtC,WAAA,MAAM,CAACA,kCAAgC,CAAC,CAAA;OAhBpC,2BAA2B,CA4DvC;IAAD,kCAAC;CA5DD;;;ICmBA;KAA2C;IAA9B,2BAA2B;QAtBvC,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,WAAW;gBACX,qBAAqB;gBACrB,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,gBAAgB;gBAChB,mBAAmB;gBACnB,oBAAoB;gBACpB,uBAAuB;gBACvB,eAAe;gBACf,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;YAC3E,OAAO,EAAE,CAAC,8BAA8B,CAAC;SAC5C,CAAC;OACW,2BAA2B,CAAG;IAAD,kCAAC;CAA3C;;AC7CA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield-options.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.directive.ts","ng://@taiga-ui/core/components/primitive-textfield/textfield/textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {InjectionToken} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiPrimitiveTextfieldOptions {\n readonly iconAlign: TuiHorizontalDirection;\n readonly iconCleaner: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';\n\n/** Default values for primitive textfield options */\nexport const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS: TuiPrimitiveTextfieldOptions = {\n iconAlign: 'right',\n iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,\n};\n\nexport const TUI_PRIMITIVE_TEXTFIELD_OPTIONS =\n new InjectionToken<TuiPrimitiveTextfieldOptions>(\n 'Default parameters for primitive textfield component',\n {\n factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,\n },\n );\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocusedIn,\n setNativeFocused,\n TuiContextWithImplicit,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\nimport {\n TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n TuiPrimitiveTextfieldOptions,\n} from './primitive-textfield-options';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._autofilled]': 'autofilled',\n '[class._label-outside]': 'controller.labelOutside',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiPrimitiveTextfieldOptions['iconAlign'] = this.options.iconAlign;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>> | null =\n null;\n\n @Input()\n @tuiDefaultProp()\n iconCleaner: TuiPrimitiveTextfieldOptions['iconCleaner'] = this.options.iconCleaner;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n /**\n * @deprecated TODO: remove in 3.0\n */\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n autofilled = false;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)\n readonly options: TuiPrimitiveTextfieldOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n if (this.computedDisabled || !this.focusableElement) {\n return null;\n }\n\n // TODO: Refactor this after we drop built-in input element\n return (\n (this.focusableElement.nativeElement\n .previousElementSibling as HTMLInputElement | null) ||\n this.focusableElement.nativeElement\n );\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n @HostBinding('class._hidden')\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor =\n this.controller.exampleText ||\n this.prefix ||\n this.postfix ||\n this.nativeFocusableElement?.placeholder;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n @HostBinding('style.--border-start.rem')\n get borderStart(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n @HostBinding('style.--border-end.rem')\n get borderEnd(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n get computedId(): string {\n return this.nativeFocusableElement?.id || '';\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n const {nativeFocusableElement} = this;\n\n if (!nativeFocusableElement || event.target === nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(nativeFocusableElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.controller.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {Directive, forwardRef, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiAbstractTextfieldHost} from '@taiga-ui/core/abstract';\nimport {TUI_TEXTFIELD_HOST} from '@taiga-ui/core/tokens';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\n@Directive({\n selector: 'tui-primitive-textfield',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldDirective),\n },\n ],\n})\nexport class TuiPrimitiveTextfieldDirective extends TuiAbstractTextfieldHost<any> {\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n ) {\n /**\n * TuiPrimitiveTextfieldComponent satisfies all required parts of\n * AbstractTuiControl interface. A new interface is not introduced\n * so AbstractTuiControl is automatically injected for all other controls.\n */\n super(textfield as any as AbstractTuiControl<unknown>);\n }\n\n get readOnly(): boolean {\n return this.textfield.readOnly || !this.textfield.editable;\n }\n\n onValueChange(value: string) {\n this.textfield.onModelChange(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {TuiIdService} from '@taiga-ui/cdk';\nimport {\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_DESCRIBED_BY_PROVIDERS,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiDescribedByDirective,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\nimport {TUI_TEXTFIELD_HOST} from '@taiga-ui/core/tokens';\n\n// @dynamic\n@Component({\n selector: 'input[tuiTextfield]',\n template: '',\n providers: [\n TuiDescribedByDirective,\n TUI_DESCRIBED_BY_PROVIDERS,\n TEXTFIELD_CONTROLLER_PROVIDER,\n ],\n host: {\n type: 'text',\n '[attr.aria-placeholder]': 'controller.exampleText',\n '[attr.aria-invalid]': 'host.invalid',\n '[attr.disabled]': 'host.disabled || null',\n '[tabIndex]': 'host.focusable ? 0 : -1',\n '[readOnly]': 'host.readOnly',\n '[value]': 'host.value',\n '(input)': 'host.onValueChange($event.target.value)',\n },\n styleUrls: ['textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTextfieldComponent implements DoCheck {\n constructor(\n @Inject(TUI_TEXTFIELD_HOST) readonly host: TuiTextfieldHost,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiDescribedByDirective)\n private readonly describedBy: TuiDescribedByDirective,\n @Inject(TuiIdService)\n private readonly idService: TuiIdService,\n ) {\n this.host.process(this.elementRef.nativeElement);\n }\n\n @HostBinding('attr.aria-describedby')\n get computedDescribedBy(): string | null {\n return this.describedBy.computedDescribedBy;\n }\n\n @HostBinding('id')\n get id(): string {\n return this.elementRef.nativeElement.id || this.idService.generate();\n }\n\n ngDoCheck() {\n this.describedBy.tuiDescribedBy = this.id;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n const {focused, placeholder, exampleText, value, textfield} = this;\n\n if (focused && placeholder && exampleText) {\n return '';\n }\n\n return focused ? exampleText || textfield.filler.slice(value.length) : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get placeholder(): string {\n return this.textfield.nativeFocusableElement?.placeholder || '';\n }\n\n private get exampleText(): string {\n const exampleText = this.controller.exampleText || this.placeholder;\n\n return !this.value && this.focused ? exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiPrimitiveTextfieldDirective} from './primitive-textfield.directive';\nimport {TuiTextfieldComponent} from './textfield/textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n MutationObserverModule,\n ],\n declarations: [\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldDirective,\n TuiTextfieldComponent,\n TuiValueDecorationComponent,\n ],\n exports: [\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldDirective,\n TuiTextfieldComponent,\n ],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER","TEXTFIELD_CONTROLLER_PROVIDER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQa,iCAAiC,GAAG;IAC7C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,8BAA8B,GAAA,CAAC;KAChE;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ACNjB;IACa,oCAAoC,GAAG,oBAAoB;AAExE;IACa,uCAAuC,GAAiC;IACjF,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,oCAAoC;EACnD;IAEW,+BAA+B,GACxC,IAAI,cAAc,CACd,sDAAsD,EACtD;IACI,OAAO,EAAE,cAAM,OAAA,uCAAuC,GAAA;CACzD;;ACsBT,IAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,IAAM,cAAc,GAAG,GAAG,CAAC;;IAef,kDAAsB;IAmE9B,wCAC+B,KAAuC,EACvB,UAAkB,EAEpD,UAAkC,EAElC,cAA0C,EAE1C,OAAqC,EACT,UAAmC;QAT5E,YAWI,iBAAO,SACV;QAX8B,WAAK,GAAL,KAAK,CAAkC;QACvB,gBAAU,GAAV,UAAU,CAAQ;QAEpD,gBAAU,GAAV,UAAU,CAAwB;QAElC,oBAAc,GAAd,cAAc,CAA4B;QAE1C,aAAO,GAAP,OAAO,CAA8B;QACT,gBAAU,GAAV,UAAU,CAAyB;QApE5E,cAAQ,GAAG,IAAI,CAAC;QAIhB,YAAM,GAAG,EAAE,CAAC;QAIZ,eAAS,GAA8C,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC;;QAK9E,iBAAW,GACP,IAAI,CAAC;QAIT,iBAAW,GAAgD,KAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAKpF,cAAQ,GAA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