@taiga-ui/core 2.30.0 → 2.34.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 (367) 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-checkbox.umd.js +7 -2
  33. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  34. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -1
  35. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
  36. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +231 -44
  37. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  38. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
  39. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  40. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
  41. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +2 -2
  42. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
  43. package/bundles/taiga-ui-core-components-theme-night.umd.js +1 -1
  44. package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -1
  45. package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
  46. package/bundles/taiga-ui-core-components-tooltip.umd.js +24 -14
  47. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  48. package/bundles/taiga-ui-core-components-tooltip.umd.min.js +2 -2
  49. package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  51. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  52. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  53. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  54. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -6
  55. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  56. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +2 -2
  57. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-core-directives-hint-controller.umd.js +17 -12
  59. package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
  60. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +2 -2
  61. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-core-directives-hint.umd.js +25 -6
  63. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  64. package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -1
  65. package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
  66. package/bundles/taiga-ui-core-directives-manual-hint.umd.js +20 -4
  67. package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
  68. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js +1 -1
  69. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
  70. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +22 -6
  71. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
  72. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -1
  73. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
  74. package/bundles/taiga-ui-core-directives.umd.js +4 -12
  75. package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
  76. package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
  77. package/bundles/taiga-ui-core-providers.umd.js +2 -1
  78. package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
  79. package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
  80. package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
  81. package/bundles/taiga-ui-core-tokens.umd.js +3 -0
  82. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  83. package/bundles/taiga-ui-core-tokens.umd.min.js +2 -2
  84. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  85. package/bundles/taiga-ui-core-utils-dom.umd.js +1 -1
  86. package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
  87. package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
  88. package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
  89. package/bundles/taiga-ui-core-utils-format.umd.js +1 -1
  90. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  91. package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
  92. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  93. package/bundles/taiga-ui-core-utils-mask.umd.js +1 -1
  94. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  95. package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
  96. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  97. package/bundles/taiga-ui-core-utils-polyfills.umd.js +5 -5
  98. package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
  99. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js +1 -1
  100. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
  101. package/components/button/button-options.d.ts +10 -4
  102. package/components/button/button.component.d.ts +3 -3
  103. package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
  104. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  105. package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
  106. package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
  107. package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
  108. package/components/loader/loader.directive.d.ts +3 -0
  109. package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
  110. package/components/primitive-checkbox/checkbox-options.d.ts +10 -4
  111. package/components/primitive-checkbox/primitive-checkbox.component.d.ts +2 -2
  112. package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.metadata.json +1 -1
  113. package/components/primitive-textfield/index.d.ts +3 -0
  114. package/components/primitive-textfield/primitive-textfield-options.d.ts +12 -0
  115. package/components/primitive-textfield/primitive-textfield.component.d.ts +18 -11
  116. package/components/primitive-textfield/primitive-textfield.directive.d.ts +8 -0
  117. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  118. package/components/primitive-textfield/textfield/textfield.component.d.ts +15 -0
  119. package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -0
  120. package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
  121. package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
  122. package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
  123. package/components/tooltip/tooltip.component.d.ts +9 -6
  124. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  125. package/constants/version.d.ts +1 -1
  126. package/directives/dropdown/taiga-ui-core-directives-dropdown.metadata.json +1 -1
  127. package/directives/hint/hint-options.d.ts +13 -0
  128. package/directives/hint/hint.directive.d.ts +5 -3
  129. package/directives/hint/index.d.ts +1 -0
  130. package/directives/hint/taiga-ui-core-directives-hint.metadata.json +1 -1
  131. package/directives/hint-controller/hint-controller.directive.d.ts +7 -5
  132. package/directives/hint-controller/taiga-ui-core-directives-hint-controller.metadata.json +1 -1
  133. package/directives/index.d.ts +0 -1
  134. package/directives/manual-hint/index.d.ts +1 -0
  135. package/directives/manual-hint/manual-hint-options.d.ts +7 -0
  136. package/directives/manual-hint/manual-hint.directive.d.ts +3 -1
  137. package/directives/manual-hint/taiga-ui-core-directives-manual-hint.metadata.json +1 -1
  138. package/directives/pointer-hint/index.d.ts +1 -0
  139. package/directives/pointer-hint/pointer-hint-options.d.ts +10 -0
  140. package/directives/pointer-hint/pointer-hint.directive.d.ts +5 -3
  141. package/directives/pointer-hint/taiga-ui-core-directives-pointer-hint.metadata.json +1 -1
  142. package/directives/taiga-ui-core-directives.metadata.json +1 -1
  143. package/esm2015/abstract/abstract-dropdown.js +12 -1
  144. package/esm2015/abstract/abstract-hint-options.js +6 -0
  145. package/esm2015/abstract/abstract-hint.js +7 -5
  146. package/esm2015/abstract/abstract-textfield-host.js +34 -0
  147. package/esm2015/abstract/index.js +3 -1
  148. package/esm2015/components/button/button-options.js +5 -1
  149. package/esm2015/components/button/button.component.js +3 -3
  150. package/esm2015/components/dialog/dialog.component.js +1 -1
  151. package/esm2015/components/dropdown-box/dropdown-box.component.js +1 -1
  152. package/esm2015/components/label/label.component.js +1 -1
  153. package/esm2015/components/link/link.component.js +3 -3
  154. package/esm2015/components/loader/loader.component.js +1 -1
  155. package/esm2015/components/loader/loader.directive.js +5 -2
  156. package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -1
  157. package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +3 -3
  158. package/esm2015/components/primitive-textfield/index.js +4 -1
  159. package/esm2015/components/primitive-textfield/primitive-textfield-options.js +16 -0
  160. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +66 -31
  161. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +40 -0
  162. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +15 -7
  163. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +68 -0
  164. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -5
  165. package/esm2015/components/scroll-controls/scroll-controls.component.js +1 -1
  166. package/esm2015/components/theme-night/theme-night.component.js +1 -1
  167. package/esm2015/components/tooltip/tooltip.component.js +17 -10
  168. package/esm2015/components/tooltip/tooltip.module.js +3 -2
  169. package/esm2015/constants/version.js +2 -2
  170. package/esm2015/directives/dropdown/dropdown.directive.js +2 -7
  171. package/esm2015/directives/hint/hint-options.js +14 -0
  172. package/esm2015/directives/hint/hint.directive.js +11 -7
  173. package/esm2015/directives/hint/index.js +2 -1
  174. package/esm2015/directives/hint-controller/hint-controller.directive.js +16 -10
  175. package/esm2015/directives/hint-controller/hint-controller.token.js +4 -3
  176. package/esm2015/directives/index.js +1 -2
  177. package/esm2015/directives/manual-hint/index.js +2 -1
  178. package/esm2015/directives/manual-hint/manual-hint-options.js +12 -0
  179. package/esm2015/directives/manual-hint/manual-hint.directive.js +9 -5
  180. package/esm2015/directives/pointer-hint/index.js +2 -1
  181. package/esm2015/directives/pointer-hint/pointer-hint-options.js +12 -0
  182. package/esm2015/directives/pointer-hint/pointer-hint.directive.js +11 -7
  183. package/esm2015/interfaces/index.js +1 -1
  184. package/esm2015/interfaces/textfield-host.js +1 -0
  185. package/esm2015/providers/mode.provider.js +3 -2
  186. package/esm2015/tokens/index.js +2 -1
  187. package/esm2015/tokens/textfield-host.js +3 -0
  188. package/esm2015/utils/dom/process-icon.js +2 -2
  189. package/esm2015/utils/format/format-number.js +2 -2
  190. package/esm2015/utils/mask/create-number-mask.js +2 -2
  191. package/esm2015/utils/polyfills/inner-HTML.js +3 -2
  192. package/esm5/abstract/abstract-dropdown.js +12 -1
  193. package/esm5/abstract/abstract-hint-options.js +6 -0
  194. package/esm5/abstract/abstract-hint.js +7 -5
  195. package/esm5/abstract/abstract-textfield-host.js +55 -0
  196. package/esm5/abstract/index.js +3 -1
  197. package/esm5/components/button/button-options.js +6 -1
  198. package/esm5/components/button/button.component.js +3 -3
  199. package/esm5/components/dialog/dialog.component.js +1 -1
  200. package/esm5/components/dropdown-box/dropdown-box.component.js +1 -1
  201. package/esm5/components/label/label.component.js +1 -1
  202. package/esm5/components/link/link.component.js +3 -3
  203. package/esm5/components/loader/loader.component.js +1 -1
  204. package/esm5/components/loader/loader.directive.js +5 -2
  205. package/esm5/components/primitive-checkbox/checkbox-options.js +6 -1
  206. package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +3 -3
  207. package/esm5/components/primitive-textfield/index.js +4 -1
  208. package/esm5/components/primitive-textfield/primitive-textfield-options.js +17 -0
  209. package/esm5/components/primitive-textfield/primitive-textfield.component.js +70 -35
  210. package/esm5/components/primitive-textfield/primitive-textfield.directive.js +49 -0
  211. package/esm5/components/primitive-textfield/primitive-textfield.module.js +15 -7
  212. package/esm5/components/primitive-textfield/textfield/textfield.component.js +77 -0
  213. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +16 -5
  214. package/esm5/components/scroll-controls/scroll-controls.component.js +1 -1
  215. package/esm5/components/theme-night/theme-night.component.js +1 -1
  216. package/esm5/components/tooltip/tooltip.component.js +21 -10
  217. package/esm5/components/tooltip/tooltip.module.js +3 -2
  218. package/esm5/constants/version.js +2 -2
  219. package/esm5/directives/dropdown/dropdown.directive.js +2 -7
  220. package/esm5/directives/hint/hint-options.js +15 -0
  221. package/esm5/directives/hint/hint.directive.js +11 -7
  222. package/esm5/directives/hint/index.js +2 -1
  223. package/esm5/directives/hint-controller/hint-controller.directive.js +16 -10
  224. package/esm5/directives/hint-controller/hint-controller.token.js +4 -3
  225. package/esm5/directives/index.js +1 -2
  226. package/esm5/directives/manual-hint/index.js +2 -1
  227. package/esm5/directives/manual-hint/manual-hint-options.js +13 -0
  228. package/esm5/directives/manual-hint/manual-hint.directive.js +9 -5
  229. package/esm5/directives/pointer-hint/index.js +2 -1
  230. package/esm5/directives/pointer-hint/pointer-hint-options.js +13 -0
  231. package/esm5/directives/pointer-hint/pointer-hint.directive.js +11 -7
  232. package/esm5/interfaces/index.js +1 -1
  233. package/esm5/interfaces/textfield-host.js +1 -0
  234. package/esm5/providers/mode.provider.js +3 -2
  235. package/esm5/tokens/index.js +2 -1
  236. package/esm5/tokens/textfield-host.js +3 -0
  237. package/esm5/utils/dom/process-icon.js +2 -2
  238. package/esm5/utils/format/format-number.js +2 -2
  239. package/esm5/utils/mask/create-number-mask.js +2 -2
  240. package/esm5/utils/polyfills/inner-HTML.js +3 -2
  241. package/fesm2015/taiga-ui-core-abstract.js +57 -8
  242. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  243. package/fesm2015/taiga-ui-core-components-button.js +7 -3
  244. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  245. package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
  246. package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
  247. package/fesm2015/taiga-ui-core-components-label.js +1 -1
  248. package/fesm2015/taiga-ui-core-components-link.js +2 -2
  249. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  250. package/fesm2015/taiga-ui-core-components-loader.js +5 -2
  251. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  252. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -3
  253. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  254. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +201 -42
  255. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  256. package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
  257. package/fesm2015/taiga-ui-core-components-theme-night.js +1 -1
  258. package/fesm2015/taiga-ui-core-components-tooltip.js +18 -10
  259. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  260. package/fesm2015/taiga-ui-core-constants.js +1 -1
  261. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  262. package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -6
  263. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  264. package/fesm2015/taiga-ui-core-directives-hint-controller.js +16 -10
  265. package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
  266. package/fesm2015/taiga-ui-core-directives-hint.js +24 -9
  267. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  268. package/fesm2015/taiga-ui-core-directives-manual-hint.js +20 -7
  269. package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
  270. package/fesm2015/taiga-ui-core-directives-pointer-hint.js +22 -9
  271. package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  272. package/fesm2015/taiga-ui-core-directives.js +0 -1
  273. package/fesm2015/taiga-ui-core-directives.js.map +1 -1
  274. package/fesm2015/taiga-ui-core-providers.js +2 -1
  275. package/fesm2015/taiga-ui-core-providers.js.map +1 -1
  276. package/fesm2015/taiga-ui-core-tokens.js +3 -1
  277. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  278. package/fesm2015/taiga-ui-core-utils-dom.js +1 -1
  279. package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
  280. package/fesm2015/taiga-ui-core-utils-format.js +1 -1
  281. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  282. package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
  283. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  284. package/fesm2015/taiga-ui-core-utils-polyfills.js +3 -1
  285. package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
  286. package/fesm5/taiga-ui-core-abstract.js +78 -8
  287. package/fesm5/taiga-ui-core-abstract.js.map +1 -1
  288. package/fesm5/taiga-ui-core-components-button.js +8 -4
  289. package/fesm5/taiga-ui-core-components-button.js.map +1 -1
  290. package/fesm5/taiga-ui-core-components-dialog.js +1 -1
  291. package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
  292. package/fesm5/taiga-ui-core-components-label.js +1 -1
  293. package/fesm5/taiga-ui-core-components-link.js +2 -2
  294. package/fesm5/taiga-ui-core-components-link.js.map +1 -1
  295. package/fesm5/taiga-ui-core-components-loader.js +5 -2
  296. package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
  297. package/fesm5/taiga-ui-core-components-primitive-checkbox.js +8 -4
  298. package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  299. package/fesm5/taiga-ui-core-components-primitive-textfield.js +228 -47
  300. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  301. package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
  302. package/fesm5/taiga-ui-core-components-theme-night.js +1 -1
  303. package/fesm5/taiga-ui-core-components-tooltip.js +22 -10
  304. package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
  305. package/fesm5/taiga-ui-core-constants.js +1 -1
  306. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  307. package/fesm5/taiga-ui-core-directives-dropdown.js +1 -6
  308. package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
  309. package/fesm5/taiga-ui-core-directives-hint-controller.js +16 -10
  310. package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
  311. package/fesm5/taiga-ui-core-directives-hint.js +25 -10
  312. package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
  313. package/fesm5/taiga-ui-core-directives-manual-hint.js +21 -8
  314. package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
  315. package/fesm5/taiga-ui-core-directives-pointer-hint.js +23 -10
  316. package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  317. package/fesm5/taiga-ui-core-directives.js +0 -1
  318. package/fesm5/taiga-ui-core-directives.js.map +1 -1
  319. package/fesm5/taiga-ui-core-providers.js +2 -1
  320. package/fesm5/taiga-ui-core-providers.js.map +1 -1
  321. package/fesm5/taiga-ui-core-tokens.js +3 -1
  322. package/fesm5/taiga-ui-core-tokens.js.map +1 -1
  323. package/fesm5/taiga-ui-core-utils-dom.js +1 -1
  324. package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
  325. package/fesm5/taiga-ui-core-utils-format.js +1 -1
  326. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  327. package/fesm5/taiga-ui-core-utils-mask.js +1 -1
  328. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  329. package/fesm5/taiga-ui-core-utils-polyfills.js +3 -1
  330. package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
  331. package/interfaces/index.d.ts +1 -0
  332. package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
  333. package/interfaces/textfield-host.d.ts +9 -0
  334. package/package.json +7 -6
  335. package/providers/taiga-ui-core-providers.metadata.json +1 -1
  336. package/styles/markup/tui-form-old.less +13 -11
  337. package/styles/markup/tui-form.less +13 -11
  338. package/styles/markup/tui-island.less +1 -0
  339. package/styles/mixins/textfield.less +47 -27
  340. package/styles/mixins/textfield.scss +21 -30
  341. package/styles/theme/variables.less +2 -0
  342. package/styles/variables/media.less +2 -2
  343. package/tokens/index.d.ts +1 -0
  344. package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
  345. package/tokens/textfield-host.d.ts +3 -0
  346. package/bundles/taiga-ui-core-directives-border.umd.js +0 -291
  347. package/bundles/taiga-ui-core-directives-border.umd.js.map +0 -1
  348. package/bundles/taiga-ui-core-directives-border.umd.min.js +0 -16
  349. package/bundles/taiga-ui-core-directives-border.umd.min.js.map +0 -1
  350. package/directives/border/border.directive.d.ts +0 -9
  351. package/directives/border/border.module.d.ts +0 -2
  352. package/directives/border/index.d.ts +0 -2
  353. package/directives/border/package.json +0 -13
  354. package/directives/border/taiga-ui-core-directives-border.d.ts +0 -4
  355. package/directives/border/taiga-ui-core-directives-border.metadata.json +0 -1
  356. package/esm2015/directives/border/border.directive.js +0 -42
  357. package/esm2015/directives/border/border.module.js +0 -13
  358. package/esm2015/directives/border/index.js +0 -3
  359. package/esm2015/directives/border/taiga-ui-core-directives-border.js +0 -5
  360. package/esm5/directives/border/border.directive.js +0 -51
  361. package/esm5/directives/border/border.module.js +0 -16
  362. package/esm5/directives/border/index.js +0 -3
  363. package/esm5/directives/border/taiga-ui-core-directives-border.js +0 -5
  364. package/fesm2015/taiga-ui-core-directives-border.js +0 -57
  365. package/fesm2015/taiga-ui-core-directives-border.js.map +0 -1
  366. package/fesm5/taiga-ui-core-directives-border.js +0 -69
  367. package/fesm5/taiga-ui-core-directives-border.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n setNativeFocused,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {\n TuiBrightness,\n TuiHorizontalDirection,\n TuiSizeL,\n TuiSizeS,\n} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n private autofilled = false;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent | null = null;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor = this.controller.exampleText || this.prefix || this.postfix;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n get borderLeft(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n get borderRight(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n if (\n !this.focusableElement ||\n event.target === this.focusableElement.nativeElement\n ) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.focusableElement.nativeElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n return this.focused\n ? this.exampleText || this.textfield.filler.slice(this.value.length)\n : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get exampleText(): string {\n return !this.value && this.focused ? this.controller.exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiBorderModule} from '@taiga-ui/core/directives/border';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n TuiBorderModule,\n MutationObserverModule,\n ],\n declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],\n exports: [TuiPrimitiveTextfieldComponent],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQa,iCAAiC,GAAG;IAC7C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,8BAA8B,GAAA,CAAC;KAChE;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;AC6BjB,IAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,IAAM,cAAc,GAAG,GAAG,CAAC;;IAaf,kDAAsB;IA2D9B,wCAC+B,KAAuC,EACvB,UAAkB,EAEpD,UAAkC,EAElC,cAA0C;QANvD,YAQI,iBAAO,SACV;QAR8B,WAAK,GAAL,KAAK,CAAkC;QACvB,gBAAU,GAAV,UAAU,CAAQ;QAEpD,gBAAU,GAAV,UAAU,CAAwB;QAElC,oBAAc,GAAd,cAAc,CAA4B;QA3D/C,gBAAU,GAAG,KAAK,CAAC;QAI3B,cA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taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield-options.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.directive.ts","ng://@taiga-ui/core/components/primitive-textfield/textfield/textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiPrimitiveTextfieldOptions {\n readonly iconAlign: TuiHorizontalDirection;\n readonly iconCleaner: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';\n\n/** Default values for primitive textfield options */\nexport const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS: TuiPrimitiveTextfieldOptions = {\n iconAlign: 'right',\n iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,\n};\n\nexport const TUI_PRIMITIVE_TEXTFIELD_OPTIONS =\n new InjectionToken<TuiPrimitiveTextfieldOptions>(\n 'Default parameters for primitive textfield component',\n {\n factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,\n },\n );\n\nexport const tuiPrimitiveTextfieldOptionsProvider: (\n options: Partial<TuiPrimitiveTextfieldOptions>,\n) => ValueProvider = (options: Partial<TuiPrimitiveTextfieldOptions>) => ({\n provide: TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n useValue: {...TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocusedIn,\n setNativeFocused,\n TuiContextWithImplicit,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\nimport {\n TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n TuiPrimitiveTextfieldOptions,\n} from './primitive-textfield-options';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._autofilled]': 'autofilled',\n '[class._label-outside]': 'controller.labelOutside',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiPrimitiveTextfieldOptions['iconAlign'] = this.options.iconAlign;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>> | null =\n null;\n\n @Input()\n @tuiDefaultProp()\n iconCleaner: TuiPrimitiveTextfieldOptions['iconCleaner'] = this.options.iconCleaner;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n /**\n * @deprecated TODO: remove in 3.0\n */\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n autofilled = false;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)\n readonly options: TuiPrimitiveTextfieldOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n if (this.computedDisabled || !this.focusableElement) {\n return null;\n }\n\n // TODO: Refactor this after we drop built-in input element\n return (\n (this.focusableElement.nativeElement\n .previousElementSibling as HTMLInputElement | null) ||\n this.focusableElement.nativeElement\n );\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n @HostBinding('class._hidden')\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor =\n this.controller.exampleText ||\n this.prefix ||\n this.postfix ||\n this.nativeFocusableElement?.placeholder;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n @HostBinding('style.--border-start.rem')\n get borderStart(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n @HostBinding('style.--border-end.rem')\n get borderEnd(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n get computedId(): string {\n return this.nativeFocusableElement?.id || '';\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n const {nativeFocusableElement} = this;\n\n if (!nativeFocusableElement || event.target === nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(nativeFocusableElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.controller.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {Directive, forwardRef, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiAbstractTextfieldHost} from '@taiga-ui/core/abstract';\nimport {TUI_TEXTFIELD_HOST} from '@taiga-ui/core/tokens';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\n@Directive({\n selector: 'tui-primitive-textfield',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldDirective),\n },\n ],\n})\nexport class TuiPrimitiveTextfieldDirective extends TuiAbstractTextfieldHost<any> {\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n ) {\n /**\n * TuiPrimitiveTextfieldComponent satisfies all required parts of\n * AbstractTuiControl interface. A new interface is not introduced\n * so AbstractTuiControl is automatically injected for all other controls.\n */\n super(textfield as any as AbstractTuiControl<unknown>);\n }\n\n get readOnly(): boolean {\n return this.textfield.readOnly || !this.textfield.editable;\n }\n\n onValueChange(value: string) {\n this.textfield.onModelChange(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {TuiIdService} from '@taiga-ui/cdk';\nimport {\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_DESCRIBED_BY_PROVIDERS,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiDescribedByDirective,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\nimport {TUI_TEXTFIELD_HOST} from '@taiga-ui/core/tokens';\n\n// @dynamic\n@Component({\n selector: 'input[tuiTextfield]',\n template: '',\n providers: [\n TuiDescribedByDirective,\n TUI_DESCRIBED_BY_PROVIDERS,\n TEXTFIELD_CONTROLLER_PROVIDER,\n ],\n host: {\n type: 'text',\n '[attr.aria-placeholder]': 'controller.exampleText',\n '[attr.aria-invalid]': 'host.invalid',\n '[attr.disabled]': 'host.disabled || null',\n '[tabIndex]': 'host.focusable ? 0 : -1',\n '[readOnly]': 'host.readOnly',\n '[value]': 'host.value',\n '(input)': 'host.onValueChange($event.target.value)',\n },\n styleUrls: ['textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTextfieldComponent implements DoCheck {\n constructor(\n @Inject(TUI_TEXTFIELD_HOST) readonly host: TuiTextfieldHost,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiDescribedByDirective)\n private readonly describedBy: TuiDescribedByDirective,\n @Inject(TuiIdService)\n private readonly idService: TuiIdService,\n ) {\n this.host.process(this.elementRef.nativeElement);\n }\n\n @HostBinding('attr.aria-describedby')\n get computedDescribedBy(): string | null {\n return this.describedBy.computedDescribedBy;\n }\n\n @HostBinding('id')\n get id(): string {\n return this.elementRef.nativeElement.id || this.idService.generate();\n }\n\n ngDoCheck() {\n this.describedBy.tuiDescribedBy = this.id;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n const {focused, placeholder, exampleText, value, textfield} = this;\n\n if (focused && placeholder && exampleText) {\n return '';\n }\n\n return focused ? exampleText || textfield.filler.slice(value.length) : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get placeholder(): string {\n return this.textfield.nativeFocusableElement?.placeholder || '';\n }\n\n private get exampleText(): string {\n const exampleText = this.controller.exampleText || this.placeholder;\n\n return !this.value && this.focused ? exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiPrimitiveTextfieldDirective} from './primitive-textfield.directive';\nimport {TuiTextfieldComponent} from './textfield/textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n MutationObserverModule,\n ],\n declarations: [\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldDirective,\n TuiTextfieldComponent,\n TuiValueDecorationComponent,\n ],\n exports: [\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldDirective,\n TuiTextfieldComponent,\n ],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER","TEXTFIELD_CONTROLLER_PROVIDER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQa,iCAAiC,GAAG;IAC7C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,8BAA8B,GAAA,CAAC;KAChE;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ACNjB;IACa,oCAAoC,GAAG,oBAAoB;AAExE;IACa,uCAAuC,GAAiC;IACjF,SAAS,EAA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;gBACX,qBAAqB;gBACrB,kBAAkB;gBAClB,gBAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,gBAAgB;gBAChB,mBAAmB;gBACnB,oBAAoB;gBACpB,uBAAuB;gBACvB,sBAAsB;aACzB;YACD,YAAY,EAAE;gBACV,8BAA8B;gBAC9B,8BAA8B;gBAC9B,qBAAqB;gBACrB,2BAA2B;aAC9B;YACD,OAAO,EAAE;gBACL,8BAA8B;gBAC9B,8BAA8B;gBAC9B,qBAAqB;aACxB;SACJ,CAAC;OACW,2BAA2B,CAAG;IAAD,kCAAC;CAA3C;;ACpDA;;;;;;"}
@@ -53,7 +53,7 @@ var TuiScrollControlsComponent = /** @class */ (function () {
53
53
  host: {
54
54
  '($.data-mode.attr)': 'mode$',
55
55
  },
56
- styles: [":host{position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);float:left;margin-right:calc(-100% + 1px);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.bar{position:absolute;right:0;bottom:0;pointer-events:auto}.bar_vertical{top:0;width:.875rem}.bar_horizontal{left:0;height:.875rem}.bar_has-horizontal{bottom:.5rem}.bar_has-vertical{right:.5rem}.thumb{transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;background:var(--tui-text-01);background-clip:content-box;box-sizing:border-box;transition-property:width,height;opacity:.2}.thumb:hover{opacity:.24}.thumb:active{opacity:.48}:host[data-mode=onDark] .thumb{background-color:var(--tui-text-01-night)}.bar_vertical .thumb{right:0;width:.75rem;min-height:1.25rem}.bar_vertical .thumb:active,.bar_vertical:hover .thumb{width:.875rem}.bar_horizontal .thumb{bottom:0;height:.75rem;min-width:1.25rem}.bar_horizontal .thumb:active,.bar_horizontal:hover .thumb{height:.875rem}"]
56
+ styles: [":host{position:-webkit-sticky;position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);float:left;margin-right:calc(-100% + 1px);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.bar{position:absolute;right:0;bottom:0;pointer-events:auto}.bar_vertical{top:0;width:.875rem}.bar_horizontal{left:0;height:.875rem}.bar_has-horizontal{bottom:.5rem}.bar_has-vertical{right:.5rem}.thumb{transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;background:var(--tui-text-01);background-clip:content-box;box-sizing:border-box;transition-property:width,height;opacity:.2}.thumb:hover{opacity:.24}.thumb:active{opacity:.48}:host[data-mode=onDark] .thumb{background-color:var(--tui-text-01-night)}.bar_vertical .thumb{right:0;width:.75rem;min-height:1.25rem}.bar_vertical .thumb:active,.bar_vertical:hover .thumb{width:.875rem}.bar_horizontal .thumb{bottom:0;height:.75rem;min-width:1.25rem}.bar_horizontal .thumb:active,.bar_horizontal:hover .thumb{height:.875rem}"]
57
57
  }),
58
58
  __param(0, Inject(TUI_ANIMATION_OPTIONS)),
59
59
  __param(1, Inject(NgZone)),
@@ -13,7 +13,7 @@ var TuiThemeNightComponent = /** @class */ (function (_super) {
13
13
  selector: 'tui-theme-night',
14
14
  template: '',
15
15
  encapsulation: ViewEncapsulation.None,
16
- styles: [":root{--tui-base-01:#222;--tui-base-02:#333;--tui-base-03:#808080;--tui-base-04:#959595;--tui-base-05:#b0b0b0;--tui-base-06:#d7d7d7;--tui-base-07:#ededed;--tui-base-08:#f6f6f6;--tui-base-09:#fff;--tui-focus:rgba(51, 51, 51, 0.64);--tui-secondary:rgba(255, 255, 255, 0.16);--tui-secondary-hover:rgba(255, 255, 255, 0.24);--tui-secondary-active:rgba(255, 255, 255, 0.4);--tui-clear:rgba(255, 255, 255, 0.16);--tui-clear-disabled:rgba(255, 255, 255, 0.08);--tui-clear-hover:rgba(255, 255, 255, 0.24);--tui-clear-active:rgba(255, 255, 255, 0.4);--tui-error-fill:#ff8c67;--tui-error-bg:rgba(244, 87, 37, 0.32);--tui-error-bg-hover:rgba(244, 87, 37, 0.4);--tui-success-fill:#4ac99b;--tui-success-bg:rgba(74, 201, 155, 0.32);--tui-success-bg-hover:rgba(74, 201, 155, 0.4);--tui-warning-fill:#ffc700;--tui-warning-bg:rgba(255, 199, 0, 0.32);--tui-warning-bg-hover:rgba(255, 199, 0, 0.4);--tui-info-fill:#70b6f6;--tui-info-bg:rgba(112, 182, 246, 0.32);--tui-info-bg-hover:rgba(112, 182, 246, 0.4);--tui-neutral-fill:#959ba4;--tui-neutral-bg:rgba(149, 155, 164, 0.32);--tui-neutral-bg-hover:rgba(149, 155, 164, 0.48);--tui-text-01:#ffffff;--tui-text-02:rgba(255, 255, 255, 0.72);--tui-text-03:rgba(255, 255, 255, 0.6);--tui-link:#6788ff;--tui-link-hover:#526ed3;--tui-positive:#44c596;--tui-positive-hover:#3aa981;--tui-negative:#ff8c67;--tui-negative-hover:#bb593a;--tui-autofill:var(--tui-autofill-night)}tui-notification{--tui-base-01:#000}"]
16
+ styles: [":root{--tui-base-01:#222;--tui-base-02:#333;--tui-base-03:#808080;--tui-base-04:#959595;--tui-base-05:#b0b0b0;--tui-base-06:#d7d7d7;--tui-base-07:#ededed;--tui-base-08:#f6f6f6;--tui-base-09:#fff;--tui-focus:rgba(51, 51, 51, 0.64);--tui-secondary:rgba(255, 255, 255, 0.16);--tui-secondary-hover:rgba(255, 255, 255, 0.24);--tui-secondary-active:rgba(255, 255, 255, 0.4);--tui-clear:rgba(255, 255, 255, 0.16);--tui-clear-disabled:rgba(255, 255, 255, 0.08);--tui-clear-hover:rgba(255, 255, 255, 0.24);--tui-clear-active:rgba(255, 255, 255, 0.4);--tui-error-fill:#ff8c67;--tui-error-bg:rgba(244, 87, 37, 0.32);--tui-error-bg-hover:rgba(244, 87, 37, 0.4);--tui-success-fill:#4ac99b;--tui-success-bg:rgba(74, 201, 155, 0.32);--tui-success-bg-hover:rgba(74, 201, 155, 0.4);--tui-warning-fill:#ffc700;--tui-warning-bg:rgba(255, 199, 0, 0.32);--tui-warning-bg-hover:rgba(255, 199, 0, 0.4);--tui-info-fill:#70b6f6;--tui-info-bg:rgba(112, 182, 246, 0.32);--tui-info-bg-hover:rgba(112, 182, 246, 0.4);--tui-neutral-fill:#959ba4;--tui-neutral-bg:rgba(149, 155, 164, 0.32);--tui-neutral-bg-hover:rgba(149, 155, 164, 0.48);--tui-text-01:#ffffff;--tui-text-02:rgba(255, 255, 255, 0.72);--tui-text-03:rgba(255, 255, 255, 0.6);--tui-link:#6788ff;--tui-link-hover:#526ed3;--tui-positive:#44c596;--tui-positive-hover:#3aa981;--tui-negative:#ff8c67;--tui-negative-hover:#bb593a;--tui-autofill:var(--tui-autofill-night);--tui-elevation-01:#222;--tui-elevation-02:#222}tui-notification{--tui-base-01:#000}"]
17
17
  })
18
18
  ], TuiThemeNightComponent);
19
19
  return TuiThemeNightComponent;
@@ -1,6 +1,7 @@
1
1
  import { __decorate, __param } from 'tslib';
2
2
  import { Inject, Input, HostBinding, HostListener, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import { TuiDestroyService, TUI_IS_MOBILE, tuiDefaultProp } from '@taiga-ui/cdk';
4
+ import { TUI_HINT_OPTIONS } from '@taiga-ui/core/directives';
4
5
  import { MODE_PROVIDER } from '@taiga-ui/core/providers';
5
6
  import { TUI_MODE } from '@taiga-ui/core/tokens';
6
7
  import { Observable } from 'rxjs';
@@ -8,17 +9,19 @@ import { takeUntil } from 'rxjs/operators';
8
9
  import { CommonModule } from '@angular/common';
9
10
  import { TuiSvgModule } from '@taiga-ui/core/components/svg';
10
11
  import { TuiHintModule } from '@taiga-ui/core/directives/hint';
12
+ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
11
13
 
12
14
  var TuiTooltipComponent = /** @class */ (function () {
13
- function TuiTooltipComponent(destroy$, mode$, isMobile) {
15
+ function TuiTooltipComponent(destroy$, mode$, isMobile, options) {
14
16
  var _this = this;
15
17
  this.isMobile = isMobile;
18
+ this.options = options;
16
19
  this.globalMode = null;
17
20
  this.content = '';
18
- this.mode = null;
19
- this.direction = 'bottom-left';
20
- this.showDelay = 500;
21
- this.hideDelay = 200;
21
+ this.mode = this.options.mode;
22
+ this.direction = this.options.direction;
23
+ this.showDelay = this.options.tuiHintShowDelay;
24
+ this.hideDelay = this.options.tuiHintHideDelay;
22
25
  this.describeId = '';
23
26
  mode$.pipe(takeUntil(destroy$)).subscribe(function (mode) {
24
27
  _this.globalMode = mode;
@@ -38,10 +41,18 @@ var TuiTooltipComponent = /** @class */ (function () {
38
41
  event.stopPropagation();
39
42
  }
40
43
  };
44
+ Object.defineProperty(TuiTooltipComponent.prototype, "icon", {
45
+ get: function () {
46
+ return this.options.tooltipIcon;
47
+ },
48
+ enumerable: true,
49
+ configurable: true
50
+ });
41
51
  TuiTooltipComponent.ctorParameters = function () { return [
42
52
  { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
43
53
  { type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
44
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] }
54
+ { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
55
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_HINT_OPTIONS,] }] }
45
56
  ]; };
46
57
  __decorate([
47
58
  Input(),
@@ -77,14 +88,15 @@ var TuiTooltipComponent = /** @class */ (function () {
77
88
  TuiTooltipComponent = __decorate([
78
89
  Component({
79
90
  selector: 'tui-tooltip',
80
- template: "<tui-svg\n src=\"tuiIconTooltipLarge\"\n automation-id=\"tui-tooltip__icon\"\n class=\"icon\"\n [tuiHintId]=\"describeId\"\n [tuiHint]=\"content\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintMode]=\"computedMode\"\n></tui-svg>\n",
91
+ template: "<span\n polymorpheus-outlet\n automation-id=\"tui-tooltip__icon\"\n class=\"icon\"\n [content]=\"icon\"\n [tuiHintId]=\"describeId\"\n [tuiHint]=\"content\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintMode]=\"computedMode\"\n>\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\n</span>\n",
81
92
  changeDetection: ChangeDetectionStrategy.OnPush,
82
93
  providers: [TuiDestroyService, MODE_PROVIDER],
83
- styles: [":host{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-03)}:host:hover{color:var(--tui-text-02)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-mode=onLight]{color:var(--tui-text-01)}:host[data-mode=error]{color:var(--tui-error-fill)}.icon{transition-property:opacity,color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:100%;height:100%}:host:not([data-mode]) .icon._hint_hovered{color:var(--tui-text-02)}:host[data-mode=onDark] .icon,:host[data-mode=onLight] .icon{opacity:var(--tui-disabled-opacity)}:host[data-mode=onDark] .icon._hint_hovered,:host[data-mode=onDark] .icon:hover,:host[data-mode=onLight] .icon._hint_hovered,:host[data-mode=onLight] .icon:hover{opacity:1}"]
94
+ styles: [":host{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-03)}:host:hover{color:var(--tui-text-02)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-mode=onLight]{color:var(--tui-text-01)}:host[data-mode=error]{color:var(--tui-error-fill)}.icon{transition-property:opacity,color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:inline-block;width:100%;height:100%}:host:not([data-mode]) .icon._hint_hovered{color:var(--tui-text-02)}:host[data-mode=onDark] .icon,:host[data-mode=onLight] .icon{opacity:var(--tui-disabled-opacity)}:host[data-mode=onDark] .icon._hint_hovered,:host[data-mode=onDark] .icon:hover,:host[data-mode=onLight] .icon._hint_hovered,:host[data-mode=onLight] .icon:hover{opacity:1}"]
84
95
  }),
85
96
  __param(0, Inject(TuiDestroyService)),
86
97
  __param(1, Inject(TUI_MODE)),
87
- __param(2, Inject(TUI_IS_MOBILE))
98
+ __param(2, Inject(TUI_IS_MOBILE)),
99
+ __param(3, Inject(TUI_HINT_OPTIONS))
88
100
  ], TuiTooltipComponent);
89
101
  return TuiTooltipComponent;
90
102
  }());
@@ -94,7 +106,7 @@ var TuiTooltipModule = /** @class */ (function () {
94
106
  }
95
107
  TuiTooltipModule = __decorate([
96
108
  NgModule({
97
- imports: [CommonModule, TuiSvgModule, TuiHintModule],
109
+ imports: [CommonModule, TuiSvgModule, TuiHintModule, PolymorpheusModule],
98
110
  declarations: [TuiTooltipComponent],
99
111
  exports: [TuiTooltipComponent],
100
112
  })
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["ng://@taiga-ui/core/components/tooltip/tooltip.component.ts","ng://@taiga-ui/core/components/tooltip/tooltip.module.ts","ng://@taiga-ui/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n})\nexport class TuiTooltipComponent {\n private globalMode: TuiBrightness | null = null;\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n mode: TuiHintModeT | null = null;\n\n @Input()\n @tuiDefaultProp()\n direction: TuiDirection = 'bottom-left';\n\n @Input()\n @tuiDefaultProp()\n showDelay = 500;\n\n @Input()\n @tuiDefaultProp()\n hideDelay = 200;\n\n @Input()\n @tuiDefaultProp()\n describeId = '';\n\n constructor(\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TUI_MODE) mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n ) {\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.globalMode = mode;\n });\n }\n\n // TODO: Simplify\n @HostBinding('attr.data-mode')\n get computedMode(): TuiHintModeT | TuiBrightness | null {\n return this.mode || this.globalMode;\n }\n\n @HostListener('mousedown', ['$event'])\n @HostListener('click', ['$event'])\n stopOnMobile(event: MouseEvent) {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiHintModule} from '@taiga-ui/core/directives/hint';\n\nimport {TuiTooltipComponent} from './tooltip.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiHintModule],\n declarations: [TuiTooltipComponent],\n exports: [TuiTooltipComponent],\n})\nexport class TuiTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;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AQ,CAAC,CAAC;QACrC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;2DAMjC;IAlDQ,mBAAmB;QAP/B,SAAS,CAAC;YACP,QAAQ,EAAE,aAAa;YACvB,kVAAsC;YAEtC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,SAAS,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC;;SAChD,CAAC;QA6BO,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChB,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;OA9BjB,mBAAmB,CAmD/B;IAAD,0BAAC;CAnDD;;;ICXA;KAAgC;IAAnB,gBAAgB;QAL5B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;YACpD,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACZA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["ng://@taiga-ui/core/components/tooltip/tooltip.component.ts","ng://@taiga-ui/core/components/tooltip/tooltip.module.ts","ng://@taiga-ui/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {TUI_HINT_OPTIONS, TuiHintOptions} from '@taiga-ui/core/directives';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiHintModeT} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n})\nexport class TuiTooltipComponent {\n private globalMode: TuiBrightness | null = null;\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n mode: TuiHintOptions['mode'] = this.options.mode;\n\n @Input()\n @tuiDefaultProp()\n direction: TuiHintOptions['direction'] = this.options.direction;\n\n @Input()\n @tuiDefaultProp()\n showDelay: TuiHintOptions['tuiHintShowDelay'] = this.options.tuiHintShowDelay;\n\n @Input()\n @tuiDefaultProp()\n hideDelay: TuiHintOptions['tuiHintHideDelay'] = this.options.tuiHintHideDelay;\n\n @Input()\n @tuiDefaultProp()\n describeId = '';\n\n constructor(\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TUI_MODE) mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_HINT_OPTIONS) private readonly options: TuiHintOptions,\n ) {\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.globalMode = mode;\n });\n }\n\n // TODO: Simplify\n @HostBinding('attr.data-mode')\n get computedMode(): TuiHintModeT | TuiBrightness | null {\n return this.mode || this.globalMode;\n }\n\n @HostListener('mousedown', ['$event'])\n @HostListener('click', ['$event'])\n stopOnMobile(event: MouseEvent) {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n get icon(): PolymorpheusContent {\n return this.options.tooltipIcon;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiHintModule} from '@taiga-ui/core/directives/hint';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTooltipComponent} from './tooltip.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiHintModule, PolymorpheusModule],\n declarations: [TuiTooltipComponent],\n exports: [TuiTooltipComponent],\n})\nexport class TuiTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAmDI,6BAC+B,QAA6B,EACtC,KAAuC,EACjB,QAAiB,EACd,OAAuB;QAJtE,iBASC;QAN2C,aAAQ,GAAR,QAAQ,CAAS;QACd,YAAO,GAAP,OAAO,CAAgB;QA9B9D,eAAU,GAAyB,IAAI,CAAC;QAIhD,YAAO,GAAwB,EAAE,CAAC;QAIlC,SAAI,GAA2B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAIjD,cAAS,GAAgC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QAIhE,cAAS,GAAuC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAI9E,cAAS,GAAuC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAI9E,eAAU,GAAG,EAAE,CAAC;QAQZ,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,UAAA,IAAI;YAC1C,KAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SAC1B,CAAC,CAAC;KACN;IAID,sBAAI,6CAAY;;aAAhB;YACI,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC;SACvC;;;OAAA;IAID,0CAAY,GAAZ,UAAa,KAAiB;QAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;SAC3B;KACJ;IAED,sBAAI,qCAAI;aAAR;YACI,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;SACnC;;;OAAA;;gBA3BwC,UAAU,uBAA9C,MAAM,SAAC,iBAAiB;gBACA,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65,7 +65,7 @@ var TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\/#!$%\\^&\\*;:{}=\\-_`~()]$/;
65
65
  var TUI_LATIN_REGEXP = /[A-z]/;
66
66
  var TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;
67
67
 
68
- var VERSION = '2.30.0';
68
+ var VERSION = '2.34.0';
69
69
 
70
70
  /**
71
71
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: ReadonlyArray<string> = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.30.0';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAA0B,CAAC,GAAG,EAAE,GAAG;;ICEtD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICN/B,OAAO,GAAG;;ACAvB;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: ReadonlyArray<string> = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.34.0';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAA0B,CAAC,GAAG,EAAE,GAAG;;ICEtD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICN/B,OAAO,GAAG;;ACAvB;;;;;;"}
@@ -15,12 +15,7 @@ var TuiDropdownDirective = /** @class */ (function (_super) {
15
15
  TuiDropdownDirective_1 = TuiDropdownDirective;
16
16
  Object.defineProperty(TuiDropdownDirective.prototype, "open", {
17
17
  set: function (value) {
18
- if (value) {
19
- this.openDropdownBox();
20
- }
21
- else {
22
- this.closeDropdownBox();
23
- }
18
+ this.toggleDropdown(value);
24
19
  },
25
20
  enumerable: true,
26
21
  configurable: true
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-directives-dropdown.js","sources":["ng://@taiga-ui/core/directives/dropdown/dropdown.directive.ts","ng://@taiga-ui/core/directives/dropdown/dropdown.module.ts","ng://@taiga-ui/core/directives/dropdown/taiga-ui-core-directives-dropdown.ts"],"sourcesContent":["import {\n AfterViewChecked,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Inject,\n Injector,\n Input,\n OnDestroy,\n Optional,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n TuiParentsScrollService,\n TuiPortalService,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiDropdown} from '@taiga-ui/core/abstract';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiDropdown]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownDirective),\n },\n TuiParentsScrollService,\n ],\n})\nexport class TuiDropdownDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, AfterViewChecked, OnDestroy\n{\n @Input('tuiDropdown')\n set open(value: boolean) {\n if (value) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n }\n\n constructor(\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService)\n portalService: TuiPortalService,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n ) {\n super(componentFactoryResolver, injector, portalService, elementRef, activeZone);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core/components/dropdown-box';\n\nimport {TuiDropdownDirective} from './dropdown.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownDirective],\n exports: [TuiDropdownDirective],\n})\nexport class TuiDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAgCY,wCAAmB;IAY3B,8BAEI,wBAAkD,EAChC,QAAkB,EAEpC,aAA+B,EACX,UAAmC,EAGvD,UAAyC,EACC,QAAiC;QAV/E,YAYI,kBAAM,wBAAwB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,SACnF;QAH6C,cAAQ,GAAR,QAAQ,CAAyB;;KAG9E;6BA1BQ,oBAAoB;IAK7B,sBAAI,sCAAI;aAAR,UAAS,KAAc;YACnB,IAAI,KAAK,EAAE;gBACP,IAAI,CAAC,eAAe,EAAE,CAAC;aAC1B;iBAAM;gBACH,IAAI,CAAC,gBAAgB,EAAE,CAAC;aAC3B;SACJ;;;OAAA;;;gBAI6B,wBAAwB,uBADjD,MAAM,SAAC,wBAAwB;gBAEJ,QAAQ,uBAAnC,MAAM,SAAC,QAAQ;gBAED,gBAAgB,uBAD9B,MAAM,SAAC,gBAAgB;gBAEQ,UAAU,uBAAzC,MAAM,SAAC,UAAU;gBAGN,sBAAsB,uBAFjC,MAAM,SAAC,sBAAsB,cAC7B,QAAQ;gBAE2C,uBAAuB,uBAA1E,MAAM,SAAC,uBAAuB;;IAlBnC;QADC,KAAK,CAAC,aAAa,CAAC;oDAOpB;IAXQ,oBAAoB;QAVhC,SAAS,CAAC;YACP,QAAQ,EAAE,iCAAiC;YAC3C,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,sBAAsB;oBAC/B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAoB,GAAA,CAAC;iBACtD;gBACD,uBAAuB;aAC1B;SACJ,CAAC;QAeO,WAAA,MAAM,CAAC,wBAAwB,CAAC,CAAA;QAEhC,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QAExB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;QAC9B,WAAA,QAAQ,EAAE,CAAA;QAEV,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;OAvB3B,oBAAoB,CA2BhC;IAAD,2BAAC;CAAA,CA1BW,mBAAmB;;;ICtB/B;KAAiC;IAApB,iBAAiB;QAL7B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;YAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACVA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-directives-dropdown.js","sources":["ng://@taiga-ui/core/directives/dropdown/dropdown.directive.ts","ng://@taiga-ui/core/directives/dropdown/dropdown.module.ts","ng://@taiga-ui/core/directives/dropdown/taiga-ui-core-directives-dropdown.ts"],"sourcesContent":["import {\n AfterViewChecked,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Inject,\n Injector,\n Input,\n OnDestroy,\n Optional,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n TuiParentsScrollService,\n TuiPortalService,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiDropdown} from '@taiga-ui/core/abstract';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiDropdown]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownDirective),\n },\n TuiParentsScrollService,\n ],\n})\nexport class TuiDropdownDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, AfterViewChecked, OnDestroy\n{\n @Input('tuiDropdown')\n set open(value: boolean) {\n this.toggleDropdown(value);\n }\n\n constructor(\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService)\n portalService: TuiPortalService,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n ) {\n super(componentFactoryResolver, injector, portalService, elementRef, activeZone);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core/components/dropdown-box';\n\nimport {TuiDropdownDirective} from './dropdown.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownDirective],\n exports: [TuiDropdownDirective],\n})\nexport class TuiDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAgCY,wCAAmB;IAQ3B,8BAEI,wBAAkD,EAChC,QAAkB,EAEpC,aAA+B,EACX,UAAmC,EAGvD,UAAyC,EACC,QAAiC;QAV/E,YAYI,kBAAM,wBAAwB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,SACnF;QAH6C,cAAQ,GAAR,QAAQ,CAAyB;;KAG9E;6BAtBQ,oBAAoB;IAK7B,sBAAI,sCAAI;aAAR,UAAS,KAAc;YACnB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SAC9B;;;OAAA;;;gBAI6B,wBAAwB,uBADjD,MAAM,SAAC,wBAAwB;gBAEJ,QAAQ,uBAAnC,MAAM,SAAC,QAAQ;gBAED,gBAAgB,uBAD9B,MAAM,SAAC,gBAAgB;gBAEQ,UAAU,uBAAzC,MAAM,SAAC,UAAU;gBAGN,sBAAsB,uBAFjC,MAAM,SAAC,sBAAsB,cAC7B,QAAQ;gBAE2C,uBAAuB,uBAA1E,MAAM,SAAC,uBAAuB;;IAdnC;QADC,KAAK,CAAC,aAAa,CAAC;oDAGpB;IAPQ,oBAAoB;QAVhC,SAAS,CAAC;YACP,QAAQ,EAAE,iCAAiC;YAC3C,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,sBAAsB;oBAC/B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAoB,GAAA,CAAC;iBACtD;gBACD,uBAAuB;aAC1B;SACJ,CAAC;QAWO,WAAA,MAAM,CAAC,wBAAwB,CAAC,CAAA;QAEhC,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QAExB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;QAC9B,WAAA,QAAQ,EAAE,CAAA;QAEV,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;OAnB3B,oBAAoB,CAuBhC;IAAD,2BAAC;CAAA,CAtBW,mBAAmB;;;ICtB/B;KAAiC;IAApB,iBAAiB;QAL7B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;YAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACVA;;;;;;"}
@@ -1,27 +1,32 @@
1
- import { __extends, __decorate } from 'tslib';
2
- import { InjectionToken, Input, Directive, forwardRef, NgModule, ChangeDetectorRef } from '@angular/core';
1
+ import { __extends, __decorate, __param } from 'tslib';
2
+ import { InjectionToken, inject, Inject, Input, Directive, forwardRef, NgModule, ChangeDetectorRef } from '@angular/core';
3
3
  import { tuiDefaultProp, TuiController, TuiDestroyService } from '@taiga-ui/cdk';
4
+ import { TUI_HINT_OPTIONS } from '@taiga-ui/core/directives/hint';
4
5
  import { watchedControllerFactory } from '@taiga-ui/core/providers';
5
6
 
6
7
  var TUI_HINT_CONTROLLER = new InjectionToken('Controls configuration of hints', {
7
- factory: function () { return new TuiHintControllerDirective(); },
8
+ factory: function () { return new TuiHintControllerDirective(inject(TUI_HINT_OPTIONS)); },
8
9
  });
9
10
 
10
11
  // TODO: v2.0 use in Charts
11
12
  var TuiHintControllerDirective = /** @class */ (function (_super) {
12
13
  __extends(TuiHintControllerDirective, _super);
13
- function TuiHintControllerDirective() {
14
- var _this = _super !== null && _super.apply(this, arguments) || this;
14
+ function TuiHintControllerDirective(options) {
15
+ var _this = _super.call(this) || this;
16
+ _this.options = options;
15
17
  // TODO: Remove null in 3.0
16
18
  _this.content = null;
17
- _this.direction = 'bottom-left';
18
- _this.mode = null;
19
- _this.showDelay = 500;
20
- _this.hideDelay = 200;
19
+ _this.direction = _this.options.direction;
20
+ _this.mode = _this.options.mode;
21
+ _this.showDelay = _this.options.tuiHintShowDelay;
22
+ _this.hideDelay = _this.options.tuiHintHideDelay;
21
23
  return _this;
22
24
  }
23
25
  TuiHintControllerDirective_1 = TuiHintControllerDirective;
24
26
  var TuiHintControllerDirective_1;
27
+ TuiHintControllerDirective.ctorParameters = function () { return [
28
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_HINT_OPTIONS,] }] }
29
+ ]; };
25
30
  __decorate([
26
31
  Input('tuiHintContent'),
27
32
  tuiDefaultProp()
@@ -51,7 +56,8 @@ var TuiHintControllerDirective = /** @class */ (function (_super) {
51
56
  useExisting: forwardRef(function () { return TuiHintControllerDirective_1; }),
52
57
  },
53
58
  ],
54
- })
59
+ }),
60
+ __param(0, Inject(TUI_HINT_OPTIONS))
55
61
  ], TuiHintControllerDirective);
56
62
  return TuiHintControllerDirective;
57
63
  }(TuiController));
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-directives-hint-controller.js","sources":["ng://@taiga-ui/core/directives/hint-controller/hint-controller.token.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.directive.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.module.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.provider.ts","ng://@taiga-ui/core/directives/hint-controller/taiga-ui-core-directives-hint-controller.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\nexport const TUI_HINT_CONTROLLER = new InjectionToken<TuiHintControllerDirective>(\n 'Controls configuration of hints',\n {\n factory: () => new TuiHintControllerDirective(),\n },\n);\n","import {Directive, forwardRef, Input} from '@angular/core';\nimport {TuiController, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_HINT_CONTROLLER} from './hint-controller.token';\n\n// TODO: v2.0 use in Charts\n@Directive({\n selector: '[tuiHintContent]',\n providers: [\n {\n provide: TUI_HINT_CONTROLLER,\n useExisting: forwardRef(() => TuiHintControllerDirective),\n },\n ],\n})\nexport class TuiHintControllerDirective extends TuiController {\n // TODO: Remove null in 3.0\n @Input('tuiHintContent')\n @tuiDefaultProp()\n content: PolymorpheusContent | null = null;\n\n @Input('tuiHintDirection')\n @tuiDefaultProp()\n direction: TuiDirection = 'bottom-left';\n\n @Input('tuiHintMode')\n @tuiDefaultProp()\n mode: TuiHintModeT | null = null;\n\n @Input('tuiHintShowDelay')\n @tuiDefaultProp()\n showDelay = 500;\n\n @Input('tuiHintHideDelay')\n @tuiDefaultProp()\n hideDelay = 200;\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\n@NgModule({\n declarations: [TuiHintControllerDirective],\n exports: [TuiHintControllerDirective],\n})\nexport class TuiHintControllerModule {}\n","import {ChangeDetectorRef, InjectionToken, Provider} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {watchedControllerFactory} from '@taiga-ui/core/providers';\n\nimport {TUI_HINT_CONTROLLER} from './hint-controller.token';\n\nexport const TUI_HINT_WATCHED_CONTROLLER = new InjectionToken('watched hint controller');\n// TODO: remove in ivy compilation\nexport const HINT_CONTROLLER_FACTORY = watchedControllerFactory;\nexport const HINT_CONTROLLER_PROVIDER: Provider = [\n TuiDestroyService,\n {\n provide: TUI_HINT_WATCHED_CONTROLLER,\n deps: [TUI_HINT_CONTROLLER, ChangeDetectorRef, TuiDestroyService],\n useFactory: HINT_CONTROLLER_FACTORY,\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAIa,mBAAmB,GAAG,IAAI,cAAc,CACjD,iCAAiC,EACjC;IACI,OAAO,EAAE,cAAM,OAAA,IAAI,0BAA0B,EAAE,GAAA;CAClD;;ACDL;;IAUgD,8CAAa;IAA7D;QAAA,qEAqBC;;QAjBG,aAAO,GAA+B,IAAI,CAAC;QAI3C,eAAS,GAAiB,aAAa,CAAC;QAIxC,UAAI,GAAwB,IAAI,CAAC;QAIjC,eAAS,GAAG,GAAG,CAAC;QAIhB,eAAS,GAAG,GAAG,CAAC;;KACnB;mCArBY,0BAA0B;;IAInC;QAFC,KAAK,CAAC,gBAAgB,CAAC;QACvB,cAAc,EAAE;+DAC0B;IAI3C;QAFC,KAAK,CAAC,kBAAkB,CAAC;QACzB,cAAc,EAAE;iEACuB;IAIxC;QAFC,KAAK,CAAC,aAAa,CAAC;QACpB,cAAc,EAAE;4DACgB;IAIjC;QAFC,KAAK,CAAC,kBAAkB,CAAC;QACzB,cAAc,EAAE;iEACD;IAIhB;QAFC,KAAK,CAAC,kBAAkB,CAAC;QACzB,cAAc,EAAE;iEACD;IApBP,0BAA0B;QATtC,SAAS,CAAC;YACP,QAAQ,EAAE,kBAAkB;YAC5B,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,mBAAmB;oBAC5B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,4BAA0B,GAAA,CAAC;iBAC5D;aACJ;SACJ,CAAC;OACW,0BAA0B,CAqBtC;IAAD,iCAAC;CAAA,CArB+C,aAAa;;;ICT7D;KAAuC;IAA1B,uBAAuB;QAJnC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,0BAA0B,CAAC;YAC1C,OAAO,EAAE,CAAC,0BAA0B,CAAC;SACxC,CAAC;OACW,uBAAuB,CAAG;IAAD,8BAAC;CAAvC;;ICFa,2BAA2B,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;AACzF;IACa,uBAAuB,GAAG,yBAAyB;IACnD,wBAAwB,GAAa;IAC9C,iBAAiB;IACjB;QACI,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;QACjE,UAAU,EAAE,uBAAuB;KACtC;;;ACfL;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-directives-hint-controller.js","sources":["ng://@taiga-ui/core/directives/hint-controller/hint-controller.token.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.directive.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.module.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.provider.ts","ng://@taiga-ui/core/directives/hint-controller/taiga-ui-core-directives-hint-controller.ts"],"sourcesContent":["import {inject, InjectionToken} from '@angular/core';\nimport {TUI_HINT_OPTIONS} from '@taiga-ui/core/directives/hint';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\nexport const TUI_HINT_CONTROLLER = new InjectionToken<TuiHintControllerDirective>(\n 'Controls configuration of hints',\n {\n factory: () => new TuiHintControllerDirective(inject(TUI_HINT_OPTIONS)),\n },\n);\n","import {Directive, forwardRef, Inject, Input} from '@angular/core';\nimport {TuiController, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TUI_HINT_OPTIONS, TuiHintOptions} from '@taiga-ui/core/directives/hint';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_HINT_CONTROLLER} from './hint-controller.token';\n\n// TODO: v2.0 use in Charts\n@Directive({\n selector: '[tuiHintContent]',\n providers: [\n {\n provide: TUI_HINT_CONTROLLER,\n useExisting: forwardRef(() => TuiHintControllerDirective),\n },\n ],\n})\nexport class TuiHintControllerDirective extends TuiController {\n // TODO: Remove null in 3.0\n @Input('tuiHintContent')\n @tuiDefaultProp()\n content: PolymorpheusContent | null = null;\n\n @Input('tuiHintDirection')\n @tuiDefaultProp()\n direction: TuiHintOptions['direction'] = this.options.direction;\n\n @Input('tuiHintMode')\n @tuiDefaultProp()\n mode: TuiHintOptions['mode'] = this.options.mode;\n\n @Input('tuiHintShowDelay')\n @tuiDefaultProp()\n showDelay: TuiHintOptions['tuiHintShowDelay'] = this.options.tuiHintShowDelay;\n\n @Input('tuiHintHideDelay')\n @tuiDefaultProp()\n hideDelay: TuiHintOptions['tuiHintHideDelay'] = this.options.tuiHintHideDelay;\n\n constructor(@Inject(TUI_HINT_OPTIONS) private readonly options: TuiHintOptions) {\n super();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\n@NgModule({\n declarations: [TuiHintControllerDirective],\n exports: [TuiHintControllerDirective],\n})\nexport class TuiHintControllerModule {}\n","import {ChangeDetectorRef, InjectionToken, Provider} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {watchedControllerFactory} from '@taiga-ui/core/providers';\n\nimport {TUI_HINT_CONTROLLER} from './hint-controller.token';\n\nexport const TUI_HINT_WATCHED_CONTROLLER = new InjectionToken('watched hint controller');\n// TODO: remove in ivy compilation\nexport const HINT_CONTROLLER_FACTORY = watchedControllerFactory;\nexport const HINT_CONTROLLER_PROVIDER: Provider = [\n TuiDestroyService,\n {\n provide: TUI_HINT_WATCHED_CONTROLLER,\n deps: [TUI_HINT_CONTROLLER, ChangeDetectorRef, TuiDestroyService],\n useFactory: HINT_CONTROLLER_FACTORY,\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;IAKa,mBAAmB,GAAG,IAAI,cAAc,CACjD,iCAAi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,EAAE,CAAC,0BAA0B,CAAC;YAC1C,OAAO,EAAE,CAAC,0BAA0B,CAAC;SACxC,CAAC;OACW,uBAAuB,CAAG;IAAD,8BAAC;CAAvC;;ICFa,2BAA2B,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;AACzF;IACa,uBAAuB,GAAG,yBAAyB;IACnD,wBAAwB,GAAa;IAC9C,iBAAiB;IACjB;QACI,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;QACjE,UAAU,EAAE,uBAAuB;KACtC;;;ACfL;;;;;;"}
@@ -1,20 +1,33 @@
1
- import { __extends, __read, __decorate, __param } from 'tslib';
2
- import { Renderer2, Inject, ElementRef, Self, Optional, Input, Directive, NgModule } from '@angular/core';
1
+ import { __assign, __extends, __read, __decorate, __param } from 'tslib';
2
+ import { InjectionToken, Renderer2, Inject, ElementRef, Self, Optional, Input, Directive, NgModule } from '@angular/core';
3
3
  import { TuiDestroyService, TuiObscuredService, TuiHoveredService, TuiActiveZoneDirective, tuiDefaultProp, tuiRequiredSetter, TuiParentsScrollService } from '@taiga-ui/cdk';
4
- import { AbstractTuiHint } from '@taiga-ui/core/abstract';
4
+ import { TUI_ABSTRACT_HINT_DEFAULT_OPTIONS, AbstractTuiHint } from '@taiga-ui/core/abstract';
5
5
  import { DESCRIBED_BY } from '@taiga-ui/core/directives/described-by';
6
6
  import { TuiHintService } from '@taiga-ui/core/services';
7
7
  import { Subject, combineLatest, of } from 'rxjs';
8
8
  import { startWith, map, switchMap, delay, take, distinctUntilChanged, takeUntil } from 'rxjs/operators';
9
9
 
10
+ // TODO: remove in ivy compilation
11
+ var TUI_TOOLTIP_ICON = 'tuiIconTooltipLarge';
12
+ /** Default values for hint options */
13
+ var TUI_HINT_DEFAULT_OPTIONS = __assign(__assign({}, TUI_ABSTRACT_HINT_DEFAULT_OPTIONS), { tuiHintShowDelay: 500, tuiHintHideDelay: 200, tooltipIcon: TUI_TOOLTIP_ICON });
14
+ var TUI_HINT_OPTIONS = new InjectionToken('Default parameters for hint directive', {
15
+ factory: function () { return TUI_HINT_DEFAULT_OPTIONS; },
16
+ });
17
+ var tuiHintOptionsProvider = function (options) { return ({
18
+ provide: TUI_HINT_OPTIONS,
19
+ useValue: __assign(__assign({}, TUI_HINT_DEFAULT_OPTIONS), options),
20
+ }); };
21
+
10
22
  var HINT_HOVERED_CLASS = '_hint_hovered';
11
23
  var TuiHintDirective = /** @class */ (function (_super) {
12
24
  __extends(TuiHintDirective, _super);
13
- function TuiHintDirective(renderer, elementRef, hintService, destroy$, obscured$, hoveredService, activeZone) {
14
- var _this = _super.call(this, elementRef, hintService, activeZone) || this;
25
+ function TuiHintDirective(renderer, elementRef, hintService, destroy$, obscured$, hoveredService, activeZone, options) {
26
+ var _this = _super.call(this, elementRef, hintService, activeZone, options) || this;
15
27
  _this.renderer = renderer;
16
- _this.tuiHintShowDelay = 500;
17
- _this.tuiHintHideDelay = 200;
28
+ _this.options = options;
29
+ _this.tuiHintShowDelay = _this.options.tuiHintShowDelay;
30
+ _this.tuiHintHideDelay = _this.options.tuiHintHideDelay;
18
31
  _this.tuiHintHost = null;
19
32
  _this.componentHovered$ = new Subject();
20
33
  // @bad TODO: Use private provider
@@ -100,7 +113,8 @@ var TuiHintDirective = /** @class */ (function (_super) {
100
113
  { type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
101
114
  { type: TuiObscuredService, decorators: [{ type: Inject, args: [TuiObscuredService,] }, { type: Self }] },
102
115
  { type: TuiHoveredService, decorators: [{ type: Inject, args: [TuiHoveredService,] }] },
103
- { type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] }
116
+ { type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] },
117
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_HINT_OPTIONS,] }] }
104
118
  ]; };
105
119
  __decorate([
106
120
  Input()
@@ -134,7 +148,8 @@ var TuiHintDirective = /** @class */ (function (_super) {
134
148
  __param(4, Self()),
135
149
  __param(5, Inject(TuiHoveredService)),
136
150
  __param(6, Optional()),
137
- __param(6, Inject(TuiActiveZoneDirective))
151
+ __param(6, Inject(TuiActiveZoneDirective)),
152
+ __param(7, Inject(TUI_HINT_OPTIONS))
138
153
  ], TuiHintDirective);
139
154
  return TuiHintDirective;
140
155
  }(AbstractTuiHint));
@@ -155,5 +170,5 @@ var TuiHintModule = /** @class */ (function () {
155
170
  * Generated bundle index. Do not edit.
156
171
  */
157
172
 
158
- export { HINT_HOVERED_CLASS, TuiHintDirective, TuiHintModule };
173
+ export { HINT_HOVERED_CLASS, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_OPTIONS, TUI_TOOLTIP_ICON, TuiHintDirective, TuiHintModule, tuiHintOptionsProvider };
159
174
  //# sourceMappingURL=taiga-ui-core-directives-hint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-directives-hint.js","sources":["ng://@taiga-ui/core/directives/hint/hint.directive.ts","ng://@taiga-ui/core/directives/hint/hint.module.ts","ng://@taiga-ui/core/directives/hint/taiga-ui-core-directives-hint.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiHoveredService,\n TuiObscuredService,\n TuiParentsScrollService,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {DESCRIBED_BY} from '@taiga-ui/core/directives/described-by';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, of, Subject} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n map,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\nexport const HINT_HOVERED_CLASS = '_hint_hovered';\n\n@Directive({\n selector: '[tuiHint]:not(ng-container)',\n providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService],\n})\nexport class TuiHintDirective extends AbstractTuiHint implements OnDestroy {\n @Input()\n tuiHintId?: string;\n\n @Input()\n @tuiDefaultProp()\n tuiHintShowDelay = 500;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHideDelay = 200;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHost: HTMLElement | null = null;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiRequiredSetter()\n set tuiHint(value: PolymorpheusContent | null) {\n if (!value) {\n this.hideTooltip();\n this.content = '';\n\n return;\n }\n\n this.content = value;\n }\n\n readonly componentHovered$ = new Subject<boolean>();\n\n constructor(\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) hintService: TuiHintService,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiObscuredService)\n @Self()\n obscured$: TuiObscuredService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n ) {\n super(elementRef, hintService, activeZone);\n\n // @bad TODO: Use private provider\n combineLatest(\n hoveredService.createHovered$(elementRef.nativeElement),\n this.componentHovered$.pipe(startWith(false)),\n )\n .pipe(\n map(\n ([directiveHovered, componentHovered]) =>\n directiveHovered || componentHovered,\n ),\n switchMap(visible => {\n this.toggleClass(visible);\n\n return of(visible).pipe(\n delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay),\n );\n }),\n switchMap(visible =>\n visible && this.mode !== 'overflow'\n ? obscured$.pipe(\n map(obscured => !obscured),\n take(2),\n )\n : of(visible),\n ),\n distinctUntilChanged(),\n takeUntil(destroy$),\n )\n .subscribe(visible => {\n if (visible) {\n this.showTooltip();\n } else {\n this.hideTooltip();\n }\n });\n\n this.hintService.register(this);\n }\n\n get id(): string | null {\n return this.tuiHintId ? this.tuiHintId + DESCRIBED_BY : null;\n }\n\n get host(): HTMLElement {\n return this.tuiHintHost ? this.tuiHintHost : this.elementRef.nativeElement;\n }\n\n getElementClientRect(): ClientRect {\n return this.host.getBoundingClientRect();\n }\n\n ngOnDestroy() {\n this.hintService.unregister(this);\n }\n\n protected showTooltip() {\n if (this.content === '') {\n return;\n }\n\n this.toggleClass(true);\n this.hintService.add(this);\n }\n\n protected hideTooltip() {\n this.toggleClass(false);\n this.hintService.remove(this);\n }\n\n private toggleClass(add: boolean) {\n if (add) {\n this.renderer.addClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n } else {\n this.renderer.removeClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintDirective} from './hint.directive';\n\n@NgModule({\n declarations: [TuiHintDirective],\n exports: [TuiHintDirective],\n})\nexport class TuiHintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAkCa,kBAAkB,GAAG,gBAAgB;;IAMZ,oCAAe;IAgCjD,0BACwC,QAAmB,EACnC,UAAmC,EAC/B,WAA2B,EAEnD,QAA2B,EAG3B,SAA6B,EACF,cAAiC,EAG5D,UAAyC;QAZ7C,YAcI,kBAAM,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,SAuC7C;QApDuC,cAAQ,GAAR,QAAQ,CAAW;QA3B3D,sBAAgB,GAAG,GAAG,CAAC;QAIvB,sBAAgB,GAAG,GAAG,CAAC;QAIvB,iBAAW,GAAuB,IAAI,CAAC;QAgB9B,uBAAiB,GAAG,IAAI,OAAO,EAAW,CAAC;;QAmBhD,aAAa,CACT,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,aAAa,CAAC,EACvD,KAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CA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Gb,sBAAsB,uBAFjC,QAAQ,YACR,MAAM,SAAC,sBAAsB;;IAzClC;QADC,KAAK,EAAE;uDACW;IAInB;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;8DACM;IAIvB;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;8DACM;IAIvB;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;yDACsB;IAKvC;QAFC,KAAK,EAAE;QACP,iBAAiB,EAAE;mDAUnB;IA5BQ,gBAAgB;QAJ5B,SAAS,CAAC;YACP,QAAQ,EAAE,6BAA6B;YACvC,SAAS,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,iBAAiB,CAAC;SAC9E,CAAC;QAkCO,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;QACtB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAEzB,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAC1B,WAAA,IAAI,EAAE,CAAA;QAEN,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;OA3C1B,gBAAgB,CA4H5B;IAAD,uBAAC;CAAA,CA5HqC,eAAe;;;IChCrD;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-directives-hint.js","sources":["ng://@taiga-ui/core/directives/hint/hint-options.ts","ng://@taiga-ui/core/directives/hint/hint.directive.ts","ng://@taiga-ui/core/directives/hint/hint.module.ts","ng://@taiga-ui/core/directives/hint/taiga-ui-core-directives-hint.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {\n TUI_ABSTRACT_HINT_DEFAULT_OPTIONS,\n TuiAbstractHintOptions,\n} from '@taiga-ui/core/abstract';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiHintOptions extends TuiAbstractHintOptions {\n readonly tuiHintShowDelay: number;\n readonly tuiHintHideDelay: number;\n readonly tooltipIcon: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_TOOLTIP_ICON = 'tuiIconTooltipLarge';\n\n/** Default values for hint options */\nexport const TUI_HINT_DEFAULT_OPTIONS: TuiHintOptions = {\n ...TUI_ABSTRACT_HINT_DEFAULT_OPTIONS,\n tuiHintShowDelay: 500,\n tuiHintHideDelay: 200,\n tooltipIcon: TUI_TOOLTIP_ICON,\n};\n\nexport const TUI_HINT_OPTIONS = new InjectionToken<TuiHintOptions>(\n 'Default parameters for hint directive',\n {\n factory: () => TUI_HINT_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiHintOptionsProvider: (\n options: Partial<TuiHintOptions>,\n) => ValueProvider = (options: Partial<TuiHintOptions>) => ({\n provide: TUI_HINT_OPTIONS,\n useValue: {...TUI_HINT_DEFAULT_OPTIONS, ...options},\n});\n","import {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiHoveredService,\n TuiObscuredService,\n TuiParentsScrollService,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {DESCRIBED_BY} from '@taiga-ui/core/directives/described-by';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, of, Subject} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n map,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\nimport {TUI_HINT_OPTIONS, TuiHintOptions} from './hint-options';\n\nexport const HINT_HOVERED_CLASS = '_hint_hovered';\n\n@Directive({\n selector: '[tuiHint]:not(ng-container)',\n providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService],\n})\nexport class TuiHintDirective extends AbstractTuiHint implements OnDestroy {\n @Input()\n tuiHintId?: string;\n\n @Input()\n @tuiDefaultProp()\n tuiHintShowDelay: TuiHintOptions['tuiHintShowDelay'] = this.options.tuiHintShowDelay;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHideDelay: TuiHintOptions['tuiHintHideDelay'] = this.options.tuiHintHideDelay;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHost: HTMLElement | null = null;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiRequiredSetter()\n set tuiHint(value: PolymorpheusContent | null) {\n if (!value) {\n this.hideTooltip();\n this.content = '';\n\n return;\n }\n\n this.content = value;\n }\n\n readonly componentHovered$ = new Subject<boolean>();\n\n constructor(\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) hintService: TuiHintService,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiObscuredService)\n @Self()\n obscured$: TuiObscuredService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_HINT_OPTIONS) protected readonly options: TuiHintOptions,\n ) {\n super(elementRef, hintService, activeZone, options);\n\n // @bad TODO: Use private provider\n combineLatest(\n hoveredService.createHovered$(elementRef.nativeElement),\n this.componentHovered$.pipe(startWith(false)),\n )\n .pipe(\n map(\n ([directiveHovered, componentHovered]) =>\n directiveHovered || componentHovered,\n ),\n switchMap(visible => {\n this.toggleClass(visible);\n\n return of(visible).pipe(\n delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay),\n );\n }),\n switchMap(visible =>\n visible && this.mode !== 'overflow'\n ? obscured$.pipe(\n map(obscured => !obscured),\n take(2),\n )\n : of(visible),\n ),\n distinctUntilChanged(),\n takeUntil(destroy$),\n )\n .subscribe(visible => {\n if (visible) {\n this.showTooltip();\n } else {\n this.hideTooltip();\n }\n });\n\n this.hintService.register(this);\n }\n\n get id(): string | null {\n return this.tuiHintId ? this.tuiHintId + DESCRIBED_BY : null;\n }\n\n get host(): HTMLElement {\n return this.tuiHintHost ? this.tuiHintHost : this.elementRef.nativeElement;\n }\n\n getElementClientRect(): ClientRect {\n return this.host.getBoundingClientRect();\n }\n\n ngOnDestroy() {\n this.hintService.unregister(this);\n }\n\n protected showTooltip() {\n if (this.content === '') {\n return;\n }\n\n this.toggleClass(true);\n this.hintService.add(this);\n }\n\n protected hideTooltip() {\n this.toggleClass(false);\n this.hintService.remove(this);\n }\n\n private toggleClass(add: boolean) {\n if (add) {\n this.renderer.addClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n } else {\n this.renderer.removeClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintDirective} from './hint.directive';\n\n@NgModule({\n declarations: [TuiHintDirective],\n exports: [TuiHintDirective],\n})\nexport class TuiHintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAaA;IACa,gBAAgB,GAAG,sBAAsB;AAEtD;IACa,wBAAwB,yBAC9B,iCAAiC,KACpC,gBAAgB,EAAE,GAAG,EACrB,gBAAgB,EAAE,GAAG,EACrB,WAAW,EAAE,gBAAgB,IAC/B;IAEW,gBAAgB,GAAG,IAAI,cAAc,CAC9C,uCAAuC,EACvC;IACI,OAAO,EAAE,cAAM,OAAA,wBAAwB,GAAA;CAC1C,EACH;IAEW,sBAAsB,GAEd,UAAC,OAAgC,IAAK,QAAC;IACxD,OAAO,EAAE,gBAA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QAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;QACtB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAEzB,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAC1B,WAAA,IAAI,EAAE,CAAA;QAEN,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;QAE9B,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OA7CpB,gBAAgB,CA6H5B;IAAD,uBAAC;CAAA,CA7HqC,eAAe;;;IClCrD;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
@@ -1,13 +1,24 @@
1
- import { __extends, __decorate, __param } from 'tslib';
2
- import { ElementRef, Inject, Optional, Input, Directive, NgModule } from '@angular/core';
1
+ import { __assign, __extends, __decorate, __param } from 'tslib';
2
+ import { InjectionToken, ElementRef, Inject, Optional, Input, Directive, NgModule } from '@angular/core';
3
3
  import { TuiActiveZoneDirective, tuiDefaultProp, tuiRequiredSetter } from '@taiga-ui/cdk';
4
- import { AbstractTuiHint } from '@taiga-ui/core/abstract';
4
+ import { TUI_ABSTRACT_HINT_DEFAULT_OPTIONS, AbstractTuiHint } from '@taiga-ui/core/abstract';
5
5
  import { TuiHintService } from '@taiga-ui/core/services';
6
6
 
7
+ /** Default values for manual hint options */
8
+ var TUI_MANUAL_HINT_DEFAULT_OPTIONS = __assign({}, TUI_ABSTRACT_HINT_DEFAULT_OPTIONS);
9
+ var TUI_MANUAL_HINT_OPTIONS = new InjectionToken('Default parameters for manual hint directive', {
10
+ factory: function () { return TUI_MANUAL_HINT_DEFAULT_OPTIONS; },
11
+ });
12
+ var tuiManualHintOptionsProvider = function (options) { return ({
13
+ provide: TUI_MANUAL_HINT_OPTIONS,
14
+ useValue: __assign(__assign({}, TUI_MANUAL_HINT_DEFAULT_OPTIONS), options),
15
+ }); };
16
+
7
17
  var TuiManualHintDirective = /** @class */ (function (_super) {
8
18
  __extends(TuiManualHintDirective, _super);
9
- function TuiManualHintDirective(elementRef, hintService, activeZone) {
10
- var _this = _super.call(this, elementRef, hintService, activeZone) || this;
19
+ function TuiManualHintDirective(elementRef, hintService, activeZone, options) {
20
+ var _this = _super.call(this, elementRef, hintService, activeZone, options) || this;
21
+ _this.options = options;
11
22
  _this.content = '';
12
23
  return _this;
13
24
  }
@@ -29,7 +40,8 @@ var TuiManualHintDirective = /** @class */ (function (_super) {
29
40
  TuiManualHintDirective.ctorParameters = function () { return [
30
41
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
31
42
  { type: TuiHintService, decorators: [{ type: Inject, args: [TuiHintService,] }] },
32
- { type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] }
43
+ { type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] },
44
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_MANUAL_HINT_OPTIONS,] }] }
33
45
  ]; };
34
46
  __decorate([
35
47
  Input('tuiManualHint'),
@@ -46,7 +58,8 @@ var TuiManualHintDirective = /** @class */ (function (_super) {
46
58
  __param(0, Inject(ElementRef)),
47
59
  __param(1, Inject(TuiHintService)),
48
60
  __param(2, Optional()),
49
- __param(2, Inject(TuiActiveZoneDirective))
61
+ __param(2, Inject(TuiActiveZoneDirective)),
62
+ __param(3, Inject(TUI_MANUAL_HINT_OPTIONS))
50
63
  ], TuiManualHintDirective);
51
64
  return TuiManualHintDirective;
52
65
  }(AbstractTuiHint));
@@ -67,5 +80,5 @@ var TuiManualHintModule = /** @class */ (function () {
67
80
  * Generated bundle index. Do not edit.
68
81
  */
69
82
 
70
- export { TuiManualHintDirective, TuiManualHintModule };
83
+ export { TUI_MANUAL_HINT_DEFAULT_OPTIONS, TUI_MANUAL_HINT_OPTIONS, TuiManualHintDirective, TuiManualHintModule, tuiManualHintOptionsProvider };
71
84
  //# sourceMappingURL=taiga-ui-core-directives-manual-hint.js.map