@taiga-ui/core 3.59.0 → 3.60.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.
Files changed (56) hide show
  1. package/bundles/taiga-ui-core-abstract.umd.js +671 -525
  2. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-alert.umd.js +152 -6
  4. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-button.umd.js +668 -522
  6. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-data-list.umd.js +819 -673
  8. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-dialog.umd.js +152 -6
  10. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +933 -787
  12. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +3 -4
  14. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +605 -459
  16. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +1175 -1029
  18. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-root.umd.js +605 -459
  20. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +152 -6
  22. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-svg.umd.js +152 -6
  24. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-theme-night.umd.js +520 -374
  26. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-tooltip.umd.js +595 -449
  28. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1506 -1360
  30. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-directives-hint.umd.js +1287 -1141
  32. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-directives-mode.umd.js +521 -375
  34. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-directives-number-format.umd.js +543 -397
  36. package/bundles/taiga-ui-core-directives-number-format.umd.js.map +1 -1
  37. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +152 -6
  38. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +530 -384
  40. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
  41. package/bundles/taiga-ui-core-services.umd.js +780 -634
  42. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-tokens.umd.js +152 -6
  44. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-utils-format.umd.js +152 -6
  46. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  47. package/bundles/taiga-ui-core-utils-mask.umd.js +152 -6
  48. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  49. package/components/primitive-calendar/primitive-calendar.component.d.ts +1 -1
  50. package/constants/cache-basting-payload.d.ts +1 -1
  51. package/esm2015/components/primitive-calendar/primitive-calendar.component.js +4 -4
  52. package/esm2015/components/root/root.component.js +1 -1
  53. package/fesm2015/taiga-ui-core-components-primitive-calendar.js +3 -3
  54. package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  55. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  56. package/package.json +5 -5
@@ -1,1050 +1,1196 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/directives/hint'), require('@taiga-ui/core/directives/textfield-controller'), require('@taiga-ui/core/utils/miscellaneous'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core/components/svg'), require('@taiga-ui/core/enums'), require('@taiga-ui/core/components/tooltip'), require('@angular/common'), require('@taiga-ui/core/directives/wrapper'), require('@taiga-ui/core/directives/mask-accessor'), require('@angular/forms'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/tokens'), require('@taiga-ui/core/directives')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/core/components/primitive-textfield', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/directives/hint', '@taiga-ui/core/directives/textfield-controller', '@taiga-ui/core/utils/miscellaneous', '@tinkoff/ng-polymorpheus', 'rxjs', 'rxjs/operators', '@taiga-ui/core/components/svg', '@taiga-ui/core/enums', '@taiga-ui/core/components/tooltip', '@angular/common', '@taiga-ui/core/directives/wrapper', '@taiga-ui/core/directives/mask-accessor', '@angular/forms', '@taiga-ui/core/abstract', '@taiga-ui/core/tokens', '@taiga-ui/core/directives'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.components = global["taiga-ui"].core.components || {}, global["taiga-ui"].core.components["primitive-textfield"] = {}), global.ng.core, global.i6, global["taiga-ui"].core.directives.hint, global["taiga-ui"].core.directives["textfield-controller"], global["taiga-ui"].core.utils.miscellaneous, global.i9, global.rxjs, global.rxjs.operators, global["taiga-ui"].core.components.svg, global["taiga-ui"].core.enums, global["taiga-ui"].core.components.tooltip, global.ng.common, global["taiga-ui"].core.directives.wrapper, global["taiga-ui"].core.directives["mask-accessor"], global.ng.forms, global["taiga-ui"].core.abstract, global["taiga-ui"].core.tokens, global["taiga-ui"].core.directives));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/directives/hint'), require('@taiga-ui/core/directives/textfield-controller'), require('@taiga-ui/core/utils/miscellaneous'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core/components/svg'), require('@taiga-ui/core/enums'), require('@taiga-ui/core/components/tooltip'), require('@angular/common'), require('@taiga-ui/core/directives/wrapper'), require('@taiga-ui/core/directives/mask-accessor'), require('@angular/forms'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/tokens'), require('@taiga-ui/core/directives')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/core/components/primitive-textfield', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/directives/hint', '@taiga-ui/core/directives/textfield-controller', '@taiga-ui/core/utils/miscellaneous', '@tinkoff/ng-polymorpheus', 'rxjs', 'rxjs/operators', '@taiga-ui/core/components/svg', '@taiga-ui/core/enums', '@taiga-ui/core/components/tooltip', '@angular/common', '@taiga-ui/core/directives/wrapper', '@taiga-ui/core/directives/mask-accessor', '@angular/forms', '@taiga-ui/core/abstract', '@taiga-ui/core/tokens', '@taiga-ui/core/directives'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.components = global["taiga-ui"].core.components || {}, global["taiga-ui"].core.components["primitive-textfield"] = {}), global.ng.core, global.i6, global["taiga-ui"].core.directives.hint, global["taiga-ui"].core.directives["textfield-controller"], global["taiga-ui"].core.utils.miscellaneous, global.i9, global.rxjs, global.rxjs.operators, global["taiga-ui"].core.components.svg, global["taiga-ui"].core.enums, global["taiga-ui"].core.components.tooltip, global.ng.common, global["taiga-ui"].core.directives.wrapper, global["taiga-ui"].core.directives["mask-accessor"], global.ng.forms, global["taiga-ui"].core.abstract, global["taiga-ui"].core.tokens, global["taiga-ui"].core.directives));
5
5
  })(this, (function (exports, i0, i6, i11, i10, miscellaneous, i9, rxjs, operators, i1, enums, i3, i4, i5, i7, i8, abstract, tokens, i1$1) { 'use strict';
6
6
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
20
18
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
19
+ });
23
20
  }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
- var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
28
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
29
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
30
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
34
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
35
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
36
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
28
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
29
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
30
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
34
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
35
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
36
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
37
37
 
38
- /*! *****************************************************************************
39
- Copyright (c) Microsoft Corporation.
38
+ /******************************************************************************
39
+ Copyright (c) Microsoft Corporation.
40
40
 
41
- Permission to use, copy, modify, and/or distribute this software for any
42
- purpose with or without fee is hereby granted.
41
+ Permission to use, copy, modify, and/or distribute this software for any
42
+ purpose with or without fee is hereby granted.
43
43
 
44
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
45
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
46
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
47
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
48
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
49
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50
- PERFORMANCE OF THIS SOFTWARE.
51
- ***************************************************************************** */
52
- /* global Reflect, Promise */
53
- var extendStatics = function (d, b) {
54
- extendStatics = Object.setPrototypeOf ||
55
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56
- function (d, b) { for (var p in b)
57
- if (Object.prototype.hasOwnProperty.call(b, p))
58
- d[p] = b[p]; };
59
- return extendStatics(d, b);
60
- };
61
- function __extends(d, b) {
62
- if (typeof b !== "function" && b !== null)
63
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
64
- extendStatics(d, b);
65
- function __() { this.constructor = d; }
66
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
67
- }
68
- var __assign = function () {
69
- __assign = Object.assign || function __assign(t) {
70
- for (var s, i = 1, n = arguments.length; i < n; i++) {
71
- s = arguments[i];
72
- for (var p in s)
73
- if (Object.prototype.hasOwnProperty.call(s, p))
74
- t[p] = s[p];
75
- }
76
- return t;
77
- };
78
- return __assign.apply(this, arguments);
79
- };
80
- function __rest(s, e) {
81
- var t = {};
82
- for (var p in s)
83
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84
- t[p] = s[p];
85
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
86
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
87
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
88
- t[p[i]] = s[p[i]];
89
- }
90
- return t;
91
- }
92
- function __decorate(decorators, target, key, desc) {
93
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
94
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
95
- r = Reflect.decorate(decorators, target, key, desc);
96
- else
97
- for (var i = decorators.length - 1; i >= 0; i--)
98
- if (d = decorators[i])
99
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
100
- return c > 3 && r && Object.defineProperty(target, key, r), r;
101
- }
102
- function __param(paramIndex, decorator) {
103
- return function (target, key) { decorator(target, key, paramIndex); };
104
- }
105
- function __metadata(metadataKey, metadataValue) {
106
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
107
- return Reflect.metadata(metadataKey, metadataValue);
108
- }
109
- function __awaiter(thisArg, _arguments, P, generator) {
110
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
111
- return new (P || (P = Promise))(function (resolve, reject) {
112
- function fulfilled(value) { try {
113
- step(generator.next(value));
114
- }
115
- catch (e) {
116
- reject(e);
117
- } }
118
- function rejected(value) { try {
119
- step(generator["throw"](value));
120
- }
121
- catch (e) {
122
- reject(e);
123
- } }
124
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
125
- step((generator = generator.apply(thisArg, _arguments || [])).next());
126
- });
127
- }
128
- function __generator(thisArg, body) {
129
- var _ = { label: 0, sent: function () { if (t[0] & 1)
130
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
131
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
132
- function verb(n) { return function (v) { return step([n, v]); }; }
133
- function step(op) {
134
- if (f)
135
- throw new TypeError("Generator is already executing.");
136
- while (_)
137
- try {
138
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
139
- return t;
140
- if (y = 0, t)
141
- op = [op[0] & 2, t.value];
142
- switch (op[0]) {
143
- case 0:
144
- case 1:
145
- t = op;
146
- break;
147
- case 4:
148
- _.label++;
149
- return { value: op[1], done: false };
150
- case 5:
151
- _.label++;
152
- y = op[1];
153
- op = [0];
154
- continue;
155
- case 7:
156
- op = _.ops.pop();
157
- _.trys.pop();
158
- continue;
159
- default:
160
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
161
- _ = 0;
162
- continue;
163
- }
164
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
165
- _.label = op[1];
166
- break;
167
- }
168
- if (op[0] === 6 && _.label < t[1]) {
169
- _.label = t[1];
170
- t = op;
171
- break;
172
- }
173
- if (t && _.label < t[2]) {
174
- _.label = t[2];
175
- _.ops.push(op);
176
- break;
177
- }
178
- if (t[2])
179
- _.ops.pop();
180
- _.trys.pop();
181
- continue;
182
- }
183
- op = body.call(thisArg, _);
184
- }
185
- catch (e) {
186
- op = [6, e];
187
- y = 0;
188
- }
189
- finally {
190
- f = t = 0;
191
- }
192
- if (op[0] & 5)
193
- throw op[1];
194
- return { value: op[0] ? op[1] : void 0, done: true };
195
- }
196
- }
197
- var __createBinding = Object.create ? (function (o, m, k, k2) {
198
- if (k2 === undefined)
199
- k2 = k;
200
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
201
- }) : (function (o, m, k, k2) {
202
- if (k2 === undefined)
203
- k2 = k;
204
- o[k2] = m[k];
205
- });
206
- function __exportStar(m, o) {
207
- for (var p in m)
208
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
209
- __createBinding(o, m, p);
210
- }
211
- function __values(o) {
212
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
213
- if (m)
214
- return m.call(o);
215
- if (o && typeof o.length === "number")
216
- return {
217
- next: function () {
218
- if (o && i >= o.length)
219
- o = void 0;
220
- return { value: o && o[i++], done: !o };
221
- }
222
- };
223
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
224
- }
225
- function __read(o, n) {
226
- var m = typeof Symbol === "function" && o[Symbol.iterator];
227
- if (!m)
228
- return o;
229
- var i = m.call(o), r, ar = [], e;
230
- try {
231
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
232
- ar.push(r.value);
233
- }
234
- catch (error) {
235
- e = { error: error };
236
- }
237
- finally {
238
- try {
239
- if (r && !r.done && (m = i["return"]))
240
- m.call(i);
241
- }
242
- finally {
243
- if (e)
244
- throw e.error;
245
- }
246
- }
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spread() {
251
- for (var ar = [], i = 0; i < arguments.length; i++)
252
- ar = ar.concat(__read(arguments[i]));
253
- return ar;
254
- }
255
- /** @deprecated */
256
- function __spreadArrays() {
257
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
258
- s += arguments[i].length;
259
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
260
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
261
- r[k] = a[j];
262
- return r;
263
- }
264
- function __spreadArray(to, from, pack) {
265
- if (pack || arguments.length === 2)
266
- for (var i = 0, l = from.length, ar; i < l; i++) {
267
- if (ar || !(i in from)) {
268
- if (!ar)
269
- ar = Array.prototype.slice.call(from, 0, i);
270
- ar[i] = from[i];
271
- }
272
- }
273
- return to.concat(ar || from);
274
- }
275
- function __await(v) {
276
- return this instanceof __await ? (this.v = v, this) : new __await(v);
277
- }
278
- function __asyncGenerator(thisArg, _arguments, generator) {
279
- if (!Symbol.asyncIterator)
280
- throw new TypeError("Symbol.asyncIterator is not defined.");
281
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
282
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
283
- function verb(n) { if (g[n])
284
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
285
- function resume(n, v) { try {
286
- step(g[n](v));
287
- }
288
- catch (e) {
289
- settle(q[0][3], e);
290
- } }
291
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
292
- function fulfill(value) { resume("next", value); }
293
- function reject(value) { resume("throw", value); }
294
- function settle(f, v) { if (f(v), q.shift(), q.length)
295
- resume(q[0][0], q[0][1]); }
296
- }
297
- function __asyncDelegator(o) {
298
- var i, p;
299
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
300
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
301
- }
302
- function __asyncValues(o) {
303
- if (!Symbol.asyncIterator)
304
- throw new TypeError("Symbol.asyncIterator is not defined.");
305
- var m = o[Symbol.asyncIterator], i;
306
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
307
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
308
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
309
- }
310
- function __makeTemplateObject(cooked, raw) {
311
- if (Object.defineProperty) {
312
- Object.defineProperty(cooked, "raw", { value: raw });
313
- }
314
- else {
315
- cooked.raw = raw;
316
- }
317
- return cooked;
318
- }
319
- ;
320
- var __setModuleDefault = Object.create ? (function (o, v) {
321
- Object.defineProperty(o, "default", { enumerable: true, value: v });
322
- }) : function (o, v) {
323
- o["default"] = v;
324
- };
325
- function __importStar(mod) {
326
- if (mod && mod.__esModule)
327
- return mod;
328
- var result = {};
329
- if (mod != null)
330
- for (var k in mod)
331
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
332
- __createBinding(result, mod, k);
333
- __setModuleDefault(result, mod);
334
- return result;
335
- }
336
- function __importDefault(mod) {
337
- return (mod && mod.__esModule) ? mod : { default: mod };
338
- }
339
- function __classPrivateFieldGet(receiver, state, kind, f) {
340
- if (kind === "a" && !f)
341
- throw new TypeError("Private accessor was defined without a getter");
342
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
343
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
344
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
345
- }
346
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
347
- if (kind === "m")
348
- throw new TypeError("Private method is not writable");
349
- if (kind === "a" && !f)
350
- throw new TypeError("Private accessor was defined without a setter");
351
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
352
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
353
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
354
- }
44
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
45
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
46
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
47
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
48
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
49
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50
+ PERFORMANCE OF THIS SOFTWARE.
51
+ ***************************************************************************** */
52
+ /* global Reflect, Promise, SuppressedError, Symbol */
53
+ var extendStatics = function (d, b) {
54
+ extendStatics = Object.setPrototypeOf ||
55
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56
+ function (d, b) { for (var p in b)
57
+ if (Object.prototype.hasOwnProperty.call(b, p))
58
+ d[p] = b[p]; };
59
+ return extendStatics(d, b);
60
+ };
61
+ function __extends(d, b) {
62
+ if (typeof b !== "function" && b !== null)
63
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
64
+ extendStatics(d, b);
65
+ function __() { this.constructor = d; }
66
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
67
+ }
68
+ var __assign = function () {
69
+ __assign = Object.assign || function __assign(t) {
70
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
71
+ s = arguments[i];
72
+ for (var p in s)
73
+ if (Object.prototype.hasOwnProperty.call(s, p))
74
+ t[p] = s[p];
75
+ }
76
+ return t;
77
+ };
78
+ return __assign.apply(this, arguments);
79
+ };
80
+ function __rest(s, e) {
81
+ var t = {};
82
+ for (var p in s)
83
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84
+ t[p] = s[p];
85
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
86
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
87
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
88
+ t[p[i]] = s[p[i]];
89
+ }
90
+ return t;
91
+ }
92
+ function __decorate(decorators, target, key, desc) {
93
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
94
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
95
+ r = Reflect.decorate(decorators, target, key, desc);
96
+ else
97
+ for (var i = decorators.length - 1; i >= 0; i--)
98
+ if (d = decorators[i])
99
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
100
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
101
+ }
102
+ function __param(paramIndex, decorator) {
103
+ return function (target, key) { decorator(target, key, paramIndex); };
104
+ }
105
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
106
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
107
+ throw new TypeError("Function expected"); return f; }
108
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
109
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
110
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
111
+ var _, done = false;
112
+ for (var i = decorators.length - 1; i >= 0; i--) {
113
+ var context = {};
114
+ for (var p in contextIn)
115
+ context[p] = p === "access" ? {} : contextIn[p];
116
+ for (var p in contextIn.access)
117
+ context.access[p] = contextIn.access[p];
118
+ context.addInitializer = function (f) { if (done)
119
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
120
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
121
+ if (kind === "accessor") {
122
+ if (result === void 0)
123
+ continue;
124
+ if (result === null || typeof result !== "object")
125
+ throw new TypeError("Object expected");
126
+ if (_ = accept(result.get))
127
+ descriptor.get = _;
128
+ if (_ = accept(result.set))
129
+ descriptor.set = _;
130
+ if (_ = accept(result.init))
131
+ initializers.unshift(_);
132
+ }
133
+ else if (_ = accept(result)) {
134
+ if (kind === "field")
135
+ initializers.unshift(_);
136
+ else
137
+ descriptor[key] = _;
138
+ }
139
+ }
140
+ if (target)
141
+ Object.defineProperty(target, contextIn.name, descriptor);
142
+ done = true;
143
+ }
144
+ ;
145
+ function __runInitializers(thisArg, initializers, value) {
146
+ var useValue = arguments.length > 2;
147
+ for (var i = 0; i < initializers.length; i++) {
148
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
149
+ }
150
+ return useValue ? value : void 0;
151
+ }
152
+ ;
153
+ function __propKey(x) {
154
+ return typeof x === "symbol" ? x : "".concat(x);
155
+ }
156
+ ;
157
+ function __setFunctionName(f, name, prefix) {
158
+ if (typeof name === "symbol")
159
+ name = name.description ? "[".concat(name.description, "]") : "";
160
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
161
+ }
162
+ ;
163
+ function __metadata(metadataKey, metadataValue) {
164
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
165
+ return Reflect.metadata(metadataKey, metadataValue);
166
+ }
167
+ function __awaiter(thisArg, _arguments, P, generator) {
168
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
169
+ return new (P || (P = Promise))(function (resolve, reject) {
170
+ function fulfilled(value) { try {
171
+ step(generator.next(value));
172
+ }
173
+ catch (e) {
174
+ reject(e);
175
+ } }
176
+ function rejected(value) { try {
177
+ step(generator["throw"](value));
178
+ }
179
+ catch (e) {
180
+ reject(e);
181
+ } }
182
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
183
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
184
+ });
185
+ }
186
+ function __generator(thisArg, body) {
187
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
188
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
189
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
190
+ function verb(n) { return function (v) { return step([n, v]); }; }
191
+ function step(op) {
192
+ if (f)
193
+ throw new TypeError("Generator is already executing.");
194
+ while (g && (g = 0, op[0] && (_ = 0)), _)
195
+ try {
196
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
197
+ return t;
198
+ if (y = 0, t)
199
+ op = [op[0] & 2, t.value];
200
+ switch (op[0]) {
201
+ case 0:
202
+ case 1:
203
+ t = op;
204
+ break;
205
+ case 4:
206
+ _.label++;
207
+ return { value: op[1], done: false };
208
+ case 5:
209
+ _.label++;
210
+ y = op[1];
211
+ op = [0];
212
+ continue;
213
+ case 7:
214
+ op = _.ops.pop();
215
+ _.trys.pop();
216
+ continue;
217
+ default:
218
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
219
+ _ = 0;
220
+ continue;
221
+ }
222
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
223
+ _.label = op[1];
224
+ break;
225
+ }
226
+ if (op[0] === 6 && _.label < t[1]) {
227
+ _.label = t[1];
228
+ t = op;
229
+ break;
230
+ }
231
+ if (t && _.label < t[2]) {
232
+ _.label = t[2];
233
+ _.ops.push(op);
234
+ break;
235
+ }
236
+ if (t[2])
237
+ _.ops.pop();
238
+ _.trys.pop();
239
+ continue;
240
+ }
241
+ op = body.call(thisArg, _);
242
+ }
243
+ catch (e) {
244
+ op = [6, e];
245
+ y = 0;
246
+ }
247
+ finally {
248
+ f = t = 0;
249
+ }
250
+ if (op[0] & 5)
251
+ throw op[1];
252
+ return { value: op[0] ? op[1] : void 0, done: true };
253
+ }
254
+ }
255
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
256
+ if (k2 === undefined)
257
+ k2 = k;
258
+ var desc = Object.getOwnPropertyDescriptor(m, k);
259
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
260
+ desc = { enumerable: true, get: function () { return m[k]; } };
261
+ }
262
+ Object.defineProperty(o, k2, desc);
263
+ }) : (function (o, m, k, k2) {
264
+ if (k2 === undefined)
265
+ k2 = k;
266
+ o[k2] = m[k];
267
+ });
268
+ function __exportStar(m, o) {
269
+ for (var p in m)
270
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
271
+ __createBinding(o, m, p);
272
+ }
273
+ function __values(o) {
274
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
275
+ if (m)
276
+ return m.call(o);
277
+ if (o && typeof o.length === "number")
278
+ return {
279
+ next: function () {
280
+ if (o && i >= o.length)
281
+ o = void 0;
282
+ return { value: o && o[i++], done: !o };
283
+ }
284
+ };
285
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
286
+ }
287
+ function __read(o, n) {
288
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
289
+ if (!m)
290
+ return o;
291
+ var i = m.call(o), r, ar = [], e;
292
+ try {
293
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
294
+ ar.push(r.value);
295
+ }
296
+ catch (error) {
297
+ e = { error: error };
298
+ }
299
+ finally {
300
+ try {
301
+ if (r && !r.done && (m = i["return"]))
302
+ m.call(i);
303
+ }
304
+ finally {
305
+ if (e)
306
+ throw e.error;
307
+ }
308
+ }
309
+ return ar;
310
+ }
311
+ /** @deprecated */
312
+ function __spread() {
313
+ for (var ar = [], i = 0; i < arguments.length; i++)
314
+ ar = ar.concat(__read(arguments[i]));
315
+ return ar;
316
+ }
317
+ /** @deprecated */
318
+ function __spreadArrays() {
319
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
320
+ s += arguments[i].length;
321
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
322
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
323
+ r[k] = a[j];
324
+ return r;
325
+ }
326
+ function __spreadArray(to, from, pack) {
327
+ if (pack || arguments.length === 2)
328
+ for (var i = 0, l = from.length, ar; i < l; i++) {
329
+ if (ar || !(i in from)) {
330
+ if (!ar)
331
+ ar = Array.prototype.slice.call(from, 0, i);
332
+ ar[i] = from[i];
333
+ }
334
+ }
335
+ return to.concat(ar || Array.prototype.slice.call(from));
336
+ }
337
+ function __await(v) {
338
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
339
+ }
340
+ function __asyncGenerator(thisArg, _arguments, generator) {
341
+ if (!Symbol.asyncIterator)
342
+ throw new TypeError("Symbol.asyncIterator is not defined.");
343
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
344
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
345
+ function verb(n) { if (g[n])
346
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
347
+ function resume(n, v) { try {
348
+ step(g[n](v));
349
+ }
350
+ catch (e) {
351
+ settle(q[0][3], e);
352
+ } }
353
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
354
+ function fulfill(value) { resume("next", value); }
355
+ function reject(value) { resume("throw", value); }
356
+ function settle(f, v) { if (f(v), q.shift(), q.length)
357
+ resume(q[0][0], q[0][1]); }
358
+ }
359
+ function __asyncDelegator(o) {
360
+ var i, p;
361
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
362
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
363
+ }
364
+ function __asyncValues(o) {
365
+ if (!Symbol.asyncIterator)
366
+ throw new TypeError("Symbol.asyncIterator is not defined.");
367
+ var m = o[Symbol.asyncIterator], i;
368
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
369
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
370
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
371
+ }
372
+ function __makeTemplateObject(cooked, raw) {
373
+ if (Object.defineProperty) {
374
+ Object.defineProperty(cooked, "raw", { value: raw });
375
+ }
376
+ else {
377
+ cooked.raw = raw;
378
+ }
379
+ return cooked;
380
+ }
381
+ ;
382
+ var __setModuleDefault = Object.create ? (function (o, v) {
383
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
384
+ }) : function (o, v) {
385
+ o["default"] = v;
386
+ };
387
+ function __importStar(mod) {
388
+ if (mod && mod.__esModule)
389
+ return mod;
390
+ var result = {};
391
+ if (mod != null)
392
+ for (var k in mod)
393
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
394
+ __createBinding(result, mod, k);
395
+ __setModuleDefault(result, mod);
396
+ return result;
397
+ }
398
+ function __importDefault(mod) {
399
+ return (mod && mod.__esModule) ? mod : { default: mod };
400
+ }
401
+ function __classPrivateFieldGet(receiver, state, kind, f) {
402
+ if (kind === "a" && !f)
403
+ throw new TypeError("Private accessor was defined without a getter");
404
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
405
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
406
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
407
+ }
408
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
409
+ if (kind === "m")
410
+ throw new TypeError("Private method is not writable");
411
+ if (kind === "a" && !f)
412
+ throw new TypeError("Private accessor was defined without a setter");
413
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
414
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
415
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
416
+ }
417
+ function __classPrivateFieldIn(state, receiver) {
418
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
419
+ throw new TypeError("Cannot use 'in' operator on non-object");
420
+ return typeof state === "function" ? receiver === state : state.has(receiver);
421
+ }
422
+ function __addDisposableResource(env, value, async) {
423
+ if (value !== null && value !== void 0) {
424
+ if (typeof value !== "object" && typeof value !== "function")
425
+ throw new TypeError("Object expected.");
426
+ var dispose;
427
+ if (async) {
428
+ if (!Symbol.asyncDispose)
429
+ throw new TypeError("Symbol.asyncDispose is not defined.");
430
+ dispose = value[Symbol.asyncDispose];
431
+ }
432
+ if (dispose === void 0) {
433
+ if (!Symbol.dispose)
434
+ throw new TypeError("Symbol.dispose is not defined.");
435
+ dispose = value[Symbol.dispose];
436
+ }
437
+ if (typeof dispose !== "function")
438
+ throw new TypeError("Object not disposable.");
439
+ env.stack.push({ value: value, dispose: dispose, async: async });
440
+ }
441
+ else if (async) {
442
+ env.stack.push({ async: true });
443
+ }
444
+ return value;
445
+ }
446
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
447
+ var e = new Error(message);
448
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
449
+ };
450
+ function __disposeResources(env) {
451
+ function fail(e) {
452
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
453
+ env.hasError = true;
454
+ }
455
+ function next() {
456
+ while (env.stack.length) {
457
+ var rec = env.stack.pop();
458
+ try {
459
+ var result = rec.dispose && rec.dispose.call(rec.value);
460
+ if (rec.async)
461
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
462
+ }
463
+ catch (e) {
464
+ fail(e);
465
+ }
466
+ }
467
+ if (env.hasError)
468
+ throw env.error;
469
+ }
470
+ return next();
471
+ }
472
+ var tslib_es6 = {
473
+ __extends: __extends,
474
+ __assign: __assign,
475
+ __rest: __rest,
476
+ __decorate: __decorate,
477
+ __param: __param,
478
+ __metadata: __metadata,
479
+ __awaiter: __awaiter,
480
+ __generator: __generator,
481
+ __createBinding: __createBinding,
482
+ __exportStar: __exportStar,
483
+ __values: __values,
484
+ __read: __read,
485
+ __spread: __spread,
486
+ __spreadArrays: __spreadArrays,
487
+ __spreadArray: __spreadArray,
488
+ __await: __await,
489
+ __asyncGenerator: __asyncGenerator,
490
+ __asyncDelegator: __asyncDelegator,
491
+ __asyncValues: __asyncValues,
492
+ __makeTemplateObject: __makeTemplateObject,
493
+ __importStar: __importStar,
494
+ __importDefault: __importDefault,
495
+ __classPrivateFieldGet: __classPrivateFieldGet,
496
+ __classPrivateFieldSet: __classPrivateFieldSet,
497
+ __classPrivateFieldIn: __classPrivateFieldIn,
498
+ __addDisposableResource: __addDisposableResource,
499
+ __disposeResources: __disposeResources,
500
+ };
355
501
 
356
- var TuiValueDecorationComponent = /** @class */ (function () {
357
- function TuiValueDecorationComponent(textfield, fontsReady$) {
358
- var _this = this;
359
- this.textfield = textfield;
360
- this.fontsReady$ = fontsReady$;
361
- this.prefix$ = new rxjs.BehaviorSubject('');
362
- this.pre$ = rxjs.merge(this.fontsReady$, this.prefix$).pipe(operators.delay(0), operators.filter(function () { var _a; return !!((_a = _this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.isConnected); }), operators.map(function () { var _a; return ((_a = _this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 0; }), operators.distinctUntilChanged());
363
- }
364
- Object.defineProperty(TuiValueDecorationComponent.prototype, "isContextTable", {
365
- get: function () {
366
- return this.textfield.appearance === enums.TuiAppearance.Table;
367
- },
368
- enumerable: false,
369
- configurable: true
370
- });
371
- Object.defineProperty(TuiValueDecorationComponent.prototype, "value", {
372
- get: function () {
373
- return this.textfield.value;
374
- },
375
- enumerable: false,
376
- configurable: true
377
- });
378
- Object.defineProperty(TuiValueDecorationComponent.prototype, "filler", {
379
- get: function () {
380
- var _b = this, focused = _b.focused, placeholder = _b.placeholder, exampleText = _b.exampleText, value = _b.value, textfield = _b.textfield;
381
- if (placeholder && exampleText) {
382
- return '';
383
- }
384
- return focused ? exampleText || textfield.filler.slice(value.length) : '';
385
- },
386
- enumerable: false,
387
- configurable: true
388
- });
389
- Object.defineProperty(TuiValueDecorationComponent.prototype, "prefix", {
390
- get: function () {
391
- return this.decorationsVisible ? this.textfield.prefix : '';
392
- },
393
- enumerable: false,
394
- configurable: true
395
- });
396
- Object.defineProperty(TuiValueDecorationComponent.prototype, "postfix", {
397
- get: function () {
398
- return this.decorationsVisible ? this.computedPostfix : '';
399
- },
400
- enumerable: false,
401
- configurable: true
402
- });
403
- TuiValueDecorationComponent.prototype.ngDoCheck = function () {
404
- this.prefix$.next(this.prefix);
405
- };
406
- Object.defineProperty(TuiValueDecorationComponent.prototype, "placeholder", {
407
- get: function () {
408
- var _a;
409
- return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
410
- },
411
- enumerable: false,
412
- configurable: true
413
- });
414
- Object.defineProperty(TuiValueDecorationComponent.prototype, "exampleText", {
415
- get: function () {
416
- return !this.value && this.focused ? this.placeholder : '';
417
- },
418
- enumerable: false,
419
- configurable: true
420
- });
421
- Object.defineProperty(TuiValueDecorationComponent.prototype, "decorationsVisible", {
422
- get: function () {
423
- return !!this.value || (this.focused && !this.placeholder);
424
- },
425
- enumerable: false,
426
- configurable: true
427
- });
428
- Object.defineProperty(TuiValueDecorationComponent.prototype, "focused", {
429
- get: function () {
430
- return this.textfield.computedFocused && !this.textfield.readOnly;
431
- },
432
- enumerable: false,
433
- configurable: true
434
- });
435
- Object.defineProperty(TuiValueDecorationComponent.prototype, "computedPostfix", {
436
- get: function () {
437
- return this.textfield.postfix && (this.filler || this.value)
438
- ? " " + this.textfield.postfix
439
- : this.textfield.postfix;
440
- },
441
- enumerable: false,
442
- configurable: true
443
- });
444
- return TuiValueDecorationComponent;
445
- }());
446
- TuiValueDecorationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiValueDecorationComponent, deps: [{ token: i6.TUI_FOCUSABLE_ITEM_ACCESSOR }, { token: i6.TUI_FONTS_READY }], target: i0__namespace.ɵɵFactoryTarget.Component });
447
- TuiValueDecorationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiValueDecorationComponent, selector: "tui-value-decoration", host: { listeners: { "animationstart": "ngDoCheck()" }, properties: { "class._table": "this.isContextTable", "class._filler": "this.filler" } }, viewQueries: [{ propertyName: "pre", first: true, predicate: ["pre"], descendants: true, read: i0.ElementRef, static: true }], ngImport: i0__namespace, 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;width:100%;line-height:var(--tui-height);margin-top:calc(var(--tui-height) / -2);box-sizing:content-box;color:var(--tui-text-03);animation:tuiPresent 1s;white-space:nowrap}:host._table{position:static;margin-top:0}:host._filler{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host-context(tui-primitive-textfield [tuiWrapper][data-mode=\"onDark\"]) :host{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)) :host{line-height:calc(var(--tui-height) - .25rem)}.t-ghost{visibility:hidden;white-space:pre;text-overflow:clip}.t-prefix,.t-postfix{white-space:pre;color:var(--tui-text-01)}:host-context(tui-primitive-textfield [tuiWrapper][data-mode=\"onDark\"]) .t-prefix,:host-context(tui-primitive-textfield [tuiWrapper][data-mode=\"onDark\"]) .t-postfix{color:var(--tui-text-01-night)}.t-filler{max-width:100%;white-space:nowrap}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
448
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiValueDecorationComponent, decorators: [{
449
- type: i0.Component,
450
- args: [{
451
- selector: 'tui-value-decoration',
452
- templateUrl: './value-decoration.template.html',
453
- styleUrls: ['./value-decoration.style.less'],
454
- // It follows Change Detection of PrimitiveTextfield
455
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
456
- changeDetection: i0.ChangeDetectionStrategy.Default,
457
- }]
458
- }], ctorParameters: function () {
459
- return [{ type: undefined, decorators: [{
460
- type: i0.Inject,
461
- args: [i6.TUI_FOCUSABLE_ITEM_ACCESSOR]
462
- }] }, { type: undefined, decorators: [{
463
- type: i0.Inject,
464
- args: [i6.TUI_FONTS_READY]
465
- }] }];
466
- }, propDecorators: { pre: [{
467
- type: i0.ViewChild,
468
- args: ['pre', { read: i0.ElementRef, static: true }]
469
- }], isContextTable: [{
470
- type: i0.HostBinding,
471
- args: ['class._table']
472
- }], filler: [{
473
- type: i0.HostBinding,
474
- args: ['class._filler']
475
- }], ngDoCheck: [{
476
- type: i0.HostListener,
477
- args: ['animationstart']
478
- }] } });
502
+ var TuiValueDecorationComponent = /** @class */ (function () {
503
+ function TuiValueDecorationComponent(textfield, fontsReady$) {
504
+ var _this = this;
505
+ this.textfield = textfield;
506
+ this.fontsReady$ = fontsReady$;
507
+ this.prefix$ = new rxjs.BehaviorSubject('');
508
+ this.pre$ = rxjs.merge(this.fontsReady$, this.prefix$).pipe(operators.delay(0), operators.filter(function () { var _a; return !!((_a = _this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.isConnected); }), operators.map(function () { var _a; return ((_a = _this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 0; }), operators.distinctUntilChanged());
509
+ }
510
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "isContextTable", {
511
+ get: function () {
512
+ return this.textfield.appearance === enums.TuiAppearance.Table;
513
+ },
514
+ enumerable: false,
515
+ configurable: true
516
+ });
517
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "value", {
518
+ get: function () {
519
+ return this.textfield.value;
520
+ },
521
+ enumerable: false,
522
+ configurable: true
523
+ });
524
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "filler", {
525
+ get: function () {
526
+ var _b = this, focused = _b.focused, placeholder = _b.placeholder, exampleText = _b.exampleText, value = _b.value, textfield = _b.textfield;
527
+ if (placeholder && exampleText) {
528
+ return '';
529
+ }
530
+ return focused ? exampleText || textfield.filler.slice(value.length) : '';
531
+ },
532
+ enumerable: false,
533
+ configurable: true
534
+ });
535
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "prefix", {
536
+ get: function () {
537
+ return this.decorationsVisible ? this.textfield.prefix : '';
538
+ },
539
+ enumerable: false,
540
+ configurable: true
541
+ });
542
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "postfix", {
543
+ get: function () {
544
+ return this.decorationsVisible ? this.computedPostfix : '';
545
+ },
546
+ enumerable: false,
547
+ configurable: true
548
+ });
549
+ TuiValueDecorationComponent.prototype.ngDoCheck = function () {
550
+ this.prefix$.next(this.prefix);
551
+ };
552
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "placeholder", {
553
+ get: function () {
554
+ var _a;
555
+ return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
556
+ },
557
+ enumerable: false,
558
+ configurable: true
559
+ });
560
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "exampleText", {
561
+ get: function () {
562
+ return !this.value && this.focused ? this.placeholder : '';
563
+ },
564
+ enumerable: false,
565
+ configurable: true
566
+ });
567
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "decorationsVisible", {
568
+ get: function () {
569
+ return !!this.value || (this.focused && !this.placeholder);
570
+ },
571
+ enumerable: false,
572
+ configurable: true
573
+ });
574
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "focused", {
575
+ get: function () {
576
+ return this.textfield.computedFocused && !this.textfield.readOnly;
577
+ },
578
+ enumerable: false,
579
+ configurable: true
580
+ });
581
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "computedPostfix", {
582
+ get: function () {
583
+ return this.textfield.postfix && (this.filler || this.value)
584
+ ? " " + this.textfield.postfix
585
+ : this.textfield.postfix;
586
+ },
587
+ enumerable: false,
588
+ configurable: true
589
+ });
590
+ return TuiValueDecorationComponent;
591
+ }());
592
+ TuiValueDecorationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiValueDecorationComponent, deps: [{ token: i6.TUI_FOCUSABLE_ITEM_ACCESSOR }, { token: i6.TUI_FONTS_READY }], target: i0__namespace.ɵɵFactoryTarget.Component });
593
+ TuiValueDecorationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiValueDecorationComponent, selector: "tui-value-decoration", host: { listeners: { "animationstart": "ngDoCheck()" }, properties: { "class._table": "this.isContextTable", "class._filler": "this.filler" } }, viewQueries: [{ propertyName: "pre", first: true, predicate: ["pre"], descendants: true, read: i0.ElementRef, static: true }], ngImport: i0__namespace, 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;width:100%;line-height:var(--tui-height);margin-top:calc(var(--tui-height) / -2);box-sizing:content-box;color:var(--tui-text-03);animation:tuiPresent 1s;white-space:nowrap}:host._table{position:static;margin-top:0}:host._filler{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host-context(tui-primitive-textfield [tuiWrapper][data-mode=\"onDark\"]) :host{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)) :host{line-height:calc(var(--tui-height) - .25rem)}.t-ghost{visibility:hidden;white-space:pre;text-overflow:clip}.t-prefix,.t-postfix{white-space:pre;color:var(--tui-text-01)}:host-context(tui-primitive-textfield [tuiWrapper][data-mode=\"onDark\"]) .t-prefix,:host-context(tui-primitive-textfield [tuiWrapper][data-mode=\"onDark\"]) .t-postfix{color:var(--tui-text-01-night)}.t-filler{max-width:100%;white-space:nowrap}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
594
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiValueDecorationComponent, decorators: [{
595
+ type: i0.Component,
596
+ args: [{
597
+ selector: 'tui-value-decoration',
598
+ templateUrl: './value-decoration.template.html',
599
+ styleUrls: ['./value-decoration.style.less'],
600
+ // It follows Change Detection of PrimitiveTextfield
601
+ // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
602
+ changeDetection: i0.ChangeDetectionStrategy.Default,
603
+ }]
604
+ }], ctorParameters: function () {
605
+ return [{ type: undefined, decorators: [{
606
+ type: i0.Inject,
607
+ args: [i6.TUI_FOCUSABLE_ITEM_ACCESSOR]
608
+ }] }, { type: undefined, decorators: [{
609
+ type: i0.Inject,
610
+ args: [i6.TUI_FONTS_READY]
611
+ }] }];
612
+ }, propDecorators: { pre: [{
613
+ type: i0.ViewChild,
614
+ args: ['pre', { read: i0.ElementRef, static: true }]
615
+ }], isContextTable: [{
616
+ type: i0.HostBinding,
617
+ args: ['class._table']
618
+ }], filler: [{
619
+ type: i0.HostBinding,
620
+ args: ['class._filler']
621
+ }], ngDoCheck: [{
622
+ type: i0.HostListener,
623
+ args: ['animationstart']
624
+ }] } });
479
625
 
480
- var TUI_ICON_PADDINGS = {
481
- s: 1.25,
482
- m: 1.75,
483
- l: 2.25,
484
- };
485
- var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
486
- __extends(TuiPrimitiveTextfieldComponent, _super);
487
- function TuiPrimitiveTextfieldComponent(controller, hintOptions, options, el) {
488
- var _this = _super.call(this) || this;
489
- _this.controller = controller;
490
- _this.hintOptions = hintOptions;
491
- _this.options = options;
492
- _this.el = el;
493
- _this.editable = true;
494
- /** @deprecated use `tuiTextfieldFiller` from {@link TuiTextfieldControllerModule} instead */
495
- _this.textfieldFiller = '';
496
- /**
497
- * @deprecated:
498
- * use `tuiTextfieldOptionsProvider({iconCleaner: `tuiIconChevronUp`})`
499
- */
500
- _this.iconCleaner = _this.options.iconCleaner;
501
- _this.readOnly = false;
502
- _this.invalid = false;
503
- _this.disabled = false;
504
- /** @deprecated use `tuiTextfieldPrefix` from {@link TuiTextfieldControllerModule} instead */
505
- _this.textfieldPrefix = '';
506
- /** @deprecated use `tuiTextfieldPostfix` from {@link TuiTextfieldControllerModule} instead */
507
- _this.textfieldPostfix = '';
508
- _this.value = '';
509
- _this.valueChange = new i0.EventEmitter();
510
- _this.autofilled = false;
511
- return _this;
512
- }
513
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "prefix", {
514
- get: function () {
515
- return this.textfieldPrefix || this.controller.prefix;
516
- },
517
- enumerable: false,
518
- configurable: true
519
- });
520
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "postfix", {
521
- get: function () {
522
- return this.textfieldPostfix || this.controller.postfix;
523
- },
524
- enumerable: false,
525
- configurable: true
526
- });
527
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "filler", {
528
- get: function () {
529
- return this.textfieldFiller || this.controller.filler;
530
- },
531
- enumerable: false,
532
- configurable: true
533
- });
534
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "nativeFocusableElement", {
535
- get: function () {
536
- if (this.computedDisabled || !this.focusableElement) {
537
- return null;
538
- }
539
- var nativeElement = this.focusableElement.nativeElement;
540
- return (nativeElement.previousElementSibling ||
541
- nativeElement);
542
- },
543
- enumerable: false,
544
- configurable: true
545
- });
546
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "focused", {
547
- get: function () {
548
- return i6.tuiIsNativeFocusedIn(this.el.nativeElement);
549
- },
550
- enumerable: false,
551
- configurable: true
552
- });
553
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "appearance", {
554
- get: function () {
555
- return this.controller.appearance;
556
- },
557
- enumerable: false,
558
- configurable: true
559
- });
560
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "size", {
561
- get: function () {
562
- return this.controller.size;
563
- },
564
- enumerable: false,
565
- configurable: true
566
- });
567
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", {
568
- get: function () {
569
- return !this.readOnly && !this.disabled && this.invalid;
570
- },
571
- enumerable: false,
572
- configurable: true
573
- });
574
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "inputHidden", {
575
- get: function () {
576
- var _a;
577
- return !!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length);
578
- },
579
- enumerable: false,
580
- configurable: true
581
- });
582
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasValue", {
583
- get: function () {
584
- return !!this.value;
585
- },
586
- enumerable: false,
587
- configurable: true
588
- });
589
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasCleaner", {
590
- get: function () {
591
- return (this.controller.cleaner &&
592
- this.hasValue &&
593
- !this.computedDisabled &&
594
- !this.readOnly);
595
- },
596
- enumerable: false,
597
- configurable: true
598
- });
599
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasTooltip", {
600
- get: function () {
601
- var _a;
602
- return !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && !this.computedDisabled;
603
- },
604
- enumerable: false,
605
- configurable: true
606
- });
607
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasCustomContent", {
608
- get: function () {
609
- return !!this.controller.customContent;
610
- },
611
- enumerable: false,
612
- configurable: true
613
- });
614
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderVisible", {
615
- get: function () {
616
- var _a;
617
- var hasDecor = ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) ||
618
- this.prefix ||
619
- this.postfix ||
620
- this.filler;
621
- var showDecor = hasDecor && !this.readOnly && this.computedFocused;
622
- return !this.hasValue && !showDecor;
623
- },
624
- enumerable: false,
625
- configurable: true
626
- });
627
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasPlaceholder", {
628
- get: function () {
629
- return this.placeholderRaisable || this.placeholderVisible;
630
- },
631
- enumerable: false,
632
- configurable: true
633
- });
634
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaised", {
635
- get: function () {
636
- return (this.placeholderRaisable &&
637
- ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled));
638
- },
639
- enumerable: false,
640
- configurable: true
641
- });
642
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderStart", {
643
- get: function () {
644
- return this.iconLeftContent ? this.iconPaddingLeft : 0;
645
- },
646
- enumerable: false,
647
- configurable: true
648
- });
649
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderEnd", {
650
- get: function () {
651
- return miscellaneous.tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent, this.size);
652
- },
653
- enumerable: false,
654
- configurable: true
655
- });
656
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "iconContent", {
657
- get: function () {
658
- return this.controller.icon;
659
- },
660
- enumerable: false,
661
- configurable: true
662
- });
663
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "iconLeftContent", {
664
- get: function () {
665
- return this.controller.iconLeft;
666
- },
667
- enumerable: false,
668
- configurable: true
669
- });
670
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "showHint", {
671
- get: function () {
672
- var _a;
673
- return (!!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) &&
674
- (this.options.hintOnDisabled || !this.computedDisabled));
675
- },
676
- enumerable: false,
677
- configurable: true
678
- });
679
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "name", {
680
- // Safari expiration date autofill workaround
681
- get: function () {
682
- var _a;
683
- return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.autocomplete) === 'cc-exp'
684
- ? 'ccexpiryyear'
685
- : null;
686
- },
687
- enumerable: false,
688
- configurable: true
689
- });
690
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedId", {
691
- get: function () {
692
- var _a;
693
- return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
694
- },
695
- enumerable: false,
696
- configurable: true
697
- });
698
- TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
699
- this.updateFocused(focused);
700
- };
701
- TuiPrimitiveTextfieldComponent.prototype.getIndent$ = function (element) {
702
- return rxjs.fromEvent(element, 'scroll').pipe(operators.map(function () { return -1 * Math.max(element.scrollLeft, 0); }));
703
- };
704
- TuiPrimitiveTextfieldComponent.prototype.clear = function () {
705
- if (this.nativeFocusableElement) {
706
- this.nativeFocusableElement.value = '';
707
- }
708
- this.updateValue('');
709
- };
710
- TuiPrimitiveTextfieldComponent.prototype.onMouseDown = function (event) {
711
- var nativeFocusableElement = this.nativeFocusableElement;
712
- if (!nativeFocusableElement || event.target === nativeFocusableElement) {
713
- return;
714
- }
715
- event.preventDefault();
716
- nativeFocusableElement.focus();
717
- };
718
- TuiPrimitiveTextfieldComponent.prototype.onModelChange = function (value) {
719
- this.updateValue(value);
720
- };
721
- TuiPrimitiveTextfieldComponent.prototype.onAutofilled = function (autofilled) {
722
- this.updateAutofilled(autofilled);
723
- };
724
- TuiPrimitiveTextfieldComponent.prototype.detectRetargetFromLabel = function (event) {
725
- if (i6.tuiRetargetedBoundaryCrossing(event)) {
726
- event.stopImmediatePropagation();
727
- }
728
- };
729
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "iconPaddingLeft", {
730
- get: function () {
731
- return TUI_ICON_PADDINGS[this.size];
732
- },
733
- enumerable: false,
734
- configurable: true
735
- });
736
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaisable", {
737
- get: function () {
738
- return this.size !== 's' && !this.controller.labelOutside;
739
- },
740
- enumerable: false,
741
- configurable: true
742
- });
743
- TuiPrimitiveTextfieldComponent.prototype.updateAutofilled = function (autofilled) {
744
- if (this.autofilled === autofilled) {
745
- return;
746
- }
747
- this.autofilled = autofilled;
748
- };
749
- TuiPrimitiveTextfieldComponent.prototype.updateValue = function (value) {
750
- this.value = value;
751
- this.valueChange.emit(value);
752
- };
753
- return TuiPrimitiveTextfieldComponent;
754
- }(i6.AbstractTuiInteractive));
755
- TuiPrimitiveTextfieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldComponent, deps: [{ token: i10.TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: i11.TuiHintOptionsDirective, optional: true }, { token: i10.TUI_TEXTFIELD_OPTIONS }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
756
- TuiPrimitiveTextfieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: { editable: "editable", textfieldFiller: ["filler", "textfieldFiller"], iconCleaner: "iconCleaner", readOnly: "readOnly", invalid: "invalid", disabled: "disabled", textfieldPrefix: ["prefix", "textfieldPrefix"], textfieldPostfix: ["postfix", "textfieldPostfix"], value: "value" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "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: [
757
- i6.tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
758
- i10.TEXTFIELD_CONTROLLER_PROVIDER,
759
- ], queries: [{ propertyName: "content", predicate: i9.PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiWrapper\n [active]=\"pseudoActive\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (click.prevent.silent)=\"detectRetargetFromLabel($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"select\"></ng-content>\n <input\n #focusableElement\n automation-id=\"tui-primitive-textfield__native-input\"\n tuiMaskAccessor\n class=\"t-input\"\n [attr.aria-invalid]=\"computedInvalid\"\n [attr.name]=\"name\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\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 t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\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 aria-hidden=\"true\"\n automation-id=\"tui-primitive-textfield__value-decoration\"\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 class=\"t-icons\">\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 appearance=\"icon\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n tuiWrapper\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"\n iconCleaner || controller.options.iconCleaner as src;\n context: {$implicit: size}\n \"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"showHint\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n class=\"t-tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"computedId\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}:host[data-size=s]{--tui-height: var(--tui-height-s)}:host[data-size=m]{--tui-height: var(--tui-height-m)}:host[data-size=l]{--tui-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-width: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%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 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}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input::-webkit-caps-lock-indicator,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) .t-input::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) .t-input::placeholder,:host-context(tui-textarea._focused:not(._readonly)) .t-input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) .t-input::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context([tuiWrapper][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}[tuiWrapper][data-mode=onDark] .t-input::placeholder,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}: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-textarea[data-size=\"s\"]):not(tui-textarea),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=m] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]):not(tui-primitive-textfield),.t-input :host-context(tui-textarea[data-size=\"m\"]):not(tui-textarea),.t-input :host-context(tui-text-area[data-size=\"m\"]):not(tui-text-area){padding:0 var(--tui-padding-m)}: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-textarea[data-size=\"l\"]):not(tui-textarea),.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-textarea._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:1rem}: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%;box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=m] .t-content{padding:0 var(--tui-padding-m)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-wrapper{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;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._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .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:var(--tui-font-text-m);line-height:1.25rem}: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)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}:host[data-size=s] .t-icon_left{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}:host[data-size=m] .t-icon_left{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}:host[data-size=l] .t-icon_left{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons{display:flex;align-items:center}:host[data-size=m] .t-icons{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}:host[data-size=s] .t-icons{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}:host:not([data-size=\"s\"]) .t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}:host._autofilled[data-size=s] .t-placeholder,:host._autofilled._label-outside .t-placeholder,:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.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-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}\n"], components: [{ type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6__namespace.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7__namespace.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8__namespace.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: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i9__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
760
- __decorate([
761
- i6.tuiPure
762
- ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
763
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldComponent, decorators: [{
764
- type: i0.Component,
765
- args: [{
766
- selector: 'tui-primitive-textfield',
767
- templateUrl: './primitive-textfield.template.html',
768
- styleUrls: ['./primitive-textfield.style.less'],
769
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
770
- providers: [
771
- i6.tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
772
- i10.TEXTFIELD_CONTROLLER_PROVIDER,
773
- ],
774
- host: {
775
- '[class._autofilled]': 'autofilled',
776
- '[class._label-outside]': 'controller.labelOutside',
777
- },
778
- }]
779
- }], ctorParameters: function () {
780
- return [{ type: i10__namespace.TuiTextfieldController, decorators: [{
781
- type: i0.Inject,
782
- args: [i10.TUI_TEXTFIELD_WATCHED_CONTROLLER]
783
- }] }, { type: i11__namespace.TuiHintOptionsDirective, decorators: [{
784
- type: i0.Optional
785
- }, {
786
- type: i0.Inject,
787
- args: [i11.TuiHintOptionsDirective]
788
- }] }, { type: undefined, decorators: [{
789
- type: i0.Inject,
790
- args: [i10.TUI_TEXTFIELD_OPTIONS]
791
- }] }, { type: i0__namespace.ElementRef, decorators: [{
792
- type: i0.Inject,
793
- args: [i0.ElementRef]
794
- }] }];
795
- }, propDecorators: { focusableElement: [{
796
- type: i0.ViewChild,
797
- args: ['focusableElement']
798
- }], editable: [{
799
- type: i0.Input
800
- }], textfieldFiller: [{
801
- type: i0.Input,
802
- args: ['filler']
803
- }], iconCleaner: [{
804
- type: i0.Input
805
- }], readOnly: [{
806
- type: i0.Input
807
- }, {
808
- type: i0.HostBinding,
809
- args: ['class._readonly']
810
- }], invalid: [{
811
- type: i0.Input
812
- }], disabled: [{
813
- type: i0.Input
814
- }], textfieldPrefix: [{
815
- type: i0.Input,
816
- args: ['prefix']
817
- }], textfieldPostfix: [{
818
- type: i0.Input,
819
- args: ['postfix']
820
- }], value: [{
821
- type: i0.Input
822
- }], valueChange: [{
823
- type: i0.Output
824
- }], content: [{
825
- type: i0.ContentChildren,
826
- args: [i9.PolymorpheusOutletDirective, { descendants: true }]
827
- }], size: [{
828
- type: i0.HostBinding,
829
- args: ['attr.data-size']
830
- }], computedInvalid: [{
831
- type: i0.HostBinding,
832
- args: ['class._invalid']
833
- }], inputHidden: [{
834
- type: i0.HostBinding,
835
- args: ['class._hidden']
836
- }], borderStart: [{
837
- type: i0.HostBinding,
838
- args: ['style.--border-start.rem']
839
- }], borderEnd: [{
840
- type: i0.HostBinding,
841
- args: ['style.--border-end.rem']
842
- }], onFocused: [{
843
- type: i0.HostListener,
844
- args: ['focusin', ['true']]
845
- }, {
846
- type: i0.HostListener,
847
- args: ['focusout', ['false']]
848
- }], getIndent$: [] } });
626
+ var TUI_ICON_PADDINGS = {
627
+ s: 1.25,
628
+ m: 1.75,
629
+ l: 2.25,
630
+ };
631
+ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
632
+ __extends(TuiPrimitiveTextfieldComponent, _super);
633
+ function TuiPrimitiveTextfieldComponent(controller, hintOptions, options, el) {
634
+ var _this = _super.call(this) || this;
635
+ _this.controller = controller;
636
+ _this.hintOptions = hintOptions;
637
+ _this.options = options;
638
+ _this.el = el;
639
+ _this.editable = true;
640
+ /** @deprecated use `tuiTextfieldFiller` from {@link TuiTextfieldControllerModule} instead */
641
+ _this.textfieldFiller = '';
642
+ /**
643
+ * @deprecated:
644
+ * use `tuiTextfieldOptionsProvider({iconCleaner: `tuiIconChevronUp`})`
645
+ */
646
+ _this.iconCleaner = _this.options.iconCleaner;
647
+ _this.readOnly = false;
648
+ _this.invalid = false;
649
+ _this.disabled = false;
650
+ /** @deprecated use `tuiTextfieldPrefix` from {@link TuiTextfieldControllerModule} instead */
651
+ _this.textfieldPrefix = '';
652
+ /** @deprecated use `tuiTextfieldPostfix` from {@link TuiTextfieldControllerModule} instead */
653
+ _this.textfieldPostfix = '';
654
+ _this.value = '';
655
+ _this.valueChange = new i0.EventEmitter();
656
+ _this.autofilled = false;
657
+ return _this;
658
+ }
659
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "prefix", {
660
+ get: function () {
661
+ return this.textfieldPrefix || this.controller.prefix;
662
+ },
663
+ enumerable: false,
664
+ configurable: true
665
+ });
666
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "postfix", {
667
+ get: function () {
668
+ return this.textfieldPostfix || this.controller.postfix;
669
+ },
670
+ enumerable: false,
671
+ configurable: true
672
+ });
673
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "filler", {
674
+ get: function () {
675
+ return this.textfieldFiller || this.controller.filler;
676
+ },
677
+ enumerable: false,
678
+ configurable: true
679
+ });
680
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "nativeFocusableElement", {
681
+ get: function () {
682
+ if (this.computedDisabled || !this.focusableElement) {
683
+ return null;
684
+ }
685
+ var nativeElement = this.focusableElement.nativeElement;
686
+ return (nativeElement.previousElementSibling ||
687
+ nativeElement);
688
+ },
689
+ enumerable: false,
690
+ configurable: true
691
+ });
692
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "focused", {
693
+ get: function () {
694
+ return i6.tuiIsNativeFocusedIn(this.el.nativeElement);
695
+ },
696
+ enumerable: false,
697
+ configurable: true
698
+ });
699
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "appearance", {
700
+ get: function () {
701
+ return this.controller.appearance;
702
+ },
703
+ enumerable: false,
704
+ configurable: true
705
+ });
706
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "size", {
707
+ get: function () {
708
+ return this.controller.size;
709
+ },
710
+ enumerable: false,
711
+ configurable: true
712
+ });
713
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", {
714
+ get: function () {
715
+ return !this.readOnly && !this.disabled && this.invalid;
716
+ },
717
+ enumerable: false,
718
+ configurable: true
719
+ });
720
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "inputHidden", {
721
+ get: function () {
722
+ var _a;
723
+ return !!((_a = this.content) === null || _a === void 0 ? void 0 : _a.length);
724
+ },
725
+ enumerable: false,
726
+ configurable: true
727
+ });
728
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasValue", {
729
+ get: function () {
730
+ return !!this.value;
731
+ },
732
+ enumerable: false,
733
+ configurable: true
734
+ });
735
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasCleaner", {
736
+ get: function () {
737
+ return (this.controller.cleaner &&
738
+ this.hasValue &&
739
+ !this.computedDisabled &&
740
+ !this.readOnly);
741
+ },
742
+ enumerable: false,
743
+ configurable: true
744
+ });
745
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasTooltip", {
746
+ get: function () {
747
+ var _a;
748
+ return !!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) && !this.computedDisabled;
749
+ },
750
+ enumerable: false,
751
+ configurable: true
752
+ });
753
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasCustomContent", {
754
+ get: function () {
755
+ return !!this.controller.customContent;
756
+ },
757
+ enumerable: false,
758
+ configurable: true
759
+ });
760
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderVisible", {
761
+ get: function () {
762
+ var _a;
763
+ var hasDecor = ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) ||
764
+ this.prefix ||
765
+ this.postfix ||
766
+ this.filler;
767
+ var showDecor = hasDecor && !this.readOnly && this.computedFocused;
768
+ return !this.hasValue && !showDecor;
769
+ },
770
+ enumerable: false,
771
+ configurable: true
772
+ });
773
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasPlaceholder", {
774
+ get: function () {
775
+ return this.placeholderRaisable || this.placeholderVisible;
776
+ },
777
+ enumerable: false,
778
+ configurable: true
779
+ });
780
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaised", {
781
+ get: function () {
782
+ return (this.placeholderRaisable &&
783
+ ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled));
784
+ },
785
+ enumerable: false,
786
+ configurable: true
787
+ });
788
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderStart", {
789
+ get: function () {
790
+ return this.iconLeftContent ? this.iconPaddingLeft : 0;
791
+ },
792
+ enumerable: false,
793
+ configurable: true
794
+ });
795
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderEnd", {
796
+ get: function () {
797
+ return miscellaneous.tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent, this.size);
798
+ },
799
+ enumerable: false,
800
+ configurable: true
801
+ });
802
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "iconContent", {
803
+ get: function () {
804
+ return this.controller.icon;
805
+ },
806
+ enumerable: false,
807
+ configurable: true
808
+ });
809
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "iconLeftContent", {
810
+ get: function () {
811
+ return this.controller.iconLeft;
812
+ },
813
+ enumerable: false,
814
+ configurable: true
815
+ });
816
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "showHint", {
817
+ get: function () {
818
+ var _a;
819
+ return (!!((_a = this.hintOptions) === null || _a === void 0 ? void 0 : _a.content) &&
820
+ (this.options.hintOnDisabled || !this.computedDisabled));
821
+ },
822
+ enumerable: false,
823
+ configurable: true
824
+ });
825
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "name", {
826
+ // Safari expiration date autofill workaround
827
+ get: function () {
828
+ var _a;
829
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.autocomplete) === 'cc-exp'
830
+ ? 'ccexpiryyear'
831
+ : null;
832
+ },
833
+ enumerable: false,
834
+ configurable: true
835
+ });
836
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedId", {
837
+ get: function () {
838
+ var _a;
839
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
840
+ },
841
+ enumerable: false,
842
+ configurable: true
843
+ });
844
+ TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
845
+ this.updateFocused(focused);
846
+ };
847
+ TuiPrimitiveTextfieldComponent.prototype.getIndent$ = function (element) {
848
+ return rxjs.fromEvent(element, 'scroll').pipe(operators.map(function () { return -1 * Math.max(element.scrollLeft, 0); }));
849
+ };
850
+ TuiPrimitiveTextfieldComponent.prototype.clear = function () {
851
+ if (this.nativeFocusableElement) {
852
+ this.nativeFocusableElement.value = '';
853
+ }
854
+ this.updateValue('');
855
+ };
856
+ TuiPrimitiveTextfieldComponent.prototype.onMouseDown = function (event) {
857
+ var nativeFocusableElement = this.nativeFocusableElement;
858
+ if (!nativeFocusableElement || event.target === nativeFocusableElement) {
859
+ return;
860
+ }
861
+ event.preventDefault();
862
+ nativeFocusableElement.focus();
863
+ };
864
+ TuiPrimitiveTextfieldComponent.prototype.onModelChange = function (value) {
865
+ this.updateValue(value);
866
+ };
867
+ TuiPrimitiveTextfieldComponent.prototype.onAutofilled = function (autofilled) {
868
+ this.updateAutofilled(autofilled);
869
+ };
870
+ TuiPrimitiveTextfieldComponent.prototype.detectRetargetFromLabel = function (event) {
871
+ if (i6.tuiRetargetedBoundaryCrossing(event)) {
872
+ event.stopImmediatePropagation();
873
+ }
874
+ };
875
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "iconPaddingLeft", {
876
+ get: function () {
877
+ return TUI_ICON_PADDINGS[this.size];
878
+ },
879
+ enumerable: false,
880
+ configurable: true
881
+ });
882
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaisable", {
883
+ get: function () {
884
+ return this.size !== 's' && !this.controller.labelOutside;
885
+ },
886
+ enumerable: false,
887
+ configurable: true
888
+ });
889
+ TuiPrimitiveTextfieldComponent.prototype.updateAutofilled = function (autofilled) {
890
+ if (this.autofilled === autofilled) {
891
+ return;
892
+ }
893
+ this.autofilled = autofilled;
894
+ };
895
+ TuiPrimitiveTextfieldComponent.prototype.updateValue = function (value) {
896
+ this.value = value;
897
+ this.valueChange.emit(value);
898
+ };
899
+ return TuiPrimitiveTextfieldComponent;
900
+ }(i6.AbstractTuiInteractive));
901
+ TuiPrimitiveTextfieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldComponent, deps: [{ token: i10.TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: i11.TuiHintOptionsDirective, optional: true }, { token: i10.TUI_TEXTFIELD_OPTIONS }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
902
+ TuiPrimitiveTextfieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: { editable: "editable", textfieldFiller: ["filler", "textfieldFiller"], iconCleaner: "iconCleaner", readOnly: "readOnly", invalid: "invalid", disabled: "disabled", textfieldPrefix: ["prefix", "textfieldPrefix"], textfieldPostfix: ["postfix", "textfieldPostfix"], value: "value" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "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: [
903
+ i6.tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
904
+ i10.TEXTFIELD_CONTROLLER_PROVIDER,
905
+ ], queries: [{ propertyName: "content", predicate: i9.PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiWrapper\n [active]=\"pseudoActive\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (click.prevent.silent)=\"detectRetargetFromLabel($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"select\"></ng-content>\n <input\n #focusableElement\n automation-id=\"tui-primitive-textfield__native-input\"\n tuiMaskAccessor\n class=\"t-input\"\n [attr.aria-invalid]=\"computedInvalid\"\n [attr.name]=\"name\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\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 t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\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 aria-hidden=\"true\"\n automation-id=\"tui-primitive-textfield__value-decoration\"\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 class=\"t-icons\">\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 appearance=\"icon\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n tuiWrapper\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"\n iconCleaner || controller.options.iconCleaner as src;\n context: {$implicit: size}\n \"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"showHint\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n class=\"t-tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"computedId\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n appearance=\"icon\"\n tuiWrapper\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}:host[data-size=s]{--tui-height: var(--tui-height-s)}:host[data-size=m]{--tui-height: var(--tui-height-m)}:host[data-size=l]{--tui-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-width: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%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 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}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input::-webkit-caps-lock-indicator,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) .t-input::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) .t-input::placeholder,:host-context(tui-textarea._focused:not(._readonly)) .t-input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) .t-input::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context([tuiWrapper][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}[tuiWrapper][data-mode=onDark] .t-input::placeholder,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}: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-textarea[data-size=\"s\"]):not(tui-textarea),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=m] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]):not(tui-primitive-textfield),.t-input :host-context(tui-textarea[data-size=\"m\"]):not(tui-textarea),.t-input :host-context(tui-text-area[data-size=\"m\"]):not(tui-text-area){padding:0 var(--tui-padding-m)}: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-textarea[data-size=\"l\"]):not(tui-textarea),.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-textarea._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:1rem}: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%;box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=m] .t-content{padding:0 var(--tui-padding-m)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-wrapper{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;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._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .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:var(--tui-font-text-m);line-height:1.25rem}: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)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}:host[data-size=s] .t-icon_left{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}:host[data-size=m] .t-icon_left{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}:host[data-size=l] .t-icon_left{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons{display:flex;align-items:center}:host[data-size=m] .t-icons{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}:host[data-size=s] .t-icons{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}:host:not([data-size=\"s\"]) .t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}:host._autofilled[data-size=s] .t-placeholder,:host._autofilled._label-outside .t-placeholder,:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.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-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}\n"], components: [{ type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6__namespace.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7__namespace.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8__namespace.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: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i9__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
906
+ __decorate([
907
+ i6.tuiPure
908
+ ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
909
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldComponent, decorators: [{
910
+ type: i0.Component,
911
+ args: [{
912
+ selector: 'tui-primitive-textfield',
913
+ templateUrl: './primitive-textfield.template.html',
914
+ styleUrls: ['./primitive-textfield.style.less'],
915
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
916
+ providers: [
917
+ i6.tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
918
+ i10.TEXTFIELD_CONTROLLER_PROVIDER,
919
+ ],
920
+ host: {
921
+ '[class._autofilled]': 'autofilled',
922
+ '[class._label-outside]': 'controller.labelOutside',
923
+ },
924
+ }]
925
+ }], ctorParameters: function () {
926
+ return [{ type: i10__namespace.TuiTextfieldController, decorators: [{
927
+ type: i0.Inject,
928
+ args: [i10.TUI_TEXTFIELD_WATCHED_CONTROLLER]
929
+ }] }, { type: i11__namespace.TuiHintOptionsDirective, decorators: [{
930
+ type: i0.Optional
931
+ }, {
932
+ type: i0.Inject,
933
+ args: [i11.TuiHintOptionsDirective]
934
+ }] }, { type: undefined, decorators: [{
935
+ type: i0.Inject,
936
+ args: [i10.TUI_TEXTFIELD_OPTIONS]
937
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
938
+ type: i0.Inject,
939
+ args: [i0.ElementRef]
940
+ }] }];
941
+ }, propDecorators: { focusableElement: [{
942
+ type: i0.ViewChild,
943
+ args: ['focusableElement']
944
+ }], editable: [{
945
+ type: i0.Input
946
+ }], textfieldFiller: [{
947
+ type: i0.Input,
948
+ args: ['filler']
949
+ }], iconCleaner: [{
950
+ type: i0.Input
951
+ }], readOnly: [{
952
+ type: i0.Input
953
+ }, {
954
+ type: i0.HostBinding,
955
+ args: ['class._readonly']
956
+ }], invalid: [{
957
+ type: i0.Input
958
+ }], disabled: [{
959
+ type: i0.Input
960
+ }], textfieldPrefix: [{
961
+ type: i0.Input,
962
+ args: ['prefix']
963
+ }], textfieldPostfix: [{
964
+ type: i0.Input,
965
+ args: ['postfix']
966
+ }], value: [{
967
+ type: i0.Input
968
+ }], valueChange: [{
969
+ type: i0.Output
970
+ }], content: [{
971
+ type: i0.ContentChildren,
972
+ args: [i9.PolymorpheusOutletDirective, { descendants: true }]
973
+ }], size: [{
974
+ type: i0.HostBinding,
975
+ args: ['attr.data-size']
976
+ }], computedInvalid: [{
977
+ type: i0.HostBinding,
978
+ args: ['class._invalid']
979
+ }], inputHidden: [{
980
+ type: i0.HostBinding,
981
+ args: ['class._hidden']
982
+ }], borderStart: [{
983
+ type: i0.HostBinding,
984
+ args: ['style.--border-start.rem']
985
+ }], borderEnd: [{
986
+ type: i0.HostBinding,
987
+ args: ['style.--border-end.rem']
988
+ }], onFocused: [{
989
+ type: i0.HostListener,
990
+ args: ['focusin', ['true']]
991
+ }, {
992
+ type: i0.HostListener,
993
+ args: ['focusout', ['false']]
994
+ }], getIndent$: [] } });
849
995
 
850
- var TuiPrimitiveTextfieldDirective = /** @class */ (function (_super) {
851
- __extends(TuiPrimitiveTextfieldDirective, _super);
852
- function TuiPrimitiveTextfieldDirective(textfield) {
853
- var _this =
854
- /**
855
- * TuiPrimitiveTextfieldComponent satisfies all required parts of
856
- * AbstractTuiControl interface. A new interface is not introduced
857
- * so AbstractTuiControl is automatically injected for all other controls.
858
- */
859
- _super.call(this, textfield) || this;
860
- _this.textfield = textfield;
861
- return _this;
862
- }
863
- Object.defineProperty(TuiPrimitiveTextfieldDirective.prototype, "readOnly", {
864
- get: function () {
865
- return this.textfield.readOnly || !this.textfield.editable;
866
- },
867
- enumerable: false,
868
- configurable: true
869
- });
870
- TuiPrimitiveTextfieldDirective.prototype.onValueChange = function (value) {
871
- this.textfield.onModelChange(value);
872
- };
873
- return TuiPrimitiveTextfieldDirective;
874
- }(abstract.AbstractTuiTextfieldHost));
875
- TuiPrimitiveTextfieldDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldDirective, deps: [{ token: TuiPrimitiveTextfieldComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
876
- TuiPrimitiveTextfieldDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield", providers: [tokens.tuiAsTextfieldHost(TuiPrimitiveTextfieldDirective)], usesInheritance: true, ngImport: i0__namespace });
877
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldDirective, decorators: [{
878
- type: i0.Directive,
879
- args: [{
880
- selector: 'tui-primitive-textfield',
881
- providers: [tokens.tuiAsTextfieldHost(TuiPrimitiveTextfieldDirective)],
882
- }]
883
- }], ctorParameters: function () {
884
- return [{ type: TuiPrimitiveTextfieldComponent, decorators: [{
885
- type: i0.Inject,
886
- args: [TuiPrimitiveTextfieldComponent]
887
- }] }];
888
- } });
996
+ var TuiPrimitiveTextfieldDirective = /** @class */ (function (_super) {
997
+ __extends(TuiPrimitiveTextfieldDirective, _super);
998
+ function TuiPrimitiveTextfieldDirective(textfield) {
999
+ var _this =
1000
+ /**
1001
+ * TuiPrimitiveTextfieldComponent satisfies all required parts of
1002
+ * AbstractTuiControl interface. A new interface is not introduced
1003
+ * so AbstractTuiControl is automatically injected for all other controls.
1004
+ */
1005
+ _super.call(this, textfield) || this;
1006
+ _this.textfield = textfield;
1007
+ return _this;
1008
+ }
1009
+ Object.defineProperty(TuiPrimitiveTextfieldDirective.prototype, "readOnly", {
1010
+ get: function () {
1011
+ return this.textfield.readOnly || !this.textfield.editable;
1012
+ },
1013
+ enumerable: false,
1014
+ configurable: true
1015
+ });
1016
+ TuiPrimitiveTextfieldDirective.prototype.onValueChange = function (value) {
1017
+ this.textfield.onModelChange(value);
1018
+ };
1019
+ return TuiPrimitiveTextfieldDirective;
1020
+ }(abstract.AbstractTuiTextfieldHost));
1021
+ TuiPrimitiveTextfieldDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldDirective, deps: [{ token: TuiPrimitiveTextfieldComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1022
+ TuiPrimitiveTextfieldDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield", providers: [tokens.tuiAsTextfieldHost(TuiPrimitiveTextfieldDirective)], usesInheritance: true, ngImport: i0__namespace });
1023
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldDirective, decorators: [{
1024
+ type: i0.Directive,
1025
+ args: [{
1026
+ selector: 'tui-primitive-textfield',
1027
+ providers: [tokens.tuiAsTextfieldHost(TuiPrimitiveTextfieldDirective)],
1028
+ }]
1029
+ }], ctorParameters: function () {
1030
+ return [{ type: TuiPrimitiveTextfieldComponent, decorators: [{
1031
+ type: i0.Inject,
1032
+ args: [TuiPrimitiveTextfieldComponent]
1033
+ }] }];
1034
+ } });
889
1035
 
890
- var TuiTextfieldComponent = /** @class */ (function () {
891
- function TuiTextfieldComponent(host, controller, el, idService, legacyMask) {
892
- this.host = host;
893
- this.controller = controller;
894
- this.el = el;
895
- this.idService = idService;
896
- this.legacyMask = legacyMask;
897
- this.host.process(this.el.nativeElement);
898
- }
899
- Object.defineProperty(TuiTextfieldComponent.prototype, "id", {
900
- get: function () {
901
- return this.el.nativeElement.id || this.idService.generate();
902
- },
903
- enumerable: false,
904
- configurable: true
905
- });
906
- Object.defineProperty(TuiTextfieldComponent.prototype, "inputMode", {
907
- get: function () {
908
- return this.el.nativeElement.inputMode || this.host.inputMode;
909
- },
910
- enumerable: false,
911
- configurable: true
912
- });
913
- return TuiTextfieldComponent;
914
- }());
915
- TuiTextfieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTextfieldComponent, deps: [{ token: tokens.TUI_TEXTFIELD_HOST }, { token: i1$1.TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: i0.ElementRef }, { token: i6.TuiIdService }, { token: tokens.TUI_LEGACY_MASK, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
916
- TuiTextfieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]", host: { attributes: { "type": "text" }, listeners: { "input": "!legacyMask && host.onValueChange($event.target.value)" }, properties: { "attr.id": "id", "attr.inputMode": "inputMode", "attr.aria-invalid": "host.invalid", "attr.disabled": "host.disabled || null", "tabIndex": "host.focusable ? 0 : -1", "readOnly": "host.readOnly", "value": "host.value" } }, providers: [i1$1.TEXTFIELD_CONTROLLER_PROVIDER], ngImport: i0__namespace, template: '', isInline: true, styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width: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%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 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:-webkit-autofill,:host:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}:host::-webkit-caps-lock-indicator,:host::-webkit-contacts-auto-fill-button,:host::-webkit-credit-card-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}:host::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) :host::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) :host::placeholder,:host-context(tui-textarea._focused:not(._readonly)) :host::placeholder,:host-context(tui-text-area._focused:not(._readonly)) :host::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] :host:-webkit-autofill,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:hover,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:focus,:host :host-context([tuiWrapper][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}[tuiWrapper][data-mode=onDark] :host::placeholder,:host :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host[data-size=s] :host,:host :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),:host :host-context(tui-textarea[data-size=\"s\"]):not(tui-textarea),:host :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=m] :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]):not(tui-primitive-textfield),:host :host-context(tui-textarea[data-size=\"m\"]):not(tui-textarea),:host :host-context(tui-text-area[data-size=\"m\"]):not(tui-text-area){padding:0 var(--tui-padding-m)}:host[data-size=l] :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),:host :host-context(tui-textarea[data-size=\"l\"]):not(tui-textarea),: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-textarea._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:1rem}: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}textarea:host{white-space:pre-wrap}textarea:host :host-context(tui-textarea._ios),textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
917
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTextfieldComponent, decorators: [{
918
- type: i0.Component,
919
- args: [{
920
- selector: 'input[tuiTextfield], textarea[tuiTextfield]',
921
- template: '',
922
- styleUrls: ['./textfield.style.less'],
923
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
924
- providers: [i1$1.TEXTFIELD_CONTROLLER_PROVIDER],
925
- host: {
926
- type: 'text',
927
- '[attr.id]': 'id',
928
- '[attr.inputMode]': 'inputMode',
929
- '[attr.aria-invalid]': 'host.invalid',
930
- '[attr.disabled]': 'host.disabled || null',
931
- '[tabIndex]': 'host.focusable ? 0 : -1',
932
- '[readOnly]': 'host.readOnly',
933
- '[value]': 'host.value',
934
- '(input)': '!legacyMask && host.onValueChange($event.target.value)',
935
- },
936
- }]
937
- }], ctorParameters: function () {
938
- return [{ type: undefined, decorators: [{
939
- type: i0.Inject,
940
- args: [tokens.TUI_TEXTFIELD_HOST]
941
- }] }, { type: i1__namespace$1.TuiTextfieldController, decorators: [{
942
- type: i0.Inject,
943
- args: [i1$1.TUI_TEXTFIELD_WATCHED_CONTROLLER]
944
- }] }, { type: i0__namespace.ElementRef, decorators: [{
945
- type: i0.Inject,
946
- args: [i0.ElementRef]
947
- }] }, { type: i6__namespace.TuiIdService, decorators: [{
948
- type: i0.Inject,
949
- args: [i6.TuiIdService]
950
- }] }, { type: undefined, decorators: [{
951
- type: i0.Optional
952
- }, {
953
- type: i0.Inject,
954
- args: [tokens.TUI_LEGACY_MASK]
955
- }] }];
956
- } });
1036
+ var TuiTextfieldComponent = /** @class */ (function () {
1037
+ function TuiTextfieldComponent(host, controller, el, idService, legacyMask) {
1038
+ this.host = host;
1039
+ this.controller = controller;
1040
+ this.el = el;
1041
+ this.idService = idService;
1042
+ this.legacyMask = legacyMask;
1043
+ this.host.process(this.el.nativeElement);
1044
+ }
1045
+ Object.defineProperty(TuiTextfieldComponent.prototype, "id", {
1046
+ get: function () {
1047
+ return this.el.nativeElement.id || this.idService.generate();
1048
+ },
1049
+ enumerable: false,
1050
+ configurable: true
1051
+ });
1052
+ Object.defineProperty(TuiTextfieldComponent.prototype, "inputMode", {
1053
+ get: function () {
1054
+ return this.el.nativeElement.inputMode || this.host.inputMode;
1055
+ },
1056
+ enumerable: false,
1057
+ configurable: true
1058
+ });
1059
+ return TuiTextfieldComponent;
1060
+ }());
1061
+ TuiTextfieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTextfieldComponent, deps: [{ token: tokens.TUI_TEXTFIELD_HOST }, { token: i1$1.TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: i0.ElementRef }, { token: i6.TuiIdService }, { token: tokens.TUI_LEGACY_MASK, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1062
+ TuiTextfieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]", host: { attributes: { "type": "text" }, listeners: { "input": "!legacyMask && host.onValueChange($event.target.value)" }, properties: { "attr.id": "id", "attr.inputMode": "inputMode", "attr.aria-invalid": "host.invalid", "attr.disabled": "host.disabled || null", "tabIndex": "host.focusable ? 0 : -1", "readOnly": "host.readOnly", "value": "host.value" } }, providers: [i1$1.TEXTFIELD_CONTROLLER_PROVIDER], ngImport: i0__namespace, template: '', isInline: true, styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border-width: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%;border-style:solid;border-color:transparent;border-inline-start-width:var(--border-start, 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:-webkit-autofill,:host:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}:host::-webkit-caps-lock-indicator,:host::-webkit-contacts-auto-fill-button,:host::-webkit-credit-card-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}:host::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) :host::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) :host::placeholder,:host-context(tui-textarea._focused:not(._readonly)) :host::placeholder,:host-context(tui-text-area._focused:not(._readonly)) :host::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] :host:-webkit-autofill,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:hover,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:focus,:host :host-context([tuiWrapper][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}[tuiWrapper][data-mode=onDark] :host::placeholder,:host :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host[data-size=s] :host,:host :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),:host :host-context(tui-textarea[data-size=\"s\"]):not(tui-textarea),:host :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=m] :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]):not(tui-primitive-textfield),:host :host-context(tui-textarea[data-size=\"m\"]):not(tui-textarea),:host :host-context(tui-text-area[data-size=\"m\"]):not(tui-text-area){padding:0 var(--tui-padding-m)}:host[data-size=l] :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),:host :host-context(tui-textarea[data-size=\"l\"]):not(tui-textarea),: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-textarea._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:1rem}: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}textarea:host{white-space:pre-wrap}textarea:host :host-context(tui-textarea._ios),textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1063
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiTextfieldComponent, decorators: [{
1064
+ type: i0.Component,
1065
+ args: [{
1066
+ selector: 'input[tuiTextfield], textarea[tuiTextfield]',
1067
+ template: '',
1068
+ styleUrls: ['./textfield.style.less'],
1069
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1070
+ providers: [i1$1.TEXTFIELD_CONTROLLER_PROVIDER],
1071
+ host: {
1072
+ type: 'text',
1073
+ '[attr.id]': 'id',
1074
+ '[attr.inputMode]': 'inputMode',
1075
+ '[attr.aria-invalid]': 'host.invalid',
1076
+ '[attr.disabled]': 'host.disabled || null',
1077
+ '[tabIndex]': 'host.focusable ? 0 : -1',
1078
+ '[readOnly]': 'host.readOnly',
1079
+ '[value]': 'host.value',
1080
+ '(input)': '!legacyMask && host.onValueChange($event.target.value)',
1081
+ },
1082
+ }]
1083
+ }], ctorParameters: function () {
1084
+ return [{ type: undefined, decorators: [{
1085
+ type: i0.Inject,
1086
+ args: [tokens.TUI_TEXTFIELD_HOST]
1087
+ }] }, { type: i1__namespace$1.TuiTextfieldController, decorators: [{
1088
+ type: i0.Inject,
1089
+ args: [i1$1.TUI_TEXTFIELD_WATCHED_CONTROLLER]
1090
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
1091
+ type: i0.Inject,
1092
+ args: [i0.ElementRef]
1093
+ }] }, { type: i6__namespace.TuiIdService, decorators: [{
1094
+ type: i0.Inject,
1095
+ args: [i6.TuiIdService]
1096
+ }] }, { type: undefined, decorators: [{
1097
+ type: i0.Optional
1098
+ }, {
1099
+ type: i0.Inject,
1100
+ args: [tokens.TUI_LEGACY_MASK]
1101
+ }] }];
1102
+ } });
957
1103
 
958
- var TuiPrimitiveTextfieldModule = /** @class */ (function () {
959
- function TuiPrimitiveTextfieldModule() {
960
- }
961
- return TuiPrimitiveTextfieldModule;
962
- }());
963
- TuiPrimitiveTextfieldModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
964
- TuiPrimitiveTextfieldModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, declarations: [TuiPrimitiveTextfieldComponent,
965
- TuiPrimitiveTextfieldDirective,
966
- TuiTextfieldComponent,
967
- TuiValueDecorationComponent], imports: [i4.CommonModule,
968
- i8.FormsModule,
969
- i9.PolymorpheusModule,
970
- i7.TuiMaskAccessorModule,
971
- i6.TuiFocusableModule,
972
- i5.TuiWrapperModule,
973
- i1.TuiSvgModule,
974
- i3.TuiTooltipModule,
975
- i6.TuiAutofilledModule], exports: [TuiPrimitiveTextfieldComponent,
976
- TuiPrimitiveTextfieldDirective,
977
- TuiTextfieldComponent] });
978
- TuiPrimitiveTextfieldModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, imports: [[
979
- i4.CommonModule,
980
- i8.FormsModule,
981
- i9.PolymorpheusModule,
982
- i7.TuiMaskAccessorModule,
983
- i6.TuiFocusableModule,
984
- i5.TuiWrapperModule,
985
- i1.TuiSvgModule,
986
- i3.TuiTooltipModule,
987
- i6.TuiAutofilledModule,
988
- ]] });
989
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, decorators: [{
990
- type: i0.NgModule,
991
- args: [{
992
- imports: [
993
- i4.CommonModule,
994
- i8.FormsModule,
995
- i9.PolymorpheusModule,
996
- i7.TuiMaskAccessorModule,
997
- i6.TuiFocusableModule,
998
- i5.TuiWrapperModule,
999
- i1.TuiSvgModule,
1000
- i3.TuiTooltipModule,
1001
- i6.TuiAutofilledModule,
1002
- ],
1003
- declarations: [
1004
- TuiPrimitiveTextfieldComponent,
1005
- TuiPrimitiveTextfieldDirective,
1006
- TuiTextfieldComponent,
1007
- TuiValueDecorationComponent,
1008
- ],
1009
- exports: [
1010
- TuiPrimitiveTextfieldComponent,
1011
- TuiPrimitiveTextfieldDirective,
1012
- TuiTextfieldComponent,
1013
- ],
1014
- }]
1015
- }] });
1104
+ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
1105
+ function TuiPrimitiveTextfieldModule() {
1106
+ }
1107
+ return TuiPrimitiveTextfieldModule;
1108
+ }());
1109
+ TuiPrimitiveTextfieldModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1110
+ TuiPrimitiveTextfieldModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, declarations: [TuiPrimitiveTextfieldComponent,
1111
+ TuiPrimitiveTextfieldDirective,
1112
+ TuiTextfieldComponent,
1113
+ TuiValueDecorationComponent], imports: [i4.CommonModule,
1114
+ i8.FormsModule,
1115
+ i9.PolymorpheusModule,
1116
+ i7.TuiMaskAccessorModule,
1117
+ i6.TuiFocusableModule,
1118
+ i5.TuiWrapperModule,
1119
+ i1.TuiSvgModule,
1120
+ i3.TuiTooltipModule,
1121
+ i6.TuiAutofilledModule], exports: [TuiPrimitiveTextfieldComponent,
1122
+ TuiPrimitiveTextfieldDirective,
1123
+ TuiTextfieldComponent] });
1124
+ TuiPrimitiveTextfieldModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, imports: [[
1125
+ i4.CommonModule,
1126
+ i8.FormsModule,
1127
+ i9.PolymorpheusModule,
1128
+ i7.TuiMaskAccessorModule,
1129
+ i6.TuiFocusableModule,
1130
+ i5.TuiWrapperModule,
1131
+ i1.TuiSvgModule,
1132
+ i3.TuiTooltipModule,
1133
+ i6.TuiAutofilledModule,
1134
+ ]] });
1135
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPrimitiveTextfieldModule, decorators: [{
1136
+ type: i0.NgModule,
1137
+ args: [{
1138
+ imports: [
1139
+ i4.CommonModule,
1140
+ i8.FormsModule,
1141
+ i9.PolymorpheusModule,
1142
+ i7.TuiMaskAccessorModule,
1143
+ i6.TuiFocusableModule,
1144
+ i5.TuiWrapperModule,
1145
+ i1.TuiSvgModule,
1146
+ i3.TuiTooltipModule,
1147
+ i6.TuiAutofilledModule,
1148
+ ],
1149
+ declarations: [
1150
+ TuiPrimitiveTextfieldComponent,
1151
+ TuiPrimitiveTextfieldDirective,
1152
+ TuiTextfieldComponent,
1153
+ TuiValueDecorationComponent,
1154
+ ],
1155
+ exports: [
1156
+ TuiPrimitiveTextfieldComponent,
1157
+ TuiPrimitiveTextfieldDirective,
1158
+ TuiTextfieldComponent,
1159
+ ],
1160
+ }]
1161
+ }] });
1016
1162
 
1017
- /**
1018
- * @deprecated:
1019
- * use {@link TUI_TEXTFIELD_DEFAULT_OPTIONS}
1020
- */
1021
- var TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = i1$1.TUI_TEXTFIELD_DEFAULT_OPTIONS;
1022
- /**
1023
- * @deprecated:
1024
- * use {@link TUI_TEXTFIELD_OPTIONS}
1025
- */
1026
- var TUI_PRIMITIVE_TEXTFIELD_OPTIONS = i1$1.TUI_TEXTFIELD_OPTIONS;
1027
- /**
1028
- * @deprecated:
1029
- * use {@link tuiTextfieldOptionsProvider}
1030
- */
1031
- var tuiPrimitiveTextfieldOptionsProvider = i1$1.tuiTextfieldOptionsProvider;
1163
+ /**
1164
+ * @deprecated:
1165
+ * use {@link TUI_TEXTFIELD_DEFAULT_OPTIONS}
1166
+ */
1167
+ var TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = i1$1.TUI_TEXTFIELD_DEFAULT_OPTIONS;
1168
+ /**
1169
+ * @deprecated:
1170
+ * use {@link TUI_TEXTFIELD_OPTIONS}
1171
+ */
1172
+ var TUI_PRIMITIVE_TEXTFIELD_OPTIONS = i1$1.TUI_TEXTFIELD_OPTIONS;
1173
+ /**
1174
+ * @deprecated:
1175
+ * use {@link tuiTextfieldOptionsProvider}
1176
+ */
1177
+ var tuiPrimitiveTextfieldOptionsProvider = i1$1.tuiTextfieldOptionsProvider;
1032
1178
 
1033
- /**
1034
- * Generated bundle index. Do not edit.
1035
- */
1179
+ /**
1180
+ * Generated bundle index. Do not edit.
1181
+ */
1036
1182
 
1037
- exports.TUI_ICON_PADDINGS = TUI_ICON_PADDINGS;
1038
- exports.TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS;
1039
- exports.TUI_PRIMITIVE_TEXTFIELD_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_OPTIONS;
1040
- exports.TuiPrimitiveTextfieldComponent = TuiPrimitiveTextfieldComponent;
1041
- exports.TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective;
1042
- exports.TuiPrimitiveTextfieldModule = TuiPrimitiveTextfieldModule;
1043
- exports.TuiTextfieldComponent = TuiTextfieldComponent;
1044
- exports.TuiValueDecorationComponent = TuiValueDecorationComponent;
1045
- exports.tuiPrimitiveTextfieldOptionsProvider = tuiPrimitiveTextfieldOptionsProvider;
1183
+ exports.TUI_ICON_PADDINGS = TUI_ICON_PADDINGS;
1184
+ exports.TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS;
1185
+ exports.TUI_PRIMITIVE_TEXTFIELD_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_OPTIONS;
1186
+ exports.TuiPrimitiveTextfieldComponent = TuiPrimitiveTextfieldComponent;
1187
+ exports.TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective;
1188
+ exports.TuiPrimitiveTextfieldModule = TuiPrimitiveTextfieldModule;
1189
+ exports.TuiTextfieldComponent = TuiTextfieldComponent;
1190
+ exports.TuiValueDecorationComponent = TuiValueDecorationComponent;
1191
+ exports.tuiPrimitiveTextfieldOptionsProvider = tuiPrimitiveTextfieldOptionsProvider;
1046
1192
 
1047
- Object.defineProperty(exports, '__esModule', { value: true });
1193
+ Object.defineProperty(exports, '__esModule', { value: true });
1048
1194
 
1049
1195
  }));
1050
1196
  //# sourceMappingURL=taiga-ui-core-components-primitive-textfield.umd.js.map