@taiga-ui/core 2.29.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 (348) hide show
  1. package/abstract/abstract-dropdown.d.ts +2 -1
  2. package/abstract/abstract-hint-options.d.ts +7 -0
  3. package/abstract/abstract-hint.d.ts +5 -4
  4. package/abstract/abstract-textfield-host.d.ts +13 -0
  5. package/abstract/index.d.ts +2 -0
  6. package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
  7. package/bundles/taiga-ui-core-abstract.umd.js +76 -4
  8. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-abstract.umd.min.js +1 -1
  10. package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
  12. package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
  13. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  14. package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
  15. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
  16. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-hints-host.umd.js +1 -0
  18. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
  20. package/bundles/taiga-ui-core-components-label.umd.js +1 -1
  21. package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
  22. package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-link.umd.js +2 -2
  24. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-link.umd.min.js +1 -1
  26. package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-loader.umd.js +5 -2
  28. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -1
  30. package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
  31. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +226 -44
  32. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
  34. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  35. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
  36. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +2 -2
  37. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
  38. package/bundles/taiga-ui-core-components-theme-night.umd.js +1 -1
  39. package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -1
  40. package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
  41. package/bundles/taiga-ui-core-components-tooltip.umd.js +24 -14
  42. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-components-tooltip.umd.min.js +2 -2
  44. package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
  45. package/bundles/taiga-ui-core-constants.umd.js +2 -2
  46. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  47. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  48. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  49. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -6
  50. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  51. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +2 -2
  52. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
  53. package/bundles/taiga-ui-core-directives-hint-controller.umd.js +17 -12
  54. package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
  55. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +2 -2
  56. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
  57. package/bundles/taiga-ui-core-directives-hint.umd.js +20 -6
  58. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  59. package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -1
  60. package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
  61. package/bundles/taiga-ui-core-directives-manual-hint.umd.js +15 -4
  62. package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
  63. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js +1 -1
  64. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
  65. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +17 -6
  66. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
  67. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -1
  68. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
  69. package/bundles/taiga-ui-core-directives.umd.js +4 -12
  70. package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
  71. package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
  72. package/bundles/taiga-ui-core-providers.umd.js +2 -1
  73. package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
  74. package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
  75. package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
  76. package/bundles/taiga-ui-core-tokens.umd.js +3 -0
  77. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  78. package/bundles/taiga-ui-core-tokens.umd.min.js +2 -2
  79. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  80. package/bundles/taiga-ui-core-utils-dom.umd.js +1 -1
  81. package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
  82. package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
  83. package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
  84. package/bundles/taiga-ui-core-utils-format.umd.js +38 -6
  85. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  86. package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
  87. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  88. package/bundles/taiga-ui-core-utils-mask.umd.js +1 -1
  89. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  90. package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
  91. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  92. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  93. package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
  94. package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
  95. package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
  96. package/components/loader/loader.directive.d.ts +3 -0
  97. package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
  98. package/components/primitive-textfield/index.d.ts +3 -0
  99. package/components/primitive-textfield/primitive-textfield-options.d.ts +11 -0
  100. package/components/primitive-textfield/primitive-textfield.component.d.ts +18 -11
  101. package/components/primitive-textfield/primitive-textfield.directive.d.ts +8 -0
  102. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  103. package/components/primitive-textfield/textfield/textfield.component.d.ts +15 -0
  104. package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -0
  105. package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
  106. package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
  107. package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
  108. package/components/tooltip/tooltip.component.d.ts +9 -6
  109. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  110. package/constants/version.d.ts +1 -1
  111. package/directives/dropdown/taiga-ui-core-directives-dropdown.metadata.json +1 -1
  112. package/directives/hint/hint-options.d.ts +12 -0
  113. package/directives/hint/hint.directive.d.ts +5 -3
  114. package/directives/hint/index.d.ts +1 -0
  115. package/directives/hint/taiga-ui-core-directives-hint.metadata.json +1 -1
  116. package/directives/hint-controller/hint-controller.directive.d.ts +7 -5
  117. package/directives/hint-controller/taiga-ui-core-directives-hint-controller.metadata.json +1 -1
  118. package/directives/index.d.ts +0 -1
  119. package/directives/manual-hint/index.d.ts +1 -0
  120. package/directives/manual-hint/manual-hint-options.d.ts +6 -0
  121. package/directives/manual-hint/manual-hint.directive.d.ts +3 -1
  122. package/directives/manual-hint/taiga-ui-core-directives-manual-hint.metadata.json +1 -1
  123. package/directives/pointer-hint/index.d.ts +1 -0
  124. package/directives/pointer-hint/pointer-hint-options.d.ts +9 -0
  125. package/directives/pointer-hint/pointer-hint.directive.d.ts +5 -3
  126. package/directives/pointer-hint/taiga-ui-core-directives-pointer-hint.metadata.json +1 -1
  127. package/directives/taiga-ui-core-directives.metadata.json +1 -1
  128. package/esm2015/abstract/abstract-dropdown.js +12 -1
  129. package/esm2015/abstract/abstract-hint-options.js +6 -0
  130. package/esm2015/abstract/abstract-hint.js +7 -5
  131. package/esm2015/abstract/abstract-textfield-host.js +34 -0
  132. package/esm2015/abstract/index.js +3 -1
  133. package/esm2015/components/dialog/dialog.component.js +1 -1
  134. package/esm2015/components/dropdown-box/dropdown-box.component.js +1 -1
  135. package/esm2015/components/hints-host/hint-box/hint-box.component.js +2 -1
  136. package/esm2015/components/label/label.component.js +1 -1
  137. package/esm2015/components/link/link.component.js +3 -3
  138. package/esm2015/components/loader/loader.component.js +1 -1
  139. package/esm2015/components/loader/loader.directive.js +5 -2
  140. package/esm2015/components/primitive-textfield/index.js +4 -1
  141. package/esm2015/components/primitive-textfield/primitive-textfield-options.js +12 -0
  142. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +66 -31
  143. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +40 -0
  144. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +15 -7
  145. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +68 -0
  146. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -5
  147. package/esm2015/components/scroll-controls/scroll-controls.component.js +1 -1
  148. package/esm2015/components/theme-night/theme-night.component.js +1 -1
  149. package/esm2015/components/tooltip/tooltip.component.js +17 -10
  150. package/esm2015/components/tooltip/tooltip.module.js +3 -2
  151. package/esm2015/constants/regexp.js +2 -2
  152. package/esm2015/constants/version.js +2 -2
  153. package/esm2015/directives/dropdown/dropdown.directive.js +2 -7
  154. package/esm2015/directives/hint/hint-options.js +10 -0
  155. package/esm2015/directives/hint/hint.directive.js +11 -7
  156. package/esm2015/directives/hint/index.js +2 -1
  157. package/esm2015/directives/hint-controller/hint-controller.directive.js +16 -10
  158. package/esm2015/directives/hint-controller/hint-controller.token.js +4 -3
  159. package/esm2015/directives/index.js +1 -2
  160. package/esm2015/directives/manual-hint/index.js +2 -1
  161. package/esm2015/directives/manual-hint/manual-hint-options.js +8 -0
  162. package/esm2015/directives/manual-hint/manual-hint.directive.js +9 -5
  163. package/esm2015/directives/pointer-hint/index.js +2 -1
  164. package/esm2015/directives/pointer-hint/pointer-hint-options.js +8 -0
  165. package/esm2015/directives/pointer-hint/pointer-hint.directive.js +11 -7
  166. package/esm2015/interfaces/index.js +1 -1
  167. package/esm2015/interfaces/textfield-host.js +1 -0
  168. package/esm2015/providers/mode.provider.js +3 -2
  169. package/esm2015/tokens/index.js +2 -1
  170. package/esm2015/tokens/textfield-host.js +3 -0
  171. package/esm2015/utils/dom/process-icon.js +2 -2
  172. package/esm2015/utils/format/format-number.js +6 -7
  173. package/esm2015/utils/format/get-fractional-part-padded.js +15 -0
  174. package/esm2015/utils/format/index.js +3 -1
  175. package/esm2015/utils/format/number-to-string-without-exp.js +18 -0
  176. package/esm2015/utils/mask/create-number-mask.js +2 -2
  177. package/esm5/abstract/abstract-dropdown.js +12 -1
  178. package/esm5/abstract/abstract-hint-options.js +6 -0
  179. package/esm5/abstract/abstract-hint.js +7 -5
  180. package/esm5/abstract/abstract-textfield-host.js +55 -0
  181. package/esm5/abstract/index.js +3 -1
  182. package/esm5/components/dialog/dialog.component.js +1 -1
  183. package/esm5/components/dropdown-box/dropdown-box.component.js +1 -1
  184. package/esm5/components/hints-host/hint-box/hint-box.component.js +2 -1
  185. package/esm5/components/label/label.component.js +1 -1
  186. package/esm5/components/link/link.component.js +3 -3
  187. package/esm5/components/loader/loader.component.js +1 -1
  188. package/esm5/components/loader/loader.directive.js +5 -2
  189. package/esm5/components/primitive-textfield/index.js +4 -1
  190. package/esm5/components/primitive-textfield/primitive-textfield-options.js +12 -0
  191. package/esm5/components/primitive-textfield/primitive-textfield.component.js +70 -35
  192. package/esm5/components/primitive-textfield/primitive-textfield.directive.js +49 -0
  193. package/esm5/components/primitive-textfield/primitive-textfield.module.js +15 -7
  194. package/esm5/components/primitive-textfield/textfield/textfield.component.js +77 -0
  195. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +16 -5
  196. package/esm5/components/scroll-controls/scroll-controls.component.js +1 -1
  197. package/esm5/components/theme-night/theme-night.component.js +1 -1
  198. package/esm5/components/tooltip/tooltip.component.js +21 -10
  199. package/esm5/components/tooltip/tooltip.module.js +3 -2
  200. package/esm5/constants/regexp.js +2 -2
  201. package/esm5/constants/version.js +2 -2
  202. package/esm5/directives/dropdown/dropdown.directive.js +2 -7
  203. package/esm5/directives/hint/hint-options.js +11 -0
  204. package/esm5/directives/hint/hint.directive.js +11 -7
  205. package/esm5/directives/hint/index.js +2 -1
  206. package/esm5/directives/hint-controller/hint-controller.directive.js +16 -10
  207. package/esm5/directives/hint-controller/hint-controller.token.js +4 -3
  208. package/esm5/directives/index.js +1 -2
  209. package/esm5/directives/manual-hint/index.js +2 -1
  210. package/esm5/directives/manual-hint/manual-hint-options.js +9 -0
  211. package/esm5/directives/manual-hint/manual-hint.directive.js +9 -5
  212. package/esm5/directives/pointer-hint/index.js +2 -1
  213. package/esm5/directives/pointer-hint/pointer-hint-options.js +9 -0
  214. package/esm5/directives/pointer-hint/pointer-hint.directive.js +11 -7
  215. package/esm5/interfaces/index.js +1 -1
  216. package/esm5/interfaces/textfield-host.js +1 -0
  217. package/esm5/providers/mode.provider.js +3 -2
  218. package/esm5/tokens/index.js +2 -1
  219. package/esm5/tokens/textfield-host.js +3 -0
  220. package/esm5/utils/dom/process-icon.js +2 -2
  221. package/esm5/utils/format/format-number.js +6 -7
  222. package/esm5/utils/format/get-fractional-part-padded.js +16 -0
  223. package/esm5/utils/format/index.js +3 -1
  224. package/esm5/utils/format/number-to-string-without-exp.js +19 -0
  225. package/esm5/utils/mask/create-number-mask.js +2 -2
  226. package/fesm2015/taiga-ui-core-abstract.js +57 -8
  227. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  228. package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
  229. package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
  230. package/fesm2015/taiga-ui-core-components-hints-host.js +1 -0
  231. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  232. package/fesm2015/taiga-ui-core-components-label.js +1 -1
  233. package/fesm2015/taiga-ui-core-components-link.js +2 -2
  234. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  235. package/fesm2015/taiga-ui-core-components-loader.js +5 -2
  236. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  237. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +197 -42
  238. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  239. package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
  240. package/fesm2015/taiga-ui-core-components-theme-night.js +1 -1
  241. package/fesm2015/taiga-ui-core-components-tooltip.js +18 -10
  242. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  243. package/fesm2015/taiga-ui-core-constants.js +2 -2
  244. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  245. package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -6
  246. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  247. package/fesm2015/taiga-ui-core-directives-hint-controller.js +16 -10
  248. package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
  249. package/fesm2015/taiga-ui-core-directives-hint.js +20 -9
  250. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  251. package/fesm2015/taiga-ui-core-directives-manual-hint.js +16 -7
  252. package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
  253. package/fesm2015/taiga-ui-core-directives-pointer-hint.js +18 -9
  254. package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  255. package/fesm2015/taiga-ui-core-directives.js +0 -1
  256. package/fesm2015/taiga-ui-core-directives.js.map +1 -1
  257. package/fesm2015/taiga-ui-core-providers.js +2 -1
  258. package/fesm2015/taiga-ui-core-providers.js.map +1 -1
  259. package/fesm2015/taiga-ui-core-tokens.js +3 -1
  260. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  261. package/fesm2015/taiga-ui-core-utils-dom.js +1 -1
  262. package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
  263. package/fesm2015/taiga-ui-core-utils-format.js +37 -7
  264. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  265. package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
  266. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  267. package/fesm5/taiga-ui-core-abstract.js +78 -8
  268. package/fesm5/taiga-ui-core-abstract.js.map +1 -1
  269. package/fesm5/taiga-ui-core-components-dialog.js +1 -1
  270. package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
  271. package/fesm5/taiga-ui-core-components-hints-host.js +1 -0
  272. package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
  273. package/fesm5/taiga-ui-core-components-label.js +1 -1
  274. package/fesm5/taiga-ui-core-components-link.js +2 -2
  275. package/fesm5/taiga-ui-core-components-link.js.map +1 -1
  276. package/fesm5/taiga-ui-core-components-loader.js +5 -2
  277. package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
  278. package/fesm5/taiga-ui-core-components-primitive-textfield.js +223 -46
  279. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  280. package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
  281. package/fesm5/taiga-ui-core-components-theme-night.js +1 -1
  282. package/fesm5/taiga-ui-core-components-tooltip.js +22 -10
  283. package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
  284. package/fesm5/taiga-ui-core-constants.js +2 -2
  285. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  286. package/fesm5/taiga-ui-core-directives-dropdown.js +1 -6
  287. package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
  288. package/fesm5/taiga-ui-core-directives-hint-controller.js +16 -10
  289. package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
  290. package/fesm5/taiga-ui-core-directives-hint.js +21 -10
  291. package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
  292. package/fesm5/taiga-ui-core-directives-manual-hint.js +17 -8
  293. package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
  294. package/fesm5/taiga-ui-core-directives-pointer-hint.js +19 -10
  295. package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  296. package/fesm5/taiga-ui-core-directives.js +0 -1
  297. package/fesm5/taiga-ui-core-directives.js.map +1 -1
  298. package/fesm5/taiga-ui-core-providers.js +2 -1
  299. package/fesm5/taiga-ui-core-providers.js.map +1 -1
  300. package/fesm5/taiga-ui-core-tokens.js +3 -1
  301. package/fesm5/taiga-ui-core-tokens.js.map +1 -1
  302. package/fesm5/taiga-ui-core-utils-dom.js +1 -1
  303. package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
  304. package/fesm5/taiga-ui-core-utils-format.js +37 -7
  305. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  306. package/fesm5/taiga-ui-core-utils-mask.js +1 -1
  307. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  308. package/interfaces/index.d.ts +1 -0
  309. package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
  310. package/interfaces/textfield-host.d.ts +9 -0
  311. package/package.json +7 -6
  312. package/providers/taiga-ui-core-providers.metadata.json +1 -1
  313. package/styles/markup/tui-island.less +1 -0
  314. package/styles/mixins/textfield.less +47 -27
  315. package/styles/mixins/textfield.scss +0 -9
  316. package/styles/taiga-ui-theme.less +1 -0
  317. package/styles/theme/dialog.less +13 -0
  318. package/styles/theme/variables.less +2 -0
  319. package/styles/variables/media.less +2 -2
  320. package/tokens/index.d.ts +1 -0
  321. package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
  322. package/tokens/textfield-host.d.ts +3 -0
  323. package/utils/format/get-fractional-part-padded.d.ts +8 -0
  324. package/utils/format/index.d.ts +2 -0
  325. package/utils/format/number-to-string-without-exp.d.ts +7 -0
  326. package/utils/format/taiga-ui-core-utils-format.metadata.json +1 -1
  327. package/bundles/taiga-ui-core-directives-border.umd.js +0 -291
  328. package/bundles/taiga-ui-core-directives-border.umd.js.map +0 -1
  329. package/bundles/taiga-ui-core-directives-border.umd.min.js +0 -16
  330. package/bundles/taiga-ui-core-directives-border.umd.min.js.map +0 -1
  331. package/directives/border/border.directive.d.ts +0 -9
  332. package/directives/border/border.module.d.ts +0 -2
  333. package/directives/border/index.d.ts +0 -2
  334. package/directives/border/package.json +0 -13
  335. package/directives/border/taiga-ui-core-directives-border.d.ts +0 -4
  336. package/directives/border/taiga-ui-core-directives-border.metadata.json +0 -1
  337. package/esm2015/directives/border/border.directive.js +0 -42
  338. package/esm2015/directives/border/border.module.js +0 -13
  339. package/esm2015/directives/border/index.js +0 -3
  340. package/esm2015/directives/border/taiga-ui-core-directives-border.js +0 -5
  341. package/esm5/directives/border/border.directive.js +0 -51
  342. package/esm5/directives/border/border.module.js +0 -16
  343. package/esm5/directives/border/index.js +0 -3
  344. package/esm5/directives/border/taiga-ui-core-directives-border.js +0 -5
  345. package/fesm2015/taiga-ui-core-directives-border.js +0 -57
  346. package/fesm2015/taiga-ui-core-directives-border.js.map +0 -1
  347. package/fesm5/taiga-ui-core-directives-border.js +0 -69
  348. package/fesm5/taiga-ui-core-directives-border.js.map +0 -1
@@ -1,24 +1,24 @@
1
1
  import { __extends, __decorate, __param } from 'tslib';
2
- import { forwardRef, EventEmitter, Inject, ViewChild, Input, HostBinding, Output, ContentChildren, Component, ChangeDetectionStrategy, ElementRef, NgModule } from '@angular/core';
3
- import { TUI_FOCUSABLE_ITEM_ACCESSOR, isNativeFocused, setNativeFocused, tuiDefaultProp, tuiPure, AbstractTuiInteractive, 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, isNativeFocusedIn, setNativeFocused, tuiDefaultProp, tuiPure, AbstractTuiInteractive, TuiIdService, TuiFocusableModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule, TuiPreventDefaultModule } from '@taiga-ui/cdk';
4
4
  import { HINT_CONTROLLER_PROVIDER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/hint-controller';
5
5
  import { TEXTFIELD_CONTROLLER_PROVIDER, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/textfield-controller';
6
- import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE } from '@taiga-ui/core/tokens';
6
+ import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST } from '@taiga-ui/core/tokens';
7
7
  import { getBorder } from '@taiga-ui/core/utils/miscellaneous';
8
8
  import { PolymorpheusOutletComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
9
9
  import { fromEvent, Observable, defer, EMPTY } from 'rxjs';
10
10
  import { map, startWith, distinctUntilChanged } from 'rxjs/operators';
11
11
  import { MODE_PROVIDER } from '@taiga-ui/core/providers';
12
+ import { TuiAbstractTextfieldHost } from '@taiga-ui/core/abstract';
12
13
  import { CommonModule } from '@angular/common';
13
14
  import { FormsModule } from '@angular/forms';
14
15
  import { MutationObserverDirective, MutationObserverModule } from '@ng-web-apis/mutation-observer';
15
16
  import { TuiSvgModule } from '@taiga-ui/core/components/svg';
16
17
  import { TuiTooltipModule } from '@taiga-ui/core/components/tooltip';
17
18
  import { TuiWrapperModule } from '@taiga-ui/core/components/wrapper';
18
- import { TuiBorderModule } from '@taiga-ui/core/directives/border';
19
19
  import { TuiDescribedByModule } from '@taiga-ui/core/directives/described-by';
20
20
  import { TuiMaskAccessorModule } from '@taiga-ui/core/directives/mask-accessor';
21
- import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1 } from '@taiga-ui/core/directives';
21
+ import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1, TuiDescribedByDirective, TUI_DESCRIBED_BY_PROVIDERS, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1 } from '@taiga-ui/core/directives';
22
22
 
23
23
  var TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
24
24
  {
@@ -30,22 +30,35 @@ var TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
30
30
  MODE_PROVIDER,
31
31
  ];
32
32
 
33
+ // TODO: remove in ivy compilation
34
+ var TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';
35
+ /** Default values for primitive textfield options */
36
+ var TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = {
37
+ iconAlign: 'right',
38
+ iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,
39
+ };
40
+ var TUI_PRIMITIVE_TEXTFIELD_OPTIONS = new InjectionToken('Default parameters for primitive textfield component', {
41
+ factory: function () { return TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS; },
42
+ });
43
+
33
44
  var ICON_PADDING = 1.75;
34
45
  var ICON_PADDING_S = 1.5;
35
46
  var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
36
47
  __extends(TuiPrimitiveTextfieldComponent, _super);
37
- function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController) {
48
+ function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController, options, elementRef) {
38
49
  var _this = _super.call(this) || this;
39
50
  _this.mode$ = mode$;
40
51
  _this.appearance = appearance;
41
52
  _this.controller = controller;
42
53
  _this.hintController = hintController;
43
- _this.autofilled = false;
54
+ _this.options = options;
55
+ _this.elementRef = elementRef;
44
56
  _this.editable = true;
45
57
  _this.filler = '';
46
- _this.iconAlign = 'right';
58
+ _this.iconAlign = _this.options.iconAlign;
47
59
  // TODO: Remove null in 3.0
48
60
  _this.iconContent = null;
61
+ _this.iconCleaner = _this.options.iconCleaner;
49
62
  _this.readOnly = false;
50
63
  _this.invalid = false;
51
64
  _this.disabled = false;
@@ -53,21 +66,29 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
53
66
  _this.postfix = '';
54
67
  _this.value = '';
55
68
  _this.valueChange = new EventEmitter();
69
+ /**
70
+ * @deprecated TODO: remove in 3.0
71
+ */
56
72
  _this.autofilledChange = new EventEmitter();
73
+ _this.autofilled = false;
57
74
  return _this;
58
75
  }
59
76
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "nativeFocusableElement", {
60
77
  get: function () {
61
- return this.computedDisabled || !this.focusableElement
62
- ? null
63
- : this.focusableElement.nativeElement;
78
+ if (this.computedDisabled || !this.focusableElement) {
79
+ return null;
80
+ }
81
+ // TODO: Refactor this after we drop built-in input element
82
+ return (this.focusableElement.nativeElement
83
+ .previousElementSibling ||
84
+ this.focusableElement.nativeElement);
64
85
  },
65
86
  enumerable: true,
66
87
  configurable: true
67
88
  });
68
89
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "focused", {
69
90
  get: function () {
70
- return isNativeFocused(this.nativeFocusableElement);
91
+ return isNativeFocusedIn(this.elementRef.nativeElement);
71
92
  },
72
93
  enumerable: true,
73
94
  configurable: true
@@ -79,13 +100,6 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
79
100
  enumerable: true,
80
101
  configurable: true
81
102
  });
82
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "labelOutside", {
83
- get: function () {
84
- return this.controller.labelOutside;
85
- },
86
- enumerable: true,
87
- configurable: true
88
- });
89
103
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", {
90
104
  get: function () {
91
105
  return !this.readOnly && !this.disabled && this.invalid;
@@ -132,7 +146,10 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
132
146
  });
133
147
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasPlaceholder", {
134
148
  get: function () {
135
- var hasDecor = this.controller.exampleText || this.prefix || this.postfix;
149
+ var _a;
150
+ var hasDecor = this.controller.exampleText ||
151
+ this.prefix ||
152
+ this.postfix || ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
136
153
  var showDecor = hasDecor && !this.readOnly && this.computedFocused;
137
154
  var placeholderVisible = !this.hasValue && !showDecor;
138
155
  return this.placeholderRaisable || placeholderVisible;
@@ -148,14 +165,14 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
148
165
  enumerable: true,
149
166
  configurable: true
150
167
  });
151
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderLeft", {
168
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderStart", {
152
169
  get: function () {
153
170
  return this.iconAlignLeft ? this.iconPaddingLeft : 0;
154
171
  },
155
172
  enumerable: true,
156
173
  configurable: true
157
174
  });
158
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderRight", {
175
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderEnd", {
159
176
  get: function () {
160
177
  return getBorder(this.iconAlignRight, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
161
178
  },
@@ -186,6 +203,17 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
186
203
  enumerable: true,
187
204
  configurable: true
188
205
  });
206
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedId", {
207
+ get: function () {
208
+ var _a;
209
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
210
+ },
211
+ enumerable: true,
212
+ configurable: true
213
+ });
214
+ TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
215
+ this.updateFocused(focused);
216
+ };
189
217
  TuiPrimitiveTextfieldComponent.prototype.getIndent$ = function (element) {
190
218
  return fromEvent(element, 'scroll').pipe(map(function () { return -1 * element.scrollLeft; }));
191
219
  };
@@ -196,12 +224,12 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
196
224
  this.updateValue('');
197
225
  };
198
226
  TuiPrimitiveTextfieldComponent.prototype.onMouseDown = function (event) {
199
- if (!this.focusableElement ||
200
- event.target === this.focusableElement.nativeElement) {
227
+ var nativeFocusableElement = this.nativeFocusableElement;
228
+ if (!nativeFocusableElement || event.target === nativeFocusableElement) {
201
229
  return;
202
230
  }
203
231
  event.preventDefault();
204
- setNativeFocused(this.focusableElement.nativeElement);
232
+ setNativeFocused(nativeFocusableElement);
205
233
  };
206
234
  TuiPrimitiveTextfieldComponent.prototype.onModelChange = function (value) {
207
235
  this.updateValue(value);
@@ -209,9 +237,6 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
209
237
  TuiPrimitiveTextfieldComponent.prototype.onHovered = function (hovered) {
210
238
  this.updateHovered(hovered);
211
239
  };
212
- TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
213
- this.updateFocused(focused);
214
- };
215
240
  TuiPrimitiveTextfieldComponent.prototype.onAutofilled = function (autofilled) {
216
241
  this.updateAutofilled(autofilled);
217
242
  };
@@ -224,7 +249,7 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
224
249
  });
225
250
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaisable", {
226
251
  get: function () {
227
- return this.size !== 's' && !this.labelOutside;
252
+ return this.size !== 's' && !this.controller.labelOutside;
228
253
  },
229
254
  enumerable: true,
230
255
  configurable: true
@@ -251,7 +276,9 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
251
276
  { type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
252
277
  { type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] },
253
278
  { type: TuiTextfieldController, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
254
- { type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] }
279
+ { type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] },
280
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] },
281
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
255
282
  ]; };
256
283
  __decorate([
257
284
  ViewChild('focusableElement')
@@ -272,6 +299,10 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
272
299
  Input(),
273
300
  tuiDefaultProp()
274
301
  ], TuiPrimitiveTextfieldComponent.prototype, "iconContent", void 0);
302
+ __decorate([
303
+ Input(),
304
+ tuiDefaultProp()
305
+ ], TuiPrimitiveTextfieldComponent.prototype, "iconCleaner", void 0);
275
306
  __decorate([
276
307
  Input(),
277
308
  HostBinding('class._readonly'),
@@ -307,36 +338,164 @@ var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
307
338
  ContentChildren(PolymorpheusOutletComponent)
308
339
  ], TuiPrimitiveTextfieldComponent.prototype, "content", void 0);
309
340
  __decorate([
310
- HostBinding('attr.data-tui-host-size')
341
+ HostBinding('attr.data-size')
311
342
  ], TuiPrimitiveTextfieldComponent.prototype, "size", null);
312
- __decorate([
313
- HostBinding('class._label-outside')
314
- ], TuiPrimitiveTextfieldComponent.prototype, "labelOutside", null);
315
343
  __decorate([
316
344
  HostBinding('class._invalid')
317
345
  ], TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", null);
346
+ __decorate([
347
+ HostBinding('class._hidden')
348
+ ], TuiPrimitiveTextfieldComponent.prototype, "inputHidden", null);
349
+ __decorate([
350
+ HostBinding('style.--border-start.rem')
351
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderStart", null);
352
+ __decorate([
353
+ HostBinding('style.--border-end.rem')
354
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderEnd", null);
355
+ __decorate([
356
+ HostListener('focusin', ['true']),
357
+ HostListener('focusout', ['false'])
358
+ ], TuiPrimitiveTextfieldComponent.prototype, "onFocused", null);
318
359
  __decorate([
319
360
  tuiPure
320
361
  ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
321
362
  TuiPrimitiveTextfieldComponent = __decorate([
322
363
  Component({
323
364
  selector: 'tui-primitive-textfield',
324
- 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 [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 <tui-svg\n *ngIf=\"hasCleaner\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"cleaner\"\n (click.stop)=\"clear()\"\n ></tui-svg>\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",
365
+ template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<tui-wrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n tuiPreventDefault=\"click\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"input\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.maxLength]=\"controller.maxLength\"\n [attr.name]=\"name\"\n [attr.aria-placeholder]=\"controller.exampleText\"\n [attr.aria-invalid]=\"computedInvalid\"\n [autocomplete]=\"controller.autocomplete\"\n [type]=\"controller.type\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiInputMode]=\"controller.inputMode\"\n [tuiFocusable]=\"computedFocusable\"\n [tuiDescribedBy]=\"id\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"input input_template\"\n >\n <ng-content select=\"[polymorpheus-outlet]\"></ng-content>\n </div>\n <div class=\"content\">\n <div\n *ngIf=\"iconAlignLeft\"\n polymorpheus-outlet\n class=\"icon icon_left\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <div class=\"wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"custom-content\"\n [content]=\"controller.customContent\"\n >\n <ng-template let-iconSrc>\n <tui-svg class=\"custom-icon\" [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n polymorpheus-outlet\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"cleaner\"\n [content]=\"iconCleaner\"\n (click.stop)=\"clear()\"\n >\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\n </span>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintController.content\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconAlignRight\"\n polymorpheus-outlet\n class=\"icon\"\n [content]=\"iconContent\"\n [context]=\"{$implicit: size}\"\n >\n <ng-template let-iconSrc>\n <tui-svg [src]=\"iconSrc\"></tui-svg>\n </ng-template>\n </div>\n </div>\n</tui-wrapper>\n",
325
366
  changeDetection: ChangeDetectionStrategy.OnPush,
326
367
  providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,
327
368
  host: {
328
369
  '($.data-mode.attr)': 'mode$',
370
+ '[class._autofilled]': 'autofilled',
371
+ '[class._label-outside]': 'controller.labelOutside',
329
372
  },
330
- 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)}.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}.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)}.text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
373
+ styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .input:-webkit-autofill,:host[data-mode=onDark] .input:-webkit-autofill:focus,:host[data-mode=onDark] .input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}.input :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host[data-size='s'] .input{padding:0 var(--tui-padding-s)}.input :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host[data-size='l'] .input{padding:0 var(--tui-padding-l)}.input :host-context(tui-primitive-textfield._disabled),:host._disabled .input{pointer-events:none}.input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .input{padding-top:1.25rem}.input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .input{padding-top:1.125rem}.input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.input :host-context(tui-primitive-textfield._hidden),:host._hidden input.input{opacity:0;text-indent:-10em;-webkit-user-select:none}.filler{vertical-align:middle}.content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size='s'] .content{padding:0 var(--tui-padding-s)}:host[data-size='l'] .content{padding:0 var(--tui-padding-l)}.content:after{content:'';margin-right:-.25rem}:host[data-size='m'] .content:after{display:none}.wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;font-size:.8125rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none}.placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-size='l']._focused._label-outside .placeholder,:host[data-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-size='l'] .placeholder{font-size:.9375rem}:host[data-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .placeholder,:host[data-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.placeholder{transition-property:transform,color,letter-spacing}}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;align-items:center;justify-content:center;color:var(--tui-text-03)}.icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size='s'] .icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration{display:none}.custom-content{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.custom-icon{width:100%;height:100%}.icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}.icon:hover{color:var(--tui-text-02)}:host._disabled .icon,:host._readonly .icon{pointer-events:none}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .icon:hover{color:var(--tui-text-01-night)}:host._hovered:not(._readonly) .icon{color:var(--tui-text-02)}:host[data-mode=onDark]._hovered:not(._readonly) .icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]._hovered:not(._readonly) .icon{color:var(--tui-text-01)}.input:not(:first-child){display:none}:host[data-size] .input_template{display:flex;width:100%;max-width:100%;align-items:center;pointer-events:none}.input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size='l']:not(._label-outside) .input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button,.input::-webkit-credentials-auto-fill-button,.input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size='l']:not(._label-outside) .input::-webkit-contacts-auto-fill-button,:host[data-size='l']:not(._label-outside) .input::-webkit-credentials-auto-fill-button,:host[data-size='l']:not(._label-outside) .input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.input::-webkit-contacts-auto-fill-button:hover,.input::-webkit-credentials-auto-fill-button:hover,.input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.input:-webkit-autofill,.input:-webkit-autofill::first-line{font-size:inherit;line-height:inherit}.text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
331
374
  }),
332
375
  __param(0, Inject(TUI_MODE)),
333
376
  __param(1, Inject(TUI_TEXTFIELD_APPEARANCE)),
334
377
  __param(2, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)),
335
- __param(3, Inject(TUI_HINT_WATCHED_CONTROLLER))
378
+ __param(3, Inject(TUI_HINT_WATCHED_CONTROLLER)),
379
+ __param(4, Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)),
380
+ __param(5, Inject(ElementRef))
336
381
  ], TuiPrimitiveTextfieldComponent);
337
382
  return TuiPrimitiveTextfieldComponent;
338
383
  }(AbstractTuiInteractive));
339
384
 
385
+ var TuiPrimitiveTextfieldDirective = /** @class */ (function (_super) {
386
+ __extends(TuiPrimitiveTextfieldDirective, _super);
387
+ function TuiPrimitiveTextfieldDirective(textfield) {
388
+ var _this =
389
+ /**
390
+ * TuiPrimitiveTextfieldComponent satisfies all required parts of
391
+ * AbstractTuiControl interface. A new interface is not introduced
392
+ * so AbstractTuiControl is automatically injected for all other controls.
393
+ */
394
+ _super.call(this, textfield) || this;
395
+ _this.textfield = textfield;
396
+ return _this;
397
+ }
398
+ TuiPrimitiveTextfieldDirective_1 = TuiPrimitiveTextfieldDirective;
399
+ Object.defineProperty(TuiPrimitiveTextfieldDirective.prototype, "readOnly", {
400
+ get: function () {
401
+ return this.textfield.readOnly || !this.textfield.editable;
402
+ },
403
+ enumerable: true,
404
+ configurable: true
405
+ });
406
+ TuiPrimitiveTextfieldDirective.prototype.onValueChange = function (value) {
407
+ this.textfield.onModelChange(value);
408
+ };
409
+ var TuiPrimitiveTextfieldDirective_1;
410
+ TuiPrimitiveTextfieldDirective.ctorParameters = function () { return [
411
+ { type: TuiPrimitiveTextfieldComponent, decorators: [{ type: Inject, args: [TuiPrimitiveTextfieldComponent,] }] }
412
+ ]; };
413
+ TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = __decorate([
414
+ Directive({
415
+ selector: 'tui-primitive-textfield',
416
+ providers: [
417
+ {
418
+ provide: TUI_TEXTFIELD_HOST,
419
+ useExisting: forwardRef(function () { return TuiPrimitiveTextfieldDirective_1; }),
420
+ },
421
+ ],
422
+ }),
423
+ __param(0, Inject(TuiPrimitiveTextfieldComponent))
424
+ ], TuiPrimitiveTextfieldDirective);
425
+ return TuiPrimitiveTextfieldDirective;
426
+ }(TuiAbstractTextfieldHost));
427
+
428
+ // @dynamic
429
+ var TuiTextfieldComponent = /** @class */ (function () {
430
+ function TuiTextfieldComponent(host, controller, elementRef, describedBy, idService) {
431
+ this.host = host;
432
+ this.controller = controller;
433
+ this.elementRef = elementRef;
434
+ this.describedBy = describedBy;
435
+ this.idService = idService;
436
+ this.host.process(this.elementRef.nativeElement);
437
+ }
438
+ Object.defineProperty(TuiTextfieldComponent.prototype, "computedDescribedBy", {
439
+ get: function () {
440
+ return this.describedBy.computedDescribedBy;
441
+ },
442
+ enumerable: true,
443
+ configurable: true
444
+ });
445
+ Object.defineProperty(TuiTextfieldComponent.prototype, "id", {
446
+ get: function () {
447
+ return this.elementRef.nativeElement.id || this.idService.generate();
448
+ },
449
+ enumerable: true,
450
+ configurable: true
451
+ });
452
+ TuiTextfieldComponent.prototype.ngDoCheck = function () {
453
+ this.describedBy.tuiDescribedBy = this.id;
454
+ };
455
+ TuiTextfieldComponent.ctorParameters = function () { return [
456
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_HOST,] }] },
457
+ { type: TuiTextfieldController$1, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1,] }] },
458
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
459
+ { type: TuiDescribedByDirective, decorators: [{ type: Inject, args: [TuiDescribedByDirective,] }] },
460
+ { type: TuiIdService, decorators: [{ type: Inject, args: [TuiIdService,] }] }
461
+ ]; };
462
+ __decorate([
463
+ HostBinding('attr.aria-describedby')
464
+ ], TuiTextfieldComponent.prototype, "computedDescribedBy", null);
465
+ __decorate([
466
+ HostBinding('id')
467
+ ], TuiTextfieldComponent.prototype, "id", null);
468
+ TuiTextfieldComponent = __decorate([
469
+ Component({
470
+ selector: 'input[tuiTextfield]',
471
+ template: '',
472
+ providers: [
473
+ TuiDescribedByDirective,
474
+ TUI_DESCRIBED_BY_PROVIDERS,
475
+ TEXTFIELD_CONTROLLER_PROVIDER$1,
476
+ ],
477
+ host: {
478
+ type: 'text',
479
+ '[attr.aria-placeholder]': 'controller.exampleText',
480
+ '[attr.aria-invalid]': 'host.invalid',
481
+ '[attr.disabled]': 'host.disabled || null',
482
+ '[tabIndex]': 'host.focusable ? 0 : -1',
483
+ '[readOnly]': 'host.readOnly',
484
+ '[value]': 'host.value',
485
+ '(input)': 'host.onValueChange($event.target.value)',
486
+ },
487
+ changeDetection: ChangeDetectionStrategy.OnPush,
488
+ styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0 solid transparent;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}:host:-webkit-autofill,:host:-webkit-autofill:focus,:host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] :host:-webkit-autofill,:host[data-mode=onDark] :host:-webkit-autofill:focus,:host[data-mode=onDark] :host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}:host :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host[data-size='s'] :host{padding:0 var(--tui-padding-s)}:host :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host[data-size='l'] :host{padding:0 var(--tui-padding-l)}:host :host-context(tui-primitive-textfield._disabled),:host._disabled :host{pointer-events:none}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) :host{padding-top:1.25rem}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) :host{padding-top:1.125rem}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host :host-context(tui-primitive-textfield._hidden),:host._hidden input:host{opacity:0;text-indent:-10em;-webkit-user-select:none}:host::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-caps-lock-indicator{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-contacts-auto-fill-button,:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-credentials-auto-fill-button,:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button:hover,:host::-webkit-credentials-auto-fill-button:hover,:host::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}:host::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}:host::placeholder{color:var(--tui-text-03);opacity:0}:host :host-context(tui-primitive-textfield[data-mode=onDark])::-ms-input-placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield[data-mode=onDark])::placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::-ms-input-placeholder{opacity:1}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::placeholder{opacity:1}"]
489
+ }),
490
+ __param(0, Inject(TUI_TEXTFIELD_HOST)),
491
+ __param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1)),
492
+ __param(2, Inject(ElementRef)),
493
+ __param(3, Inject(TuiDescribedByDirective)),
494
+ __param(4, Inject(TuiIdService))
495
+ ], TuiTextfieldComponent);
496
+ return TuiTextfieldComponent;
497
+ }());
498
+
340
499
  var TuiValueDecorationComponent = /** @class */ (function () {
341
500
  function TuiValueDecorationComponent(textfield, controller) {
342
501
  var _this = this;
@@ -360,9 +519,11 @@ var TuiValueDecorationComponent = /** @class */ (function () {
360
519
  });
361
520
  Object.defineProperty(TuiValueDecorationComponent.prototype, "filler", {
362
521
  get: function () {
363
- return this.focused
364
- ? this.exampleText || this.textfield.filler.slice(this.value.length)
365
- : '';
522
+ var _a = this, focused = _a.focused, placeholder = _a.placeholder, exampleText = _a.exampleText, value = _a.value, textfield = _a.textfield;
523
+ if (focused && placeholder && exampleText) {
524
+ return '';
525
+ }
526
+ return focused ? exampleText || textfield.filler.slice(value.length) : '';
366
527
  },
367
528
  enumerable: true,
368
529
  configurable: true
@@ -381,9 +542,18 @@ var TuiValueDecorationComponent = /** @class */ (function () {
381
542
  enumerable: true,
382
543
  configurable: true
383
544
  });
545
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "placeholder", {
546
+ get: function () {
547
+ var _a;
548
+ return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
549
+ },
550
+ enumerable: true,
551
+ configurable: true
552
+ });
384
553
  Object.defineProperty(TuiValueDecorationComponent.prototype, "exampleText", {
385
554
  get: function () {
386
- return !this.value && this.focused ? this.controller.exampleText : '';
555
+ var exampleText = this.controller.exampleText || this.placeholder;
556
+ return !this.value && this.focused ? exampleText : '';
387
557
  },
388
558
  enumerable: true,
389
559
  configurable: true
@@ -448,7 +618,6 @@ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
448
618
  FormsModule,
449
619
  TuiMaskAccessorModule,
450
620
  TuiFocusableModule,
451
- TuiFocusedModule,
452
621
  TuiHoveredModule,
453
622
  TuiInputModeModule,
454
623
  PolymorpheusModule,
@@ -458,11 +627,19 @@ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
458
627
  TuiAutofilledModule,
459
628
  TuiDescribedByModule,
460
629
  TuiPreventDefaultModule,
461
- TuiBorderModule,
462
630
  MutationObserverModule,
463
631
  ],
464
- declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],
465
- exports: [TuiPrimitiveTextfieldComponent],
632
+ declarations: [
633
+ TuiPrimitiveTextfieldComponent,
634
+ TuiPrimitiveTextfieldDirective,
635
+ TuiTextfieldComponent,
636
+ TuiValueDecorationComponent,
637
+ ],
638
+ exports: [
639
+ TuiPrimitiveTextfieldComponent,
640
+ TuiPrimitiveTextfieldDirective,
641
+ TuiTextfieldComponent,
642
+ ],
466
643
  })
467
644
  ], TuiPrimitiveTextfieldModule);
468
645
  return TuiPrimitiveTextfieldModule;
@@ -472,5 +649,5 @@ var TuiPrimitiveTextfieldModule = /** @class */ (function () {
472
649
  * Generated bundle index. Do not edit.
473
650
  */
474
651
 
475
- export { TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldModule, TuiValueDecorationComponent };
652
+ export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent };
476
653
  //# sourceMappingURL=taiga-ui-core-components-primitive-textfield.js.map