@taiga-ui/core 2.31.0 → 2.35.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 (396) 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-button.umd.js +7 -2
  12. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-button.umd.min.js +2 -2
  14. package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
  16. package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
  17. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  18. package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
  19. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
  20. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-label.umd.js +1 -1
  22. package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
  23. package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
  24. package/bundles/taiga-ui-core-components-link.umd.js +2 -2
  25. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  26. package/bundles/taiga-ui-core-components-link.umd.min.js +1 -1
  27. package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
  28. package/bundles/taiga-ui-core-components-loader.umd.js +5 -2
  29. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  30. package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -1
  31. package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
  32. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +2 -6
  33. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  34. package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js +2 -2
  35. package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
  36. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +7 -2
  37. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  38. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -1
  39. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
  40. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +231 -44
  41. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  42. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
  43. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  44. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +2 -2
  45. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
  46. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js +1 -1
  47. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
  48. package/bundles/taiga-ui-core-components-root.umd.js +13 -7
  49. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  50. package/bundles/taiga-ui-core-components-root.umd.min.js +2 -2
  51. package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
  52. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
  53. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +2 -2
  54. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
  55. package/bundles/taiga-ui-core-components-theme-night.umd.js +1 -1
  56. package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -1
  57. package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-core-components-tooltip.umd.js +24 -14
  59. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  60. package/bundles/taiga-ui-core-components-tooltip.umd.min.js +2 -2
  61. package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  63. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  64. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  65. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  66. package/bundles/taiga-ui-core-directives-described-by.umd.js +4 -4
  67. package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
  68. package/bundles/taiga-ui-core-directives-described-by.umd.min.js +1 -1
  69. package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
  70. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -6
  71. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  72. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +2 -2
  73. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
  74. package/bundles/taiga-ui-core-directives-hint-controller.umd.js +17 -12
  75. package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
  76. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +2 -2
  77. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
  78. package/bundles/taiga-ui-core-directives-hint.umd.js +25 -6
  79. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  80. package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -1
  81. package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
  82. package/bundles/taiga-ui-core-directives-manual-hint.umd.js +20 -4
  83. package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
  84. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js +1 -1
  85. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
  86. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +22 -6
  87. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
  88. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -1
  89. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
  90. package/bundles/taiga-ui-core-directives.umd.js +4 -12
  91. package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
  92. package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
  93. package/bundles/taiga-ui-core-tokens.umd.js +8 -0
  94. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  95. package/bundles/taiga-ui-core-tokens.umd.min.js +1 -1
  96. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  97. package/bundles/taiga-ui-core-utils-format.umd.js +1 -1
  98. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  99. package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
  100. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  101. package/bundles/taiga-ui-core-utils-mask.umd.js +1 -1
  102. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  103. package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
  104. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  105. package/bundles/taiga-ui-core-utils-polyfills.umd.js +5 -5
  106. package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
  107. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js +1 -1
  108. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
  109. package/components/button/button-options.d.ts +10 -4
  110. package/components/button/button.component.d.ts +3 -3
  111. package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
  112. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  113. package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
  114. package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
  115. package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
  116. package/components/loader/loader.directive.d.ts +3 -0
  117. package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
  118. package/components/primitive-calendar/primitive-calendar.component.d.ts +0 -1
  119. package/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.metadata.json +1 -1
  120. package/components/primitive-checkbox/checkbox-options.d.ts +10 -4
  121. package/components/primitive-checkbox/primitive-checkbox.component.d.ts +2 -2
  122. package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.metadata.json +1 -1
  123. package/components/primitive-textfield/index.d.ts +3 -0
  124. package/components/primitive-textfield/primitive-textfield-options.d.ts +12 -0
  125. package/components/primitive-textfield/primitive-textfield.component.d.ts +18 -11
  126. package/components/primitive-textfield/primitive-textfield.directive.d.ts +8 -0
  127. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  128. package/components/primitive-textfield/textfield/textfield.component.d.ts +15 -0
  129. package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -0
  130. package/components/primitive-year-picker/taiga-ui-core-components-primitive-year-picker.metadata.json +1 -1
  131. package/components/root/root.component.d.ts +1 -1
  132. package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
  133. package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
  134. package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
  135. package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
  136. package/components/tooltip/tooltip.component.d.ts +9 -6
  137. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  138. package/constants/version.d.ts +1 -1
  139. package/directives/described-by/taiga-ui-core-directives-described-by.metadata.json +1 -1
  140. package/directives/dropdown/taiga-ui-core-directives-dropdown.metadata.json +1 -1
  141. package/directives/hint/hint-options.d.ts +13 -0
  142. package/directives/hint/hint.directive.d.ts +5 -3
  143. package/directives/hint/index.d.ts +1 -0
  144. package/directives/hint/taiga-ui-core-directives-hint.metadata.json +1 -1
  145. package/directives/hint-controller/hint-controller.directive.d.ts +7 -5
  146. package/directives/hint-controller/taiga-ui-core-directives-hint-controller.metadata.json +1 -1
  147. package/directives/index.d.ts +0 -1
  148. package/directives/manual-hint/index.d.ts +1 -0
  149. package/directives/manual-hint/manual-hint-options.d.ts +7 -0
  150. package/directives/manual-hint/manual-hint.directive.d.ts +3 -1
  151. package/directives/manual-hint/taiga-ui-core-directives-manual-hint.metadata.json +1 -1
  152. package/directives/pointer-hint/index.d.ts +1 -0
  153. package/directives/pointer-hint/pointer-hint-options.d.ts +10 -0
  154. package/directives/pointer-hint/pointer-hint.directive.d.ts +5 -3
  155. package/directives/pointer-hint/taiga-ui-core-directives-pointer-hint.metadata.json +1 -1
  156. package/directives/taiga-ui-core-directives.metadata.json +1 -1
  157. package/esm2015/abstract/abstract-dropdown.js +12 -1
  158. package/esm2015/abstract/abstract-hint-options.js +6 -0
  159. package/esm2015/abstract/abstract-hint.js +7 -5
  160. package/esm2015/abstract/abstract-textfield-host.js +34 -0
  161. package/esm2015/abstract/index.js +3 -1
  162. package/esm2015/components/button/button-options.js +5 -1
  163. package/esm2015/components/button/button.component.js +3 -3
  164. package/esm2015/components/dialog/dialog.component.js +1 -1
  165. package/esm2015/components/dropdown-box/dropdown-box.component.js +1 -1
  166. package/esm2015/components/label/label.component.js +1 -1
  167. package/esm2015/components/link/link.component.js +3 -3
  168. package/esm2015/components/loader/loader.component.js +1 -1
  169. package/esm2015/components/loader/loader.directive.js +5 -2
  170. package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -7
  171. package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -1
  172. package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +3 -3
  173. package/esm2015/components/primitive-textfield/index.js +4 -1
  174. package/esm2015/components/primitive-textfield/primitive-textfield-options.js +16 -0
  175. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +66 -31
  176. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +40 -0
  177. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +15 -7
  178. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +68 -0
  179. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -5
  180. package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
  181. package/esm2015/components/root/root.component.js +11 -5
  182. package/esm2015/components/scroll-controls/scroll-controls.component.js +1 -1
  183. package/esm2015/components/theme-night/theme-night.component.js +1 -1
  184. package/esm2015/components/tooltip/tooltip.component.js +17 -10
  185. package/esm2015/components/tooltip/tooltip.module.js +3 -2
  186. package/esm2015/constants/version.js +2 -2
  187. package/esm2015/directives/described-by/described-by.providers.js +6 -6
  188. package/esm2015/directives/dropdown/dropdown.directive.js +2 -7
  189. package/esm2015/directives/hint/hint-options.js +14 -0
  190. package/esm2015/directives/hint/hint.directive.js +11 -7
  191. package/esm2015/directives/hint/index.js +2 -1
  192. package/esm2015/directives/hint-controller/hint-controller.directive.js +16 -10
  193. package/esm2015/directives/hint-controller/hint-controller.token.js +4 -3
  194. package/esm2015/directives/index.js +1 -2
  195. package/esm2015/directives/manual-hint/index.js +2 -1
  196. package/esm2015/directives/manual-hint/manual-hint-options.js +12 -0
  197. package/esm2015/directives/manual-hint/manual-hint.directive.js +9 -5
  198. package/esm2015/directives/pointer-hint/index.js +2 -1
  199. package/esm2015/directives/pointer-hint/pointer-hint-options.js +12 -0
  200. package/esm2015/directives/pointer-hint/pointer-hint.directive.js +11 -7
  201. package/esm2015/interfaces/index.js +1 -1
  202. package/esm2015/interfaces/textfield-host.js +1 -0
  203. package/esm2015/tokens/index.js +3 -1
  204. package/esm2015/tokens/textfield-host.js +3 -0
  205. package/esm2015/tokens/theme.js +5 -0
  206. package/esm2015/utils/format/format-number.js +2 -2
  207. package/esm2015/utils/mask/create-number-mask.js +2 -2
  208. package/esm2015/utils/polyfills/inner-HTML.js +3 -2
  209. package/esm5/abstract/abstract-dropdown.js +12 -1
  210. package/esm5/abstract/abstract-hint-options.js +6 -0
  211. package/esm5/abstract/abstract-hint.js +7 -5
  212. package/esm5/abstract/abstract-textfield-host.js +55 -0
  213. package/esm5/abstract/index.js +3 -1
  214. package/esm5/components/button/button-options.js +6 -1
  215. package/esm5/components/button/button.component.js +3 -3
  216. package/esm5/components/dialog/dialog.component.js +1 -1
  217. package/esm5/components/dropdown-box/dropdown-box.component.js +1 -1
  218. package/esm5/components/label/label.component.js +1 -1
  219. package/esm5/components/link/link.component.js +3 -3
  220. package/esm5/components/loader/loader.component.js +1 -1
  221. package/esm5/components/loader/loader.directive.js +5 -2
  222. package/esm5/components/primitive-calendar/primitive-calendar.component.js +3 -7
  223. package/esm5/components/primitive-checkbox/checkbox-options.js +6 -1
  224. package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +3 -3
  225. package/esm5/components/primitive-textfield/index.js +4 -1
  226. package/esm5/components/primitive-textfield/primitive-textfield-options.js +17 -0
  227. package/esm5/components/primitive-textfield/primitive-textfield.component.js +70 -35
  228. package/esm5/components/primitive-textfield/primitive-textfield.directive.js +49 -0
  229. package/esm5/components/primitive-textfield/primitive-textfield.module.js +15 -7
  230. package/esm5/components/primitive-textfield/textfield/textfield.component.js +77 -0
  231. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +16 -5
  232. package/esm5/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
  233. package/esm5/components/root/root.component.js +12 -5
  234. package/esm5/components/scroll-controls/scroll-controls.component.js +1 -1
  235. package/esm5/components/theme-night/theme-night.component.js +1 -1
  236. package/esm5/components/tooltip/tooltip.component.js +21 -10
  237. package/esm5/components/tooltip/tooltip.module.js +3 -2
  238. package/esm5/constants/version.js +2 -2
  239. package/esm5/directives/described-by/described-by.providers.js +7 -7
  240. package/esm5/directives/dropdown/dropdown.directive.js +2 -7
  241. package/esm5/directives/hint/hint-options.js +15 -0
  242. package/esm5/directives/hint/hint.directive.js +11 -7
  243. package/esm5/directives/hint/index.js +2 -1
  244. package/esm5/directives/hint-controller/hint-controller.directive.js +16 -10
  245. package/esm5/directives/hint-controller/hint-controller.token.js +4 -3
  246. package/esm5/directives/index.js +1 -2
  247. package/esm5/directives/manual-hint/index.js +2 -1
  248. package/esm5/directives/manual-hint/manual-hint-options.js +13 -0
  249. package/esm5/directives/manual-hint/manual-hint.directive.js +9 -5
  250. package/esm5/directives/pointer-hint/index.js +2 -1
  251. package/esm5/directives/pointer-hint/pointer-hint-options.js +13 -0
  252. package/esm5/directives/pointer-hint/pointer-hint.directive.js +11 -7
  253. package/esm5/interfaces/index.js +1 -1
  254. package/esm5/interfaces/textfield-host.js +1 -0
  255. package/esm5/tokens/index.js +3 -1
  256. package/esm5/tokens/textfield-host.js +3 -0
  257. package/esm5/tokens/theme.js +5 -0
  258. package/esm5/utils/format/format-number.js +2 -2
  259. package/esm5/utils/mask/create-number-mask.js +2 -2
  260. package/esm5/utils/polyfills/inner-HTML.js +3 -2
  261. package/fesm2015/taiga-ui-core-abstract.js +57 -8
  262. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  263. package/fesm2015/taiga-ui-core-components-button.js +7 -3
  264. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  265. package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
  266. package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
  267. package/fesm2015/taiga-ui-core-components-label.js +1 -1
  268. package/fesm2015/taiga-ui-core-components-link.js +2 -2
  269. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  270. package/fesm2015/taiga-ui-core-components-loader.js +5 -2
  271. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  272. package/fesm2015/taiga-ui-core-components-primitive-calendar.js +2 -6
  273. package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  274. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -3
  275. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  276. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +201 -42
  277. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  278. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +2 -2
  279. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
  280. package/fesm2015/taiga-ui-core-components-root.js +10 -5
  281. package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
  282. package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
  283. package/fesm2015/taiga-ui-core-components-theme-night.js +1 -1
  284. package/fesm2015/taiga-ui-core-components-tooltip.js +18 -10
  285. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  286. package/fesm2015/taiga-ui-core-constants.js +1 -1
  287. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  288. package/fesm2015/taiga-ui-core-directives-described-by.js +6 -6
  289. package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
  290. package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -6
  291. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  292. package/fesm2015/taiga-ui-core-directives-hint-controller.js +16 -10
  293. package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
  294. package/fesm2015/taiga-ui-core-directives-hint.js +24 -9
  295. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  296. package/fesm2015/taiga-ui-core-directives-manual-hint.js +20 -7
  297. package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
  298. package/fesm2015/taiga-ui-core-directives-pointer-hint.js +22 -9
  299. package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  300. package/fesm2015/taiga-ui-core-directives.js +0 -1
  301. package/fesm2015/taiga-ui-core-directives.js.map +1 -1
  302. package/fesm2015/taiga-ui-core-tokens.js +7 -1
  303. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  304. package/fesm2015/taiga-ui-core-utils-format.js +1 -1
  305. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  306. package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
  307. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  308. package/fesm2015/taiga-ui-core-utils-polyfills.js +3 -1
  309. package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
  310. package/fesm5/taiga-ui-core-abstract.js +78 -8
  311. package/fesm5/taiga-ui-core-abstract.js.map +1 -1
  312. package/fesm5/taiga-ui-core-components-button.js +8 -4
  313. package/fesm5/taiga-ui-core-components-button.js.map +1 -1
  314. package/fesm5/taiga-ui-core-components-dialog.js +1 -1
  315. package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
  316. package/fesm5/taiga-ui-core-components-label.js +1 -1
  317. package/fesm5/taiga-ui-core-components-link.js +2 -2
  318. package/fesm5/taiga-ui-core-components-link.js.map +1 -1
  319. package/fesm5/taiga-ui-core-components-loader.js +5 -2
  320. package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
  321. package/fesm5/taiga-ui-core-components-primitive-calendar.js +2 -6
  322. package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  323. package/fesm5/taiga-ui-core-components-primitive-checkbox.js +8 -4
  324. package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  325. package/fesm5/taiga-ui-core-components-primitive-textfield.js +228 -47
  326. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  327. package/fesm5/taiga-ui-core-components-primitive-year-picker.js +2 -2
  328. package/fesm5/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
  329. package/fesm5/taiga-ui-core-components-root.js +11 -5
  330. package/fesm5/taiga-ui-core-components-root.js.map +1 -1
  331. package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
  332. package/fesm5/taiga-ui-core-components-theme-night.js +1 -1
  333. package/fesm5/taiga-ui-core-components-tooltip.js +22 -10
  334. package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
  335. package/fesm5/taiga-ui-core-constants.js +1 -1
  336. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  337. package/fesm5/taiga-ui-core-directives-described-by.js +7 -7
  338. package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
  339. package/fesm5/taiga-ui-core-directives-dropdown.js +1 -6
  340. package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
  341. package/fesm5/taiga-ui-core-directives-hint-controller.js +16 -10
  342. package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
  343. package/fesm5/taiga-ui-core-directives-hint.js +25 -10
  344. package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
  345. package/fesm5/taiga-ui-core-directives-manual-hint.js +21 -8
  346. package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
  347. package/fesm5/taiga-ui-core-directives-pointer-hint.js +23 -10
  348. package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  349. package/fesm5/taiga-ui-core-directives.js +0 -1
  350. package/fesm5/taiga-ui-core-directives.js.map +1 -1
  351. package/fesm5/taiga-ui-core-tokens.js +7 -1
  352. package/fesm5/taiga-ui-core-tokens.js.map +1 -1
  353. package/fesm5/taiga-ui-core-utils-format.js +1 -1
  354. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  355. package/fesm5/taiga-ui-core-utils-mask.js +1 -1
  356. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  357. package/fesm5/taiga-ui-core-utils-polyfills.js +3 -1
  358. package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
  359. package/interfaces/index.d.ts +1 -0
  360. package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
  361. package/interfaces/textfield-host.d.ts +9 -0
  362. package/package.json +7 -6
  363. package/styles/markup/tui-form-old.less +13 -11
  364. package/styles/markup/tui-form.less +12 -15
  365. package/styles/markup/tui-island.less +1 -0
  366. package/styles/mixins/picker.less +10 -10
  367. package/styles/mixins/picker.scss +10 -10
  368. package/styles/mixins/textfield.less +48 -28
  369. package/styles/mixins/textfield.scss +21 -30
  370. package/styles/theme/variables.less +3 -0
  371. package/tokens/index.d.ts +2 -0
  372. package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
  373. package/tokens/textfield-host.d.ts +3 -0
  374. package/tokens/theme.d.ts +2 -0
  375. package/bundles/taiga-ui-core-directives-border.umd.js +0 -291
  376. package/bundles/taiga-ui-core-directives-border.umd.js.map +0 -1
  377. package/bundles/taiga-ui-core-directives-border.umd.min.js +0 -16
  378. package/bundles/taiga-ui-core-directives-border.umd.min.js.map +0 -1
  379. package/directives/border/border.directive.d.ts +0 -9
  380. package/directives/border/border.module.d.ts +0 -2
  381. package/directives/border/index.d.ts +0 -2
  382. package/directives/border/package.json +0 -13
  383. package/directives/border/taiga-ui-core-directives-border.d.ts +0 -4
  384. package/directives/border/taiga-ui-core-directives-border.metadata.json +0 -1
  385. package/esm2015/directives/border/border.directive.js +0 -42
  386. package/esm2015/directives/border/border.module.js +0 -13
  387. package/esm2015/directives/border/index.js +0 -3
  388. package/esm2015/directives/border/taiga-ui-core-directives-border.js +0 -5
  389. package/esm5/directives/border/border.directive.js +0 -51
  390. package/esm5/directives/border/border.module.js +0 -16
  391. package/esm5/directives/border/index.js +0 -3
  392. package/esm5/directives/border/taiga-ui-core-directives-border.js +0 -5
  393. package/fesm2015/taiga-ui-core-directives-border.js +0 -57
  394. package/fesm2015/taiga-ui-core-directives-border.js.map +0 -1
  395. package/fesm5/taiga-ui-core-directives-border.js +0 -69
  396. 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,39 @@
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
+ var tuiPrimitiveTextfieldOptionsProvider = function (options) { return ({
247
+ provide: TUI_PRIMITIVE_TEXTFIELD_OPTIONS,
248
+ useValue: __assign(__assign({}, TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS), options),
249
+ }); };
250
+
236
251
  var ICON_PADDING = 1.75;
237
252
  var ICON_PADDING_S = 1.5;
238
253
  var TuiPrimitiveTextfieldComponent = /** @class */ (function (_super) {
239
254
  __extends(TuiPrimitiveTextfieldComponent, _super);
240
- function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController) {
255
+ function TuiPrimitiveTextfieldComponent(mode$, appearance, controller, hintController, options, elementRef) {
241
256
  var _this = _super.call(this) || this;
242
257
  _this.mode$ = mode$;
243
258
  _this.appearance = appearance;
244
259
  _this.controller = controller;
245
260
  _this.hintController = hintController;
246
- _this.autofilled = false;
261
+ _this.options = options;
262
+ _this.elementRef = elementRef;
247
263
  _this.editable = true;
248
264
  _this.filler = '';
249
- _this.iconAlign = 'right';
265
+ _this.iconAlign = _this.options.iconAlign;
250
266
  // TODO: Remove null in 3.0
251
267
  _this.iconContent = null;
268
+ _this.iconCleaner = _this.options.iconCleaner;
252
269
  _this.readOnly = false;
253
270
  _this.invalid = false;
254
271
  _this.disabled = false;
@@ -256,21 +273,29 @@
256
273
  _this.postfix = '';
257
274
  _this.value = '';
258
275
  _this.valueChange = new core.EventEmitter();
276
+ /**
277
+ * @deprecated TODO: remove in 3.0
278
+ */
259
279
  _this.autofilledChange = new core.EventEmitter();
280
+ _this.autofilled = false;
260
281
  return _this;
261
282
  }
262
283
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "nativeFocusableElement", {
263
284
  get: function () {
264
- return this.computedDisabled || !this.focusableElement
265
- ? null
266
- : this.focusableElement.nativeElement;
285
+ if (this.computedDisabled || !this.focusableElement) {
286
+ return null;
287
+ }
288
+ // TODO: Refactor this after we drop built-in input element
289
+ return (this.focusableElement.nativeElement
290
+ .previousElementSibling ||
291
+ this.focusableElement.nativeElement);
267
292
  },
268
293
  enumerable: true,
269
294
  configurable: true
270
295
  });
271
296
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "focused", {
272
297
  get: function () {
273
- return cdk.isNativeFocused(this.nativeFocusableElement);
298
+ return cdk.isNativeFocusedIn(this.elementRef.nativeElement);
274
299
  },
275
300
  enumerable: true,
276
301
  configurable: true
@@ -282,13 +307,6 @@
282
307
  enumerable: true,
283
308
  configurable: true
284
309
  });
285
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "labelOutside", {
286
- get: function () {
287
- return this.controller.labelOutside;
288
- },
289
- enumerable: true,
290
- configurable: true
291
- });
292
310
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", {
293
311
  get: function () {
294
312
  return !this.readOnly && !this.disabled && this.invalid;
@@ -335,7 +353,10 @@
335
353
  });
336
354
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "hasPlaceholder", {
337
355
  get: function () {
338
- var hasDecor = this.controller.exampleText || this.prefix || this.postfix;
356
+ var _a;
357
+ var hasDecor = this.controller.exampleText ||
358
+ this.prefix ||
359
+ this.postfix || ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
339
360
  var showDecor = hasDecor && !this.readOnly && this.computedFocused;
340
361
  var placeholderVisible = !this.hasValue && !showDecor;
341
362
  return this.placeholderRaisable || placeholderVisible;
@@ -351,14 +372,14 @@
351
372
  enumerable: true,
352
373
  configurable: true
353
374
  });
354
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderLeft", {
375
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderStart", {
355
376
  get: function () {
356
377
  return this.iconAlignLeft ? this.iconPaddingLeft : 0;
357
378
  },
358
379
  enumerable: true,
359
380
  configurable: true
360
381
  });
361
- Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderRight", {
382
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "borderEnd", {
362
383
  get: function () {
363
384
  return miscellaneous.getBorder(this.iconAlignRight, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
364
385
  },
@@ -389,6 +410,17 @@
389
410
  enumerable: true,
390
411
  configurable: true
391
412
  });
413
+ Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "computedId", {
414
+ get: function () {
415
+ var _a;
416
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
417
+ },
418
+ enumerable: true,
419
+ configurable: true
420
+ });
421
+ TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
422
+ this.updateFocused(focused);
423
+ };
392
424
  TuiPrimitiveTextfieldComponent.prototype.getIndent$ = function (element) {
393
425
  return rxjs.fromEvent(element, 'scroll').pipe(operators.map(function () { return -1 * element.scrollLeft; }));
394
426
  };
@@ -399,12 +431,12 @@
399
431
  this.updateValue('');
400
432
  };
401
433
  TuiPrimitiveTextfieldComponent.prototype.onMouseDown = function (event) {
402
- if (!this.focusableElement ||
403
- event.target === this.focusableElement.nativeElement) {
434
+ var nativeFocusableElement = this.nativeFocusableElement;
435
+ if (!nativeFocusableElement || event.target === nativeFocusableElement) {
404
436
  return;
405
437
  }
406
438
  event.preventDefault();
407
- cdk.setNativeFocused(this.focusableElement.nativeElement);
439
+ cdk.setNativeFocused(nativeFocusableElement);
408
440
  };
409
441
  TuiPrimitiveTextfieldComponent.prototype.onModelChange = function (value) {
410
442
  this.updateValue(value);
@@ -412,9 +444,6 @@
412
444
  TuiPrimitiveTextfieldComponent.prototype.onHovered = function (hovered) {
413
445
  this.updateHovered(hovered);
414
446
  };
415
- TuiPrimitiveTextfieldComponent.prototype.onFocused = function (focused) {
416
- this.updateFocused(focused);
417
- };
418
447
  TuiPrimitiveTextfieldComponent.prototype.onAutofilled = function (autofilled) {
419
448
  this.updateAutofilled(autofilled);
420
449
  };
@@ -427,7 +456,7 @@
427
456
  });
428
457
  Object.defineProperty(TuiPrimitiveTextfieldComponent.prototype, "placeholderRaisable", {
429
458
  get: function () {
430
- return this.size !== 's' && !this.labelOutside;
459
+ return this.size !== 's' && !this.controller.labelOutside;
431
460
  },
432
461
  enumerable: true,
433
462
  configurable: true
@@ -454,7 +483,9 @@
454
483
  { type: rxjs.Observable, decorators: [{ type: core.Inject, args: [tokens.TUI_MODE,] }] },
455
484
  { type: String, decorators: [{ type: core.Inject, args: [tokens.TUI_TEXTFIELD_APPEARANCE,] }] },
456
485
  { 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,] }] }
486
+ { type: hintController.TuiHintControllerDirective, decorators: [{ type: core.Inject, args: [hintController.TUI_HINT_WATCHED_CONTROLLER,] }] },
487
+ { type: undefined, decorators: [{ type: core.Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] },
488
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
458
489
  ]; };
459
490
  __decorate([
460
491
  core.ViewChild('focusableElement')
@@ -475,6 +506,10 @@
475
506
  core.Input(),
476
507
  cdk.tuiDefaultProp()
477
508
  ], TuiPrimitiveTextfieldComponent.prototype, "iconContent", void 0);
509
+ __decorate([
510
+ core.Input(),
511
+ cdk.tuiDefaultProp()
512
+ ], TuiPrimitiveTextfieldComponent.prototype, "iconCleaner", void 0);
478
513
  __decorate([
479
514
  core.Input(),
480
515
  core.HostBinding('class._readonly'),
@@ -510,36 +545,164 @@
510
545
  core.ContentChildren(ngPolymorpheus.PolymorpheusOutletComponent)
511
546
  ], TuiPrimitiveTextfieldComponent.prototype, "content", void 0);
512
547
  __decorate([
513
- core.HostBinding('attr.data-tui-host-size')
548
+ core.HostBinding('attr.data-size')
514
549
  ], TuiPrimitiveTextfieldComponent.prototype, "size", null);
515
- __decorate([
516
- core.HostBinding('class._label-outside')
517
- ], TuiPrimitiveTextfieldComponent.prototype, "labelOutside", null);
518
550
  __decorate([
519
551
  core.HostBinding('class._invalid')
520
552
  ], TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", null);
553
+ __decorate([
554
+ core.HostBinding('class._hidden')
555
+ ], TuiPrimitiveTextfieldComponent.prototype, "inputHidden", null);
556
+ __decorate([
557
+ core.HostBinding('style.--border-start.rem')
558
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderStart", null);
559
+ __decorate([
560
+ core.HostBinding('style.--border-end.rem')
561
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderEnd", null);
562
+ __decorate([
563
+ core.HostListener('focusin', ['true']),
564
+ core.HostListener('focusout', ['false'])
565
+ ], TuiPrimitiveTextfieldComponent.prototype, "onFocused", null);
521
566
  __decorate([
522
567
  cdk.tuiPure
523
568
  ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
524
569
  TuiPrimitiveTextfieldComponent = __decorate([
525
570
  core.Component({
526
571
  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",
572
+ 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
573
  changeDetection: core.ChangeDetectionStrategy.OnPush,
529
574
  providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,
530
575
  host: {
531
576
  '($.data-mode.attr)': 'mode$',
577
+ '[class._autofilled]': 'autofilled',
578
+ '[class._label-outside]': 'controller.labelOutside',
532
579
  },
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}"]
580
+ 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;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:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.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
581
  }),
535
582
  __param(0, core.Inject(tokens.TUI_MODE)),
536
583
  __param(1, core.Inject(tokens.TUI_TEXTFIELD_APPEARANCE)),
537
584
  __param(2, core.Inject(textfieldController.TUI_TEXTFIELD_WATCHED_CONTROLLER)),
538
- __param(3, core.Inject(hintController.TUI_HINT_WATCHED_CONTROLLER))
585
+ __param(3, core.Inject(hintController.TUI_HINT_WATCHED_CONTROLLER)),
586
+ __param(4, core.Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)),
587
+ __param(5, core.Inject(core.ElementRef))
539
588
  ], TuiPrimitiveTextfieldComponent);
540
589
  return TuiPrimitiveTextfieldComponent;
541
590
  }(cdk.AbstractTuiInteractive));
542
591
 
592
+ var TuiPrimitiveTextfieldDirective = /** @class */ (function (_super) {
593
+ __extends(TuiPrimitiveTextfieldDirective, _super);
594
+ function TuiPrimitiveTextfieldDirective(textfield) {
595
+ var _this =
596
+ /**
597
+ * TuiPrimitiveTextfieldComponent satisfies all required parts of
598
+ * AbstractTuiControl interface. A new interface is not introduced
599
+ * so AbstractTuiControl is automatically injected for all other controls.
600
+ */
601
+ _super.call(this, textfield) || this;
602
+ _this.textfield = textfield;
603
+ return _this;
604
+ }
605
+ TuiPrimitiveTextfieldDirective_1 = TuiPrimitiveTextfieldDirective;
606
+ Object.defineProperty(TuiPrimitiveTextfieldDirective.prototype, "readOnly", {
607
+ get: function () {
608
+ return this.textfield.readOnly || !this.textfield.editable;
609
+ },
610
+ enumerable: true,
611
+ configurable: true
612
+ });
613
+ TuiPrimitiveTextfieldDirective.prototype.onValueChange = function (value) {
614
+ this.textfield.onModelChange(value);
615
+ };
616
+ var TuiPrimitiveTextfieldDirective_1;
617
+ TuiPrimitiveTextfieldDirective.ctorParameters = function () { return [
618
+ { type: TuiPrimitiveTextfieldComponent, decorators: [{ type: core.Inject, args: [TuiPrimitiveTextfieldComponent,] }] }
619
+ ]; };
620
+ TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = __decorate([
621
+ core.Directive({
622
+ selector: 'tui-primitive-textfield',
623
+ providers: [
624
+ {
625
+ provide: tokens.TUI_TEXTFIELD_HOST,
626
+ useExisting: core.forwardRef(function () { return TuiPrimitiveTextfieldDirective_1; }),
627
+ },
628
+ ],
629
+ }),
630
+ __param(0, core.Inject(TuiPrimitiveTextfieldComponent))
631
+ ], TuiPrimitiveTextfieldDirective);
632
+ return TuiPrimitiveTextfieldDirective;
633
+ }(abstract.TuiAbstractTextfieldHost));
634
+
635
+ // @dynamic
636
+ var TuiTextfieldComponent = /** @class */ (function () {
637
+ function TuiTextfieldComponent(host, controller, elementRef, describedBy, idService) {
638
+ this.host = host;
639
+ this.controller = controller;
640
+ this.elementRef = elementRef;
641
+ this.describedBy = describedBy;
642
+ this.idService = idService;
643
+ this.host.process(this.elementRef.nativeElement);
644
+ }
645
+ Object.defineProperty(TuiTextfieldComponent.prototype, "computedDescribedBy", {
646
+ get: function () {
647
+ return this.describedBy.computedDescribedBy;
648
+ },
649
+ enumerable: true,
650
+ configurable: true
651
+ });
652
+ Object.defineProperty(TuiTextfieldComponent.prototype, "id", {
653
+ get: function () {
654
+ return this.elementRef.nativeElement.id || this.idService.generate();
655
+ },
656
+ enumerable: true,
657
+ configurable: true
658
+ });
659
+ TuiTextfieldComponent.prototype.ngDoCheck = function () {
660
+ this.describedBy.tuiDescribedBy = this.id;
661
+ };
662
+ TuiTextfieldComponent.ctorParameters = function () { return [
663
+ { type: undefined, decorators: [{ type: core.Inject, args: [tokens.TUI_TEXTFIELD_HOST,] }] },
664
+ { type: directives.TuiTextfieldController, decorators: [{ type: core.Inject, args: [directives.TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
665
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
666
+ { type: directives.TuiDescribedByDirective, decorators: [{ type: core.Inject, args: [directives.TuiDescribedByDirective,] }] },
667
+ { type: cdk.TuiIdService, decorators: [{ type: core.Inject, args: [cdk.TuiIdService,] }] }
668
+ ]; };
669
+ __decorate([
670
+ core.HostBinding('attr.aria-describedby')
671
+ ], TuiTextfieldComponent.prototype, "computedDescribedBy", null);
672
+ __decorate([
673
+ core.HostBinding('id')
674
+ ], TuiTextfieldComponent.prototype, "id", null);
675
+ TuiTextfieldComponent = __decorate([
676
+ core.Component({
677
+ selector: 'input[tuiTextfield]',
678
+ template: '',
679
+ providers: [
680
+ directives.TuiDescribedByDirective,
681
+ directives.TUI_DESCRIBED_BY_PROVIDERS,
682
+ directives.TEXTFIELD_CONTROLLER_PROVIDER,
683
+ ],
684
+ host: {
685
+ type: 'text',
686
+ '[attr.aria-placeholder]': 'controller.exampleText',
687
+ '[attr.aria-invalid]': 'host.invalid',
688
+ '[attr.disabled]': 'host.disabled || null',
689
+ '[tabIndex]': 'host.focusable ? 0 : -1',
690
+ '[readOnly]': 'host.readOnly',
691
+ '[value]': 'host.value',
692
+ '(input)': 'host.onValueChange($event.target.value)',
693
+ },
694
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
695
+ styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;border:0;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:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}: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}"]
696
+ }),
697
+ __param(0, core.Inject(tokens.TUI_TEXTFIELD_HOST)),
698
+ __param(1, core.Inject(directives.TUI_TEXTFIELD_WATCHED_CONTROLLER)),
699
+ __param(2, core.Inject(core.ElementRef)),
700
+ __param(3, core.Inject(directives.TuiDescribedByDirective)),
701
+ __param(4, core.Inject(cdk.TuiIdService))
702
+ ], TuiTextfieldComponent);
703
+ return TuiTextfieldComponent;
704
+ }());
705
+
543
706
  var TuiValueDecorationComponent = /** @class */ (function () {
544
707
  function TuiValueDecorationComponent(textfield, controller) {
545
708
  var _this = this;
@@ -563,9 +726,11 @@
563
726
  });
564
727
  Object.defineProperty(TuiValueDecorationComponent.prototype, "filler", {
565
728
  get: function () {
566
- return this.focused
567
- ? this.exampleText || this.textfield.filler.slice(this.value.length)
568
- : '';
729
+ var _a = this, focused = _a.focused, placeholder = _a.placeholder, exampleText = _a.exampleText, value = _a.value, textfield = _a.textfield;
730
+ if (focused && placeholder && exampleText) {
731
+ return '';
732
+ }
733
+ return focused ? exampleText || textfield.filler.slice(value.length) : '';
569
734
  },
570
735
  enumerable: true,
571
736
  configurable: true
@@ -584,9 +749,18 @@
584
749
  enumerable: true,
585
750
  configurable: true
586
751
  });
752
+ Object.defineProperty(TuiValueDecorationComponent.prototype, "placeholder", {
753
+ get: function () {
754
+ var _a;
755
+ return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
756
+ },
757
+ enumerable: true,
758
+ configurable: true
759
+ });
587
760
  Object.defineProperty(TuiValueDecorationComponent.prototype, "exampleText", {
588
761
  get: function () {
589
- return !this.value && this.focused ? this.controller.exampleText : '';
762
+ var exampleText = this.controller.exampleText || this.placeholder;
763
+ return !this.value && this.focused ? exampleText : '';
590
764
  },
591
765
  enumerable: true,
592
766
  configurable: true
@@ -651,7 +825,6 @@
651
825
  forms.FormsModule,
652
826
  maskAccessor.TuiMaskAccessorModule,
653
827
  cdk.TuiFocusableModule,
654
- cdk.TuiFocusedModule,
655
828
  cdk.TuiHoveredModule,
656
829
  cdk.TuiInputModeModule,
657
830
  ngPolymorpheus.PolymorpheusModule,
@@ -661,20 +834,34 @@
661
834
  cdk.TuiAutofilledModule,
662
835
  describedBy.TuiDescribedByModule,
663
836
  cdk.TuiPreventDefaultModule,
664
- border.TuiBorderModule,
665
837
  mutationObserver.MutationObserverModule,
666
838
  ],
667
- declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],
668
- exports: [TuiPrimitiveTextfieldComponent],
839
+ declarations: [
840
+ TuiPrimitiveTextfieldComponent,
841
+ TuiPrimitiveTextfieldDirective,
842
+ TuiTextfieldComponent,
843
+ TuiValueDecorationComponent,
844
+ ],
845
+ exports: [
846
+ TuiPrimitiveTextfieldComponent,
847
+ TuiPrimitiveTextfieldDirective,
848
+ TuiTextfieldComponent,
849
+ ],
669
850
  })
670
851
  ], TuiPrimitiveTextfieldModule);
671
852
  return TuiPrimitiveTextfieldModule;
672
853
  }());
673
854
 
855
+ exports.TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS;
856
+ exports.TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER;
857
+ exports.TUI_PRIMITIVE_TEXTFIELD_OPTIONS = TUI_PRIMITIVE_TEXTFIELD_OPTIONS;
674
858
  exports.TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = TUI_PRIMITIVE_TEXTFIELD_PROVIDERS;
675
859
  exports.TuiPrimitiveTextfieldComponent = TuiPrimitiveTextfieldComponent;
860
+ exports.TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective;
676
861
  exports.TuiPrimitiveTextfieldModule = TuiPrimitiveTextfieldModule;
862
+ exports.TuiTextfieldComponent = TuiTextfieldComponent;
677
863
  exports.TuiValueDecorationComponent = TuiValueDecorationComponent;
864
+ exports.tuiPrimitiveTextfieldOptionsProvider = tuiPrimitiveTextfieldOptionsProvider;
678
865
 
679
866
  Object.defineProperty(exports, '__esModule', { value: true });
680
867