@taiga-ui/core 2.32.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/abstract/abstract-dropdown.d.ts +2 -1
  2. package/abstract/abstract-textfield-host.d.ts +13 -0
  3. package/abstract/index.d.ts +1 -0
  4. package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
  5. package/bundles/taiga-ui-core-abstract.umd.js +63 -0
  6. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-abstract.umd.min.js +1 -1
  8. package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
  10. package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
  11. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
  13. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
  14. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-label.umd.js +1 -1
  16. package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
  17. package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
  18. package/bundles/taiga-ui-core-components-loader.umd.js +5 -2
  19. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  20. package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -1
  21. package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
  22. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +201 -42
  23. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  24. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
  25. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  26. package/bundles/taiga-ui-core-components-theme-night.umd.js +1 -1
  27. package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -1
  28. package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
  29. package/bundles/taiga-ui-core-components-tooltip.umd.js +1 -1
  30. package/bundles/taiga-ui-core-components-tooltip.umd.min.js +1 -1
  31. package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
  32. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  33. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  34. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  35. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  36. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -6
  37. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  38. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +2 -2
  39. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
  40. package/bundles/taiga-ui-core-directives.umd.js +4 -12
  41. package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
  42. package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
  43. package/bundles/taiga-ui-core-tokens.umd.js +3 -0
  44. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-tokens.umd.min.js +2 -2
  46. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  47. package/bundles/taiga-ui-core-utils-format.umd.js +1 -1
  48. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  49. package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
  50. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  51. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  52. package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
  53. package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
  54. package/components/loader/loader.directive.d.ts +3 -0
  55. package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
  56. package/components/primitive-textfield/index.d.ts +2 -0
  57. package/components/primitive-textfield/primitive-textfield.component.d.ts +12 -8
  58. package/components/primitive-textfield/primitive-textfield.directive.d.ts +8 -0
  59. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  60. package/components/primitive-textfield/textfield/textfield.component.d.ts +15 -0
  61. package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -0
  62. package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
  63. package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
  64. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  65. package/constants/version.d.ts +1 -1
  66. package/directives/dropdown/taiga-ui-core-directives-dropdown.metadata.json +1 -1
  67. package/directives/index.d.ts +0 -1
  68. package/directives/taiga-ui-core-directives.metadata.json +1 -1
  69. package/esm2015/abstract/abstract-dropdown.js +12 -1
  70. package/esm2015/abstract/abstract-textfield-host.js +34 -0
  71. package/esm2015/abstract/index.js +2 -1
  72. package/esm2015/components/dialog/dialog.component.js +1 -1
  73. package/esm2015/components/dropdown-box/dropdown-box.component.js +1 -1
  74. package/esm2015/components/label/label.component.js +1 -1
  75. package/esm2015/components/loader/loader.component.js +1 -1
  76. package/esm2015/components/loader/loader.directive.js +5 -2
  77. package/esm2015/components/primitive-textfield/index.js +3 -1
  78. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +54 -29
  79. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +40 -0
  80. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +15 -7
  81. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +68 -0
  82. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -5
  83. package/esm2015/components/theme-night/theme-night.component.js +1 -1
  84. package/esm2015/components/tooltip/tooltip.component.js +1 -1
  85. package/esm2015/constants/version.js +2 -2
  86. package/esm2015/directives/dropdown/dropdown.directive.js +2 -7
  87. package/esm2015/directives/index.js +1 -2
  88. package/esm2015/interfaces/index.js +1 -1
  89. package/esm2015/interfaces/textfield-host.js +1 -0
  90. package/esm2015/tokens/index.js +2 -1
  91. package/esm2015/tokens/textfield-host.js +3 -0
  92. package/esm2015/utils/format/format-number.js +2 -2
  93. package/esm5/abstract/abstract-dropdown.js +12 -1
  94. package/esm5/abstract/abstract-textfield-host.js +55 -0
  95. package/esm5/abstract/index.js +2 -1
  96. package/esm5/components/dialog/dialog.component.js +1 -1
  97. package/esm5/components/dropdown-box/dropdown-box.component.js +1 -1
  98. package/esm5/components/label/label.component.js +1 -1
  99. package/esm5/components/loader/loader.component.js +1 -1
  100. package/esm5/components/loader/loader.directive.js +5 -2
  101. package/esm5/components/primitive-textfield/index.js +3 -1
  102. package/esm5/components/primitive-textfield/primitive-textfield.component.js +58 -33
  103. package/esm5/components/primitive-textfield/primitive-textfield.directive.js +49 -0
  104. package/esm5/components/primitive-textfield/primitive-textfield.module.js +15 -7
  105. package/esm5/components/primitive-textfield/textfield/textfield.component.js +77 -0
  106. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +16 -5
  107. package/esm5/components/theme-night/theme-night.component.js +1 -1
  108. package/esm5/components/tooltip/tooltip.component.js +1 -1
  109. package/esm5/constants/version.js +2 -2
  110. package/esm5/directives/dropdown/dropdown.directive.js +2 -7
  111. package/esm5/directives/index.js +1 -2
  112. package/esm5/interfaces/index.js +1 -1
  113. package/esm5/interfaces/textfield-host.js +1 -0
  114. package/esm5/tokens/index.js +2 -1
  115. package/esm5/tokens/textfield-host.js +3 -0
  116. package/esm5/utils/format/format-number.js +2 -2
  117. package/fesm2015/taiga-ui-core-abstract.js +45 -4
  118. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  119. package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
  120. package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
  121. package/fesm2015/taiga-ui-core-components-label.js +1 -1
  122. package/fesm2015/taiga-ui-core-components-loader.js +5 -2
  123. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  124. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +175 -40
  125. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  126. package/fesm2015/taiga-ui-core-components-theme-night.js +1 -1
  127. package/fesm2015/taiga-ui-core-components-tooltip.js +1 -1
  128. package/fesm2015/taiga-ui-core-constants.js +1 -1
  129. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  130. package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -6
  131. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  132. package/fesm2015/taiga-ui-core-directives.js +0 -1
  133. package/fesm2015/taiga-ui-core-directives.js.map +1 -1
  134. package/fesm2015/taiga-ui-core-tokens.js +3 -1
  135. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  136. package/fesm2015/taiga-ui-core-utils-format.js +1 -1
  137. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  138. package/fesm5/taiga-ui-core-abstract.js +66 -4
  139. package/fesm5/taiga-ui-core-abstract.js.map +1 -1
  140. package/fesm5/taiga-ui-core-components-dialog.js +1 -1
  141. package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
  142. package/fesm5/taiga-ui-core-components-label.js +1 -1
  143. package/fesm5/taiga-ui-core-components-loader.js +5 -2
  144. package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
  145. package/fesm5/taiga-ui-core-components-primitive-textfield.js +201 -44
  146. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  147. package/fesm5/taiga-ui-core-components-theme-night.js +1 -1
  148. package/fesm5/taiga-ui-core-components-tooltip.js +1 -1
  149. package/fesm5/taiga-ui-core-constants.js +1 -1
  150. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  151. package/fesm5/taiga-ui-core-directives-dropdown.js +1 -6
  152. package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
  153. package/fesm5/taiga-ui-core-directives.js +0 -1
  154. package/fesm5/taiga-ui-core-directives.js.map +1 -1
  155. package/fesm5/taiga-ui-core-tokens.js +3 -1
  156. package/fesm5/taiga-ui-core-tokens.js.map +1 -1
  157. package/fesm5/taiga-ui-core-utils-format.js +1 -1
  158. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  159. package/interfaces/index.d.ts +1 -0
  160. package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
  161. package/interfaces/textfield-host.d.ts +9 -0
  162. package/package.json +10 -9
  163. package/styles/markup/tui-island.less +1 -0
  164. package/styles/mixins/textfield.less +40 -27
  165. package/styles/mixins/textfield.scss +0 -9
  166. package/styles/theme/variables.less +2 -0
  167. package/tokens/index.d.ts +1 -0
  168. package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
  169. package/tokens/textfield-host.d.ts +3 -0
  170. package/bundles/taiga-ui-core-directives-border.umd.js +0 -291
  171. package/bundles/taiga-ui-core-directives-border.umd.js.map +0 -1
  172. package/bundles/taiga-ui-core-directives-border.umd.min.js +0 -16
  173. package/bundles/taiga-ui-core-directives-border.umd.min.js.map +0 -1
  174. package/directives/border/border.directive.d.ts +0 -9
  175. package/directives/border/border.module.d.ts +0 -2
  176. package/directives/border/index.d.ts +0 -2
  177. package/directives/border/package.json +0 -13
  178. package/directives/border/taiga-ui-core-directives-border.d.ts +0 -4
  179. package/directives/border/taiga-ui-core-directives-border.metadata.json +0 -1
  180. package/esm2015/directives/border/border.directive.js +0 -42
  181. package/esm2015/directives/border/border.module.js +0 -13
  182. package/esm2015/directives/border/index.js +0 -3
  183. package/esm2015/directives/border/taiga-ui-core-directives-border.js +0 -5
  184. package/esm5/directives/border/border.directive.js +0 -51
  185. package/esm5/directives/border/border.module.js +0 -16
  186. package/esm5/directives/border/index.js +0 -3
  187. package/esm5/directives/border/taiga-ui-core-directives-border.js +0 -5
  188. package/fesm2015/taiga-ui-core-directives-border.js +0 -57
  189. package/fesm2015/taiga-ui-core-directives-border.js.map +0 -1
  190. package/fesm5/taiga-ui-core-directives-border.js +0 -69
  191. package/fesm5/taiga-ui-core-directives-border.js.map +0 -1
@@ -1,24 +1,24 @@
1
1
  import { __decorate, __param } from 'tslib';
2
- import { forwardRef, InjectionToken, EventEmitter, Inject, ViewChild, Input, HostBinding, Output, ContentChildren, Component, ChangeDetectionStrategy, ElementRef, NgModule } from '@angular/core';
3
- import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, isNativeFocused, setNativeFocused, tuiDefaultProp, tuiPure, TuiFocusableModule, TuiFocusedModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule, TuiPreventDefaultModule } from '@taiga-ui/cdk';
2
+ import { forwardRef, InjectionToken, EventEmitter, Inject, ElementRef, ViewChild, Input, HostBinding, Output, ContentChildren, HostListener, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
3
+ import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, isNativeFocusedIn, setNativeFocused, tuiDefaultProp, tuiPure, TuiIdService, TuiFocusableModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule, TuiPreventDefaultModule } from '@taiga-ui/cdk';
4
4
  import { HINT_CONTROLLER_PROVIDER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/hint-controller';
5
5
  import { TEXTFIELD_CONTROLLER_PROVIDER, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/textfield-controller';
6
- import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE } from '@taiga-ui/core/tokens';
6
+ import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST } from '@taiga-ui/core/tokens';
7
7
  import { getBorder } from '@taiga-ui/core/utils/miscellaneous';
8
8
  import { PolymorpheusOutletComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
9
9
  import { fromEvent, Observable, defer, EMPTY } from 'rxjs';
10
10
  import { map, startWith, distinctUntilChanged } from 'rxjs/operators';
11
11
  import { MODE_PROVIDER } from '@taiga-ui/core/providers';
12
+ import { TuiAbstractTextfieldHost } from '@taiga-ui/core/abstract';
12
13
  import { CommonModule } from '@angular/common';
13
14
  import { FormsModule } from '@angular/forms';
14
15
  import { MutationObserverDirective, MutationObserverModule } from '@ng-web-apis/mutation-observer';
15
16
  import { TuiSvgModule } from '@taiga-ui/core/components/svg';
16
17
  import { TuiTooltipModule } from '@taiga-ui/core/components/tooltip';
17
18
  import { TuiWrapperModule } from '@taiga-ui/core/components/wrapper';
18
- import { TuiBorderModule } from '@taiga-ui/core/directives/border';
19
19
  import { TuiDescribedByModule } from '@taiga-ui/core/directives/described-by';
20
20
  import { TuiMaskAccessorModule } from '@taiga-ui/core/directives/mask-accessor';
21
- import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1 } from '@taiga-ui/core/directives';
21
+ import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1, TuiDescribedByDirective, TUI_DESCRIBED_BY_PROVIDERS, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1 } from '@taiga-ui/core/directives';
22
22
 
23
23
  const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
24
24
  {
@@ -44,13 +44,14 @@ const TUI_PRIMITIVE_TEXTFIELD_OPTIONS = new InjectionToken('Default parameters f
44
44
  const ICON_PADDING = 1.75;
45
45
  const ICON_PADDING_S = 1.5;
46
46
  let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
47
- constructor(mode$, appearance, controller, hintController, options) {
47
+ constructor(mode$, appearance, controller, hintController, options, elementRef) {
48
48
  super();
49
49
  this.mode$ = mode$;
50
50
  this.appearance = appearance;
51
51
  this.controller = controller;
52
52
  this.hintController = hintController;
53
53
  this.options = options;
54
+ this.elementRef = elementRef;
54
55
  this.editable = true;
55
56
  this.filler = '';
56
57
  this.iconAlign = this.options.iconAlign;
@@ -64,23 +65,27 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
64
65
  this.postfix = '';
65
66
  this.value = '';
66
67
  this.valueChange = new EventEmitter();
68
+ /**
69
+ * @deprecated TODO: remove in 3.0
70
+ */
67
71
  this.autofilledChange = new EventEmitter();
68
72
  this.autofilled = false;
69
73
  }
70
74
  get nativeFocusableElement() {
71
- return this.computedDisabled || !this.focusableElement
72
- ? null
73
- : this.focusableElement.nativeElement;
75
+ if (this.computedDisabled || !this.focusableElement) {
76
+ return null;
77
+ }
78
+ // TODO: Refactor this after we drop built-in input element
79
+ return (this.focusableElement.nativeElement
80
+ .previousElementSibling ||
81
+ this.focusableElement.nativeElement);
74
82
  }
75
83
  get focused() {
76
- return isNativeFocused(this.nativeFocusableElement);
84
+ return isNativeFocusedIn(this.elementRef.nativeElement);
77
85
  }
78
86
  get size() {
79
87
  return this.controller.size;
80
88
  }
81
- get labelOutside() {
82
- return this.controller.labelOutside;
83
- }
84
89
  get computedInvalid() {
85
90
  return !this.readOnly && !this.disabled && this.invalid;
86
91
  }
@@ -102,7 +107,10 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
102
107
  return !!this.controller.customContent;
103
108
  }
104
109
  get hasPlaceholder() {
105
- const hasDecor = this.controller.exampleText || this.prefix || this.postfix;
110
+ var _a;
111
+ const hasDecor = this.controller.exampleText ||
112
+ this.prefix ||
113
+ this.postfix || ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
106
114
  const showDecor = hasDecor && !this.readOnly && this.computedFocused;
107
115
  const placeholderVisible = !this.hasValue && !showDecor;
108
116
  return this.placeholderRaisable || placeholderVisible;
@@ -111,10 +119,10 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
111
119
  return (this.placeholderRaisable &&
112
120
  ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled));
113
121
  }
114
- get borderLeft() {
122
+ get borderStart() {
115
123
  return this.iconAlignLeft ? this.iconPaddingLeft : 0;
116
124
  }
117
- get borderRight() {
125
+ get borderEnd() {
118
126
  return getBorder(this.iconAlignRight, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
119
127
  }
120
128
  get iconAlignLeft() {
@@ -129,6 +137,13 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
129
137
  ? 'ccexpiryyear'
130
138
  : null;
131
139
  }
140
+ get computedId() {
141
+ var _a;
142
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
143
+ }
144
+ onFocused(focused) {
145
+ this.updateFocused(focused);
146
+ }
132
147
  getIndent$(element) {
133
148
  return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));
134
149
  }
@@ -139,12 +154,12 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
139
154
  this.updateValue('');
140
155
  }
141
156
  onMouseDown(event) {
142
- if (!this.focusableElement ||
143
- event.target === this.focusableElement.nativeElement) {
157
+ const { nativeFocusableElement } = this;
158
+ if (!nativeFocusableElement || event.target === nativeFocusableElement) {
144
159
  return;
145
160
  }
146
161
  event.preventDefault();
147
- setNativeFocused(this.focusableElement.nativeElement);
162
+ setNativeFocused(nativeFocusableElement);
148
163
  }
149
164
  onModelChange(value) {
150
165
  this.updateValue(value);
@@ -152,9 +167,6 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
152
167
  onHovered(hovered) {
153
168
  this.updateHovered(hovered);
154
169
  }
155
- onFocused(focused) {
156
- this.updateFocused(focused);
157
- }
158
170
  onAutofilled(autofilled) {
159
171
  this.updateAutofilled(autofilled);
160
172
  }
@@ -162,7 +174,7 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
162
174
  return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;
163
175
  }
164
176
  get placeholderRaisable() {
165
- return this.size !== 's' && !this.labelOutside;
177
+ return this.size !== 's' && !this.controller.labelOutside;
166
178
  }
167
179
  get hasIcon() {
168
180
  return !!this.iconContent;
@@ -184,7 +196,8 @@ TuiPrimitiveTextfieldComponent.ctorParameters = () => [
184
196
  { type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] },
185
197
  { type: TuiTextfieldController, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
186
198
  { type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] },
187
- { type: undefined, decorators: [{ type: Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] }
199
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] },
200
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
188
201
  ];
189
202
  __decorate([
190
203
  ViewChild('focusableElement')
@@ -244,36 +257,144 @@ __decorate([
244
257
  ContentChildren(PolymorpheusOutletComponent)
245
258
  ], TuiPrimitiveTextfieldComponent.prototype, "content", void 0);
246
259
  __decorate([
247
- HostBinding('attr.data-tui-host-size')
260
+ HostBinding('attr.data-size')
248
261
  ], TuiPrimitiveTextfieldComponent.prototype, "size", null);
249
- __decorate([
250
- HostBinding('class._label-outside')
251
- ], TuiPrimitiveTextfieldComponent.prototype, "labelOutside", null);
252
262
  __decorate([
253
263
  HostBinding('class._invalid')
254
264
  ], TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", null);
265
+ __decorate([
266
+ HostBinding('class._hidden')
267
+ ], TuiPrimitiveTextfieldComponent.prototype, "inputHidden", null);
268
+ __decorate([
269
+ HostBinding('style.--border-start.rem')
270
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderStart", null);
271
+ __decorate([
272
+ HostBinding('style.--border-end.rem')
273
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderEnd", null);
274
+ __decorate([
275
+ HostListener('focusin', ['true']),
276
+ HostListener('focusout', ['false'])
277
+ ], TuiPrimitiveTextfieldComponent.prototype, "onFocused", null);
255
278
  __decorate([
256
279
  tuiPure
257
280
  ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
258
281
  TuiPrimitiveTextfieldComponent = __decorate([
259
282
  Component({
260
283
  selector: 'tui-primitive-textfield',
261
- template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<tui-wrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiPreventDefault=\"click\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (mousedown)=\"onMouseDown($event)\"\n>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"input\"\n [class.input_hidden]=\"inputHidden\"\n [style.textIndent.px]=\"decor.pre$ | async\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.maxLength]=\"controller.maxLength\"\n [attr.name]=\"name\"\n [attr.aria-placeholder]=\"controller.exampleText\"\n [attr.aria-invalid]=\"computedInvalid\"\n [autocomplete]=\"controller.autocomplete\"\n [type]=\"controller.type\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiBorderStart]=\"borderLeft\"\n [tuiBorderEnd]=\"borderRight\"\n [tuiInputMode]=\"controller.inputMode\"\n [tuiFocusable]=\"computedFocusable\"\n [tuiDescribedBy]=\"id\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"input input_template\"\n [tuiBorderStart]=\"borderLeft\"\n [tuiBorderEnd]=\"borderRight\"\n >\n <ng-content select=\"[polymorpheus-outlet]\"></ng-content>\n </div>\n <div class=\"content\">\n <div\n *ngIf=\"iconAlignLeft\"\n polymorpheus-outlet\n class=\"icon icon_left\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <div class=\"wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n [for]=\"id\"\n >\n <ng-content></ng-content>\n </label>\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"custom-content\"\n [content]=\"controller.customContent\"\n >\n <ng-template let-iconSrc>\n <tui-svg class=\"custom-icon\" [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"cleaner\"\n [content]=\"iconCleaner\"\n (click.stop)=\"clear()\"\n >\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\n </span>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"id\"\n [content]=\"hintController.content\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconAlignRight\"\n polymorpheus-outlet\n class=\"icon\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n </div>\n</tui-wrapper>\n",
284
+ template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<tui-wrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiPreventDefault=\"click\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"input\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.maxLength]=\"controller.maxLength\"\n [attr.name]=\"name\"\n [attr.aria-placeholder]=\"controller.exampleText\"\n [attr.aria-invalid]=\"computedInvalid\"\n [autocomplete]=\"controller.autocomplete\"\n [type]=\"controller.type\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiInputMode]=\"controller.inputMode\"\n [tuiFocusable]=\"computedFocusable\"\n [tuiDescribedBy]=\"id\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"input input_template\"\n >\n <ng-content select=\"[polymorpheus-outlet]\"></ng-content>\n </div>\n <div class=\"content\">\n <div\n *ngIf=\"iconAlignLeft\"\n polymorpheus-outlet\n class=\"icon icon_left\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <div class=\"wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"custom-content\"\n [content]=\"controller.customContent\"\n >\n <ng-template let-iconSrc>\n <tui-svg class=\"custom-icon\" [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"cleaner\"\n [content]=\"iconCleaner\"\n (click.stop)=\"clear()\"\n >\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\n </span>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintController.content\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconAlignRight\"\n polymorpheus-outlet\n class=\"icon\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n </div>\n</tui-wrapper>\n",
262
285
  changeDetection: ChangeDetectionStrategy.OnPush,
263
286
  providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,
264
287
  host: {
265
288
  '($.data-mode.attr)': 'mode$',
266
289
  '[class._autofilled]': 'autofilled',
290
+ '[class._label-outside]': 'controller.labelOutside',
267
291
  },
268
- styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-tui-host-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-tui-host-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-tui-host-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}:host[data-mode=onDark] .input:-webkit-autofill,:host[data-mode=onDark] .input:-webkit-autofill:focus,:host[data-mode=onDark] .input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}:host[data-tui-host-size='s'] .input{padding:0 var(--tui-padding-s)}:host[data-tui-host-size='l'] .input{padding:0 var(--tui-padding-l)}:host._disabled .input{pointer-events:none}:host._right-aligned .input{text-align:right}:host[data-tui-host-size='l']:not(._label-outside) .input{padding-top:1.25rem}:host[data-tui-host-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-tui-host-size='m']:not(._label-outside) .input{padding-top:1.125rem}:host[data-tui-host-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.filler{vertical-align:middle}.content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-tui-host-size='s'] .content{padding:0 var(--tui-padding-s)}:host[data-tui-host-size='l'] .content{padding:0 var(--tui-padding-l)}.content:after{content:'';margin-right:-.25rem}:host[data-tui-host-size='m'] .content:after{display:none}.wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;font-size:.8125rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none}.placeholder_raised{transform:translateY(-.625rem)}:host[data-tui-host-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-tui-host-size='l']._focused._label-outside .placeholder,:host[data-tui-host-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-tui-host-size='l'] .placeholder{font-size:.9375rem}:host[data-tui-host-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-tui-host-size='l']._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-tui-host-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-tui-host-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.placeholder{transition-property:transform,color,letter-spacing}}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;align-items:center;justify-content:center;color:var(--tui-text-03)}.icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-tui-host-size='s'] .icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration{display:none}.value_visible{display:block}.custom-content{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.custom-icon{width:100%;height:100%}.icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}.icon:hover{color:var(--tui-text-02)}:host._disabled .icon,:host._readonly .icon{pointer-events:none}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .icon:hover{color:var(--tui-text-01-night)}:host._hovered:not(._readonly) .icon{color:var(--tui-text-02)}:host[data-mode=onDark]._hovered:not(._readonly) .icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]._hovered:not(._readonly) .icon{color:var(--tui-text-01)}.input_hidden{opacity:0;text-indent:-10em;-webkit-user-select:none}:host[data-tui-host-size] .input_template{display:flex;width:100%;max-width:100%;align-items:center;pointer-events:none}.input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-tui-host-size='l']:not(._label-outside) .input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button,.input::-webkit-credentials-auto-fill-button,.input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-tui-host-size='l']:not(._label-outside) .input::-webkit-contacts-auto-fill-button,:host[data-tui-host-size='l']:not(._label-outside) .input::-webkit-credentials-auto-fill-button,:host[data-tui-host-size='l']:not(._label-outside) .input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button:hover,.input::-webkit-credentials-auto-fill-button:hover,.input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.input:-webkit-autofill,.input:-webkit-autofill::first-line{font-size:inherit;line-height:inherit}.text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
292
+ styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .input:-webkit-autofill,:host[data-mode=onDark] .input:-webkit-autofill:focus,:host[data-mode=onDark] .input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}.input :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host[data-size='s'] .input{padding:0 var(--tui-padding-s)}.input :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host[data-size='l'] .input{padding:0 var(--tui-padding-l)}.input :host-context(tui-primitive-textfield._disabled),:host._disabled .input{pointer-events:none}.input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .input{padding-top:1.25rem}.input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .input{padding-top:1.125rem}.input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.input :host-context(tui-primitive-textfield._hidden),:host._hidden input.input{opacity:0;text-indent:-10em;-webkit-user-select:none}.filler{vertical-align:middle}.content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size='s'] .content{padding:0 var(--tui-padding-s)}:host[data-size='l'] .content{padding:0 var(--tui-padding-l)}.content:after{content:'';margin-right:-.25rem}:host[data-size='m'] .content:after{display:none}.wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;font-size:.8125rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none}.placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-size='l']._focused._label-outside .placeholder,:host[data-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-size='l'] .placeholder{font-size:.9375rem}:host[data-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .placeholder,:host[data-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.placeholder{transition-property:transform,color,letter-spacing}}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;align-items:center;justify-content:center;color:var(--tui-text-03)}.icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size='s'] .icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration{display:none}.custom-content{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.custom-icon{width:100%;height:100%}.icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}.icon:hover{color:var(--tui-text-02)}:host._disabled .icon,:host._readonly .icon{pointer-events:none}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .icon:hover{color:var(--tui-text-01-night)}:host._hovered:not(._readonly) .icon{color:var(--tui-text-02)}:host[data-mode=onDark]._hovered:not(._readonly) .icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]._hovered:not(._readonly) .icon{color:var(--tui-text-01)}.input:not(:first-child){display:none}:host[data-size] .input_template{display:flex;width:100%;max-width:100%;align-items:center;pointer-events:none}.input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size='l']:not(._label-outside) .input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button,.input::-webkit-credentials-auto-fill-button,.input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size='l']:not(._label-outside) .input::-webkit-contacts-auto-fill-button,:host[data-size='l']:not(._label-outside) .input::-webkit-credentials-auto-fill-button,:host[data-size='l']:not(._label-outside) .input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button:hover,.input::-webkit-credentials-auto-fill-button:hover,.input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.input:-webkit-autofill,.input:-webkit-autofill::first-line{font-size:inherit;line-height:inherit}.text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
269
293
  }),
270
294
  __param(0, Inject(TUI_MODE)),
271
295
  __param(1, Inject(TUI_TEXTFIELD_APPEARANCE)),
272
296
  __param(2, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)),
273
297
  __param(3, Inject(TUI_HINT_WATCHED_CONTROLLER)),
274
- __param(4, Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS))
298
+ __param(4, Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)),
299
+ __param(5, Inject(ElementRef))
275
300
  ], TuiPrimitiveTextfieldComponent);
276
301
 
302
+ var TuiPrimitiveTextfieldDirective_1;
303
+ let TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = class TuiPrimitiveTextfieldDirective extends TuiAbstractTextfieldHost {
304
+ constructor(textfield) {
305
+ /**
306
+ * TuiPrimitiveTextfieldComponent satisfies all required parts of
307
+ * AbstractTuiControl interface. A new interface is not introduced
308
+ * so AbstractTuiControl is automatically injected for all other controls.
309
+ */
310
+ super(textfield);
311
+ this.textfield = textfield;
312
+ }
313
+ get readOnly() {
314
+ return this.textfield.readOnly || !this.textfield.editable;
315
+ }
316
+ onValueChange(value) {
317
+ this.textfield.onModelChange(value);
318
+ }
319
+ };
320
+ TuiPrimitiveTextfieldDirective.ctorParameters = () => [
321
+ { type: TuiPrimitiveTextfieldComponent, decorators: [{ type: Inject, args: [TuiPrimitiveTextfieldComponent,] }] }
322
+ ];
323
+ TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = __decorate([
324
+ Directive({
325
+ selector: 'tui-primitive-textfield',
326
+ providers: [
327
+ {
328
+ provide: TUI_TEXTFIELD_HOST,
329
+ useExisting: forwardRef(() => TuiPrimitiveTextfieldDirective_1),
330
+ },
331
+ ],
332
+ }),
333
+ __param(0, Inject(TuiPrimitiveTextfieldComponent))
334
+ ], TuiPrimitiveTextfieldDirective);
335
+
336
+ // @dynamic
337
+ let TuiTextfieldComponent = class TuiTextfieldComponent {
338
+ constructor(host, controller, elementRef, describedBy, idService) {
339
+ this.host = host;
340
+ this.controller = controller;
341
+ this.elementRef = elementRef;
342
+ this.describedBy = describedBy;
343
+ this.idService = idService;
344
+ this.host.process(this.elementRef.nativeElement);
345
+ }
346
+ get computedDescribedBy() {
347
+ return this.describedBy.computedDescribedBy;
348
+ }
349
+ get id() {
350
+ return this.elementRef.nativeElement.id || this.idService.generate();
351
+ }
352
+ ngDoCheck() {
353
+ this.describedBy.tuiDescribedBy = this.id;
354
+ }
355
+ };
356
+ TuiTextfieldComponent.ctorParameters = () => [
357
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_HOST,] }] },
358
+ { type: TuiTextfieldController$1, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1,] }] },
359
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
360
+ { type: TuiDescribedByDirective, decorators: [{ type: Inject, args: [TuiDescribedByDirective,] }] },
361
+ { type: TuiIdService, decorators: [{ type: Inject, args: [TuiIdService,] }] }
362
+ ];
363
+ __decorate([
364
+ HostBinding('attr.aria-describedby')
365
+ ], TuiTextfieldComponent.prototype, "computedDescribedBy", null);
366
+ __decorate([
367
+ HostBinding('id')
368
+ ], TuiTextfieldComponent.prototype, "id", null);
369
+ TuiTextfieldComponent = __decorate([
370
+ Component({
371
+ selector: 'input[tuiTextfield]',
372
+ template: '',
373
+ providers: [
374
+ TuiDescribedByDirective,
375
+ TUI_DESCRIBED_BY_PROVIDERS,
376
+ TEXTFIELD_CONTROLLER_PROVIDER$1,
377
+ ],
378
+ host: {
379
+ type: 'text',
380
+ '[attr.aria-placeholder]': 'controller.exampleText',
381
+ '[attr.aria-invalid]': 'host.invalid',
382
+ '[attr.disabled]': 'host.disabled || null',
383
+ '[tabIndex]': 'host.focusable ? 0 : -1',
384
+ '[readOnly]': 'host.readOnly',
385
+ '[value]': 'host.value',
386
+ '(input)': 'host.onValueChange($event.target.value)',
387
+ },
388
+ changeDetection: ChangeDetectionStrategy.OnPush,
389
+ styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}:host:-webkit-autofill,:host:-webkit-autofill:focus,:host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] :host:-webkit-autofill,:host[data-mode=onDark] :host:-webkit-autofill:focus,:host[data-mode=onDark] :host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}:host :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host[data-size='s'] :host{padding:0 var(--tui-padding-s)}:host :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host[data-size='l'] :host{padding:0 var(--tui-padding-l)}:host :host-context(tui-primitive-textfield._disabled),:host._disabled :host{pointer-events:none}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) :host{padding-top:1.25rem}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) :host{padding-top:1.125rem}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host :host-context(tui-primitive-textfield._hidden),:host._hidden input:host{opacity:0;text-indent:-10em;-webkit-user-select:none}:host::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-caps-lock-indicator{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-contacts-auto-fill-button,:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-credentials-auto-fill-button,:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button:hover,:host::-webkit-credentials-auto-fill-button:hover,:host::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}:host::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}:host::placeholder{color:var(--tui-text-03);opacity:0}:host :host-context(tui-primitive-textfield[data-mode=onDark])::-ms-input-placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield[data-mode=onDark])::placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::-ms-input-placeholder{opacity:1}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::placeholder{opacity:1}"]
390
+ }),
391
+ __param(0, Inject(TUI_TEXTFIELD_HOST)),
392
+ __param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1)),
393
+ __param(2, Inject(ElementRef)),
394
+ __param(3, Inject(TuiDescribedByDirective)),
395
+ __param(4, Inject(TuiIdService))
396
+ ], TuiTextfieldComponent);
397
+
277
398
  let TuiValueDecorationComponent = class TuiValueDecorationComponent {
278
399
  constructor(textfield, controller) {
279
400
  this.textfield = textfield;
@@ -287,9 +408,11 @@ let TuiValueDecorationComponent = class TuiValueDecorationComponent {
287
408
  return this.textfield.value;
288
409
  }
289
410
  get filler() {
290
- return this.focused
291
- ? this.exampleText || this.textfield.filler.slice(this.value.length)
292
- : '';
411
+ const { focused, placeholder, exampleText, value, textfield } = this;
412
+ if (focused && placeholder && exampleText) {
413
+ return '';
414
+ }
415
+ return focused ? exampleText || textfield.filler.slice(value.length) : '';
293
416
  }
294
417
  get prefix() {
295
418
  return this.decorationsVisible ? this.textfield.prefix : '';
@@ -297,8 +420,13 @@ let TuiValueDecorationComponent = class TuiValueDecorationComponent {
297
420
  get postfix() {
298
421
  return this.decorationsVisible ? this.computedPostfix : '';
299
422
  }
423
+ get placeholder() {
424
+ var _a;
425
+ return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
426
+ }
300
427
  get exampleText() {
301
- return !this.value && this.focused ? this.controller.exampleText : '';
428
+ const exampleText = this.controller.exampleText || this.placeholder;
429
+ return !this.value && this.focused ? exampleText : '';
302
430
  }
303
431
  get decorationsVisible() {
304
432
  return !!this.value || this.focused;
@@ -346,7 +474,6 @@ TuiPrimitiveTextfieldModule = __decorate([
346
474
  FormsModule,
347
475
  TuiMaskAccessorModule,
348
476
  TuiFocusableModule,
349
- TuiFocusedModule,
350
477
  TuiHoveredModule,
351
478
  TuiInputModeModule,
352
479
  PolymorpheusModule,
@@ -356,11 +483,19 @@ TuiPrimitiveTextfieldModule = __decorate([
356
483
  TuiAutofilledModule,
357
484
  TuiDescribedByModule,
358
485
  TuiPreventDefaultModule,
359
- TuiBorderModule,
360
486
  MutationObserverModule,
361
487
  ],
362
- declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],
363
- exports: [TuiPrimitiveTextfieldComponent],
488
+ declarations: [
489
+ TuiPrimitiveTextfieldComponent,
490
+ TuiPrimitiveTextfieldDirective,
491
+ TuiTextfieldComponent,
492
+ TuiValueDecorationComponent,
493
+ ],
494
+ exports: [
495
+ TuiPrimitiveTextfieldComponent,
496
+ TuiPrimitiveTextfieldDirective,
497
+ TuiTextfieldComponent,
498
+ ],
364
499
  })
365
500
  ], TuiPrimitiveTextfieldModule);
366
501
 
@@ -368,5 +503,5 @@ TuiPrimitiveTextfieldModule = __decorate([
368
503
  * Generated bundle index. Do not edit.
369
504
  */
370
505
 
371
- export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldModule, TuiValueDecorationComponent };
506
+ export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent };
372
507
  //# sourceMappingURL=taiga-ui-core-components-primitive-textfield.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield-options.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {InjectionToken} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiPrimitiveTextfieldOptions {\n readonly iconAlign: TuiHorizontalDirection;\n readonly iconCleaner: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';\n\n/** Default values for primitive textfield options */\nexport const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS: TuiPrimitiveTextfieldOptions = {\n iconAlign: 'right',\n iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,\n};\n\nexport const TUI_PRIMITIVE_TEXTFIELD_OPTIONS =\n new InjectionToken<TuiPrimitiveTextfieldOptions>(\n 'Default parameters for primitive textfield component',\n {\n factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,\n },\n );\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n setNativeFocused,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\nimport {\n TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n TuiPrimitiveTextfieldOptions,\n} from './primitive-textfield-options';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._autofilled]': 'autofilled',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiPrimitiveTextfieldOptions['iconAlign'] = this.options.iconAlign;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconCleaner: TuiPrimitiveTextfieldOptions['iconCleaner'] = this.options.iconCleaner;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n autofilled = false;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)\n readonly options: TuiPrimitiveTextfieldOptions,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor = this.controller.exampleText || this.prefix || this.postfix;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n get borderLeft(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n get borderRight(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n if (\n !this.focusableElement ||\n event.target === this.focusableElement.nativeElement\n ) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.focusableElement.nativeElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n return this.focused\n ? this.exampleText || this.textfield.filler.slice(this.value.length)\n : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get exampleText(): string {\n return !this.value && this.focused ? this.controller.exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiBorderModule} from '@taiga-ui/core/directives/border';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n TuiBorderModule,\n MutationObserverModule,\n ],\n declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],\n exports: [TuiPrimitiveTextfieldComponent],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n *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B,CA4DvC;;ICzCY,2BAA2B,GAAxC,MAAa,2BAA2B;EAAG;AAA9B,2BAA2B;IAtBvC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,qBAAqB;YACrB,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,gBAAgB;YAChB,mBAAmB;YACnB,oBAAoB;YACpB,uBAAuB;YACvB,eAAe;YACf,sBAAsB;SACzB;QACD,YAAY,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;QAC3E,OAAO,EAAE,CAAC,8BAA8B,CAAC;KAC5C,CAAC;GACW,2BAA2B,CAAG;;AC7C3C;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield-options.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.directive.ts","ng://@taiga-ui/core/components/primitive-textfield/textfield/textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {InjectionToken} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiPrimitiveTextfieldOptions {\n readonly iconAlign: TuiHorizontalDirection;\n readonly iconCleaner: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';\n\n/** Default values for primitive textfield options */\nexport const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS: TuiPrimitiveTextfieldOptions = {\n iconAlign: 'right',\n iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,\n};\n\nexport const TUI_PRIMITIVE_TEXTFIELD_OPTIONS =\n new InjectionToken<TuiPrimitiveTextfieldOptions>(\n 'Default parameters for primitive textfield component',\n {\n factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,\n },\n );\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocusedIn,\n setNativeFocused,\n TuiContextWithImplicit,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\nimport {\n TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n TuiPrimitiveTextfieldOptions,\n} from './primitive-textfield-options';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._autofilled]': 'autofilled',\n '[class._label-outside]': 'controller.labelOutside',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiPrimitiveTextfieldOptions['iconAlign'] = this.options.iconAlign;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>> | null =\n null;\n\n @Input()\n @tuiDefaultProp()\n iconCleaner: TuiPrimitiveTextfieldOptions['iconCleaner'] = this.options.iconCleaner;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n /**\n * @deprecated TODO: remove in 3.0\n */\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n autofilled = false;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)\n readonly options: TuiPrimitiveTextfieldOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n if (this.computedDisabled || !this.focusableElement) {\n return null;\n }\n\n // TODO: Refactor this after we drop built-in input element\n return (\n (this.focusableElement.nativeElement\n .previousElementSibling as HTMLInputElement | null) ||\n this.focusableElement.nativeElement\n );\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n @HostBinding('class._hidden')\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor =\n this.controller.exampleText ||\n this.prefix ||\n this.postfix ||\n this.nativeFocusableElement?.placeholder;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n @HostBinding('style.--border-start.rem')\n get borderStart(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n @HostBinding('style.--border-end.rem')\n get borderEnd(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n get computedId(): string {\n return this.nativeFocusableElement?.id || '';\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n const {nativeFocusableElement} = this;\n\n if (!nativeFocusableElement || event.target === nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(nativeFocusableElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.controller.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {Directive, forwardRef, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiAbstractTextfieldHost} from '@taiga-ui/core/abstract';\nimport {TUI_TEXTFIELD_HOST} from '@taiga-ui/core/tokens';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\n@Directive({\n selector: 'tui-primitive-textfield',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldDirective),\n },\n ],\n})\nexport class TuiPrimitiveTextfieldDirective extends TuiAbstractTextfieldHost<any> {\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n ) {\n /**\n * TuiPrimitiveTextfieldComponent satisfies all required parts of\n * AbstractTuiControl interface. A new interface is not introduced\n * so AbstractTuiControl is automatically injected for all other controls.\n */\n super(textfield as any as AbstractTuiControl<unknown>);\n }\n\n get readOnly(): boolean {\n return this.textfield.readOnly || !this.textfield.editable;\n }\n\n onValueChange(value: string) {\n this.textfield.onModelChange(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {TuiIdService} from '@taiga-ui/cdk';\nimport {\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_DESCRIBED_BY_PROVIDERS,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiDescribedByDirective,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\nimport {TUI_TEXTFIELD_HOST} from '@taiga-ui/core/tokens';\n\n// @dynamic\n@Component({\n selector: 'input[tuiTextfield]',\n template: '',\n providers: [\n TuiDescribedByDirective,\n TUI_DESCRIBED_BY_PROVIDERS,\n TEXTFIELD_CONTROLLER_PROVIDER,\n ],\n host: {\n type: 'text',\n '[attr.aria-placeholder]': 'controller.exampleText',\n '[attr.aria-invalid]': 'host.invalid',\n '[attr.disabled]': 'host.disabled || null',\n '[tabIndex]': 'host.focusable ? 0 : -1',\n '[readOnly]': 'host.readOnly',\n '[value]': 'host.value',\n '(input)': 'host.onValueChange($event.target.value)',\n },\n styleUrls: ['textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTextfieldComponent implements DoCheck {\n constructor(\n @Inject(TUI_TEXTFIELD_HOST) readonly host: TuiTextfieldHost,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiDescribedByDirective)\n private readonly describedBy: TuiDescribedByDirective,\n @Inject(TuiIdService)\n private readonly idService: TuiIdService,\n ) {\n this.host.process(this.elementRef.nativeElement);\n }\n\n @HostBinding('attr.aria-describedby')\n get computedDescribedBy(): string | null {\n return this.describedBy.computedDescribedBy;\n }\n\n @HostBinding('id')\n get id(): string {\n return this.elementRef.nativeElement.id || this.idService.generate();\n }\n\n ngDoCheck() {\n this.describedBy.tuiDescribedBy = this.id;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n const {focused, placeholder, exampleText, value, textfield} = this;\n\n if (focused && placeholder && exampleText) {\n return '';\n }\n\n return focused ? exampleText || textfield.filler.slice(value.length) : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get placeholder(): string {\n return this.textfield.nativeFocusableElement?.placeholder || '';\n }\n\n private get exampleText(): string {\n const exampleText = this.controller.exampleText || this.placeholder;\n\n return !this.value && this.focused ? exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiPrimitiveTextfieldDirective} from './primitive-textfield.directive';\nimport {TuiTextfieldComponent} from './textfield/textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n MutationObserverModule,\n ],\n declarations: [\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldDirective,\n TuiTextfieldComponent,\n TuiValueDecorationComponent,\n ],\n exports: [\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldDirective,\n TuiTextfieldComponent,\n ],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER","TEX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E;cAC5B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;KAChC;EACJ;;YAvDmC,8BAA8B,uBADzD,MAAM,SAAC,8BAA8B;YAGTD,wBAAsB,uBADlD,MAAM,SAACC,kCAAgC;;AAd5C;IADC,SAAS,CAAC,KAAK,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;wDACJ;AAG/C;IADC,SAAS,CAAC,yBAAyB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;8DACE;AAgBvD;IADC,WAAW,CAAC,cAAc,CAAC;iEAG3B;AAvBQ,2BAA2B;IAPvC,SAAS,CAAC;QACP,QAAQ,EAAE,sBAAsB;QAChC,8LAA6C;;QAG7C,eAAe,EAAE,uBAAuB,CAAC,OAAO;;KACnD,CAAC;IAeO,WAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;IAEtC,WAAA,MAAM,CAACA,kCAAgC,CAAC,CAAA;GAhBpC,2BAA2B,CAsEvC;;IC5CY,2BAA2B,GAAxC,MAAa,2BAA2B;EAAG;AAA9B,2BAA2B;IA7BvC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,qBAAqB;YACrB,kBAAkB;YAClB,gBAAgB;YAChB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,gBAAgB;YAChB,mBAAmB;YACnB,oBAAoB;YACpB,uBAAuB;YACvB,sBAAsB;SACzB;QACD,YAAY,EAAE;YACV,8BAA8B;YAC9B,8BAA8B;YAC9B,qBAAqB;YACrB,2BAA2B;SAC9B;QACD,OAAO,EAAE;YACL,8BAA8B;YAC9B,8BAA8B;YAC9B,qBAAqB;SACxB;KACJ,CAAC;GACW,2BAA2B,CAAG;;ACpD3C;;;;;;"}
@@ -10,7 +10,7 @@ TuiThemeNightComponent = __decorate([
10
10
  selector: 'tui-theme-night',
11
11
  template: '',
12
12
  encapsulation: ViewEncapsulation.None,
13
- styles: [":root{--tui-base-01:#222;--tui-base-02:#333;--tui-base-03:#808080;--tui-base-04:#959595;--tui-base-05:#b0b0b0;--tui-base-06:#d7d7d7;--tui-base-07:#ededed;--tui-base-08:#f6f6f6;--tui-base-09:#fff;--tui-focus:rgba(51, 51, 51, 0.64);--tui-secondary:rgba(255, 255, 255, 0.16);--tui-secondary-hover:rgba(255, 255, 255, 0.24);--tui-secondary-active:rgba(255, 255, 255, 0.4);--tui-clear:rgba(255, 255, 255, 0.16);--tui-clear-disabled:rgba(255, 255, 255, 0.08);--tui-clear-hover:rgba(255, 255, 255, 0.24);--tui-clear-active:rgba(255, 255, 255, 0.4);--tui-error-fill:#ff8c67;--tui-error-bg:rgba(244, 87, 37, 0.32);--tui-error-bg-hover:rgba(244, 87, 37, 0.4);--tui-success-fill:#4ac99b;--tui-success-bg:rgba(74, 201, 155, 0.32);--tui-success-bg-hover:rgba(74, 201, 155, 0.4);--tui-warning-fill:#ffc700;--tui-warning-bg:rgba(255, 199, 0, 0.32);--tui-warning-bg-hover:rgba(255, 199, 0, 0.4);--tui-info-fill:#70b6f6;--tui-info-bg:rgba(112, 182, 246, 0.32);--tui-info-bg-hover:rgba(112, 182, 246, 0.4);--tui-neutral-fill:#959ba4;--tui-neutral-bg:rgba(149, 155, 164, 0.32);--tui-neutral-bg-hover:rgba(149, 155, 164, 0.48);--tui-text-01:#ffffff;--tui-text-02:rgba(255, 255, 255, 0.72);--tui-text-03:rgba(255, 255, 255, 0.6);--tui-link:#6788ff;--tui-link-hover:#526ed3;--tui-positive:#44c596;--tui-positive-hover:#3aa981;--tui-negative:#ff8c67;--tui-negative-hover:#bb593a;--tui-autofill:var(--tui-autofill-night)}tui-notification{--tui-base-01:#000}"]
13
+ styles: [":root{--tui-base-01:#222;--tui-base-02:#333;--tui-base-03:#808080;--tui-base-04:#959595;--tui-base-05:#b0b0b0;--tui-base-06:#d7d7d7;--tui-base-07:#ededed;--tui-base-08:#f6f6f6;--tui-base-09:#fff;--tui-focus:rgba(51, 51, 51, 0.64);--tui-secondary:rgba(255, 255, 255, 0.16);--tui-secondary-hover:rgba(255, 255, 255, 0.24);--tui-secondary-active:rgba(255, 255, 255, 0.4);--tui-clear:rgba(255, 255, 255, 0.16);--tui-clear-disabled:rgba(255, 255, 255, 0.08);--tui-clear-hover:rgba(255, 255, 255, 0.24);--tui-clear-active:rgba(255, 255, 255, 0.4);--tui-error-fill:#ff8c67;--tui-error-bg:rgba(244, 87, 37, 0.32);--tui-error-bg-hover:rgba(244, 87, 37, 0.4);--tui-success-fill:#4ac99b;--tui-success-bg:rgba(74, 201, 155, 0.32);--tui-success-bg-hover:rgba(74, 201, 155, 0.4);--tui-warning-fill:#ffc700;--tui-warning-bg:rgba(255, 199, 0, 0.32);--tui-warning-bg-hover:rgba(255, 199, 0, 0.4);--tui-info-fill:#70b6f6;--tui-info-bg:rgba(112, 182, 246, 0.32);--tui-info-bg-hover:rgba(112, 182, 246, 0.4);--tui-neutral-fill:#959ba4;--tui-neutral-bg:rgba(149, 155, 164, 0.32);--tui-neutral-bg-hover:rgba(149, 155, 164, 0.48);--tui-text-01:#ffffff;--tui-text-02:rgba(255, 255, 255, 0.72);--tui-text-03:rgba(255, 255, 255, 0.6);--tui-link:#6788ff;--tui-link-hover:#526ed3;--tui-positive:#44c596;--tui-positive-hover:#3aa981;--tui-negative:#ff8c67;--tui-negative-hover:#bb593a;--tui-autofill:var(--tui-autofill-night);--tui-elevation-01:#222;--tui-elevation-02:#222}tui-notification{--tui-base-01:#000}"]
14
14
  })
15
15
  ], TuiThemeNightComponent);
16
16
 
@@ -83,7 +83,7 @@ TuiTooltipComponent = __decorate([
83
83
  template: "<span\n polymorpheus-outlet\n automation-id=\"tui-tooltip__icon\"\n class=\"icon\"\n [content]=\"icon\"\n [tuiHintId]=\"describeId\"\n [tuiHint]=\"content\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintMode]=\"computedMode\"\n>\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\n</span>\n",
84
84
  changeDetection: ChangeDetectionStrategy.OnPush,
85
85
  providers: [TuiDestroyService, MODE_PROVIDER],
86
- styles: [":host{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-03)}:host:hover{color:var(--tui-text-02)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-mode=onLight]{color:var(--tui-text-01)}:host[data-mode=error]{color:var(--tui-error-fill)}.icon{transition-property:opacity,color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:100%;height:100%}:host:not([data-mode]) .icon._hint_hovered{color:var(--tui-text-02)}:host[data-mode=onDark] .icon,:host[data-mode=onLight] .icon{opacity:var(--tui-disabled-opacity)}:host[data-mode=onDark] .icon._hint_hovered,:host[data-mode=onDark] .icon:hover,:host[data-mode=onLight] .icon._hint_hovered,:host[data-mode=onLight] .icon:hover{opacity:1}"]
86
+ styles: [":host{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-03)}:host:hover{color:var(--tui-text-02)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-mode=onLight]{color:var(--tui-text-01)}:host[data-mode=error]{color:var(--tui-error-fill)}.icon{transition-property:opacity,color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:inline-block;width:100%;height:100%}:host:not([data-mode]) .icon._hint_hovered{color:var(--tui-text-02)}:host[data-mode=onDark] .icon,:host[data-mode=onLight] .icon{opacity:var(--tui-disabled-opacity)}:host[data-mode=onDark] .icon._hint_hovered,:host[data-mode=onDark] .icon:hover,:host[data-mode=onLight] .icon._hint_hovered,:host[data-mode=onLight] .icon:hover{opacity:1}"]
87
87
  }),
88
88
  __param(0, Inject(TuiDestroyService)),
89
89
  __param(1, Inject(TUI_MODE)),
@@ -63,7 +63,7 @@ const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\/#!$%\\^&\\*;:{}=\\-_`~()]$/;
63
63
  const TUI_LATIN_REGEXP = /[A-z]/;
64
64
  const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;
65
65
 
66
- const VERSION = '2.32.0';
66
+ const VERSION = '2.33.0';
67
67
 
68
68
  /**
69
69
  * Generated bundle index. Do not edit.