@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 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-primitive-checkbox.js","sources":["ng://@taiga-ui/core/components/primitive-checkbox/checkbox-options.ts","ng://@taiga-ui/core/components/primitive-checkbox/primitive-checkbox.component.ts","ng://@taiga-ui/core/components/primitive-checkbox/primitive-checkbox.module.ts","ng://@taiga-ui/core/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeL} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface CheckboxOptions {\n readonly size: TuiSizeL;\n readonly appearances: Readonly<{\n unchecked: string;\n checked: string;\n indeterminate: string;\n }>;\n readonly icons: Readonly<{\n checked: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n indeterminate: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n}\n\n/** Default values for the checkbox options. */\nexport const TUI_CHECKBOX_DEFAULT_OPTIONS: CheckboxOptions = {\n size: 'm',\n appearances: {\n unchecked: TuiAppearance.Outline,\n checked: TuiAppearance.Primary,\n indeterminate: TuiAppearance.Primary,\n },\n icons: {\n checked({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconCheck' : 'tuiIconCheckLarge';\n },\n indeterminate({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconMinus' : 'tuiIconMinusLarge';\n },\n },\n};\n\nexport const TUI_CHECKBOX_OPTIONS = new InjectionToken<CheckboxOptions>(\n 'Default parameters for checkbox component',\n {\n factory: () => TUI_CHECKBOX_DEFAULT_OPTIONS,\n },\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {TuiContextWithImplicit, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {CheckboxOptions, TUI_CHECKBOX_OPTIONS} from './checkbox-options';\n\n// @dynamic\n@Component({\n selector: 'tui-primitive-checkbox',\n templateUrl: './primitive-checkbox.template.html',\n styleUrls: ['./primitive-checkbox.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPrimitiveCheckboxComponent {\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n focused = false;\n\n @Input()\n @tuiDefaultProp()\n hovered = false;\n\n @Input()\n @tuiDefaultProp()\n pressed = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input('value')\n @tuiDefaultProp()\n set valueSetter(value: boolean | null) {\n if (value !== false) {\n this.setCurrentIcon(value);\n }\n\n this.value = value;\n }\n\n icon: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> =\n this.options.icons.checked;\n\n value: boolean | null = false;\n\n constructor(\n @Inject(TUI_CHECKBOX_OPTIONS) private readonly options: CheckboxOptions,\n ) {}\n\n get appearance(): string {\n switch (this.value) {\n case false:\n return this.options.appearances.unchecked;\n case true:\n return this.options.appearances.checked;\n default:\n return this.options.appearances.indeterminate;\n }\n }\n\n get empty(): boolean {\n return this.value === false;\n }\n\n private setCurrentIcon(value: null | boolean) {\n this.icon =\n value === null\n ? this.options.icons.indeterminate\n : this.options.icons.checked;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveCheckboxComponent} from './primitive-checkbox.component';\n\n@NgModule({\n imports: [TuiSvgModule, TuiWrapperModule, PolymorpheusModule],\n declarations: [TuiPrimitiveCheckboxComponent],\n exports: [TuiPrimitiveCheckboxComponent],\n})\nexport class TuiPrimitiveCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"taiga-ui-core-components-primitive-checkbox.js","sources":["ng://@taiga-ui/core/components/primitive-checkbox/checkbox-options.ts","ng://@taiga-ui/core/components/primitive-checkbox/primitive-checkbox.component.ts","ng://@taiga-ui/core/components/primitive-checkbox/primitive-checkbox.module.ts","ng://@taiga-ui/core/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeL} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiCheckboxOptions {\n readonly size: TuiSizeL;\n readonly appearances: Readonly<{\n unchecked: string;\n checked: string;\n indeterminate: string;\n }>;\n readonly icons: Readonly<{\n checked: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n indeterminate: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n}\n\n/**\n * @deprecated: use TuiCheckboxOptions instead\n * todo: remove in 3.0\n */\nexport type CheckboxOptions = TuiCheckboxOptions;\n\n/** Default values for the checkbox options. */\nexport const TUI_CHECKBOX_DEFAULT_OPTIONS: TuiCheckboxOptions = {\n size: 'm',\n appearances: {\n unchecked: TuiAppearance.Outline,\n checked: TuiAppearance.Primary,\n indeterminate: TuiAppearance.Primary,\n },\n icons: {\n checked({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconCheck' : 'tuiIconCheckLarge';\n },\n indeterminate({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconMinus' : 'tuiIconMinusLarge';\n },\n },\n};\n\nexport const TUI_CHECKBOX_OPTIONS = new InjectionToken<TuiCheckboxOptions>(\n 'Default parameters for checkbox component',\n {\n factory: () => TUI_CHECKBOX_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiCheckboxOptionsProvider: (\n options: Partial<TuiCheckboxOptions>,\n) => ValueProvider = (options: Partial<TuiCheckboxOptions>) => ({\n provide: TUI_CHECKBOX_OPTIONS,\n useValue: {...TUI_CHECKBOX_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {TuiContextWithImplicit, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_CHECKBOX_OPTIONS, TuiCheckboxOptions} from './checkbox-options';\n\n// @dynamic\n@Component({\n selector: 'tui-primitive-checkbox',\n templateUrl: './primitive-checkbox.template.html',\n styleUrls: ['./primitive-checkbox.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPrimitiveCheckboxComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n focused = false;\n\n @Input()\n @tuiDefaultProp()\n hovered = false;\n\n @Input()\n @tuiDefaultProp()\n pressed = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input('value')\n @tuiDefaultProp()\n set valueSetter(value: boolean | null) {\n if (value !== false) {\n this.setCurrentIcon(value);\n }\n\n this.value = value;\n }\n\n icon: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> =\n this.options.icons.checked;\n\n value: boolean | null = false;\n\n constructor(\n @Inject(TUI_CHECKBOX_OPTIONS) private readonly options: TuiCheckboxOptions,\n ) {}\n\n get appearance(): string {\n switch (this.value) {\n case false:\n return this.options.appearances.unchecked;\n case true:\n return this.options.appearances.checked;\n default:\n return this.options.appearances.indeterminate;\n }\n }\n\n get empty(): boolean {\n return this.value === false;\n }\n\n private setCurrentIcon(value: null | boolean) {\n this.icon =\n value === null\n ? this.options.icons.indeterminate\n : this.options.icons.checked;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveCheckboxComponent} from './primitive-checkbox.component';\n\n@NgModule({\n imports: [TuiSvgModule, TuiWrapperModule, PolymorpheusModule],\n declarations: [TuiPrimitiveCheckboxComponent],\n exports: [TuiPrimitiveCheckboxComponent],\n})\nexport class TuiPrimitiveCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
@@ -1,24 +1,24 @@
1
1
  import { __decorate, __param } from 'tslib';
2
- import { forwardRef, EventEmitter, Inject, ViewChild, Input, HostBinding, Output, ContentChildren, Component, ChangeDetectionStrategy, ElementRef, NgModule } from '@angular/core';
3
- import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, isNativeFocused, setNativeFocused, tuiDefaultProp, tuiPure, TuiFocusableModule, TuiFocusedModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule, TuiPreventDefaultModule } from '@taiga-ui/cdk';
2
+ import { forwardRef, InjectionToken, EventEmitter, Inject, ElementRef, ViewChild, Input, HostBinding, Output, ContentChildren, HostListener, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
3
+ import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, isNativeFocusedIn, setNativeFocused, tuiDefaultProp, tuiPure, TuiIdService, TuiFocusableModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule, TuiPreventDefaultModule } from '@taiga-ui/cdk';
4
4
  import { HINT_CONTROLLER_PROVIDER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/hint-controller';
5
5
  import { TEXTFIELD_CONTROLLER_PROVIDER, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/textfield-controller';
6
- import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE } from '@taiga-ui/core/tokens';
6
+ import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST } from '@taiga-ui/core/tokens';
7
7
  import { getBorder } from '@taiga-ui/core/utils/miscellaneous';
8
8
  import { PolymorpheusOutletComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
9
9
  import { fromEvent, Observable, defer, EMPTY } from 'rxjs';
10
10
  import { map, startWith, distinctUntilChanged } from 'rxjs/operators';
11
11
  import { MODE_PROVIDER } from '@taiga-ui/core/providers';
12
+ import { TuiAbstractTextfieldHost } from '@taiga-ui/core/abstract';
12
13
  import { CommonModule } from '@angular/common';
13
14
  import { FormsModule } from '@angular/forms';
14
15
  import { MutationObserverDirective, MutationObserverModule } from '@ng-web-apis/mutation-observer';
15
16
  import { TuiSvgModule } from '@taiga-ui/core/components/svg';
16
17
  import { TuiTooltipModule } from '@taiga-ui/core/components/tooltip';
17
18
  import { TuiWrapperModule } from '@taiga-ui/core/components/wrapper';
18
- import { TuiBorderModule } from '@taiga-ui/core/directives/border';
19
19
  import { TuiDescribedByModule } from '@taiga-ui/core/directives/described-by';
20
20
  import { TuiMaskAccessorModule } from '@taiga-ui/core/directives/mask-accessor';
21
- import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1 } from '@taiga-ui/core/directives';
21
+ import { TuiTextfieldController as TuiTextfieldController$1, TUI_TEXTFIELD_WATCHED_CONTROLLER as TUI_TEXTFIELD_WATCHED_CONTROLLER$1, TuiDescribedByDirective, TUI_DESCRIBED_BY_PROVIDERS, TEXTFIELD_CONTROLLER_PROVIDER as TEXTFIELD_CONTROLLER_PROVIDER$1 } from '@taiga-ui/core/directives';
22
22
 
23
23
  const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
24
24
  {
@@ -30,21 +30,38 @@ const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
30
30
  MODE_PROVIDER,
31
31
  ];
32
32
 
33
+ // TODO: remove in ivy compilation
34
+ const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';
35
+ /** Default values for primitive textfield options */
36
+ const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = {
37
+ iconAlign: 'right',
38
+ iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,
39
+ };
40
+ const TUI_PRIMITIVE_TEXTFIELD_OPTIONS = new InjectionToken('Default parameters for primitive textfield component', {
41
+ factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,
42
+ });
43
+ const tuiPrimitiveTextfieldOptionsProvider = (options) => ({
44
+ provide: TUI_PRIMITIVE_TEXTFIELD_OPTIONS,
45
+ useValue: Object.assign(Object.assign({}, TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS), options),
46
+ });
47
+
33
48
  const ICON_PADDING = 1.75;
34
49
  const ICON_PADDING_S = 1.5;
35
50
  let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
36
- constructor(mode$, appearance, controller, hintController) {
51
+ constructor(mode$, appearance, controller, hintController, options, elementRef) {
37
52
  super();
38
53
  this.mode$ = mode$;
39
54
  this.appearance = appearance;
40
55
  this.controller = controller;
41
56
  this.hintController = hintController;
42
- this.autofilled = false;
57
+ this.options = options;
58
+ this.elementRef = elementRef;
43
59
  this.editable = true;
44
60
  this.filler = '';
45
- this.iconAlign = 'right';
61
+ this.iconAlign = this.options.iconAlign;
46
62
  // TODO: Remove null in 3.0
47
63
  this.iconContent = null;
64
+ this.iconCleaner = this.options.iconCleaner;
48
65
  this.readOnly = false;
49
66
  this.invalid = false;
50
67
  this.disabled = false;
@@ -52,22 +69,27 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
52
69
  this.postfix = '';
53
70
  this.value = '';
54
71
  this.valueChange = new EventEmitter();
72
+ /**
73
+ * @deprecated TODO: remove in 3.0
74
+ */
55
75
  this.autofilledChange = new EventEmitter();
76
+ this.autofilled = false;
56
77
  }
57
78
  get nativeFocusableElement() {
58
- return this.computedDisabled || !this.focusableElement
59
- ? null
60
- : this.focusableElement.nativeElement;
79
+ if (this.computedDisabled || !this.focusableElement) {
80
+ return null;
81
+ }
82
+ // TODO: Refactor this after we drop built-in input element
83
+ return (this.focusableElement.nativeElement
84
+ .previousElementSibling ||
85
+ this.focusableElement.nativeElement);
61
86
  }
62
87
  get focused() {
63
- return isNativeFocused(this.nativeFocusableElement);
88
+ return isNativeFocusedIn(this.elementRef.nativeElement);
64
89
  }
65
90
  get size() {
66
91
  return this.controller.size;
67
92
  }
68
- get labelOutside() {
69
- return this.controller.labelOutside;
70
- }
71
93
  get computedInvalid() {
72
94
  return !this.readOnly && !this.disabled && this.invalid;
73
95
  }
@@ -89,7 +111,10 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
89
111
  return !!this.controller.customContent;
90
112
  }
91
113
  get hasPlaceholder() {
92
- const hasDecor = this.controller.exampleText || this.prefix || this.postfix;
114
+ var _a;
115
+ const hasDecor = this.controller.exampleText ||
116
+ this.prefix ||
117
+ this.postfix || ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder);
93
118
  const showDecor = hasDecor && !this.readOnly && this.computedFocused;
94
119
  const placeholderVisible = !this.hasValue && !showDecor;
95
120
  return this.placeholderRaisable || placeholderVisible;
@@ -98,10 +123,10 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
98
123
  return (this.placeholderRaisable &&
99
124
  ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled));
100
125
  }
101
- get borderLeft() {
126
+ get borderStart() {
102
127
  return this.iconAlignLeft ? this.iconPaddingLeft : 0;
103
128
  }
104
- get borderRight() {
129
+ get borderEnd() {
105
130
  return getBorder(this.iconAlignRight, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
106
131
  }
107
132
  get iconAlignLeft() {
@@ -116,6 +141,13 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
116
141
  ? 'ccexpiryyear'
117
142
  : null;
118
143
  }
144
+ get computedId() {
145
+ var _a;
146
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.id) || '';
147
+ }
148
+ onFocused(focused) {
149
+ this.updateFocused(focused);
150
+ }
119
151
  getIndent$(element) {
120
152
  return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));
121
153
  }
@@ -126,12 +158,12 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
126
158
  this.updateValue('');
127
159
  }
128
160
  onMouseDown(event) {
129
- if (!this.focusableElement ||
130
- event.target === this.focusableElement.nativeElement) {
161
+ const { nativeFocusableElement } = this;
162
+ if (!nativeFocusableElement || event.target === nativeFocusableElement) {
131
163
  return;
132
164
  }
133
165
  event.preventDefault();
134
- setNativeFocused(this.focusableElement.nativeElement);
166
+ setNativeFocused(nativeFocusableElement);
135
167
  }
136
168
  onModelChange(value) {
137
169
  this.updateValue(value);
@@ -139,9 +171,6 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
139
171
  onHovered(hovered) {
140
172
  this.updateHovered(hovered);
141
173
  }
142
- onFocused(focused) {
143
- this.updateFocused(focused);
144
- }
145
174
  onAutofilled(autofilled) {
146
175
  this.updateAutofilled(autofilled);
147
176
  }
@@ -149,7 +178,7 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
149
178
  return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;
150
179
  }
151
180
  get placeholderRaisable() {
152
- return this.size !== 's' && !this.labelOutside;
181
+ return this.size !== 's' && !this.controller.labelOutside;
153
182
  }
154
183
  get hasIcon() {
155
184
  return !!this.iconContent;
@@ -170,7 +199,9 @@ TuiPrimitiveTextfieldComponent.ctorParameters = () => [
170
199
  { type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
171
200
  { type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] },
172
201
  { type: TuiTextfieldController, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
173
- { type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] }
202
+ { type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] },
203
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_PRIMITIVE_TEXTFIELD_OPTIONS,] }] },
204
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
174
205
  ];
175
206
  __decorate([
176
207
  ViewChild('focusableElement')
@@ -191,6 +222,10 @@ __decorate([
191
222
  Input(),
192
223
  tuiDefaultProp()
193
224
  ], TuiPrimitiveTextfieldComponent.prototype, "iconContent", void 0);
225
+ __decorate([
226
+ Input(),
227
+ tuiDefaultProp()
228
+ ], TuiPrimitiveTextfieldComponent.prototype, "iconCleaner", void 0);
194
229
  __decorate([
195
230
  Input(),
196
231
  HostBinding('class._readonly'),
@@ -226,34 +261,144 @@ __decorate([
226
261
  ContentChildren(PolymorpheusOutletComponent)
227
262
  ], TuiPrimitiveTextfieldComponent.prototype, "content", void 0);
228
263
  __decorate([
229
- HostBinding('attr.data-tui-host-size')
264
+ HostBinding('attr.data-size')
230
265
  ], TuiPrimitiveTextfieldComponent.prototype, "size", null);
231
- __decorate([
232
- HostBinding('class._label-outside')
233
- ], TuiPrimitiveTextfieldComponent.prototype, "labelOutside", null);
234
266
  __decorate([
235
267
  HostBinding('class._invalid')
236
268
  ], TuiPrimitiveTextfieldComponent.prototype, "computedInvalid", null);
269
+ __decorate([
270
+ HostBinding('class._hidden')
271
+ ], TuiPrimitiveTextfieldComponent.prototype, "inputHidden", null);
272
+ __decorate([
273
+ HostBinding('style.--border-start.rem')
274
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderStart", null);
275
+ __decorate([
276
+ HostBinding('style.--border-end.rem')
277
+ ], TuiPrimitiveTextfieldComponent.prototype, "borderEnd", null);
278
+ __decorate([
279
+ HostListener('focusin', ['true']),
280
+ HostListener('focusout', ['false'])
281
+ ], TuiPrimitiveTextfieldComponent.prototype, "onFocused", null);
237
282
  __decorate([
238
283
  tuiPure
239
284
  ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
240
285
  TuiPrimitiveTextfieldComponent = __decorate([
241
286
  Component({
242
287
  selector: 'tui-primitive-textfield',
243
- 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",
288
+ 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",
244
289
  changeDetection: ChangeDetectionStrategy.OnPush,
245
290
  providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,
246
291
  host: {
247
292
  '($.data-mode.attr)': 'mode$',
293
+ '[class._autofilled]': 'autofilled',
294
+ '[class._label-outside]': 'controller.labelOutside',
248
295
  },
249
- 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}"]
296
+ 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}"]
250
297
  }),
251
298
  __param(0, Inject(TUI_MODE)),
252
299
  __param(1, Inject(TUI_TEXTFIELD_APPEARANCE)),
253
300
  __param(2, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)),
254
- __param(3, Inject(TUI_HINT_WATCHED_CONTROLLER))
301
+ __param(3, Inject(TUI_HINT_WATCHED_CONTROLLER)),
302
+ __param(4, Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)),
303
+ __param(5, Inject(ElementRef))
255
304
  ], TuiPrimitiveTextfieldComponent);
256
305
 
306
+ var TuiPrimitiveTextfieldDirective_1;
307
+ let TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = class TuiPrimitiveTextfieldDirective extends TuiAbstractTextfieldHost {
308
+ constructor(textfield) {
309
+ /**
310
+ * TuiPrimitiveTextfieldComponent satisfies all required parts of
311
+ * AbstractTuiControl interface. A new interface is not introduced
312
+ * so AbstractTuiControl is automatically injected for all other controls.
313
+ */
314
+ super(textfield);
315
+ this.textfield = textfield;
316
+ }
317
+ get readOnly() {
318
+ return this.textfield.readOnly || !this.textfield.editable;
319
+ }
320
+ onValueChange(value) {
321
+ this.textfield.onModelChange(value);
322
+ }
323
+ };
324
+ TuiPrimitiveTextfieldDirective.ctorParameters = () => [
325
+ { type: TuiPrimitiveTextfieldComponent, decorators: [{ type: Inject, args: [TuiPrimitiveTextfieldComponent,] }] }
326
+ ];
327
+ TuiPrimitiveTextfieldDirective = TuiPrimitiveTextfieldDirective_1 = __decorate([
328
+ Directive({
329
+ selector: 'tui-primitive-textfield',
330
+ providers: [
331
+ {
332
+ provide: TUI_TEXTFIELD_HOST,
333
+ useExisting: forwardRef(() => TuiPrimitiveTextfieldDirective_1),
334
+ },
335
+ ],
336
+ }),
337
+ __param(0, Inject(TuiPrimitiveTextfieldComponent))
338
+ ], TuiPrimitiveTextfieldDirective);
339
+
340
+ // @dynamic
341
+ let TuiTextfieldComponent = class TuiTextfieldComponent {
342
+ constructor(host, controller, elementRef, describedBy, idService) {
343
+ this.host = host;
344
+ this.controller = controller;
345
+ this.elementRef = elementRef;
346
+ this.describedBy = describedBy;
347
+ this.idService = idService;
348
+ this.host.process(this.elementRef.nativeElement);
349
+ }
350
+ get computedDescribedBy() {
351
+ return this.describedBy.computedDescribedBy;
352
+ }
353
+ get id() {
354
+ return this.elementRef.nativeElement.id || this.idService.generate();
355
+ }
356
+ ngDoCheck() {
357
+ this.describedBy.tuiDescribedBy = this.id;
358
+ }
359
+ };
360
+ TuiTextfieldComponent.ctorParameters = () => [
361
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_HOST,] }] },
362
+ { type: TuiTextfieldController$1, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1,] }] },
363
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
364
+ { type: TuiDescribedByDirective, decorators: [{ type: Inject, args: [TuiDescribedByDirective,] }] },
365
+ { type: TuiIdService, decorators: [{ type: Inject, args: [TuiIdService,] }] }
366
+ ];
367
+ __decorate([
368
+ HostBinding('attr.aria-describedby')
369
+ ], TuiTextfieldComponent.prototype, "computedDescribedBy", null);
370
+ __decorate([
371
+ HostBinding('id')
372
+ ], TuiTextfieldComponent.prototype, "id", null);
373
+ TuiTextfieldComponent = __decorate([
374
+ Component({
375
+ selector: 'input[tuiTextfield]',
376
+ template: '',
377
+ providers: [
378
+ TuiDescribedByDirective,
379
+ TUI_DESCRIBED_BY_PROVIDERS,
380
+ TEXTFIELD_CONTROLLER_PROVIDER$1,
381
+ ],
382
+ host: {
383
+ type: 'text',
384
+ '[attr.aria-placeholder]': 'controller.exampleText',
385
+ '[attr.aria-invalid]': 'host.invalid',
386
+ '[attr.disabled]': 'host.disabled || null',
387
+ '[tabIndex]': 'host.focusable ? 0 : -1',
388
+ '[readOnly]': 'host.readOnly',
389
+ '[value]': 'host.value',
390
+ '(input)': 'host.onValueChange($event.target.value)',
391
+ },
392
+ changeDetection: ChangeDetectionStrategy.OnPush,
393
+ 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}"]
394
+ }),
395
+ __param(0, Inject(TUI_TEXTFIELD_HOST)),
396
+ __param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1)),
397
+ __param(2, Inject(ElementRef)),
398
+ __param(3, Inject(TuiDescribedByDirective)),
399
+ __param(4, Inject(TuiIdService))
400
+ ], TuiTextfieldComponent);
401
+
257
402
  let TuiValueDecorationComponent = class TuiValueDecorationComponent {
258
403
  constructor(textfield, controller) {
259
404
  this.textfield = textfield;
@@ -267,9 +412,11 @@ let TuiValueDecorationComponent = class TuiValueDecorationComponent {
267
412
  return this.textfield.value;
268
413
  }
269
414
  get filler() {
270
- return this.focused
271
- ? this.exampleText || this.textfield.filler.slice(this.value.length)
272
- : '';
415
+ const { focused, placeholder, exampleText, value, textfield } = this;
416
+ if (focused && placeholder && exampleText) {
417
+ return '';
418
+ }
419
+ return focused ? exampleText || textfield.filler.slice(value.length) : '';
273
420
  }
274
421
  get prefix() {
275
422
  return this.decorationsVisible ? this.textfield.prefix : '';
@@ -277,8 +424,13 @@ let TuiValueDecorationComponent = class TuiValueDecorationComponent {
277
424
  get postfix() {
278
425
  return this.decorationsVisible ? this.computedPostfix : '';
279
426
  }
427
+ get placeholder() {
428
+ var _a;
429
+ return ((_a = this.textfield.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
430
+ }
280
431
  get exampleText() {
281
- return !this.value && this.focused ? this.controller.exampleText : '';
432
+ const exampleText = this.controller.exampleText || this.placeholder;
433
+ return !this.value && this.focused ? exampleText : '';
282
434
  }
283
435
  get decorationsVisible() {
284
436
  return !!this.value || this.focused;
@@ -326,7 +478,6 @@ TuiPrimitiveTextfieldModule = __decorate([
326
478
  FormsModule,
327
479
  TuiMaskAccessorModule,
328
480
  TuiFocusableModule,
329
- TuiFocusedModule,
330
481
  TuiHoveredModule,
331
482
  TuiInputModeModule,
332
483
  PolymorpheusModule,
@@ -336,11 +487,19 @@ TuiPrimitiveTextfieldModule = __decorate([
336
487
  TuiAutofilledModule,
337
488
  TuiDescribedByModule,
338
489
  TuiPreventDefaultModule,
339
- TuiBorderModule,
340
490
  MutationObserverModule,
341
491
  ],
342
- declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],
343
- exports: [TuiPrimitiveTextfieldComponent],
492
+ declarations: [
493
+ TuiPrimitiveTextfieldComponent,
494
+ TuiPrimitiveTextfieldDirective,
495
+ TuiTextfieldComponent,
496
+ TuiValueDecorationComponent,
497
+ ],
498
+ exports: [
499
+ TuiPrimitiveTextfieldComponent,
500
+ TuiPrimitiveTextfieldDirective,
501
+ TuiTextfieldComponent,
502
+ ],
344
503
  })
345
504
  ], TuiPrimitiveTextfieldModule);
346
505
 
@@ -348,5 +507,5 @@ TuiPrimitiveTextfieldModule = __decorate([
348
507
  * Generated bundle index. Do not edit.
349
508
  */
350
509
 
351
- export { TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldModule, TuiValueDecorationComponent };
510
+ export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_PROVIDERS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent, tuiPrimitiveTextfieldOptionsProvider };
352
511
  //# sourceMappingURL=taiga-ui-core-components-primitive-textfield.js.map