@taiga-ui/core 4.52.0-canary.46625cf → 4.52.0-canary.49575ff

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 (312) hide show
  1. package/README.md +1 -1
  2. package/classes/accessors.d.ts +2 -2
  3. package/components/calendar/calendar-sheet.component.d.ts +1 -1
  4. package/components/calendar/calendar-sheet.options.d.ts +1 -3
  5. package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +2 -2
  6. package/components/calendar/calendar-spin.component.d.ts +1 -0
  7. package/components/calendar/calendar-year.component.d.ts +1 -1
  8. package/components/calendar/calendar.options.d.ts +9 -0
  9. package/components/calendar/index.d.ts +3 -0
  10. package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +1 -1
  11. package/components/data-list/data-list.component.d.ts +8 -12
  12. package/components/data-list/data-list.d.ts +3 -4
  13. package/components/data-list/data-list.tokens.d.ts +1 -23
  14. package/components/data-list/index.d.ts +3 -4
  15. package/components/data-list/opt-group.directive.d.ts +2 -2
  16. package/components/data-list/option-content.directive.d.ts +14 -0
  17. package/components/data-list/option-with-value.directive.d.ts +9 -0
  18. package/components/data-list/option.directive.d.ts +19 -0
  19. package/components/error/error.component.d.ts +1 -1
  20. package/components/icon/icon.component.d.ts +2 -2
  21. package/components/index.d.ts +2 -3
  22. package/components/input/index.d.ts +2 -0
  23. package/components/input/input.d.ts +5 -0
  24. package/components/input/input.directive.d.ts +30 -0
  25. package/components/label/label.directive.d.ts +1 -1
  26. package/components/link/index.d.ts +0 -1
  27. package/components/link/link.directive.d.ts +8 -6
  28. package/components/loader/loader.component.d.ts +7 -7
  29. package/components/loader/loader.options.d.ts +1 -3
  30. package/components/notification/index.d.ts +3 -0
  31. package/components/notification/notification.component.d.ts +14 -0
  32. package/components/notification/notification.d.ts +3 -0
  33. package/components/notification/notification.directive.d.ts +7 -12
  34. package/components/notification/notification.options.d.ts +10 -7
  35. package/components/notification/notification.service.d.ts +17 -0
  36. package/components/root/root.component.d.ts +1 -1
  37. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  38. package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
  39. package/components/scrollbar/scrollbar.component.d.ts +1 -5
  40. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  41. package/components/spin-button/spin-button.component.d.ts +9 -10
  42. package/components/textfield/index.d.ts +0 -1
  43. package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
  44. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +10 -14
  45. package/components/textfield/textfield.component.d.ts +23 -36
  46. package/components/textfield/textfield.d.ts +2 -3
  47. package/components/textfield/textfield.options.d.ts +8 -11
  48. package/directives/date-format/date-format.directive.d.ts +3 -7
  49. package/directives/group/group.directive.d.ts +7 -7
  50. package/directives/group/group.options.d.ts +1 -3
  51. package/directives/index.d.ts +0 -4
  52. package/directives/items-handlers/items-handlers.directive.d.ts +5 -9
  53. package/directives/items-handlers/items-handlers.tokens.d.ts +4 -4
  54. package/directives/number-format/number-format.directive.d.ts +3 -7
  55. package/fesm2022/taiga-ui-core-classes.mjs +9 -11
  56. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-core-components-button.mjs +7 -7
  58. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-core-components-calendar.mjs +139 -35
  60. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-core-components-cell.mjs +7 -7
  62. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-core-components-data-list.mjs +111 -280
  64. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-error.mjs +14 -13
  66. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-core-components-expand.mjs +3 -3
  68. package/fesm2022/taiga-ui-core-components-icon.mjs +10 -11
  69. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-core-components-input.mjs +104 -0
  71. package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
  72. package/fesm2022/taiga-ui-core-components-label.mjs +11 -13
  73. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-core-components-link.mjs +14 -31
  75. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-core-components-loader.mjs +16 -34
  77. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-core-components-notification.mjs +104 -49
  79. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-core-components-root.mjs +9 -14
  81. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +68 -82
  83. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-core-components-spin-button.mjs +18 -31
  85. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-core-components-textfield.mjs +124 -327
  87. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  88. package/fesm2022/{taiga-ui-core-directives-title.mjs → taiga-ui-core-components-title.mjs} +8 -8
  89. package/fesm2022/{taiga-ui-core-directives-title.mjs.map → taiga-ui-core-components-title.mjs.map} +1 -1
  90. package/fesm2022/taiga-ui-core-components.mjs +2 -3
  91. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-core-directives-appearance.mjs +16 -16
  93. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  94. package/fesm2022/taiga-ui-core-directives-date-format.mjs +26 -20
  95. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  96. package/fesm2022/taiga-ui-core-directives-group.mjs +23 -35
  97. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  98. package/fesm2022/taiga-ui-core-directives-icons.mjs +12 -12
  99. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  100. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +18 -42
  101. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  102. package/fesm2022/taiga-ui-core-directives-number-format.mjs +32 -20
  103. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  104. package/fesm2022/taiga-ui-core-directives.mjs +0 -4
  105. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  106. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -15
  107. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  108. package/fesm2022/taiga-ui-core-pipes.mjs +0 -7
  109. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  110. package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
  111. package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
  112. package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
  113. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
  114. package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +171 -302
  115. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
  116. package/fesm2022/{taiga-ui-core-directives-hint.mjs → taiga-ui-core-portals-hint.mjs} +145 -235
  117. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
  118. package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
  119. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
  120. package/fesm2022/{taiga-ui-core-directives-popup.mjs → taiga-ui-core-portals-popup.mjs} +12 -13
  121. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
  122. package/fesm2022/taiga-ui-core-portals.mjs +11 -0
  123. package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
  124. package/fesm2022/taiga-ui-core-services.mjs +15 -79
  125. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-core-tokens.mjs +51 -60
  127. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  128. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
  129. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  130. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +20 -20
  131. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  132. package/fesm2022/taiga-ui-core.mjs +1 -1
  133. package/index.d.ts +1 -1
  134. package/package.json +67 -89
  135. package/pipes/format-number/format-number.pipe.d.ts +6 -4
  136. package/pipes/index.d.ts +0 -7
  137. package/portals/alert/alert.directive.d.ts +11 -0
  138. package/portals/alert/alert.service.d.ts +12 -0
  139. package/portals/alert/index.d.ts +2 -0
  140. package/{components → portals}/dialog/dialog.component.d.ts +3 -4
  141. package/portals/dialog/dialog.directive.d.ts +8 -0
  142. package/{components → portals}/dialog/dialog.options.d.ts +2 -3
  143. package/{components → portals}/dialog/dialog.providers.d.ts +1 -2
  144. package/portals/dialog/dialog.service.d.ts +10 -0
  145. package/{components → portals}/dialog/index.d.ts +0 -1
  146. package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
  147. package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
  148. package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
  149. package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
  150. package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -4
  151. package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
  152. package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +5 -5
  153. package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
  154. package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
  155. package/{directives → portals}/dropdown/dropdown.d.ts +1 -2
  156. package/{directives → portals}/dropdown/dropdown.directive.d.ts +6 -8
  157. package/{directives → portals}/dropdown/index.d.ts +0 -1
  158. package/{directives → portals}/hint/hint-describe.directive.d.ts +4 -6
  159. package/{directives → portals}/hint/hint-host.directive.d.ts +2 -2
  160. package/{directives → portals}/hint/hint-hover.directive.d.ts +3 -4
  161. package/{directives → portals}/hint/hint-manual.directive.d.ts +2 -2
  162. package/{directives → portals}/hint/hint-overflow.directive.d.ts +2 -2
  163. package/{directives → portals}/hint/hint-position.directive.d.ts +6 -7
  164. package/{directives → portals}/hint/hint-unstyled.component.d.ts +2 -7
  165. package/{directives → portals}/hint/hint.component.d.ts +7 -6
  166. package/portals/hint/hint.directive.d.ts +24 -0
  167. package/{directives → portals}/hint/index.d.ts +0 -2
  168. package/portals/index.d.ts +6 -0
  169. package/portals/modal/index.d.ts +2 -0
  170. package/portals/modal/modal.component.d.ts +17 -0
  171. package/portals/modal/modal.service.d.ts +13 -0
  172. package/services/index.d.ts +0 -3
  173. package/styles/components/appearance.less +5 -0
  174. package/styles/components/button.less +10 -20
  175. package/styles/components/icon.less +11 -0
  176. package/styles/components/icons.less +2 -1
  177. package/styles/components/label.less +3 -12
  178. package/styles/components/link.less +9 -24
  179. package/styles/components/notification.less +21 -22
  180. package/styles/components/textfield.less +35 -68
  181. package/styles/components/title.less +8 -8
  182. package/styles/mixins/appearance.less +10 -26
  183. package/styles/mixins/appearance.scss +8 -24
  184. package/styles/mixins/date-picker.less +1 -1
  185. package/styles/mixins/mixins.less +0 -13
  186. package/styles/mixins/mixins.scss +0 -13
  187. package/styles/mixins/picker.less +1 -1
  188. package/styles/mixins/picker.scss +1 -1
  189. package/styles/mixins/slider.less +1 -1
  190. package/styles/mixins/slider.scss +2 -3
  191. package/styles/taiga-ui-local.less +0 -1
  192. package/styles/taiga-ui-local.scss +0 -1
  193. package/styles/taiga-ui-theme.less +0 -1
  194. package/styles/theme/appearance/outline.less +9 -18
  195. package/styles/theme/appearance/primary.less +2 -4
  196. package/styles/theme/appearance/secondary.less +6 -14
  197. package/styles/theme/appearance/status.less +0 -4
  198. package/styles/theme/appearance/table.less +38 -31
  199. package/styles/theme/appearance.less +0 -1
  200. package/styles/theme/variables.less +18 -19
  201. package/tokens/breakpoint.d.ts +4 -0
  202. package/tokens/common-icons.d.ts +3 -3
  203. package/tokens/date-format.d.ts +2 -3
  204. package/tokens/i18n.d.ts +7 -7
  205. package/tokens/icons.d.ts +0 -4
  206. package/tokens/index.d.ts +1 -4
  207. package/tokens/number-format.d.ts +2 -3
  208. package/types/index.d.ts +0 -3
  209. package/types/point.d.ts +1 -1
  210. package/types/size.d.ts +0 -11
  211. package/utils/format/index.d.ts +0 -1
  212. package/utils/miscellaneous/font-scaling.d.ts +2 -1
  213. package/utils/miscellaneous/get-duration.d.ts +2 -0
  214. package/utils/miscellaneous/index.d.ts +1 -1
  215. package/animations/animations.d.ts +0 -109
  216. package/animations/index.d.ts +0 -1
  217. package/components/alert/alert.component.d.ts +0 -13
  218. package/components/alert/alert.directive.d.ts +0 -8
  219. package/components/alert/alert.interfaces.d.ts +0 -14
  220. package/components/alert/alert.service.d.ts +0 -10
  221. package/components/alert/alert.tokens.d.ts +0 -5
  222. package/components/alert/index.d.ts +0 -5
  223. package/components/data-list/data-list.directive.d.ts +0 -7
  224. package/components/data-list/option/option-content.d.ts +0 -16
  225. package/components/data-list/option/option-legacy.component.d.ts +0 -24
  226. package/components/data-list/option/option.directive.d.ts +0 -27
  227. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  228. package/components/dialog/dialog.directive.d.ts +0 -7
  229. package/components/dialog/dialog.service.d.ts +0 -7
  230. package/components/dialog/dialogs.component.d.ts +0 -8
  231. package/components/header/header.directive.d.ts +0 -17
  232. package/components/header/index.d.ts +0 -1
  233. package/components/link/link.options.d.ts +0 -12
  234. package/components/textfield/textfield.directive.d.ts +0 -38
  235. package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
  236. package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
  237. package/directives/hint/hint.directive.d.ts +0 -26
  238. package/directives/hint/hint.service.d.ts +0 -13
  239. package/directives/hint/hints.component.d.ts +0 -12
  240. package/fesm2022/taiga-ui-core-animations.mjs +0 -370
  241. package/fesm2022/taiga-ui-core-animations.mjs.map +0 -1
  242. package/fesm2022/taiga-ui-core-components-alert.mjs +0 -112
  243. package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
  244. package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -215
  245. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
  246. package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
  247. package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
  248. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
  249. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
  250. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
  251. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
  252. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
  253. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
  254. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
  255. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
  256. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
  257. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
  258. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
  259. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
  260. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
  261. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
  262. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
  263. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
  264. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
  265. package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
  266. package/pipes/auto-color/index.d.ts +0 -1
  267. package/pipes/calendar-sheet/index.d.ts +0 -1
  268. package/pipes/calendar-sheet/utils.d.ts +0 -20
  269. package/pipes/flag/flag.pipe.d.ts +0 -14
  270. package/pipes/flag/index.d.ts +0 -1
  271. package/pipes/format-date/format-date.pipe.d.ts +0 -9
  272. package/pipes/format-date/index.d.ts +0 -1
  273. package/pipes/initials/index.d.ts +0 -1
  274. package/pipes/initials/initials.pipe.d.ts +0 -7
  275. package/pipes/month/index.d.ts +0 -1
  276. package/pipes/month/month.pipe.d.ts +0 -10
  277. package/pipes/order-week-days/index.d.ts +0 -1
  278. package/services/breakpoint.service.d.ts +0 -16
  279. package/services/dark-theme.service.d.ts +0 -10
  280. package/services/format-date.service.d.ts +0 -8
  281. package/styles/mixins/wrapper.less +0 -64
  282. package/styles/mixins/wrapper.scss +0 -61
  283. package/styles/theme/appearance/opposite.less +0 -17
  284. package/styles/theme/wrapper.less +0 -211
  285. package/tokens/day-type-handler.d.ts +0 -7
  286. package/tokens/first-day-of-week.d.ts +0 -5
  287. package/tokens/scroll-ref.d.ts +0 -2
  288. package/tokens/spin-icons.d.ts +0 -6
  289. package/types/portal-item.d.ts +0 -9
  290. package/types/range-state.d.ts +0 -4
  291. package/types/value-content-context.d.ts +0 -4
  292. package/utils/format/string-hash-to-hsl.d.ts +0 -6
  293. package/utils/miscellaneous/to-animation-options.d.ts +0 -4
  294. /package/{directives → components}/title/index.d.ts +0 -0
  295. /package/{directives → components}/title/title.directive.d.ts +0 -0
  296. /package/{components → portals}/dialog/dialog.factory.d.ts +0 -0
  297. /package/{directives → portals}/dropdown/dropdown-content.directive.d.ts +0 -0
  298. /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
  299. /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
  300. /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
  301. /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
  302. /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
  303. /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
  304. /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
  305. /package/{directives → portals}/hint/hint-options.directive.d.ts +0 -0
  306. /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
  307. /package/{directives → portals}/hint/hint.d.ts +0 -0
  308. /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
  309. /package/{directives → portals}/popup/index.d.ts +0 -0
  310. /package/{directives → portals}/popup/popup.directive.d.ts +0 -0
  311. /package/{directives → portals}/popup/popup.service.d.ts +0 -0
  312. /package/{directives → portals}/popup/popups.component.d.ts +0 -0
@@ -1,27 +1,30 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, Injectable, Directive, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, signal, INJECTOR, ChangeDetectionStrategy, Component, TemplateRef, NgZone, DestroyRef, ChangeDetectorRef } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
+ import { InjectionToken, Directive, Optional, Self, SkipSelf, inject, Input, input, output, INJECTOR, ChangeDetectionStrategy, Component, TemplateRef, forwardRef, signal, computed } from '@angular/core';
4
+ import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
5
5
  import { EMPTY_CLIENT_RECT } from '@taiga-ui/cdk/constants';
6
+ import * as i3 from '@taiga-ui/cdk/directives/active-zone';
7
+ import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
6
8
  import * as i2 from '@taiga-ui/cdk/directives/animated';
7
- import { TuiAnimated, TuiAnimatedParent } from '@taiga-ui/cdk/directives/animated';
9
+ import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
8
10
  import { TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
9
11
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
10
12
  import { tuiInjectElement, tuiPointToClientRect } from '@taiga-ui/cdk/utils/dom';
11
13
  import { tuiClamp } from '@taiga-ui/cdk/utils/math';
12
- import { tuiProvide, tuiPure, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
13
- import { TuiDriverDirective, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsRectAccessor, tuiAsVehicle, tuiPositionAccessorFor, tuiRectAccessorFor } from '@taiga-ui/core/classes';
14
+ import { tuiPure, tuiSetSignal, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
15
+ import { TuiDriverDirective, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsVehicle, tuiAsRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor } from '@taiga-ui/core/classes';
14
16
  import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
15
17
  import * as i1 from '@taiga-ui/core/directives/appearance';
16
18
  import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
17
19
  import { TuiPositionService, TuiVisualViewportService } from '@taiga-ui/core/services';
18
20
  import { TUI_VIEWPORT } from '@taiga-ui/core/tokens';
19
- import { tuiOverrideOptions, tuiIsObscured } from '@taiga-ui/core/utils';
20
- import { PolymorpheusComponent, injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
21
- import { BehaviorSubject, Subject, merge, switchMap, of, delay, takeUntil, repeat, filter, map, tap, takeWhile, distinctUntilChanged, fromEvent, debounce, timer, startWith, skip } from 'rxjs';
22
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
21
+ import { tuiOverrideOptions, tuiIsObscured } from '@taiga-ui/core/utils/miscellaneous';
22
+ import { PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
23
+ import { Subject, merge, switchMap, of, delay, takeUntil, repeat, filter, map, tap, takeWhile, distinctUntilChanged, fromEvent, debounce, timer, startWith, skip, BehaviorSubject } from 'rxjs';
24
+ import { TuiPopupService } from '@taiga-ui/core/portals/popup';
25
+ import { tuiProvide } from '@taiga-ui/cdk/utils/di';
23
26
  import { DOCUMENT } from '@angular/common';
24
- import { tuiIfMap, tuiTypedFromEvent, tuiZonefreeScheduler, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
27
+ import { tuiIfMap, tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
25
28
  import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
26
29
 
27
30
  /**
@@ -31,44 +34,16 @@ const TUI_HINT_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_HINT_COMPONENT' :
31
34
  factory: () => TuiHintComponent,
32
35
  });
33
36
 
34
- /**
35
- * Service for displaying hints/tooltips
36
- */
37
- class TuiHintService extends BehaviorSubject {
38
- constructor() {
39
- super([]);
40
- }
41
- add(directive) {
42
- this.next(this.value.concat(directive));
43
- }
44
- remove(directive) {
45
- if (this.value.includes(directive)) {
46
- this.next(this.value.filter((hint) => hint !== directive));
47
- }
48
- }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
50
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, providedIn: 'root' }); }
51
- }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, decorators: [{
53
- type: Injectable,
54
- args: [{
55
- providedIn: 'root',
56
- }]
57
- }], ctorParameters: () => [] });
58
-
59
37
  class TuiHintDriver extends TuiDriverDirective {
60
38
  constructor() {
61
39
  super(...arguments);
62
40
  this.type = 'hint';
63
41
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDriver, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
65
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintDriver, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintDriver, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
43
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiHintDriver, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
66
44
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDriver, decorators: [{
68
- type: Directive,
69
- args: [{
70
- standalone: true,
71
- }]
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintDriver, decorators: [{
46
+ type: Directive
72
47
  }] });
73
48
 
74
49
  const TUI_HINT_DIRECTIONS = [
@@ -124,13 +99,12 @@ class TuiHintOptionsDirective {
124
99
  ngOnChanges() {
125
100
  this.change$.next();
126
101
  }
127
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
128
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintOptionsDirective, isStandalone: true, selector: "[tuiHintContent]", inputs: { content: ["tuiHintContent", "content"], direction: ["tuiHintDirection", "direction"], appearance: ["tuiHintAppearance", "appearance"], showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [tuiProvide(TUI_HINT_OPTIONS, TuiHintOptionsDirective)], usesOnChanges: true, ngImport: i0 }); }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
103
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiHintOptionsDirective, isStandalone: true, selector: "[tuiHintContent]", inputs: { content: ["tuiHintContent", "content"], direction: ["tuiHintDirection", "direction"], appearance: ["tuiHintAppearance", "appearance"], showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [tuiProvide(TUI_HINT_OPTIONS, TuiHintOptionsDirective)], usesOnChanges: true, ngImport: i0 }); }
129
104
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOptionsDirective, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintOptionsDirective, decorators: [{
131
106
  type: Directive,
132
107
  args: [{
133
- standalone: true,
134
108
  selector: '[tuiHintContent]',
135
109
  providers: [tuiProvide(TUI_HINT_OPTIONS, TuiHintOptionsDirective)],
136
110
  }]
@@ -160,11 +134,11 @@ class TuiHintHover extends TuiDriver {
160
134
  this.options = inject(TUI_HINT_OPTIONS);
161
135
  this.visible = false;
162
136
  this.toggle$ = new Subject();
163
- this.stream$ = merge(this.toggle$.pipe(switchMap((visible) => this.isMobile
164
- ? of(visible)
165
- : of(visible).pipe(delay(visible ? 0 : this.tuiHintHideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((visible) => this.isMobile
166
- ? of(visible)
167
- : of(visible).pipe(delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
137
+ this.stream$ = merge(this.toggle$.pipe(switchMap((show) => this.isMobile
138
+ ? of(show)
139
+ : of(show).pipe(delay(show ? 0 : this.hideDelay()))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((show) => this.isMobile
140
+ ? of(show).pipe(delay(0))
141
+ : of(show).pipe(delay(show ? this.showDelay() : this.hideDelay()))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
168
142
  (this.el.hasAttribute('tuiHintPointer') || !tuiIsObscured(this.el))), tap((visible) => {
169
143
  this.visible = visible;
170
144
  }));
@@ -172,8 +146,12 @@ class TuiHintHover extends TuiDriver {
172
146
  optional: true,
173
147
  skipSelf: true,
174
148
  });
175
- this.tuiHintShowDelay = this.options.showDelay;
176
- this.tuiHintHideDelay = this.options.hideDelay;
149
+ this.showDelay = input(this.options.showDelay, {
150
+ alias: 'tuiHintShowDelay',
151
+ });
152
+ this.hideDelay = input(this.options.hideDelay, {
153
+ alias: 'tuiHintHideDelay',
154
+ });
177
155
  this.type = 'hint';
178
156
  this.enabled = true;
179
157
  }
@@ -184,80 +162,80 @@ class TuiHintHover extends TuiDriver {
184
162
  close() {
185
163
  this.toggle$.next(false);
186
164
  }
187
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
188
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintHover, isStandalone: true, inputs: { tuiHintShowDelay: "tuiHintShowDelay", tuiHintHideDelay: "tuiHintHideDelay" }, providers: [tuiAsDriver(TuiHintHover), TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0 }); }
165
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
166
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintHover, isStandalone: true, inputs: { showDelay: { classPropertyName: "showDelay", publicName: "tuiHintShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "tuiHintHideDelay", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintHover), TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0 }); }
189
167
  }
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, decorators: [{
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintHover, decorators: [{
191
169
  type: Directive,
192
170
  args: [{
193
- standalone: true,
194
171
  providers: [tuiAsDriver(TuiHintHover), TuiHoveredService],
195
172
  exportAs: 'tuiHintHover',
196
173
  }]
197
- }], ctorParameters: () => [], propDecorators: { tuiHintShowDelay: [{
198
- type: Input
199
- }], tuiHintHideDelay: [{
200
- type: Input
201
- }] } });
174
+ }], ctorParameters: () => [] });
202
175
 
203
176
  const GAP$1 = 8;
204
177
  const ARROW_OFFSET = 24;
205
- const TOP = 0;
206
- const LEFT = 1;
178
+ const TOP = 1;
179
+ const LEFT = 0;
207
180
  class TuiHintPosition extends TuiPositionAccessor {
208
181
  constructor() {
209
182
  super(...arguments);
210
183
  this.el = tuiInjectElement();
211
- this.offset = inject(TUI_IS_MOBILE) ? 16 : 8;
212
184
  this.viewport = inject(TUI_VIEWPORT);
213
- this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor), inject(TuiHintDirective));
185
+ this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor, { optional: true }), { getClientRect: () => this.el.getBoundingClientRect() });
214
186
  this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => ({ ...acc, [direction]: [0, 0] }), {});
215
- this.direction = inject(TUI_HINT_OPTIONS).direction;
216
- this.directionChange = new EventEmitter();
187
+ this.direction = input(inject(TUI_HINT_OPTIONS).direction, {
188
+ alias: 'tuiHintDirection',
189
+ });
190
+ this.offset = input(inject(TUI_IS_MOBILE) ? 16 : 8, {
191
+ alias: 'tuiHintOffset',
192
+ });
193
+ this.directionChange = output({
194
+ alias: 'tuiHintDirectionChange',
195
+ });
217
196
  this.type = 'hint';
218
197
  }
219
198
  emitDirection(direction) {
220
199
  this.directionChange.emit(direction);
221
200
  }
222
- getPosition(rect, el) {
223
- const width = el?.clientWidth ?? rect.width;
224
- const height = el?.clientHeight ?? rect.height;
225
- const hostRect = this.accessor.getClientRect() ?? EMPTY_CLIENT_RECT;
201
+ getPosition({ width, height }) {
202
+ const direction = this.direction();
203
+ const hostRect = this.accessor.getClientRect();
226
204
  const leftCenter = hostRect.left + hostRect.width / 2;
227
205
  const topCenter = hostRect.top + hostRect.height / 2;
228
206
  const rtl = this.el.matches('[dir="rtl"] :scope');
229
- this.points['top-left'][TOP] = hostRect.top - height - this.offset;
207
+ this.points['top-left'][TOP] = hostRect.top - height - this.offset();
230
208
  this.points['top-left'][LEFT] = leftCenter - width + ARROW_OFFSET;
231
209
  this.points.top[TOP] = this.points['top-left'][TOP];
232
210
  this.points.top[LEFT] = leftCenter - width / 2;
233
211
  this.points['top-right'][TOP] = this.points['top-left'][TOP];
234
212
  this.points['top-right'][LEFT] = leftCenter - ARROW_OFFSET;
235
- this.points['bottom-left'][TOP] = hostRect.bottom + this.offset;
213
+ this.points['bottom-left'][TOP] = hostRect.bottom + this.offset();
236
214
  this.points['bottom-left'][LEFT] = this.points['top-left'][LEFT];
237
215
  this.points.bottom[TOP] = this.points['bottom-left'][TOP];
238
216
  this.points.bottom[LEFT] = this.points.top[LEFT];
239
217
  this.points['bottom-right'][TOP] = this.points['bottom-left'][TOP];
240
218
  this.points['bottom-right'][LEFT] = this.points['top-right'][LEFT];
241
219
  this.points['left-top'][TOP] = topCenter - height + ARROW_OFFSET;
242
- this.points['left-top'][LEFT] = hostRect.left - width - this.offset;
220
+ this.points['left-top'][LEFT] = hostRect.left - width - this.offset();
243
221
  this.points.left[TOP] = topCenter - height / 2;
244
222
  this.points.left[LEFT] = this.points['left-top'][LEFT];
245
223
  this.points['left-bottom'][TOP] = topCenter - ARROW_OFFSET;
246
224
  this.points['left-bottom'][LEFT] = this.points['left-top'][LEFT];
247
225
  this.points['right-top'][TOP] = this.points['left-top'][TOP];
248
- this.points['right-top'][LEFT] = hostRect.right + this.offset;
226
+ this.points['right-top'][LEFT] = hostRect.right + this.offset();
249
227
  this.points.right[TOP] = this.points.left[TOP];
250
228
  this.points.right[LEFT] = this.points['right-top'][LEFT];
251
229
  this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];
252
230
  this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];
253
- const array = Array.isArray(this.direction) ? this.direction : [this.direction];
231
+ const array = Array.isArray(direction) ? direction : [direction];
254
232
  const priority = array.map((direction) => adjust(direction, rtl));
255
- const direction = priority
233
+ const updated = priority
256
234
  .concat(TUI_HINT_DIRECTIONS)
257
235
  .find((dir) => this.checkPosition(this.points[dir], width, height)) ||
258
236
  this.fallback;
259
- this.emitDirection(adjust(direction, rtl));
260
- return this.points[direction];
237
+ this.emitDirection(adjust(updated, rtl));
238
+ return this.points[updated];
261
239
  }
262
240
  get fallback() {
263
241
  return this.points.top[TOP] >
@@ -265,31 +243,22 @@ class TuiHintPosition extends TuiPositionAccessor {
265
243
  ? 'top'
266
244
  : 'bottom';
267
245
  }
268
- checkPosition([top, left], width, height) {
246
+ checkPosition([left, top], width, height) {
269
247
  const viewport = this.viewport.getClientRect();
270
248
  return (top > viewport.top + GAP$1 &&
271
249
  left > viewport.left + GAP$1 &&
272
250
  top + height < viewport.bottom - GAP$1 &&
273
251
  left + width < viewport.right - GAP$1);
274
252
  }
275
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
276
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintPosition, isStandalone: true, inputs: { direction: ["tuiHintDirection", "direction"] }, outputs: { directionChange: "tuiHintDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
253
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
254
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintPosition, isStandalone: true, inputs: { direction: { classPropertyName: "direction", publicName: "tuiHintDirection", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "tuiHintOffset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { directionChange: "tuiHintDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
277
255
  }
278
256
  __decorate([
279
257
  tuiPure
280
258
  ], TuiHintPosition.prototype, "emitDirection", null);
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, decorators: [{
282
- type: Directive,
283
- args: [{
284
- standalone: true,
285
- }]
286
- }], propDecorators: { direction: [{
287
- type: Input,
288
- args: ['tuiHintDirection']
289
- }], directionChange: [{
290
- type: Output,
291
- args: ['tuiHintDirectionChange']
292
- }], emitDirection: [] } });
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintPosition, decorators: [{
260
+ type: Directive
261
+ }], propDecorators: { emitDirection: [] } });
293
262
  function adjust(direction, rtl) {
294
263
  if (rtl && direction.includes('left')) {
295
264
  return direction.replace('left', 'right');
@@ -302,18 +271,19 @@ function adjust(direction, rtl) {
302
271
 
303
272
  class TuiHintDirective {
304
273
  constructor() {
305
- this.service = inject(TuiHintService);
306
- this.appearance = inject(TUI_HINT_OPTIONS).appearance;
307
- this.visible = new EventEmitter();
308
- this.content = signal(null);
274
+ this.service = inject(TuiPopupService);
275
+ this.content = input(null, { alias: 'tuiHint' });
276
+ this.context = input(undefined, { alias: 'tuiHintContext' });
277
+ this.appearance = input(inject(TUI_HINT_OPTIONS).appearance, {
278
+ alias: 'tuiHintAppearance',
279
+ });
280
+ this.visible = output({ alias: 'tuiHintVisible' });
309
281
  this.component = inject((PolymorpheusComponent));
310
282
  this.el = tuiInjectElement();
311
- this.activeZone = inject(TuiActiveZone, { optional: true });
312
283
  this.type = 'hint';
313
284
  }
314
- set tuiHint(content) {
315
- this.content.set(content);
316
- if (!content) {
285
+ ngOnChanges() {
286
+ if (!this.content()) {
317
287
  this.toggle(false);
318
288
  }
319
289
  }
@@ -324,32 +294,31 @@ class TuiHintDirective {
324
294
  return this.el.getBoundingClientRect();
325
295
  }
326
296
  toggle(show) {
327
- if (show && this.content()) {
328
- this.service.add(this);
297
+ if (show && this.content() && !this.ref) {
298
+ this.ref = this.service.add(this.component);
299
+ this.visible.emit(true);
329
300
  }
330
- else {
331
- this.service.remove(this);
301
+ else if (this.ref) {
302
+ this.ref.destroy();
303
+ this.ref = undefined;
304
+ this.visible.emit(false);
332
305
  }
333
- this.visible.emit(show);
334
306
  }
335
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
336
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintDirective, isStandalone: true, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: { context: ["tuiHintContext", "context"], appearance: ["tuiHintAppearance", "appearance"], tuiHint: "tuiHint" }, outputs: { visible: "tuiHintVisible" }, providers: [
337
- tuiAsRectAccessor(TuiHintDirective),
307
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
308
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintDirective, isStandalone: true, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: { content: { classPropertyName: "content", publicName: "tuiHint", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "tuiHintContext", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "tuiHintAppearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "tuiHintVisible" }, providers: [
338
309
  tuiAsVehicle(TuiHintDirective),
339
310
  {
340
311
  provide: PolymorpheusComponent,
341
312
  deps: [TUI_HINT_COMPONENT, INJECTOR],
342
313
  useClass: PolymorpheusComponent,
343
314
  },
344
- ], hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
315
+ ], usesOnChanges: true, hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection", "tuiHintOffset", "tuiHintOffset"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
345
316
  }
346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, decorators: [{
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintDirective, decorators: [{
347
318
  type: Directive,
348
319
  args: [{
349
- standalone: true,
350
320
  selector: '[tuiHint]:not(ng-container):not(ng-template)',
351
321
  providers: [
352
- tuiAsRectAccessor(TuiHintDirective),
353
322
  tuiAsVehicle(TuiHintDirective),
354
323
  {
355
324
  provide: PolymorpheusComponent,
@@ -365,23 +334,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
365
334
  },
366
335
  {
367
336
  directive: TuiHintPosition,
368
- inputs: ['tuiHintDirection'],
337
+ inputs: ['tuiHintDirection', 'tuiHintOffset'],
369
338
  outputs: ['tuiHintDirectionChange'],
370
339
  },
371
340
  ],
372
341
  }]
373
- }], propDecorators: { context: [{
374
- type: Input,
375
- args: ['tuiHintContext']
376
- }], appearance: [{
377
- type: Input,
378
- args: ['tuiHintAppearance']
379
- }], visible: [{
380
- type: Output,
381
- args: ['tuiHintVisible']
382
- }], tuiHint: [{
383
- type: Input
384
- }] } });
342
+ }] });
385
343
 
386
344
  class TuiHintPointer extends TuiHintHover {
387
345
  constructor() {
@@ -394,13 +352,12 @@ class TuiHintPointer extends TuiHintHover {
394
352
  onMove({ clientX, clientY }) {
395
353
  this.currentRect = tuiPointToClientRect(clientX, clientY);
396
354
  }
397
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
398
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintPointer, isStandalone: true, selector: "[tuiHint][tuiHintPointer]", host: { listeners: { "mousemove.zoneless": "onMove($event)" } }, providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)], usesInheritance: true, ngImport: i0 }); }
355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintPointer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
356
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiHintPointer, isStandalone: true, selector: "[tuiHint][tuiHintPointer]", host: { listeners: { "mousemove.zoneless": "onMove($event)" } }, providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)], usesInheritance: true, ngImport: i0 }); }
399
357
  }
400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, decorators: [{
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintPointer, decorators: [{
401
359
  type: Directive,
402
360
  args: [{
403
- standalone: true,
404
361
  selector: '[tuiHint][tuiHintPointer]',
405
362
  providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)],
406
363
  host: {
@@ -411,32 +368,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
411
368
 
412
369
  class TuiHintUnstyledComponent {
413
370
  constructor() {
414
- this.context = injectContext();
371
+ this.hint = inject(TuiHintDirective);
415
372
  }
416
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
417
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyledComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<ng-container *polymorpheusOutlet="context.$implicit.content()" />', isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
373
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintUnstyledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
374
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiHintUnstyledComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<ng-container *polymorpheusOutlet="hint.content()" />', isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
418
375
  }
419
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, decorators: [{
376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintUnstyledComponent, decorators: [{
420
377
  type: Component,
421
378
  args: [{
422
379
  imports: [PolymorpheusOutlet],
423
- template: '<ng-container *polymorpheusOutlet="context.$implicit.content()" />',
380
+ template: '<ng-container *polymorpheusOutlet="hint.content()" />',
424
381
  changeDetection: ChangeDetectionStrategy.OnPush,
425
382
  }]
426
383
  }] });
427
384
  class TuiHintUnstyled {
428
385
  constructor() {
429
386
  const hint = inject((TuiHintDirective));
430
- hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent);
431
- hint.content.set(inject((TemplateRef)));
387
+ tuiSetSignal(hint.content, inject((TemplateRef)));
388
+ hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent, inject(INJECTOR));
432
389
  }
433
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
434
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyled, isStandalone: true, selector: "ng-template[tuiHint]", ngImport: i0 }); }
390
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
391
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiHintUnstyled, isStandalone: true, selector: "ng-template[tuiHint]", ngImport: i0 }); }
435
392
  }
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, decorators: [{
393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintUnstyled, decorators: [{
437
394
  type: Directive,
438
395
  args: [{
439
- standalone: true,
440
396
  selector: 'ng-template[tuiHint]',
441
397
  }]
442
398
  }], ctorParameters: () => [] });
@@ -445,7 +401,7 @@ const TUI_HINT_PROVIDERS = [
445
401
  TuiPositionService,
446
402
  TuiHoveredService,
447
403
  tuiPositionAccessorFor('hint', TuiHintPosition),
448
- tuiRectAccessorFor('hint', TuiHintDirective),
404
+ tuiRectAccessorFor('hint', forwardRef(() => TuiHintDirective)),
449
405
  ];
450
406
  const GAP = 8;
451
407
  class TuiHintComponent {
@@ -456,7 +412,7 @@ class TuiHintComponent {
456
412
  this.viewport = inject(TUI_VIEWPORT);
457
413
  this.pointer = inject(TuiHintPointer, { optional: true });
458
414
  this.accessor = inject(TuiRectAccessor);
459
- this.hint = injectContext().$implicit;
415
+ this.hint = inject(TuiHintDirective);
460
416
  this.isMobile = inject(TUI_IS_MOBILE);
461
417
  this.content = this.hint.component.component === TuiHintUnstyledComponent
462
418
  ? signal('')
@@ -468,7 +424,7 @@ class TuiHintComponent {
468
424
  inject(TuiPositionService)
469
425
  .pipe(takeWhile(() => this.hint.el.isConnected), map((point) => this.vvs.correct(point)), takeUntilDestroyed())
470
426
  .subscribe({
471
- next: ([top, left]) => this.update(top, left),
427
+ next: (point) => this.update(...point),
472
428
  complete: () => this.hover.close(),
473
429
  });
474
430
  inject(TuiHoveredService)
@@ -488,7 +444,7 @@ class TuiHintComponent {
488
444
  this.el.style.setProperty('--t-left', `${beakLeft}%`);
489
445
  this.el.style.setProperty('--t-rotate', !beakLeft || Math.ceil(beakLeft) === 100 ? '90deg' : '0deg');
490
446
  }
491
- update(top, left) {
447
+ update(left, top) {
492
448
  const { clientHeight, clientWidth } = this.el;
493
449
  const rect = this.accessor.getClientRect();
494
450
  if (rect === EMPTY_CLIENT_RECT || !clientHeight || !clientWidth) {
@@ -502,32 +458,33 @@ class TuiHintComponent {
502
458
  ]);
503
459
  this.apply(tuiPx(Math.round(top)), tuiPx(Math.round(safeLeft)), Math.round((tuiClamp(beakTop, 0, clientHeight) / clientHeight) * 100), Math.round((tuiClamp(beakLeft, 0, clientWidth) / clientWidth) * 100));
504
460
  }
505
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
506
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.tuiTheme": "theme" } }, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiAnimated }], ngImport: i0, template: `
461
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
462
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", host: { attributes: { "role": "tooltip" }, listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.tuiTheme": "theme" } }, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiAnimated }, { directive: i3.TuiActiveZone }], ngImport: i0, template: `
507
463
  <ng-content />
508
464
  <span
509
- *polymorpheusOutlet="content() as text; context: hint.context"
465
+ *polymorpheusOutlet="content() as text; context: hint.context()"
510
466
  [innerHTML]="text"
511
467
  ></span>
512
- `, isInline: true, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
468
+ `, isInline: true, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-body-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-body-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
513
469
  }
514
470
  __decorate([
515
471
  tuiPure
516
472
  ], TuiHintComponent.prototype, "apply", null);
517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, decorators: [{
473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintComponent, decorators: [{
518
474
  type: Component,
519
475
  args: [{ selector: 'tui-hint', imports: [PolymorpheusOutlet], template: `
520
476
  <ng-content />
521
477
  <span
522
- *polymorpheusOutlet="content() as text; context: hint.context"
478
+ *polymorpheusOutlet="content() as text; context: hint.context()"
523
479
  [innerHTML]="text"
524
480
  ></span>
525
- `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated], host: {
481
+ `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated, TuiActiveZone], host: {
482
+ role: 'tooltip',
526
483
  '[class._untouchable]': 'pointer',
527
484
  '[class._mobile]': 'isMobile',
528
485
  '[attr.tuiTheme]': 'theme',
529
486
  '(document:click)': 'onClick($event.target)',
530
- }, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"] }]
487
+ }, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-body-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-body-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"] }]
531
488
  }], ctorParameters: () => [], propDecorators: { apply: [] } });
532
489
 
533
490
  class TuiHintDescribe extends TuiDriver {
@@ -535,107 +492,87 @@ class TuiHintDescribe extends TuiDriver {
535
492
  super((subscriber) => this.stream$.subscribe(subscriber));
536
493
  this.doc = inject(DOCUMENT);
537
494
  this.el = tuiInjectElement();
538
- this.zone = inject(NgZone);
539
- this.id$ = new BehaviorSubject('');
540
- this.stream$ = this.id$.pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
541
- ? of(false)
542
- : merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element, 'blur')).pipe(map(() => this.focused))), debounce((visible) => visible ? timer(1000, tuiZonefreeScheduler(this.zone)) : of(null)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized());
495
+ this.element = computed((id = this.id()) => id ? this.doc.querySelector(`#${id}`) || this.el : this.el);
496
+ this.id = input('', { alias: 'tuiHintDescribe' });
543
497
  this.type = 'hint';
544
- }
545
- set tuiHintDescribe(id) {
546
- this.id$.next(id || '');
547
- }
548
- get element() {
549
- const id = this.id$.value;
550
- return id ? this.doc.querySelector(`#${id}`) || this.el : this.el;
498
+ this.stream$ = toObservable(this.id).pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
499
+ ? of(false)
500
+ : merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element(), 'blur')).pipe(map(() => this.focused))), debounce((visible) => (visible ? timer(1000) : of(null))), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized());
551
501
  }
552
502
  get focused() {
553
- return tuiIsFocused(this.element);
503
+ return tuiIsFocused(this.element());
554
504
  }
555
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
556
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintDescribe, isStandalone: true, selector: "[tuiHintDescribe]", inputs: { tuiHintDescribe: "tuiHintDescribe" }, providers: [tuiAsDriver(TuiHintDescribe)], usesInheritance: true, ngImport: i0 }); }
505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintDescribe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
506
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintDescribe, isStandalone: true, selector: "[tuiHintDescribe]", inputs: { id: { classPropertyName: "id", publicName: "tuiHintDescribe", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintDescribe)], usesInheritance: true, ngImport: i0 }); }
557
507
  }
558
- __decorate([
559
- tuiPure
560
- ], TuiHintDescribe.prototype, "element", null);
561
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, decorators: [{
508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintDescribe, decorators: [{
562
509
  type: Directive,
563
510
  args: [{
564
- standalone: true,
565
511
  selector: '[tuiHintDescribe]',
566
512
  providers: [tuiAsDriver(TuiHintDescribe)],
567
513
  }]
568
- }], ctorParameters: () => [], propDecorators: { tuiHintDescribe: [{
569
- type: Input
570
- }], element: [] } });
514
+ }], ctorParameters: () => [] });
571
515
 
572
516
  class TuiHintHost extends TuiRectAccessor {
573
517
  constructor() {
574
518
  super(...arguments);
519
+ this.tuiHintHost = input();
575
520
  this.type = 'hint';
576
521
  }
577
522
  getClientRect() {
578
- return this.tuiHintHost?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
523
+ return this.tuiHintHost()?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
579
524
  }
580
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
581
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintHost, isStandalone: true, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: "tuiHintHost" }, providers: [tuiAsRectAccessor(TuiHintHost)], usesInheritance: true, ngImport: i0 }); }
525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintHost, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
526
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintHost, isStandalone: true, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: { classPropertyName: "tuiHintHost", publicName: "tuiHintHost", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsRectAccessor(TuiHintHost)], usesInheritance: true, ngImport: i0 }); }
582
527
  }
583
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, decorators: [{
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintHost, decorators: [{
584
529
  type: Directive,
585
530
  args: [{
586
- standalone: true,
587
531
  selector: '[tuiHint][tuiHintHost]',
588
532
  providers: [tuiAsRectAccessor(TuiHintHost)],
589
533
  }]
590
- }], propDecorators: { tuiHintHost: [{
591
- type: Input
592
- }] } });
534
+ }] });
593
535
 
594
536
  class TuiHintManual extends TuiDriver {
595
537
  constructor() {
596
538
  super((subscriber) => this.stream$.subscribe(subscriber));
597
539
  this.hover = inject(TuiHintHover);
598
540
  this.stream$ = new BehaviorSubject(false);
599
- this.tuiHintManual = false;
541
+ this.visible = input(false, { alias: 'tuiHintManual' });
600
542
  this.type = 'hint';
601
543
  this.hover.enabled = false;
602
544
  }
603
545
  ngOnChanges() {
604
- this.stream$.next(!!this.tuiHintManual);
605
- this.hover.enabled = this.tuiHintManual === null;
546
+ this.stream$.next(!!this.visible());
547
+ this.hover.enabled = this.visible() === null;
606
548
  }
607
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
608
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintManual, isStandalone: true, selector: "[tuiHint][tuiHintManual]", inputs: { tuiHintManual: "tuiHintManual" }, providers: [tuiAsDriver(TuiHintManual)], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
549
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
550
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintManual, isStandalone: true, selector: "[tuiHint][tuiHintManual]", inputs: { visible: { classPropertyName: "visible", publicName: "tuiHintManual", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintManual)], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
609
551
  }
610
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, decorators: [{
552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintManual, decorators: [{
611
553
  type: Directive,
612
554
  args: [{
613
- standalone: true,
614
555
  selector: '[tuiHint][tuiHintManual]',
615
556
  providers: [tuiAsDriver(TuiHintManual)],
616
557
  }]
617
- }], ctorParameters: () => [], propDecorators: { tuiHintManual: [{
618
- type: Input
619
- }] } });
558
+ }], ctorParameters: () => [] });
620
559
 
621
560
  class TuiHintOverflow {
622
561
  constructor() {
623
562
  this.hint = inject(TuiHintDirective);
624
- this.tuiHintOverflow = '';
563
+ this.content = input('', { alias: 'tuiHintOverflow' });
625
564
  }
626
565
  onMouseEnter({ scrollWidth, clientWidth, textContent }) {
627
- this.hint.tuiHint =
628
- scrollWidth > clientWidth && this.tuiHintOverflow !== null
629
- ? this.tuiHintOverflow || textContent
630
- : '';
566
+ tuiSetSignal(this.hint.content, scrollWidth > clientWidth && this.content() !== null
567
+ ? this.content() || textContent
568
+ : '');
631
569
  }
632
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
633
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintOverflow, isStandalone: true, selector: "[tuiHintOverflow]", inputs: { tuiHintOverflow: "tuiHintOverflow" }, host: { listeners: { "mouseenter": "onMouseEnter($event.currentTarget)" } }, hostDirectives: [{ directive: TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance"] }], ngImport: i0 }); }
570
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintOverflow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
571
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiHintOverflow, isStandalone: true, selector: "[tuiHintOverflow]", inputs: { content: { classPropertyName: "content", publicName: "tuiHintOverflow", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter($event.currentTarget)" } }, hostDirectives: [{ directive: TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance"] }], ngImport: i0 }); }
634
572
  }
635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, decorators: [{
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiHintOverflow, decorators: [{
636
574
  type: Directive,
637
575
  args: [{
638
- standalone: true,
639
576
  selector: '[tuiHintOverflow]',
640
577
  hostDirectives: [
641
578
  {
@@ -647,9 +584,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
647
584
  '(mouseenter)': 'onMouseEnter($event.currentTarget)',
648
585
  },
649
586
  }]
650
- }], propDecorators: { tuiHintOverflow: [{
651
- type: Input
652
- }] } });
587
+ }] });
653
588
 
654
589
  const TuiHint = [
655
590
  TuiHintComponent,
@@ -666,34 +601,9 @@ const TuiHint = [
666
601
  TuiHintPointer,
667
602
  ];
668
603
 
669
- class TuiHints {
670
- constructor() {
671
- this.hints$ = inject(TuiHintService);
672
- this.destroyRef = inject(DestroyRef);
673
- this.cdr = inject(ChangeDetectorRef);
674
- this.hints = [];
675
- }
676
- ngOnInit() {
677
- // Due to this view being parallel to app content, `markForCheck` from `async` pipe
678
- // can happen after view was checked, so calling `detectChanges` instead
679
- this.hints$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hints) => {
680
- this.hints = hints;
681
- this.cdr.detectChanges();
682
- });
683
- }
684
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHints, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
685
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiHints, isStandalone: true, selector: "tui-hints", host: { attributes: { "aria-live": "polite" } }, ngImport: i0, template: "@for (hint of hints; track hint) {\n <div\n role=\"tooltip\"\n tuiAnimatedParent\n [tuiActiveZoneParent]=\"hint.activeZone || null\"\n >\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n </div>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;block-size:0}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
686
- }
687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHints, decorators: [{
688
- type: Component,
689
- args: [{ selector: 'tui-hints', imports: [PolymorpheusOutlet, TuiActiveZone, TuiAnimatedParent], changeDetection: ChangeDetectionStrategy.Default, host: {
690
- 'aria-live': 'polite',
691
- }, template: "@for (hint of hints; track hint) {\n <div\n role=\"tooltip\"\n tuiAnimatedParent\n [tuiActiveZoneParent]=\"hint.activeZone || null\"\n >\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n </div>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;block-size:0}\n"] }]
692
- }] });
693
-
694
604
  /**
695
605
  * Generated bundle index. Do not edit.
696
606
  */
697
607
 
698
- export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint, TuiHintComponent, TuiHintDescribe, TuiHintDirective, TuiHintDriver, TuiHintHost, TuiHintHover, TuiHintManual, TuiHintOptionsDirective, TuiHintOverflow, TuiHintPointer, TuiHintPosition, TuiHintService, TuiHintUnstyled, TuiHintUnstyledComponent, TuiHints, tuiHintOptionsProvider };
699
- //# sourceMappingURL=taiga-ui-core-directives-hint.mjs.map
608
+ export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint, TuiHintComponent, TuiHintDescribe, TuiHintDirective, TuiHintDriver, TuiHintHost, TuiHintHover, TuiHintManual, TuiHintOptionsDirective, TuiHintOverflow, TuiHintPointer, TuiHintPosition, TuiHintUnstyled, TuiHintUnstyledComponent, tuiHintOptionsProvider };
609
+ //# sourceMappingURL=taiga-ui-core-portals-hint.mjs.map