@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,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/directives/hint-controller'), require('@taiga-ui/core/directives/textfield-controller'), require('@taiga-ui/core/tokens'), require('@taiga-ui/core/utils/miscellaneous'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core/providers'), require('@angular/common'), require('@angular/forms'), require('@ng-web-apis/mutation-observer'), require('@taiga-ui/core/components/svg'), require('@taiga-ui/core/components/tooltip'), require('@taiga-ui/core/components/wrapper'), require('@taiga-ui/core/directives/border'), require('@taiga-ui/core/directives/described-by'), require('@taiga-ui/core/directives/mask-accessor'), require('@taiga-ui/core/directives')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/core/components/primitive-textfield', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/directives/hint-controller', '@taiga-ui/core/directives/textfield-controller', '@taiga-ui/core/tokens', '@taiga-ui/core/utils/miscellaneous', '@tinkoff/ng-polymorpheus', 'rxjs', 'rxjs/operators', '@taiga-ui/core/providers', '@angular/common', '@angular/forms', '@ng-web-apis/mutation-observer', '@taiga-ui/core/components/svg', '@taiga-ui/core/components/tooltip', '@taiga-ui/core/components/wrapper', '@taiga-ui/core/directives/border', '@taiga-ui/core/directives/described-by', '@taiga-ui/core/directives/mask-accessor', '@taiga-ui/core/directives'], factory) :
4
- (global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].core = global['taiga-ui'].core || {}, global['taiga-ui'].core.components = global['taiga-ui'].core.components || {}, global['taiga-ui'].core.components['primitive-textfield'] = {}), global.ng.core, global.cdk, global['taiga-ui'].core.directives['hint-controller'], global['taiga-ui'].core.directives['textfield-controller'], global['taiga-ui'].core.tokens, global['taiga-ui'].core.utils.miscellaneous, global.ngPolymorpheus, global.rxjs, global.rxjs.operators, global['taiga-ui'].core.providers, global.ng.common, global.ng.forms, global.mutationObserver, global['taiga-ui'].core.components.svg, global['taiga-ui'].core.components.tooltip, global['taiga-ui'].core.components.wrapper, global['taiga-ui'].core.directives.border, global['taiga-ui'].core.directives['described-by'], global['taiga-ui'].core.directives['mask-accessor'], global['taiga-ui'].core.directives));
5
- }(this, (function (exports, core, cdk, hintController, textfieldController, tokens, miscellaneous, ngPolymorpheus, rxjs, operators, providers, common, forms, mutationObserver, svg, tooltip, wrapper, border, describedBy, maskAccessor, directives) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/directives/hint-controller'), require('@taiga-ui/core/directives/textfield-controller'), require('@taiga-ui/core/tokens'), require('@taiga-ui/core/utils/miscellaneous'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core/providers'), require('@taiga-ui/core/abstract'), require('@angular/common'), require('@angular/forms'), require('@ng-web-apis/mutation-observer'), require('@taiga-ui/core/components/svg'), require('@taiga-ui/core/components/tooltip'), require('@taiga-ui/core/components/wrapper'), require('@taiga-ui/core/directives/described-by'), require('@taiga-ui/core/directives/mask-accessor'), require('@taiga-ui/core/directives')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/core/components/primitive-textfield', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/directives/hint-controller', '@taiga-ui/core/directives/textfield-controller', '@taiga-ui/core/tokens', '@taiga-ui/core/utils/miscellaneous', '@tinkoff/ng-polymorpheus', 'rxjs', 'rxjs/operators', '@taiga-ui/core/providers', '@taiga-ui/core/abstract', '@angular/common', '@angular/forms', '@ng-web-apis/mutation-observer', '@taiga-ui/core/components/svg', '@taiga-ui/core/components/tooltip', '@taiga-ui/core/components/wrapper', '@taiga-ui/core/directives/described-by', '@taiga-ui/core/directives/mask-accessor', '@taiga-ui/core/directives'], factory) :
4
+ (global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].core = global['taiga-ui'].core || {}, global['taiga-ui'].core.components = global['taiga-ui'].core.components || {}, global['taiga-ui'].core.components['primitive-textfield'] = {}), global.ng.core, global.cdk, global['taiga-ui'].core.directives['hint-controller'], global['taiga-ui'].core.directives['textfield-controller'], global['taiga-ui'].core.tokens, global['taiga-ui'].core.utils.miscellaneous, global.ngPolymorpheus, global.rxjs, global.rxjs.operators, global['taiga-ui'].core.providers, global['taiga-ui'].core.abstract, global.ng.common, global.ng.forms, global.mutationObserver, global['taiga-ui'].core.components.svg, global['taiga-ui'].core.components.tooltip, global['taiga-ui'].core.components.wrapper, global['taiga-ui'].core.directives['described-by'], global['taiga-ui'].core.directives['mask-accessor'], global['taiga-ui'].core.directives));
5
+ }(this, (function (exports, core, cdk, hintController, textfieldController, tokens, miscellaneous, ngPolymorpheus, rxjs, operators, providers, abstract, common, forms, mutationObserver, svg, tooltip, wrapper, describedBy, maskAccessor, directives) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -233,22 +233,35 @@
233
233
  providers.MODE_PROVIDER,
234
234
  ];
235
235
 
236
+ // TODO: remove in ivy compilation
237
+ var TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';
238
+ /** Default values for primitive textfield options */
239
+ var TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = {
240
+ iconAlign: 'right',
241
+ iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,
242
+ };
243
+ var TUI_PRIMITIVE_TEXTFIELD_OPTIONS = new core.InjectionToken('Default parameters for primitive textfield component', {
244
+ factory: function () { return TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS; },
245
+ });
246
+
236
247
  var ICON_PADDING = 1.75;
237
248
  var ICON_PADDING_S = 1.5;
238
249
  var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
239
250
  __extends(TuiPrimitiveTextfieldComponent, _super);
240
- function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController) {
251
+ function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController, options, elementRef) {
241
252
  var _this = _super.call(this) || this;
242
253
  _this.mode$ = mode$;
243
254
  _this.appearance = appearance;
244
255
  _this.controller = controller;
245
256
  _this.hintController = hintController;
246
- _this.autofilled = false;
257
+ _this.options = options;
258
+ _this.elementRef = elementRef;
247
259
  _this.editable = true;
248
260
  _this.filler = '';
249
- _this.iconAlign = 'right';
261
+ _this.iconAlign = _this.options.iconAlign;
250
262
  // TODO: Remove null in 3.0
251
263
  _this.iconContent = null;
264
+ _this.iconCleaner = _this.options.iconCleaner;
252
265
  _this.readOnly = false;
253
266
  _this.invalid = false;
254
267
  _this.disabled = false;
@@ -256,21 +269,29 @@
256
269
  _this.postfix = '';
257
270
  _this.value = '';
258
271
  _this.valueChange = new core.EventEmitter();
272
+ /**
273
+ * @deprecated TODO: remove in 3.0
274
+ */
259
275
  _this.autofilledChange = new core.EventEmitter();
276
+ _this.autofilled = false;
260
277
  return _this;
261
278
  }
262
279
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "nativeFocusableElement", {
263
280
  get: function () {
264
- return this.computedDisabled || !this.focusableElement
265
- ? null
266
- : this.focusableElement.nativeElement;
281
+ if (this.computedDisabled || !this.focusableElement) {
282
+ return null;
283
+ }
284
+ // TODO: Refactor this after we drop built-in input element
285
+ return (this.focusableElement.nativeElement
286
+ .previousElementSibling ||
287
+ this.focusableElement.nativeElement);
267
288
  },
268
289
  enumerable: true,
269
290
  configurable: true
270
291
  });
271
292
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "focused", {
272
293
  get: function () {
273
- return cdk.isNativeFocused(this.nativeFocusableElement);
294
+ return cdk.isNativeFocusedIn(this.elementRef.nativeElement);
274
295
  },
275
296
  enumerable: true,
276
297
  configurable: true
@@ -282,13 +303,6 @@
282
303
  enumerable: true,
283
304
  configurable: true
284
305
  });
285
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "labelOutside", {
286
- get: function () {
287
- return this.controller.labelOutside;
288
- },
289
- enumerable: true,
290
- configurable: true
291
- });
292
306
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", {
293
307
  get: function () {
294
308
  return !this.readOnly && !this.disabled && this.invalid;
@@ -335,7 +349,10 @@
335
349
  });
336
350
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasPlaceholder", {
337
351
  get: function () {
338
- var hasDecor = this.controller.exampleText || this.prefix || this.postfix;
352
+ var _a;
353
+ var hasDecor = this.controller.exampleText ||
354
+ this.prefix ||
355
+ this.postfix || ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
339
356
  var showDecor = hasDecor && !this.readOnly && this.computedFocused;
340
357
  var placeholderVisible = !this.hasValue && !showDecor;
341
358
  return this.placeholderRaisable || placeholderVisible;
@@ -351,14 +368,14 @@
351
368
  enumerable: true,
352
369
  configurable: true
353
370
  });
354
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderLeft", {
371
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderStart", {
355
372
  get: function () {
356
373
  return this.iconAlignLeft ? this.iconPaddingLeft : 0;
357
374
  },
358
375
  enumerable: true,
359
376
  configurable: true
360
377
  });
361
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderRight", {
378
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderEnd", {
362
379
  get: function () {
363
380
  return miscellaneous.getBorder(this.iconAlignRight, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
364
381
  },
@@ -389,6 +406,17 @@
389
406
  enumerable: true,
390
407
  configurable: true
391
408
  });
409
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedId", {
410
+ get: function () {
411
+ var _a;
412
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
413
+ },
414
+ enumerable: true,
415
+ configurable: true
416
+ });
417
+ TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
418
+ this.updateFocused(focused);
419
+ };
392
420
  TuiPrimitiveTextfieldComponent.prototype.getIndent$ = function (element) {
393
421
  return rxjs.fromEvent(element, 'scroll').pipe(operators.map(function () { return -1 * element.scrollLeft; }));
394
422
  };
@@ -399,12 +427,12 @@
399
427
  this.updateValue('');
400
428
  };
401
429
  TuiPrimitiveTextfieldComponent.prototype.onMouseDown = function (event) {
402
- if (!this.focusableElement ||
403
- event.target === this.focusableElement.nativeElement) {
430
+ var nativeFocusableElement = this.nativeFocusableElement;
431
+ if (!nativeFocusableElement || event.target === nativeFocusableElement) {
404
432
  return;
405
433
  }
406
434
  event.preventDefault();
407
- cdk.setNativeFocused(this.focusableElement.nativeElement);
435
+ cdk.setNativeFocused(nativeFocusableElement);
408
436
  };
409
437
  TuiPrimitiveTextfieldComponent.prototype.onModelChange = function (value) {
410
438
  this.updateValue(value);
@@ -412,9 +440,6 @@
412
440
  TuiPrimitiveTextfieldComponent.prototype.onHovered = function (hovered) {
413
441
  this.updateHovered(hovered);
414
442
  };
415
- TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
416
- this.updateFocused(focused);
417
- };
418
443
  TuiPrimitiveTextfieldComponent.prototype.onAutofilled = function (autofilled) {
419
444
  this.updateAutofilled(autofilled);
420
445
  };
@@ -427,7 +452,7 @@
427
452
  });
428
453
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaisable", {
429
454
  get: function () {
430
- return this.size !== 's' && !this.labelOutside;
455
+ return this.size !== 's' && !this.controller.labelOutside;
431
456
  },
432
457
  enumerable: true,
433
458
  configurable: true
@@ -454,7 +479,9 @@
454
479
  { type: rxjs.Observable, decorators: [{ type: core.Inject, args: [tokens.TUI_MODE,] }] },
455
480
  { type: String, decorators: [{ type: core.Inject, args: [tokens.TUI_TEXTFIELD_APPEARANCE,] }] },
456
481
  { type: textfieldController.TuiTextfieldController, decorators: [{ type: core.Inject, args: [textfieldController.TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
457
- { type: hintController.TuiHintControllerDirective, decorators: [{ type: core.Inject, args: [hintController.TUI_HINT_WATCHED_CONTROLLER,] }] }
482
+ { type: hintController.TuiHintControllerDirective, decorators: [{ type: core.Inject, args: [hintController.TUI_HINT_WATCHED_CONTROLLER,] }] },
483
+ { type: undefined, decorators: [{ type: core.Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] },
484
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
458
485
  ]; };
459
486
  __decorate([
460
487
  core.ViewChild('focusableElement')
@@ -475,6 +502,10 @@
475
502
  core.Input(),
476
503
  cdk.tuiDefaultProp()
477
504
  ], TuiPrimitiveTextfieldComponent.prototype, "iconContent", void 0);
505
+ __decorate([
506
+ core.Input(),
507
+ cdk.tuiDefaultProp()
508
+ ], TuiPrimitiveTextfieldComponent.prototype, "iconCleaner", void 0);
478
509
  __decorate([
479
510
  core.Input(),
480
511
  core.HostBinding('class._readonly'),
@@ -510,36 +541,164 @@
510
541
  core.ContentChildren(ngPolymorpheus.PolymorpheusOutletComponent)
511
542
  ], TuiPrimitiveTextfieldComponent.prototype, "content", void 0);
512
543
  __decorate([
513
- core.HostBinding('attr.data-tui-host-size')
544
+ core.HostBinding('attr.data-size')
514
545
  ], TuiPrimitiveTextfieldComponent.prototype, "size", null);
515
- __decorate([
516
- core.HostBinding('class._label-outside')
517
- ], TuiPrimitiveTextfieldComponent.prototype, "labelOutside", null);
518
546
  __decorate([
519
547
  core.HostBinding('class._invalid')
520
548
  ], TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", null);
549
+ __decorate([
550
+ core.HostBinding('class._hidden')
551
+ ], TuiPrimitiveTextfieldComponent.prototype, "inputHidden", null);
552
+ __decorate([
553
+ core.HostBinding('style.--border-start.rem')
554
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderStart", null);
555
+ __decorate([
556
+ core.HostBinding('style.--border-end.rem')
557
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderEnd", null);
558
+ __decorate([
559
+ core.HostListener('focusin', ['true']),
560
+ core.HostListener('focusout', ['false'])
561
+ ], TuiPrimitiveTextfieldComponent.prototype, "onFocused", null);
521
562
  __decorate([
522
563
  cdk.tuiPure
523
564
  ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
524
565
  TuiPrimitiveTextfieldComponent = __decorate([
525
566
  core.Component({
526
567
  selector: 'tui-primitive-textfield',
527
- 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",
568
+ 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",
528
569
  changeDetection: core.ChangeDetectionStrategy.OnPush,
529
570
  providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,
530
571
  host: {
531
572
  '($.data-mode.attr)': 'mode$',
573
+ '[class._autofilled]': 'autofilled',
574
+ '[class._label-outside]': 'controller.labelOutside',
532
575
  },
533
- 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}"]
576
+ 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}"]
534
577
  }),
535
578
  __param(0, core.Inject(tokens.TUI_MODE)),
536
579
  __param(1, core.Inject(tokens.TUI_TEXTFIELD_APPEARANCE)),
537
580
  __param(2, core.Inject(textfieldController.TUI_TEXTFIELD_WATCHED_CONTROLLER)),
538
- __param(3, core.Inject(hintController.TUI_HINT_WATCHED_CONTROLLER))
581
+ __param(3, core.Inject(hintController.TUI_HINT_WATCHED_CONTROLLER)),
582
+ __param(4, core.Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)),
583
+ __param(5, core.Inject(core.ElementRef))
539
584
  ], TuiPrimitiveTextfieldComponent);
540
585
  return TuiPrimitiveTextfieldComponent;
541
586
  }(cdk.AbstractTuiInteractive));
542
587
 
588
+ var TuiPrimitiveTextfieldDirective = /** @class */ (function (_super) {
589
+ __extends(TuiPrimitiveTextfieldDirective, _super);
590
+ function TuiPrimitiveTextfieldDirective(textfield) {
591
+ var _this =
592
+ /**
593
+ * TuiPrimitiveTextfieldComponent satisfies all required parts of
594
+ * AbstractTuiControl interface. A new interface is not introduced
595
+ * so AbstractTuiControl is automatically injected for all other controls.
596
+ */
597
+ _super.call(this, textfield) || this;
598
+ _this.textfield = textfield;
599
+ return _this;
600
+ }
601
+ TuiPrimitiveTextfieldDirective_1 = TuiPrimitiveTextfieldDirective;
602
+ Object.defineProperty(TuiPrimitiveTextfieldDirective.prototype, "readOnly", {
603
+ get: function () {
604
+ return this.textfield.readOnly || !this.textfield.editable;
605
+ },
606
+ enumerable: true,
607
+ configurable: true
608
+ });
609
+ TuiPrimitiveTextfieldDirective.prototype.onValueChange = function (value) {
610
+ this.textfield.onModelChange(value);
611
+ };
612
+ var TuiPrimitiveTextfieldDirective_1;
613
+ TuiPrimitiveTextfieldDirective.ctorParameters = function () { return [
614
+ { type: TuiPrimitiveTextfieldComponent, decorators: [{ type: core.Inject, args: [TuiPrimitiveTextfieldComponent,] }] }
615
+ ]; };
616
+ TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = __decorate([
617
+ core.Directive({
618
+ selector: 'tui-primitive-textfield',
619
+ providers: [
620
+ {
621
+ provide: tokens.TUI_TEXTFIELD_HOST,
622
+ useExisting: core.forwardRef(function () { return TuiPrimitiveTextfieldDirective_1; }),
623
+ },
624
+ ],
625
+ }),
626
+ __param(0, core.Inject(TuiPrimitiveTextfieldComponent))
627
+ ], TuiPrimitiveTextfieldDirective);
628
+ return TuiPrimitiveTextfieldDirective;
629
+ }(abstract.TuiAbstractTextfieldHost));
630
+
631
+ // @dynamic
632
+ var TuiTextfieldComponent = /** @class */ (function () {
633
+ function TuiTextfieldComponent(host, controller, elementRef, describedBy, idService) {
634
+ this.host = host;
635
+ this.controller = controller;
636
+ this.elementRef = elementRef;
637
+ this.describedBy = describedBy;
638
+ this.idService = idService;
639
+ this.host.process(this.elementRef.nativeElement);
640
+ }
641
+ Object.defineProperty(TuiTextfieldComponent.prototype, "computedDescribedBy", {
642
+ get: function () {
643
+ return this.describedBy.computedDescribedBy;
644
+ },
645
+ enumerable: true,
646
+ configurable: true
647
+ });
648
+ Object.defineProperty(TuiTextfieldComponent.prototype, "id", {
649
+ get: function () {
650
+ return this.elementRef.nativeElement.id || this.idService.generate();
651
+ },
652
+ enumerable: true,
653
+ configurable: true
654
+ });
655
+ TuiTextfieldComponent.prototype.ngDoCheck = function () {
656
+ this.describedBy.tuiDescribedBy = this.id;
657
+ };
658
+ TuiTextfieldComponent.ctorParameters = function () { return [
659
+ { type: undefined, decorators: [{ type: core.Inject, args: [tokens.TUI_TEXTFIELD_HOST,] }] },
660
+ { type: directives.TuiTextfieldController, decorators: [{ type: core.Inject, args: [directives.TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
661
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
662
+ { type: directives.TuiDescribedByDirective, decorators: [{ type: core.Inject, args: [directives.TuiDescribedByDirective,] }] },
663
+ { type: cdk.TuiIdService, decorators: [{ type: core.Inject, args: [cdk.TuiIdService,] }] }
664
+ ]; };
665
+ __decorate([
666
+ core.HostBinding('attr.aria-describedby')
667
+ ], TuiTextfieldComponent.prototype, "computedDescribedBy", null);
668
+ __decorate([
669
+ core.HostBinding('id')
670
+ ], TuiTextfieldComponent.prototype, "id", null);
671
+ TuiTextfieldComponent = __decorate([
672
+ core.Component({
673
+ selector: 'input[tuiTextfield]',
674
+ template: '',
675
+ providers: [
676
+ directives.TuiDescribedByDirective,
677
+ directives.TUI_DESCRIBED_BY_PROVIDERS,
678
+ directives.TEXTFIELD_CONTROLLER_PROVIDER,
679
+ ],
680
+ host: {
681
+ type: 'text',
682
+ '[attr.aria-placeholder]': 'controller.exampleText',
683
+ '[attr.aria-invalid]': 'host.invalid',
684
+ '[attr.disabled]': 'host.disabled || null',
685
+ '[tabIndex]': 'host.focusable ? 0 : -1',
686
+ '[readOnly]': 'host.readOnly',
687
+ '[value]': 'host.value',
688
+ '(input)': 'host.onValueChange($event.target.value)',
689
+ },
690
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
691
+ 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}"]
692
+ }),
693
+ __param(0, core.Inject(tokens.TUI_TEXTFIELD_HOST)),
694
+ __param(1, core.Inject(directives.TUI_TEXTFIELD_WATCHED_CONTROLLER)),
695
+ __param(2, core.Inject(core.ElementRef)),
696
+ __param(3, core.Inject(directives.TuiDescribedByDirective)),
697
+ __param(4, core.Inject(cdk.TuiIdService))
698
+ ], TuiTextfieldComponent);
699
+ return TuiTextfieldComponent;
700
+ }());
701
+
543
702
  var TuiValueDecorationComponent = /** @class */ (function () {
544
703
  function TuiValueDecorationComponent(textfield, controller) {
545
704
  var _this = this;
@@ -563,9 +722,11 @@
563
722
  });
564
723
  Object.defineProperty(TuiValueDecorationComponent.prototype, "filler", {
565
724
  get: function () {
566
- return this.focused
567
- ? this.exampleText || this.textfield.filler.slice(this.value.length)
568
- : '';
725
+ var _a = this, focused = _a.focused, placeholder = _a.placeholder, exampleText = _a.exampleText, value = _a.value, textfield = _a.textfield;
726
+ if (focused && placeholder && exampleText) {
727
+ return '';
728
+ }
729
+ return focused ? exampleText || textfield.filler.slice(value.length) : '';
569
730
  },
570
731
  enumerable: true,
571
732
  configurable: true
@@ -584,9 +745,18 @@
584
745
  enumerable: true,
585
746
  configurable: true
586
747
  });
748
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "placeholder", {
749
+ get: function () {
750
+ var _a;
751
+ return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
752
+ },
753
+ enumerable: true,
754
+ configurable: true
755
+ });
587
756
  Object.defineProperty(TuiValueDecorationComponent.prototype, "exampleText", {
588
757
  get: function () {
589
- return !this.value && this.focused ? this.controller.exampleText : '';
758
+ var exampleText = this.controller.exampleText || this.placeholder;
759
+ return !this.value && this.focused ? exampleText : '';
590
760
  },
591
761
  enumerable: true,
592
762
  configurable: true
@@ -651,7 +821,6 @@
651
821
  forms.FormsModule,
652
822
  maskAccessor.TuiMaskAccessorModule,
653
823
  cdk.TuiFocusableModule,
654
- cdk.TuiFocusedModule,
655
824
  cdk.TuiHoveredModule,
656
825
  cdk.TuiInputModeModule,
657
826
  ngPolymorpheus.PolymorpheusModule,
@@ -661,19 +830,32 @@
661
830
  cdk.TuiAutofilledModule,
662
831
  describedBy.TuiDescribedByModule,
663
832
  cdk.TuiPreventDefaultModule,
664
- border.TuiBorderModule,
665
833
  mutationObserver.MutationObserverModule,
666
834
  ],
667
- declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],
668
- exports: [TuiPrimitiveTextfieldComponent],
835
+ declarations: [
836
+ TuiPrimitiveTextfieldComponent,
837
+ TuiPrimitiveTextfieldDirective,
838
+ TuiTextfieldComponent,
839
+ TuiValueDecorationComponent,
840
+ ],
841
+ exports: [
842
+ TuiPrimitiveTextfieldComponent,
843
+ TuiPrimitiveTextfieldDirective,
844
+ TuiTextfieldComponent,
845
+ ],
669
846
  })
670
847
  ], TuiPrimitiveTextfieldModule);
671
848
  return TuiPrimitiveTextfieldModule;
672
849
  }());
673
850
 
851
+ exports.TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS;
852
+ exports.TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER;
853
+ exports.TUI_PRIMITIVE_TEXTFIELD_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_OPTIONS;
674
854
  exports.TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = TUI_PRIMITIVE_TEXTFIELD_PROVIDERS;
675
855
  exports.TuiPrimitiveTextfieldComponent = TuiPrimitiveTextfieldComponent;
856
+ exports.TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective;
676
857
  exports.TuiPrimitiveTextfieldModule = TuiPrimitiveTextfieldModule;
858
+ exports.TuiTextfieldComponent = TuiTextfieldComponent;
677
859
  exports.TuiValueDecorationComponent = TuiValueDecorationComponent;
678
860
 
679
861
  Object.defineProperty(exports, '__esModule', { value: true });