@taiga-ui/core 2.44.0 → 2.47.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 (513) hide show
  1. package/bundles/taiga-ui-core-abstract.umd.js +50 -20
  2. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-abstract.umd.min.js +1 -15
  4. package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-alert.umd.js +51 -21
  6. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-alert.umd.min.js +1 -15
  8. package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-button.umd.js +50 -20
  10. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-button.umd.min.js +1 -15
  12. package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-calendar.umd.js +50 -20
  14. package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-calendar.umd.min.js +1 -15
  16. package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-data-list.umd.js +56 -26
  18. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-data-list.umd.min.js +1 -15
  20. package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-dialog.umd.js +51 -21
  22. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -15
  24. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-dropdown-box.umd.js +74 -27
  26. package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -15
  28. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
  29. package/bundles/taiga-ui-core-components-error.umd.js +50 -20
  30. package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-components-error.umd.min.js +1 -15
  32. package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
  33. package/bundles/taiga-ui-core-components-expand.umd.js +52 -22
  34. package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -15
  36. package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
  37. package/bundles/taiga-ui-core-components-group.umd.js +50 -20
  38. package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-components-group.umd.min.js +1 -15
  40. package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
  41. package/bundles/taiga-ui-core-components-hints-host.umd.js +88 -46
  42. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-components-hints-host.umd.min.js +1 -15
  44. package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
  45. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +50 -20
  46. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  47. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js +1 -15
  48. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
  49. package/bundles/taiga-ui-core-components-label.umd.js +51 -21
  50. package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
  51. package/bundles/taiga-ui-core-components-label.umd.min.js +1 -15
  52. package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
  53. package/bundles/taiga-ui-core-components-link.umd.js +52 -22
  54. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  55. package/bundles/taiga-ui-core-components-link.umd.min.js +1 -15
  56. package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
  57. package/bundles/taiga-ui-core-components-loader.umd.js +60 -95
  58. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  59. package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -15
  60. package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
  61. package/bundles/taiga-ui-core-components-notification.umd.js +50 -20
  62. package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
  63. package/bundles/taiga-ui-core-components-notification.umd.min.js +1 -15
  64. package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
  65. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +50 -20
  66. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  67. package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js +1 -15
  68. package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
  69. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +50 -20
  70. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  71. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -15
  72. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
  73. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +50 -20
  74. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  75. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js +1 -15
  76. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js.map +1 -1
  77. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +76 -30
  78. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  79. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -15
  80. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  81. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +50 -20
  82. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
  83. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js +1 -15
  84. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
  85. package/bundles/taiga-ui-core-components-root.umd.js +51 -21
  86. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  87. package/bundles/taiga-ui-core-components-root.umd.min.js +1 -15
  88. package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
  89. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +50 -20
  90. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  91. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +1 -15
  92. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
  93. package/bundles/taiga-ui-core-components-scrollbar.umd.js +52 -22
  94. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  95. package/bundles/taiga-ui-core-components-scrollbar.umd.min.js +1 -15
  96. package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
  97. package/bundles/taiga-ui-core-components-svg.umd.js +59 -25
  98. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  99. package/bundles/taiga-ui-core-components-svg.umd.min.js +1 -15
  100. package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
  101. package/bundles/taiga-ui-core-components-theme-night.umd.js +50 -20
  102. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  103. package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -15
  104. package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
  105. package/bundles/taiga-ui-core-components-tooltip.umd.js +50 -20
  106. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  107. package/bundles/taiga-ui-core-components-tooltip.umd.min.js +1 -15
  108. package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
  109. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  110. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  111. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  112. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  113. package/bundles/taiga-ui-core-directives-color.umd.js +50 -20
  114. package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
  115. package/bundles/taiga-ui-core-directives-color.umd.min.js +1 -15
  116. package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
  117. package/bundles/taiga-ui-core-directives-described-by.umd.js +50 -20
  118. package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
  119. package/bundles/taiga-ui-core-directives-described-by.umd.min.js +1 -15
  120. package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
  121. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js +51 -21
  122. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
  123. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js +1 -15
  124. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
  125. package/bundles/taiga-ui-core-directives-dropdown.umd.js +50 -20
  126. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  127. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +1 -15
  128. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
  129. package/bundles/taiga-ui-core-directives-hint-controller.umd.js +52 -22
  130. package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
  131. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +1 -15
  132. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
  133. package/bundles/taiga-ui-core-directives-hint.umd.js +52 -22
  134. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  135. package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -15
  136. package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
  137. package/bundles/taiga-ui-core-directives-manual-hint.umd.js +50 -20
  138. package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
  139. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js +1 -15
  140. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
  141. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +50 -20
  142. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
  143. package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js +1 -15
  144. package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
  145. package/bundles/taiga-ui-core-directives-mode.umd.js +50 -20
  146. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  147. package/bundles/taiga-ui-core-directives-mode.umd.min.js +1 -15
  148. package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
  149. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +51 -21
  150. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
  151. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -15
  152. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
  153. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +50 -20
  154. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
  155. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js +1 -15
  156. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js.map +1 -1
  157. package/bundles/taiga-ui-core-directives-table-mode.umd.js +50 -22
  158. package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
  159. package/bundles/taiga-ui-core-directives-table-mode.umd.min.js +1 -15
  160. package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
  161. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +52 -22
  162. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  163. package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js +1 -15
  164. package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
  165. package/bundles/taiga-ui-core-directives-wrapper.umd.js +53 -22
  166. package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
  167. package/bundles/taiga-ui-core-directives-wrapper.umd.min.js +1 -15
  168. package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
  169. package/bundles/taiga-ui-core-enums.umd.js +2 -2
  170. package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
  171. package/bundles/taiga-ui-core-enums.umd.min.js.map +1 -1
  172. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +50 -20
  173. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
  174. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js +1 -15
  175. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js.map +1 -1
  176. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +50 -20
  177. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
  178. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js +1 -15
  179. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
  180. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +52 -22
  181. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
  182. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js +1 -15
  183. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
  184. package/bundles/taiga-ui-core-pipes-format-number.umd.js +50 -20
  185. package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
  186. package/bundles/taiga-ui-core-pipes-format-number.umd.min.js +1 -15
  187. package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
  188. package/bundles/taiga-ui-core-pipes-format-phone.umd.js +50 -20
  189. package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
  190. package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js +1 -15
  191. package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
  192. package/bundles/taiga-ui-core-pipes-month.umd.js +50 -20
  193. package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
  194. package/bundles/taiga-ui-core-pipes-month.umd.min.js +1 -15
  195. package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
  196. package/bundles/taiga-ui-core-pipes-pluralize.umd.js +50 -20
  197. package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
  198. package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js +1 -15
  199. package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
  200. package/bundles/taiga-ui-core-providers.umd.js +7 -9
  201. package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
  202. package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
  203. package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
  204. package/bundles/taiga-ui-core-services.umd.js +51 -21
  205. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  206. package/bundles/taiga-ui-core-services.umd.min.js +1 -15
  207. package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
  208. package/bundles/taiga-ui-core-tokens.umd.js +72 -30
  209. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  210. package/bundles/taiga-ui-core-tokens.umd.min.js +1 -15
  211. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  212. package/bundles/taiga-ui-core-utils-dom.umd.js +5 -5
  213. package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
  214. package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
  215. package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
  216. package/bundles/taiga-ui-core-utils-format.umd.js +52 -22
  217. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  218. package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -15
  219. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  220. package/bundles/taiga-ui-core-utils-mask.umd.js +51 -21
  221. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  222. package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -15
  223. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  224. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
  225. package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js.map +1 -1
  226. package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
  227. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
  228. package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
  229. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  230. package/components/dropdown-box/dropdown-box.component.d.ts +1 -0
  231. package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
  232. package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
  233. package/components/hints-host/hint-box/hint-box.component.d.ts +13 -2
  234. package/components/hints-host/hints-host.component.d.ts +4 -10
  235. package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
  236. package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
  237. package/components/loader/index.d.ts +0 -1
  238. package/components/loader/loader.component.d.ts +1 -3
  239. package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
  240. package/components/primitive-textfield/primitive-textfield.component.d.ts +3 -1
  241. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  242. package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
  243. package/components/scrollbar/scrollbar.component.d.ts +2 -2
  244. package/components/scrollbar/taiga-ui-core-components-scrollbar.metadata.json +1 -1
  245. package/components/svg/svg.component.d.ts +3 -2
  246. package/components/svg/taiga-ui-core-components-svg.metadata.json +1 -1
  247. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  248. package/constants/version.d.ts +1 -1
  249. package/directives/table-mode/table-mode.directive.d.ts +0 -1
  250. package/directives/table-mode/taiga-ui-core-directives-table-mode.metadata.json +1 -1
  251. package/directives/wrapper/taiga-ui-core-directives-wrapper.metadata.json +1 -1
  252. package/esm2015/components/alert/alert.component.js +2 -2
  253. package/esm2015/components/button/button-options.js +1 -1
  254. package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +2 -2
  255. package/esm2015/components/data-list/data-list.component.js +3 -3
  256. package/esm2015/components/data-list/option/option.component.js +4 -4
  257. package/esm2015/components/dialog/dialog.component.js +1 -1
  258. package/esm2015/components/dropdown-box/dropdown-box.component.js +22 -9
  259. package/esm2015/components/expand/expand-content.directive.js +2 -2
  260. package/esm2015/components/expand/expand.component.js +2 -2
  261. package/esm2015/components/hints-host/hint-box/hint-box.component.js +27 -14
  262. package/esm2015/components/hints-host/hint-box/hint-box.module.js +4 -2
  263. package/esm2015/components/hints-host/hints-host.component.js +11 -13
  264. package/esm2015/components/hints-host/hints-host.module.js +1 -2
  265. package/esm2015/components/label/label.component.js +2 -2
  266. package/esm2015/components/link/link.component.js +3 -3
  267. package/esm2015/components/loader/index.js +1 -2
  268. package/esm2015/components/loader/loader.component.js +7 -15
  269. package/esm2015/components/loader/loader.module.js +2 -3
  270. package/esm2015/components/primitive-textfield/primitive-textfield-options.js +2 -2
  271. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +16 -8
  272. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
  273. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +2 -2
  274. package/esm2015/components/root/root.component.js +2 -2
  275. package/esm2015/components/scrollbar/scrollbar.component.js +3 -3
  276. package/esm2015/components/svg/svg.component.js +11 -7
  277. package/esm2015/constants/version.js +2 -2
  278. package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
  279. package/esm2015/directives/hint/hint-options.js +2 -2
  280. package/esm2015/directives/hint/hint.directive.js +2 -2
  281. package/esm2015/directives/hint-controller/hint-controller.directive.js +2 -2
  282. package/esm2015/directives/hint-controller/hint-controller.provider.js +2 -2
  283. package/esm2015/directives/pointer-hint/pointer-hint.directive.js +2 -2
  284. package/esm2015/directives/table-mode/table-mode.directive.js +1 -3
  285. package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
  286. package/esm2015/directives/wrapper/wrapper.directive.js +4 -3
  287. package/esm2015/enums/interactive-state.js +3 -3
  288. package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
  289. package/esm2015/pipes/calendar-sheet/utils.js +3 -3
  290. package/esm2015/providers/is-mobile-resolution.provider.js +5 -10
  291. package/esm2015/services/hint.service.js +2 -2
  292. package/esm2015/tokens/icon-place.js +5 -0
  293. package/esm2015/tokens/icons-path.js +4 -5
  294. package/esm2015/tokens/index.js +3 -1
  295. package/esm2015/tokens/is-mobile-resolution.js +13 -3
  296. package/esm2015/tokens/ordered-short-week-days.js +2 -2
  297. package/esm2015/tokens/svg-content-processor.js +4 -0
  298. package/esm2015/types/pluralize.js +1 -1
  299. package/esm2015/utils/dom/are-css-vars-supported.js +2 -2
  300. package/esm2015/utils/dom/process-icon.js +5 -5
  301. package/esm2015/utils/format/get-fractional-part-padded.js +2 -2
  302. package/esm2015/utils/format/pluralize-to-icu.js +2 -2
  303. package/esm2015/utils/mask/create-number-mask.js +2 -2
  304. package/esm2015/utils/miscellaneous/index.js +2 -2
  305. package/esm2015/utils/miscellaneous/is-presumed-html-string.js +5 -0
  306. package/esm2015/utils/polyfills/index.js +2 -2
  307. package/esm2015/utils/polyfills/{inner-HTML.js → inner-html.js} +1 -1
  308. package/esm5/components/alert/alert.component.js +2 -2
  309. package/esm5/components/button/button-options.js +1 -1
  310. package/esm5/components/data-list/data-list-dropdown-manager.directive.js +2 -2
  311. package/esm5/components/data-list/data-list.component.js +3 -3
  312. package/esm5/components/data-list/option/option.component.js +4 -4
  313. package/esm5/components/dialog/dialog.component.js +1 -1
  314. package/esm5/components/dropdown-box/dropdown-box.component.js +26 -9
  315. package/esm5/components/expand/expand-content.directive.js +2 -2
  316. package/esm5/components/expand/expand.component.js +2 -2
  317. package/esm5/components/hints-host/hint-box/hint-box.component.js +32 -15
  318. package/esm5/components/hints-host/hint-box/hint-box.module.js +4 -2
  319. package/esm5/components/hints-host/hints-host.component.js +12 -14
  320. package/esm5/components/hints-host/hints-host.module.js +1 -2
  321. package/esm5/components/label/label.component.js +2 -2
  322. package/esm5/components/link/link.component.js +3 -3
  323. package/esm5/components/loader/index.js +1 -2
  324. package/esm5/components/loader/loader.component.js +7 -15
  325. package/esm5/components/loader/loader.module.js +2 -3
  326. package/esm5/components/primitive-textfield/primitive-textfield-options.js +2 -2
  327. package/esm5/components/primitive-textfield/primitive-textfield.component.js +24 -8
  328. package/esm5/components/primitive-textfield/textfield/textfield.component.js +1 -1
  329. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +2 -2
  330. package/esm5/components/root/root.component.js +2 -2
  331. package/esm5/components/scrollbar/scrollbar.component.js +3 -3
  332. package/esm5/components/svg/svg.component.js +11 -7
  333. package/esm5/constants/version.js +2 -2
  334. package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
  335. package/esm5/directives/hint/hint-options.js +2 -2
  336. package/esm5/directives/hint/hint.directive.js +2 -2
  337. package/esm5/directives/hint-controller/hint-controller.directive.js +2 -2
  338. package/esm5/directives/hint-controller/hint-controller.provider.js +2 -2
  339. package/esm5/directives/pointer-hint/pointer-hint.directive.js +2 -2
  340. package/esm5/directives/table-mode/table-mode.directive.js +1 -3
  341. package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
  342. package/esm5/directives/wrapper/wrapper.directive.js +4 -3
  343. package/esm5/enums/interactive-state.js +3 -3
  344. package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
  345. package/esm5/pipes/calendar-sheet/utils.js +3 -3
  346. package/esm5/providers/is-mobile-resolution.provider.js +6 -12
  347. package/esm5/services/hint.service.js +2 -2
  348. package/esm5/tokens/icon-place.js +5 -0
  349. package/esm5/tokens/icons-path.js +4 -5
  350. package/esm5/tokens/index.js +3 -1
  351. package/esm5/tokens/is-mobile-resolution.js +13 -3
  352. package/esm5/tokens/ordered-short-week-days.js +2 -2
  353. package/esm5/tokens/svg-content-processor.js +4 -0
  354. package/esm5/types/pluralize.js +1 -1
  355. package/esm5/utils/dom/are-css-vars-supported.js +2 -2
  356. package/esm5/utils/dom/process-icon.js +5 -5
  357. package/esm5/utils/format/get-fractional-part-padded.js +2 -2
  358. package/esm5/utils/format/pluralize-to-icu.js +2 -2
  359. package/esm5/utils/mask/create-number-mask.js +2 -2
  360. package/esm5/utils/miscellaneous/index.js +2 -2
  361. package/esm5/utils/miscellaneous/is-presumed-html-string.js +5 -0
  362. package/esm5/utils/polyfills/index.js +2 -2
  363. package/esm5/utils/polyfills/{inner-HTML.js → inner-html.js} +1 -1
  364. package/fesm2015/taiga-ui-core-components-alert.js +1 -1
  365. package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
  366. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  367. package/fesm2015/taiga-ui-core-components-data-list.js +6 -6
  368. package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
  369. package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
  370. package/fesm2015/taiga-ui-core-components-dropdown-box.js +21 -8
  371. package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
  372. package/fesm2015/taiga-ui-core-components-expand.js +2 -2
  373. package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
  374. package/fesm2015/taiga-ui-core-components-hints-host.js +34 -26
  375. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  376. package/fesm2015/taiga-ui-core-components-label.js +1 -1
  377. package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
  378. package/fesm2015/taiga-ui-core-components-link.js +2 -2
  379. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  380. package/fesm2015/taiga-ui-core-components-loader.js +9 -73
  381. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  382. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +18 -10
  383. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  384. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  385. package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
  386. package/fesm2015/taiga-ui-core-components-scrollbar.js +2 -2
  387. package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
  388. package/fesm2015/taiga-ui-core-components-svg.js +10 -6
  389. package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
  390. package/fesm2015/taiga-ui-core-constants.js +1 -1
  391. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  392. package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +1 -1
  393. package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
  394. package/fesm2015/taiga-ui-core-directives-hint-controller.js +2 -2
  395. package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
  396. package/fesm2015/taiga-ui-core-directives-hint.js +2 -2
  397. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  398. package/fesm2015/taiga-ui-core-directives-pointer-hint.js +1 -1
  399. package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  400. package/fesm2015/taiga-ui-core-directives-table-mode.js +0 -2
  401. package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
  402. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +2 -2
  403. package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  404. package/fesm2015/taiga-ui-core-directives-wrapper.js +3 -2
  405. package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
  406. package/fesm2015/taiga-ui-core-enums.js +2 -2
  407. package/fesm2015/taiga-ui-core-enums.js.map +1 -1
  408. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +2 -2
  409. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
  410. package/fesm2015/taiga-ui-core-providers.js +7 -9
  411. package/fesm2015/taiga-ui-core-providers.js.map +1 -1
  412. package/fesm2015/taiga-ui-core-services.js +1 -1
  413. package/fesm2015/taiga-ui-core-services.js.map +1 -1
  414. package/fesm2015/taiga-ui-core-tokens.js +22 -10
  415. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  416. package/fesm2015/taiga-ui-core-utils-dom.js +5 -5
  417. package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
  418. package/fesm2015/taiga-ui-core-utils-format.js +2 -2
  419. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  420. package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
  421. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  422. package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
  423. package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
  424. package/fesm5/taiga-ui-core-components-alert.js +1 -1
  425. package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
  426. package/fesm5/taiga-ui-core-components-button.js.map +1 -1
  427. package/fesm5/taiga-ui-core-components-data-list.js +6 -6
  428. package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
  429. package/fesm5/taiga-ui-core-components-dialog.js +1 -1
  430. package/fesm5/taiga-ui-core-components-dropdown-box.js +25 -8
  431. package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
  432. package/fesm5/taiga-ui-core-components-expand.js +2 -2
  433. package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
  434. package/fesm5/taiga-ui-core-components-hints-host.js +39 -27
  435. package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
  436. package/fesm5/taiga-ui-core-components-label.js +1 -1
  437. package/fesm5/taiga-ui-core-components-label.js.map +1 -1
  438. package/fesm5/taiga-ui-core-components-link.js +2 -2
  439. package/fesm5/taiga-ui-core-components-link.js.map +1 -1
  440. package/fesm5/taiga-ui-core-components-loader.js +10 -77
  441. package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
  442. package/fesm5/taiga-ui-core-components-primitive-textfield.js +26 -10
  443. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  444. package/fesm5/taiga-ui-core-components-root.js +1 -1
  445. package/fesm5/taiga-ui-core-components-root.js.map +1 -1
  446. package/fesm5/taiga-ui-core-components-scrollbar.js +2 -2
  447. package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
  448. package/fesm5/taiga-ui-core-components-svg.js +10 -6
  449. package/fesm5/taiga-ui-core-components-svg.js.map +1 -1
  450. package/fesm5/taiga-ui-core-constants.js +1 -1
  451. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  452. package/fesm5/taiga-ui-core-directives-dropdown-controller.js +1 -1
  453. package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
  454. package/fesm5/taiga-ui-core-directives-hint-controller.js +2 -2
  455. package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
  456. package/fesm5/taiga-ui-core-directives-hint.js +2 -2
  457. package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
  458. package/fesm5/taiga-ui-core-directives-pointer-hint.js +1 -1
  459. package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  460. package/fesm5/taiga-ui-core-directives-table-mode.js +0 -2
  461. package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
  462. package/fesm5/taiga-ui-core-directives-textfield-controller.js +2 -2
  463. package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  464. package/fesm5/taiga-ui-core-directives-wrapper.js +3 -2
  465. package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
  466. package/fesm5/taiga-ui-core-enums.js +2 -2
  467. package/fesm5/taiga-ui-core-enums.js.map +1 -1
  468. package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +2 -2
  469. package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
  470. package/fesm5/taiga-ui-core-providers.js +8 -11
  471. package/fesm5/taiga-ui-core-providers.js.map +1 -1
  472. package/fesm5/taiga-ui-core-services.js +1 -1
  473. package/fesm5/taiga-ui-core-services.js.map +1 -1
  474. package/fesm5/taiga-ui-core-tokens.js +22 -10
  475. package/fesm5/taiga-ui-core-tokens.js.map +1 -1
  476. package/fesm5/taiga-ui-core-utils-dom.js +5 -5
  477. package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
  478. package/fesm5/taiga-ui-core-utils-format.js +2 -2
  479. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  480. package/fesm5/taiga-ui-core-utils-mask.js +1 -1
  481. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  482. package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
  483. package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
  484. package/package.json +4 -4
  485. package/providers/is-mobile-resolution.provider.d.ts +2 -3
  486. package/providers/taiga-ui-core-providers.metadata.json +1 -1
  487. package/services/hint.service.d.ts +1 -1
  488. package/styles/basic/main.less +0 -1
  489. package/styles/markup/tui-list.less +15 -0
  490. package/styles/markup/tui-palette.less +1 -1
  491. package/styles/mixins/mixins.less +3 -9
  492. package/styles/mixins/slider.less +1 -1
  493. package/styles/taiga-ui-global-old.less +0 -1
  494. package/styles/taiga-ui-global.less +0 -1
  495. package/styles/theme/variables.less +1 -1
  496. package/styles/theme/wrapper/secondary.less +2 -0
  497. package/tokens/icon-place.d.ts +2 -0
  498. package/tokens/index.d.ts +2 -0
  499. package/tokens/svg-content-processor.d.ts +3 -0
  500. package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
  501. package/utils/dom/are-css-vars-supported.d.ts +1 -1
  502. package/utils/miscellaneous/index.d.ts +1 -1
  503. package/utils/miscellaneous/{is-presumed-hTMLString.d.ts → is-presumed-html-string.d.ts} +0 -0
  504. package/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.metadata.json +1 -1
  505. package/utils/polyfills/index.d.ts +1 -1
  506. package/utils/polyfills/{inner-HTML.d.ts → inner-html.d.ts} +0 -0
  507. package/utils/polyfills/taiga-ui-core-utils-polyfills.metadata.json +1 -1
  508. package/components/loader/loader.directive.d.ts +0 -12
  509. package/esm2015/components/loader/loader.directive.js +0 -61
  510. package/esm2015/utils/miscellaneous/is-presumed-hTMLString.js +0 -5
  511. package/esm5/components/loader/loader.directive.js +0 -64
  512. package/esm5/utils/miscellaneous/is-presumed-hTMLString.js +0 -5
  513. package/styles/markup/tui-autofill.less +0 -19
@@ -1,23 +1,22 @@
1
- import { __assign, __decorate, __param } from 'tslib';
2
- import { Inject, ElementRef, Component, ChangeDetectionStrategy, NgZone, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
1
+ import { __decorate, __param, __assign } from 'tslib';
2
+ import { ElementRef, Inject, Component, ChangeDetectionStrategy, NgZone, forwardRef, ViewChild, HostBinding, NgModule } from '@angular/core';
3
3
  import { ANIMATION_FRAME, WINDOW } from '@ng-web-apis/common';
4
- import { tuiZonefree, px, TuiDestroyService, tuiPure, TuiHoveredModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
4
+ import { TUI_PARENT_ANIMATION, tuiZonefree, px, TuiDestroyService, tuiPure, TuiHoveredModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
5
+ import { tuiFadeIn } from '@taiga-ui/core/animations';
5
6
  import { TuiPointerHintDirective } from '@taiga-ui/core/directives/pointer-hint';
6
7
  import { TUI_ANIMATION_OPTIONS, TUI_MEDIA } from '@taiga-ui/core/tokens';
8
+ import { PolymorpheusComponent, POLYMORPHEUS_CONTEXT, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
7
9
  import { Observable } from 'rxjs';
8
10
  import { takeUntil } from 'rxjs/operators';
9
- import { tuiFadeIn } from '@taiga-ui/core/animations';
10
11
  import { TuiHintDirective } from '@taiga-ui/core/directives/hint';
11
12
  import { TuiHintService } from '@taiga-ui/core/services';
12
13
  import { CommonModule } from '@angular/common';
13
- import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
14
14
 
15
15
  var TuiHintsHostComponent = /** @class */ (function () {
16
- function TuiHintsHostComponent(options, elementRef, hints$) {
17
- this.options = options;
16
+ function TuiHintsHostComponent(elementRef, hints$) {
18
17
  this.elementRef = elementRef;
19
18
  this.hints$ = hints$;
20
- this.animation = __assign({ value: '' }, this.options);
19
+ this.component = new PolymorpheusComponent(TuiHintBoxComponent);
21
20
  }
22
21
  Object.defineProperty(TuiHintsHostComponent.prototype, "clientRect", {
23
22
  get: function () {
@@ -32,24 +31,22 @@ var TuiHintsHostComponent = /** @class */ (function () {
32
31
  }
33
32
  };
34
33
  TuiHintsHostComponent.ctorParameters = function () { return [
35
- { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
36
34
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
37
35
  { type: TuiHintService, decorators: [{ type: Inject, args: [TuiHintService,] }] }
38
36
  ]; };
39
37
  TuiHintsHostComponent = __decorate([
40
38
  Component({
41
39
  selector: 'tui-hints-host',
42
- template: "<tui-hint-box\n *ngFor=\"let hint of hints$ | async\"\n role=\"tooltip\"\n [@tuiFadeIn]=\"animation\"\n [attr.id]=\"hint.id\"\n [hint]=\"hint\"\n [tuiActiveZoneParent]=\"hint.activeZone\"\n (tuiHoveredChange)=\"onHovered($event, hint)\"\n>\n <div\n polymorpheus-outlet\n [content]=\"hint.content\"\n >\n <ng-template let-text>\n <span class=\"t-text\">{{ text }}</span>\n </ng-template>\n </div>\n</tui-hint-box>\n",
40
+ template: "<div\n *ngFor=\"let hint of hints$ | async\"\n role=\"tooltip\"\n polymorpheus-outlet\n @tuiParentAnimation\n [attr.id]=\"hint.id\"\n [content]=\"component\"\n [context]=\"{ $implicit: hint }\"\n [tuiActiveZoneParent]=\"hint.activeZone\"\n (tuiHoveredChange)=\"onHovered($event, hint)\"\n></div>\n",
43
41
  changeDetection: ChangeDetectionStrategy.OnPush,
44
- animations: [tuiFadeIn],
42
+ animations: [TUI_PARENT_ANIMATION],
45
43
  host: {
46
44
  'aria-live': 'polite',
47
45
  },
48
- styles: [":host{position:fixed;bottom:0;left:0;width:100%;height:0}.t-text{white-space:pre-wrap}"]
46
+ styles: [":host{position:fixed;bottom:0;left:0;width:100%;height:0}"]
49
47
  }),
50
- __param(0, Inject(TUI_ANIMATION_OPTIONS)),
51
- __param(1, Inject(ElementRef)),
52
- __param(2, Inject(TuiHintService))
48
+ __param(0, Inject(ElementRef)),
49
+ __param(1, Inject(TuiHintService))
53
50
  ], TuiHintsHostComponent);
54
51
  return TuiHintsHostComponent;
55
52
  }());
@@ -85,16 +82,26 @@ var reverseDirectionsHorizontal = {
85
82
  // Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
86
83
  // @dynamic
87
84
  var TuiHintBoxComponent = /** @class */ (function () {
88
- function TuiHintBoxComponent(animationFrame$, destroy$, ngZone, elementRef, windowRef, media, hintsHost) {
85
+ function TuiHintBoxComponent(animationFrame$, destroy$, ngZone, options, elementRef, windowRef, media, hintsHost, context) {
89
86
  var _this = this;
87
+ this.options = options;
90
88
  this.elementRef = elementRef;
91
89
  this.windowRef = windowRef;
92
90
  this.media = media;
93
91
  this.hintsHost = hintsHost;
92
+ this.context = context;
93
+ this.animation = __assign({ value: '' }, this.options);
94
94
  animationFrame$
95
95
  .pipe(tuiZonefree(ngZone), takeUntil(destroy$))
96
96
  .subscribe(function () { return _this.calculatePosition(); });
97
97
  }
98
+ Object.defineProperty(TuiHintBoxComponent.prototype, "hint", {
99
+ get: function () {
100
+ return this.context.$implicit;
101
+ },
102
+ enumerable: true,
103
+ configurable: true
104
+ });
98
105
  Object.defineProperty(TuiHintBoxComponent.prototype, "isUntouchable", {
99
106
  get: function () {
100
107
  return this.hint instanceof TuiPointerHintDirective;
@@ -262,17 +269,19 @@ var TuiHintBoxComponent = /** @class */ (function () {
262
269
  { type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
263
270
  { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
264
271
  { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
272
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
265
273
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
266
274
  { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] },
267
275
  { type: undefined, decorators: [{ type: Inject, args: [TUI_MEDIA,] }] },
268
- { type: TuiHintsHostComponent, decorators: [{ type: Inject, args: [TuiHintsHostComponent,] }] }
276
+ { type: TuiHintsHostComponent, decorators: [{ type: Inject, args: [forwardRef(function () { return TuiHintsHostComponent; }),] }] },
277
+ { type: undefined, decorators: [{ type: Inject, args: [POLYMORPHEUS_CONTEXT,] }] }
269
278
  ]; };
270
279
  __decorate([
271
280
  ViewChild('arrow')
272
281
  ], TuiHintBoxComponent.prototype, "arrow", void 0);
273
282
  __decorate([
274
- Input()
275
- ], TuiHintBoxComponent.prototype, "hint", void 0);
283
+ HostBinding('@tuiFadeIn')
284
+ ], TuiHintBoxComponent.prototype, "animation", void 0);
276
285
  __decorate([
277
286
  tuiPure,
278
287
  HostBinding('class._untouchable')
@@ -283,18 +292,21 @@ var TuiHintBoxComponent = /** @class */ (function () {
283
292
  TuiHintBoxComponent = __decorate([
284
293
  Component({
285
294
  selector: 'tui-hint-box[hint]',
286
- template: "<!-- @bad TODO: Refactor to use this arrow in all cases -->\n<div\n *ngIf=\"isMobile\"\n #arrow\n class=\"t-arrow\"\n></div>\n<div\n automation-id=\"tui-hint-box__tooltip\"\n class=\"t-tooltip\"\n>\n <ng-content></ng-content>\n</div>\n",
295
+ template: "<!-- @bad TODO: Refactor to use this arrow in all cases -->\n<div\n *ngIf=\"isMobile\"\n #arrow\n class=\"t-arrow\"\n></div>\n<div\n automation-id=\"tui-hint-box__tooltip\"\n polymorpheus-outlet\n class=\"t-tooltip\"\n [content]=\"hint.content\"\n>\n <ng-template let-text>\n <span class=\"t-text\">{{ text }}</span>\n </ng-template>\n</div>\n",
287
296
  changeDetection: ChangeDetectionStrategy.OnPush,
288
297
  providers: [TuiDestroyService],
289
- styles: [":host{position:absolute;top:0;left:0;max-width:18rem;min-height:var(--tui-height-m);padding:.75rem 1rem;background:var(--tui-primary);border-radius:var(--tui-radius-l);color:var(--tui-primary-text);box-sizing:border-box}:host .t-arrow,:host:not([data-mode=overflow]):before{content:'';position:absolute;width:.5rem;height:.5rem;border-radius:.125rem;box-sizing:border-box;background-color:inherit;transform:rotate(45deg)}:host[data-tui-host-direction=top] .t-arrow{bottom:-.25rem}:host[data-tui-host-direction=bottom] .t-arrow{top:-.25rem}:host[data-tui-host-direction=bottom]:before,:host[data-tui-host-direction=top]:before{display:none}:host[data-tui-host-direction=top-left]:before,:host[data-tui-host-direction=top-middle]:before,:host[data-tui-host-direction=top-right]:before{bottom:-.25rem}:host[data-tui-host-direction=bottom-left]:before,:host[data-tui-host-direction=bottom-middle]:before,:host[data-tui-host-direction=bottom-right]:before{top:-.25rem}:host[data-tui-host-direction=bottom-middle]:before,:host[data-tui-host-direction=top-middle]:before{left:calc(50% - .2rem)}:host[data-tui-host-direction=bottom-left]:before,:host[data-tui-host-direction=top-left]:before{right:1.075rem}:host[data-tui-host-direction=bottom-right]:before,:host[data-tui-host-direction=top-right]:before{left:1.075rem}:host[data-tui-host-direction=left]:before,:host[data-tui-host-direction=right]:before{top:50%;margin-top:-.25rem}:host[data-tui-host-direction=left]:before{right:-.25rem}:host[data-tui-host-direction=right]:before{left:-.25rem}:host[data-mode=error]{background-color:var(--tui-error-fill)}:host[data-mode=onDark],:host[data-mode=overflow]{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);border:1px solid var(--tui-base-03);background-color:var(--tui-base-01);color:var(--tui-text-01)}:host[data-mode=onDark]:before,:host[data-mode=overflow]:before{border:1px solid var(--tui-base-03)}:host[data-mode=onDark][data-tui-host-direction=left]:before,:host[data-mode=overflow][data-tui-host-direction=left]:before{border-left-color:transparent;border-bottom-color:transparent}:host[data-mode=onDark][data-tui-host-direction=right]:before,:host[data-mode=overflow][data-tui-host-direction=right]:before{border-right-color:transparent;border-top-color:transparent}:host[data-mode=onDark][data-tui-host-direction=top-left]:before,:host[data-mode=onDark][data-tui-host-direction=top-middle]:before,:host[data-mode=onDark][data-tui-host-direction=top-right]:before,:host[data-mode=overflow][data-tui-host-direction=top-left]:before,:host[data-mode=overflow][data-tui-host-direction=top-middle]:before,:host[data-mode=overflow][data-tui-host-direction=top-right]:before{border-left-color:transparent;border-top-color:transparent}:host[data-mode=onDark][data-tui-host-direction=bottom-left]:before,:host[data-mode=onDark][data-tui-host-direction=bottom-middle]:before,:host[data-mode=onDark][data-tui-host-direction=bottom-right]:before,:host[data-mode=overflow][data-tui-host-direction=bottom-left]:before,:host[data-mode=overflow][data-tui-host-direction=bottom-middle]:before,:host[data-mode=overflow][data-tui-host-direction=bottom-right]:before{border-right-color:transparent;border-bottom-color:transparent}:host[data-mode=overflow]{max-width:none}:host._untouchable{pointer-events:none}.t-tooltip{font:var(--tui-font-text-s);word-wrap:break-word}:host[data-mode=overflow] .t-tooltip{font:inherit}"]
298
+ animations: [tuiFadeIn],
299
+ styles: [":host{position:absolute;top:0;left:0;max-width:18rem;min-height:var(--tui-height-m);padding:.75rem 1rem;background:var(--tui-primary);border-radius:var(--tui-radius-l);color:var(--tui-primary-text);box-sizing:border-box}:host .t-arrow,:host:not([data-mode=overflow]):before{content:'';position:absolute;width:.5rem;height:.5rem;border-radius:.125rem;box-sizing:border-box;background-color:inherit;transform:rotate(45deg)}:host[data-tui-host-direction=top] .t-arrow{bottom:-.25rem}:host[data-tui-host-direction=bottom] .t-arrow{top:-.25rem}:host[data-tui-host-direction=bottom]:before,:host[data-tui-host-direction=top]:before{display:none}:host[data-tui-host-direction=top-left]:before,:host[data-tui-host-direction=top-middle]:before,:host[data-tui-host-direction=top-right]:before{bottom:-.25rem}:host[data-tui-host-direction=bottom-left]:before,:host[data-tui-host-direction=bottom-middle]:before,:host[data-tui-host-direction=bottom-right]:before{top:-.25rem}:host[data-tui-host-direction=bottom-middle]:before,:host[data-tui-host-direction=top-middle]:before{left:calc(50% - .2rem)}:host[data-tui-host-direction=bottom-left]:before,:host[data-tui-host-direction=top-left]:before{right:1.075rem}:host[data-tui-host-direction=bottom-right]:before,:host[data-tui-host-direction=top-right]:before{left:1.075rem}:host[data-tui-host-direction=left]:before,:host[data-tui-host-direction=right]:before{top:50%;margin-top:-.25rem}:host[data-tui-host-direction=left]:before{right:-.25rem}:host[data-tui-host-direction=right]:before{left:-.25rem}:host[data-mode=error]{background-color:var(--tui-error-fill)}:host[data-mode=onDark],:host[data-mode=overflow]{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);border:1px solid var(--tui-base-03);background-color:var(--tui-base-01);color:var(--tui-text-01)}:host[data-mode=onDark]:before,:host[data-mode=overflow]:before{border:1px solid var(--tui-base-03)}:host[data-mode=onDark][data-tui-host-direction=left]:before,:host[data-mode=overflow][data-tui-host-direction=left]:before{border-left-color:transparent;border-bottom-color:transparent}:host[data-mode=onDark][data-tui-host-direction=right]:before,:host[data-mode=overflow][data-tui-host-direction=right]:before{border-right-color:transparent;border-top-color:transparent}:host[data-mode=onDark][data-tui-host-direction=top-left]:before,:host[data-mode=onDark][data-tui-host-direction=top-middle]:before,:host[data-mode=onDark][data-tui-host-direction=top-right]:before,:host[data-mode=overflow][data-tui-host-direction=top-left]:before,:host[data-mode=overflow][data-tui-host-direction=top-middle]:before,:host[data-mode=overflow][data-tui-host-direction=top-right]:before{border-left-color:transparent;border-top-color:transparent}:host[data-mode=onDark][data-tui-host-direction=bottom-left]:before,:host[data-mode=onDark][data-tui-host-direction=bottom-middle]:before,:host[data-mode=onDark][data-tui-host-direction=bottom-right]:before,:host[data-mode=overflow][data-tui-host-direction=bottom-left]:before,:host[data-mode=overflow][data-tui-host-direction=bottom-middle]:before,:host[data-mode=overflow][data-tui-host-direction=bottom-right]:before{border-right-color:transparent;border-bottom-color:transparent}:host[data-mode=overflow]{max-width:none}:host._untouchable{pointer-events:none}.t-tooltip{font:var(--tui-font-text-s);word-wrap:break-word}:host[data-mode=overflow] .t-tooltip{font:inherit}.t-text{white-space:pre-wrap}"]
290
300
  }),
291
301
  __param(0, Inject(ANIMATION_FRAME)),
292
302
  __param(1, Inject(TuiDestroyService)),
293
303
  __param(2, Inject(NgZone)),
294
- __param(3, Inject(ElementRef)),
295
- __param(4, Inject(WINDOW)),
296
- __param(5, Inject(TUI_MEDIA)),
297
- __param(6, Inject(TuiHintsHostComponent))
304
+ __param(3, Inject(TUI_ANIMATION_OPTIONS)),
305
+ __param(4, Inject(ElementRef)),
306
+ __param(5, Inject(WINDOW)),
307
+ __param(6, Inject(TUI_MEDIA)),
308
+ __param(7, Inject(forwardRef(function () { return TuiHintsHostComponent; }))),
309
+ __param(8, Inject(POLYMORPHEUS_CONTEXT))
298
310
  ], TuiHintBoxComponent);
299
311
  return TuiHintBoxComponent;
300
312
  }());
@@ -304,9 +316,10 @@ var TuiHintBoxModule = /** @class */ (function () {
304
316
  }
305
317
  TuiHintBoxModule = __decorate([
306
318
  NgModule({
307
- imports: [CommonModule],
319
+ imports: [CommonModule, PolymorpheusModule],
308
320
  declarations: [TuiHintBoxComponent],
309
321
  exports: [TuiHintBoxComponent],
322
+ entryComponents: [TuiHintBoxComponent],
310
323
  })
311
324
  ], TuiHintBoxModule);
312
325
  return TuiHintBoxModule;
@@ -326,7 +339,6 @@ var TuiHintsHostModule = /** @class */ (function () {
326
339
  ],
327
340
  declarations: [TuiHintsHostComponent],
328
341
  exports: [TuiHintsHostComponent],
329
- entryComponents: [TuiHintsHostComponent],
330
342
  })
331
343
  ], TuiHintsHostModule);
332
344
  return TuiHintsHostModule;
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-hints-host.js","sources":["ng://@taiga-ui/core/components/hints-host/hints-host.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.module.ts","ng://@taiga-ui/core/components/hints-host/hints-host.module.ts","ng://@taiga-ui/core/components/hints-host/taiga-ui-core-components-hints-host.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATION_OPTIONS} from '@taiga-ui/core/tokens';\n\n@Component({\n selector: 'tui-hints-host',\n templateUrl: './hints-host.template.html',\n styleUrls: ['./hints-host.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn],\n host: {\n 'aria-live': 'polite',\n },\n})\nexport class TuiHintsHostComponent {\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: TuiHintService,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n onHovered(hovered: boolean, directive: AbstractTuiHint): void {\n if (directive instanceof TuiHintDirective) {\n directive.componentHovered$.next(hovered);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {px, TuiDestroyService, tuiPure, tuiZonefree} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiHintsHostComponent} from '../hints-host.component';\n\nconst SPACE = 8;\nconst BORDER_WIDTH = 1;\nconst LEFT_PADDING = 16;\nconst TOP_PADDING = 12;\nconst ARROW_SIZE = 8;\nconst ARROW_OFFSET = 16;\nconst ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;\nconst reverseDirectionsVertical: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': 'bottom-left',\n 'top-right': 'bottom-right',\n 'bottom-left': 'top-left',\n 'bottom-right': 'top-right',\n left: 'right',\n right: 'left',\n 'top-middle': 'bottom-middle',\n 'bottom-middle': 'top-middle',\n};\nconst reverseDirectionsHorizontal: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': 'top-right',\n 'top-right': 'top-left',\n 'bottom-left': 'bottom-right',\n 'bottom-right': 'bottom-left',\n left: 'right',\n right: 'left',\n 'top-middle': 'top-middle',\n 'bottom-middle': 'bottom-middle',\n};\n\n// TODO: consider abstracting UI and move to CDK, split hint and overflow\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-hint-box[hint]',\n templateUrl: './hint-box.template.html',\n styleUrls: ['./hint-box.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n})\nexport class TuiHintBoxComponent {\n @ViewChild('arrow')\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @Input()\n hint!: AbstractTuiHint;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_MEDIA) private readonly media: TuiMedia,\n @Inject(TuiHintsHostComponent)\n private readonly hintsHost: TuiHintsHostComponent,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\n }\n\n @tuiPure\n @HostBinding('class._untouchable')\n get isUntouchable(): boolean {\n return this.hint instanceof TuiPointerHintDirective;\n }\n\n @HostBinding('attr.data-mode')\n get mode(): TuiHintModeT | null {\n return this.hint.mode;\n }\n\n get isMobile(): boolean {\n return this.windowRef.innerWidth <= this.media.mobile;\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition(): void {\n if (this.mode !== 'overflow') {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates(): void {\n if (this.isMobile) {\n this.calculateMobileCoordinates();\n\n return;\n }\n\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;\n const directions: TuiDirection[] = [\n 'left',\n 'right',\n 'bottom-left',\n 'bottom-right',\n 'bottom-middle',\n 'top-left',\n 'top-right',\n 'top-middle',\n ];\n\n let top = 0;\n let left = 0;\n let {direction} = this.hint;\n\n const horizontalTop =\n hostRect.top + hostRect.height / 2 - tooltipRect.height / 2 - portalRect.top;\n const horizontalLeft =\n hostRect.left - tooltipRect.width - SPACE - portalRect.left;\n const horizontalRight = hostRect.left + hostRect.width + SPACE - portalRect.left;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalRight = isHostLong\n ? hostRect.left - portalRect.left\n : hostRect.left + hostRect.width / 2 - ARROWHEAD_OFFSET - portalRect.left;\n const verticalLeft = isHostLong\n ? hostRect.left - tooltipRect.width + hostRect.width - portalRect.left\n : hostRect.left -\n tooltipRect.width +\n hostRect.width / 2 +\n ARROWHEAD_OFFSET -\n portalRect.left;\n const verticalMiddle =\n hostRect.left - tooltipRect.width / 2 + hostRect.width / 2 - portalRect.left;\n\n directions.splice(directions.indexOf(direction), 1);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (direction) {\n case 'left':\n top = horizontalTop;\n left = horizontalLeft;\n break;\n case 'right':\n top = horizontalTop;\n left = horizontalRight;\n break;\n case 'top-right':\n top = verticalTop;\n left = verticalRight;\n break;\n case 'top-left':\n top = verticalTop;\n left = verticalLeft;\n break;\n case 'bottom-right':\n top = verticalBottom;\n left = verticalRight;\n break;\n case 'bottom-left':\n top = verticalBottom;\n left = verticalLeft;\n break;\n case 'bottom-middle':\n top = verticalBottom;\n left = verticalMiddle;\n break;\n case 'top-middle':\n top = verticalTop;\n left = verticalMiddle;\n break;\n }\n\n const verticalFit =\n top + portalRect.top > SPACE &&\n top + tooltipRect.height + SPACE + portalRect.top <\n this.windowRef.innerHeight;\n const horizontalFit =\n left > SPACE &&\n left + tooltipRect.width + SPACE + portalRect.left < portalRect.width;\n\n if (directions.length === 0 || (verticalFit && horizontalFit)) {\n break;\n }\n\n direction = verticalFit\n ? reverseDirectionsHorizontal[direction]\n : reverseDirectionsVertical[direction];\n direction =\n directions.splice(directions.indexOf(direction), 1)[0] || direction;\n }\n\n style.top = px(top);\n style.left = px(left);\n\n tooltip.setAttribute('data-tui-host-direction', direction);\n }\n\n private calculateMobileCoordinates(): void {\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTopFit =\n verticalTop + portalRect.top > SPACE &&\n hostRect.top < this.windowRef.innerHeight;\n const verticalBottomFit =\n hostRect.bottom > 0 &&\n hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;\n const direction =\n (this.hint.direction.includes('top') && verticalTopFit) || !verticalBottomFit\n ? 'top'\n : 'bottom';\n const attemptedLeft =\n portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;\n const left = Math.max(\n attemptedLeft + tooltipRect.width + SPACE > portalRect.right\n ? portalRect.right - SPACE - tooltipRect.width\n : attemptedLeft,\n SPACE * 2,\n );\n\n style.left = px(left);\n style.top = direction === 'top' ? px(verticalTop) : px(verticalBottom);\n\n if (this.arrow) {\n this.arrow.nativeElement.style.left = px(\n hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2\n ? ARROW_OFFSET\n : hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2,\n );\n }\n\n tooltip.setAttribute('data-tui-host-direction', direction);\n }\n\n private setOverflowStyles(): void {\n const hostRect = this.hint.getElementClientRect();\n const {style} = this.elementRef.nativeElement;\n\n style.top = px(hostRect.top - window.innerHeight - TOP_PADDING - BORDER_WIDTH);\n style.left = px(hostRect.left - LEFT_PADDING - BORDER_WIDTH);\n style.width = px(hostRect.width + LEFT_PADDING * 2 + BORDER_WIDTH * 2);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiHoveredModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxModule} from './hint-box/hint-box.module';\nimport {TuiHintsHostComponent} from './hints-host.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiHoveredModule,\n TuiHintBoxModule,\n TuiActiveZoneModule,\n ],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n entryComponents: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;IAwBI,+BACoD,OAAyB,EACpC,UAAmC,EACvC,MAAsB;QAFP,YAAO,GAAP,OAAO,CAAkB;QACpC,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgB;QARlD,cAAS,GAAG,WACjB,KAAK,EAAE,EAAE,IACN,IAAI,CAAC,OAAO,CACT,CAAC;KAMP;IAEJ,sBAAI,6CAAU;aAAd;YACI,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;SAChE;;;OAAA;IAED,yCAAS,GAAT,UAAU,OAAgB,EAAE,SAA0B;QAClD,IAAI,SAAS,YAAY,gBAAgB,EAAE;YACvC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC7C;KACJ;;gDAbI,MAAM,SAAC,qBAAqB;gBACoB,UAAU,uBAA1D,MAAM,SAAC,UAAU;gBACuB,cAAc,uBAAtD,MAAM,SAAC,cAAc;;IATjB,qBAAqB;QAVjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,+eAAyC;YAEzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,IAAI,EAAE;gBACF,WAAW,EAAE,QAAQ;aACxB;;SACJ,CAAC;QAQO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;QAC7B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;OATlB,qBAAqB,CAqBjC;IAAD,4BAAC;CArBD;;ACIA,IAAM,KAAK,GAAG,CAAC,CAAC;AAChB,IAAM,YAAY,GAAG,CAAC,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CAAC;YACvB,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;;ICUA;KAAkC;IAArB,kBAAkB;QAZ9B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,mBAAmB;aACtB;YACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;YAChC,eAAe,EAAE,CAAC,qBAAqB,CAAC;SAC3C,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACpBA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-hints-host.js","sources":["ng://@taiga-ui/core/components/hints-host/hints-host.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.module.ts","ng://@taiga-ui/core/components/hints-host/hints-host.module.ts","ng://@taiga-ui/core/components/hints-host/taiga-ui-core-components-hints-host.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxComponent} from './hint-box/hint-box.component';\n\n@Component({\n selector: 'tui-hints-host',\n templateUrl: './hints-host.template.html',\n styleUrls: ['./hints-host.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [TUI_PARENT_ANIMATION],\n host: {\n 'aria-live': 'polite',\n },\n})\nexport class TuiHintsHostComponent {\n readonly component = new PolymorpheusComponent(TuiHintBoxComponent);\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: TuiHintService,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n onHovered(hovered: boolean, directive: AbstractTuiHint): void {\n if (directive instanceof TuiHintDirective) {\n directive.componentHovered$.next(hovered);\n }\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n px,\n TuiContextWithImplicit,\n TuiDestroyService,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiHintsHostComponent} from '../hints-host.component';\n\nconst SPACE = 8;\nconst BORDER_WIDTH = 1;\nconst LEFT_PADDING = 16;\nconst TOP_PADDING = 12;\nconst ARROW_SIZE = 8;\nconst ARROW_OFFSET = 16;\nconst ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;\nconst reverseDirectionsVertical: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': 'bottom-left',\n 'top-right': 'bottom-right',\n 'bottom-left': 'top-left',\n 'bottom-right': 'top-right',\n left: 'right',\n right: 'left',\n 'top-middle': 'bottom-middle',\n 'bottom-middle': 'top-middle',\n};\nconst reverseDirectionsHorizontal: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': 'top-right',\n 'top-right': 'top-left',\n 'bottom-left': 'bottom-right',\n 'bottom-right': 'bottom-left',\n left: 'right',\n right: 'left',\n 'top-middle': 'top-middle',\n 'bottom-middle': 'bottom-middle',\n};\n\n// TODO: consider abstracting UI and move to CDK, split hint and overflow\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-hint-box[hint]',\n templateUrl: './hint-box.template.html',\n styleUrls: ['./hint-box.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn],\n})\nexport class TuiHintBoxComponent {\n @ViewChild('arrow')\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @HostBinding('@tuiFadeIn')\n readonly animation = {value: '', ...this.options} as const;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_MEDIA) private readonly media: TuiMedia,\n @Inject(forwardRef(() => TuiHintsHostComponent))\n private readonly hintsHost: TuiHintsHostComponent,\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<AbstractTuiHint>,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\n }\n\n get hint(): AbstractTuiHint {\n return this.context.$implicit;\n }\n\n @tuiPure\n @HostBinding('class._untouchable')\n get isUntouchable(): boolean {\n return this.hint instanceof TuiPointerHintDirective;\n }\n\n @HostBinding('attr.data-mode')\n get mode(): TuiHintModeT | null {\n return this.hint.mode;\n }\n\n get isMobile(): boolean {\n return this.windowRef.innerWidth <= this.media.mobile;\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition(): void {\n if (this.mode !== 'overflow') {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates(): void {\n if (this.isMobile) {\n this.calculateMobileCoordinates();\n\n return;\n }\n\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;\n const directions: TuiDirection[] = [\n 'left',\n 'right',\n 'bottom-left',\n 'bottom-right',\n 'bottom-middle',\n 'top-left',\n 'top-right',\n 'top-middle',\n ];\n\n let top = 0;\n let left = 0;\n let {direction} = this.hint;\n\n const horizontalTop =\n hostRect.top + hostRect.height / 2 - tooltipRect.height / 2 - portalRect.top;\n const horizontalLeft =\n hostRect.left - tooltipRect.width - SPACE - portalRect.left;\n const horizontalRight = hostRect.left + hostRect.width + SPACE - portalRect.left;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalRight = isHostLong\n ? hostRect.left - portalRect.left\n : hostRect.left + hostRect.width / 2 - ARROWHEAD_OFFSET - portalRect.left;\n const verticalLeft = isHostLong\n ? hostRect.left - tooltipRect.width + hostRect.width - portalRect.left\n : hostRect.left -\n tooltipRect.width +\n hostRect.width / 2 +\n ARROWHEAD_OFFSET -\n portalRect.left;\n const verticalMiddle =\n hostRect.left - tooltipRect.width / 2 + hostRect.width / 2 - portalRect.left;\n\n directions.splice(directions.indexOf(direction), 1);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (direction) {\n case 'left':\n top = horizontalTop;\n left = horizontalLeft;\n break;\n case 'right':\n top = horizontalTop;\n left = horizontalRight;\n break;\n case 'top-right':\n top = verticalTop;\n left = verticalRight;\n break;\n case 'top-left':\n top = verticalTop;\n left = verticalLeft;\n break;\n case 'bottom-right':\n top = verticalBottom;\n left = verticalRight;\n break;\n case 'bottom-left':\n top = verticalBottom;\n left = verticalLeft;\n break;\n case 'bottom-middle':\n top = verticalBottom;\n left = verticalMiddle;\n break;\n case 'top-middle':\n top = verticalTop;\n left = verticalMiddle;\n break;\n }\n\n const verticalFit =\n top + portalRect.top > SPACE &&\n top + tooltipRect.height + SPACE + portalRect.top <\n this.windowRef.innerHeight;\n const horizontalFit =\n left > SPACE &&\n left + tooltipRect.width + SPACE + portalRect.left < portalRect.width;\n\n if (directions.length === 0 || (verticalFit && horizontalFit)) {\n break;\n }\n\n direction = verticalFit\n ? reverseDirectionsHorizontal[direction]\n : reverseDirectionsVertical[direction];\n direction =\n directions.splice(directions.indexOf(direction), 1)[0] || direction;\n }\n\n style.top = px(top);\n style.left = px(left);\n\n tooltip.setAttribute('data-tui-host-direction', direction);\n }\n\n private calculateMobileCoordinates(): void {\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTopFit =\n verticalTop + portalRect.top > SPACE &&\n hostRect.top < this.windowRef.innerHeight;\n const verticalBottomFit =\n hostRect.bottom > 0 &&\n hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;\n const direction =\n (this.hint.direction.includes('top') && verticalTopFit) || !verticalBottomFit\n ? 'top'\n : 'bottom';\n const attemptedLeft =\n portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;\n const left = Math.max(\n attemptedLeft + tooltipRect.width + SPACE > portalRect.right\n ? portalRect.right - SPACE - tooltipRect.width\n : attemptedLeft,\n SPACE * 2,\n );\n\n style.left = px(left);\n style.top = direction === 'top' ? px(verticalTop) : px(verticalBottom);\n\n if (this.arrow) {\n this.arrow.nativeElement.style.left = px(\n hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2\n ? ARROW_OFFSET\n : hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2,\n );\n }\n\n tooltip.setAttribute('data-tui-host-direction', direction);\n }\n\n private setOverflowStyles(): void {\n const hostRect = this.hint.getElementClientRect();\n const {style} = this.elementRef.nativeElement;\n\n style.top = px(hostRect.top - window.innerHeight - TOP_PADDING - BORDER_WIDTH);\n style.left = px(hostRect.left - LEFT_PADDING - BORDER_WIDTH);\n style.width = px(hostRect.width + LEFT_PADDING * 2 + BORDER_WIDTH * 2);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n entryComponents: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiHoveredModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxModule} from './hint-box/hint-box.module';\nimport {TuiHintsHostComponent} from './hints-host.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiHoveredModule,\n TuiHintBoxModule,\n TuiActiveZoneModule,\n ],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;IAsBI,+BACyC,UAAmC,EACvC,MAAsB;QADlB,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GA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AAC,oBAAoB,CAAC,CAAA;OAjBxB,mBAAmB,CAyN/B;IAAD,0BAAC;CAzND;;;IC1DA;KAAgC;IAAnB,gBAAgB;QAN5B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;YAC3C,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;YAC9B,eAAe,EAAE,CAAC,mBAAmB,CAAC;SACzC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;;ICOA;KAAkC;IAArB,kBAAkB;QAX9B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,mBAAmB;aACtB;YACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACnBA;;;;;;"}
@@ -10,7 +10,7 @@ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
10
10
  var TuiLabelComponent = /** @class */ (function () {
11
11
  function TuiLabelComponent(mode$) {
12
12
  this.mode$ = mode$;
13
- // TODO: Rename to tuiLabel in 3.0
13
+ // TODO: 3.0 Rename to tuiLabel
14
14
  this.label = '';
15
15
  this.context = {
16
16
  $implicit: null,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-label.js","sources":["ng://@taiga-ui/core/components/label/label.component.ts","ng://@taiga-ui/core/components/label/label.module.ts","ng://@taiga-ui/core/components/label/taiga-ui-core-components-label.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiContextWithImplicit, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'label[tuiLabel]',\n templateUrl: './label.template.html',\n styleUrls: ['./label.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiLabelComponent<T> {\n // TODO: Rename to tuiLabel in 3.0\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n context: TuiContextWithImplicit<T | null> = {\n $implicit: null,\n };\n\n @ContentChild(NgControl)\n @HostBinding('class._control')\n readonly control?: NgControl;\n\n constructor(@Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>) {}\n}\n","import {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLabelComponent} from './label.component';\n\n@NgModule({\n imports: [PolymorpheusModule],\n declarations: [TuiLabelComponent],\n exports: [TuiLabelComponent],\n})\nexport class TuiLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IA0CI,2BAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;;QAZ9E,UAAK,GAAwB,EAAE,CAAC;QAIhC,YAAO,GAAqC;YACxC,SAAS,EAAE,IAAI;SAClB,CAAC;KAMgF;;gBAApC,UAAU,uBAA3C,MAAM,SAAC,QAAQ;;IAZ5B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;oDACe;IAIhC;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;sDAGf;IAIF;QAFC,YAAY,CAAC,SAAS,CAAC;QACvB,WAAW,CAAC,gBAAgB,CAAC;sDACD;IAdpB,iBAAiB;QAV7B,SAAS,CAAC;YACP,QAAQ,EAAE,iBAAiB;YAC3B,2RAAoC;YAEpC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,SAAS,EAAE,CAAC,aAAa,CAAC;YAC1B,IAAI,EAAE;gBACF,oBAAoB,EAAE,OAAO;aAChC;;SACJ,CAAC;QAiBe,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;OAhBpB,iBAAiB,CAiB7B;IAAD,wBAAC;CAjBD;;;IChBA;KAA8B;IAAjB,cAAc;QAL1B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,YAAY,EAAE,CAAC,iBAAiB,CAAC;YACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;SAC/B,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B;;ACVA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-label.js","sources":["ng://@taiga-ui/core/components/label/label.component.ts","ng://@taiga-ui/core/components/label/label.module.ts","ng://@taiga-ui/core/components/label/taiga-ui-core-components-label.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiContextWithImplicit, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'label[tuiLabel]',\n templateUrl: './label.template.html',\n styleUrls: ['./label.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiLabelComponent<T> {\n // TODO: 3.0 Rename to tuiLabel\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n context: TuiContextWithImplicit<T | null> = {\n $implicit: null,\n };\n\n @ContentChild(NgControl)\n @HostBinding('class._control')\n readonly control?: NgControl;\n\n constructor(@Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>) {}\n}\n","import {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLabelComponent} from './label.component';\n\n@NgModule({\n imports: [PolymorpheusModule],\n declarations: [TuiLabelComponent],\n exports: [TuiLabelComponent],\n})\nexport class TuiLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IA0CI,2BAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;;QAZ9E,UAAK,GAAwB,EAAE,CAAC;QAIhC,YAAO,GAAqC;YACxC,SAAS,EAAE,IAAI;SAClB,CAAC;KAMgF;;gBAApC,UAAU,uBAA3C,MAAM,SAAC,QAAQ;;IAZ5B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;oDACe;IAIhC;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;sDAGf;IAIF;QAFC,YAAY,CAAC,SAAS,CAAC;QACvB,WAAW,CAAC,gBAAgB,CAAC;sDACD;IAdpB,iBAAiB;QAV7B,SAAS,CAAC;YACP,QAAQ,EAAE,iBAAiB;YAC3B,2RAAoC;YAEpC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,SAAS,EAAE,CAAC,aAAa,CAAC;YAC1B,IAAI,EAAE;gBACF,oBAAoB,EAAE,OAAO;aAChC;;SACJ,CAAC;QAiBe,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;OAhBpB,iBAAiB,CAiB7B;IAAD,wBAAC;CAjBD;;;IChBA;KAA8B;IAAjB,cAAc;QAL1B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,kBAAkB,CAAC;YAC7B,YAAY,EAAE,CAAC,iBAAiB,CAAC;YACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;SAC/B,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B;;ACVA;;;;;;"}
@@ -15,7 +15,7 @@ var TuiLinkComponent = /** @class */ (function () {
15
15
  this.elementRef = elementRef;
16
16
  this.mode$ = mode$;
17
17
  this.pseudo = false;
18
- // TODO: Remove `null` in 3.0
18
+ // TODO: 3.0 Remove `null`
19
19
  this.icon = null;
20
20
  this.iconAlign = 'right';
21
21
  this.iconRotated = false;
@@ -112,7 +112,7 @@ var TuiLinkComponent = /** @class */ (function () {
112
112
  host: {
113
113
  '($.data-mode.attr)': 'mode$',
114
114
  },
115
- styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;color:var(--tui-link);text-decoration:none;text-align:left;text-transform:inherit;font-weight:inherit;cursor:pointer;outline:0}:host:hover{color:var(--tui-link-hover)}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host[data-mode=onLight]{color:var(--tui-text-02)}:host[data-mode=onLight]._active,:host[data-mode=onLight]:hover{color:var(--tui-text-01)}:host[data-mode=onLight]._pseudo{color:var(--tui-text-01)}:host[data-mode=onLight]._pseudo._active,:host[data-mode=onLight]._pseudo:hover{color:var(--tui-text-03)}:host[data-mode=onLight][data-host-mode=negative]{color:var(--tui-negative-night)}:host[data-mode=onLight][data-host-mode=negative]._active,:host[data-mode=onLight][data-host-mode=negative]:active,:host[data-mode=onLight][data-host-mode=negative]:hover{color:var(--tui-negative-night-hover)}:host[data-mode=onDark]{color:var(--tui-text-03-night)}:host[data-mode=onDark]._active,:host[data-mode=onDark]:active,:host[data-mode=onDark]:hover{color:var(--tui-text-01-night)}:host[data-mode=onDark]._pseudo{color:var(--tui-text-01-night)}:host[data-mode=onDark]._pseudo._active,:host[data-mode=onDark]._pseudo:active,:host[data-mode=onDark]._pseudo:hover{color:var(--tui-text-03-night)}:host[data-mode=onDark][data-host-mode=positive]{color:var(--tui-positive-night)}:host[data-mode=onDark][data-host-mode=positive]._active,:host[data-mode=onDark][data-host-mode=positive]:active,:host[data-mode=onDark][data-host-mode=positive]:hover{color:var(--tui-positive-night-hover)}:host[data-host-mode=negative]{color:var(--tui-negative)}:host[data-host-mode=negative]:hover{color:var(--tui-negative-hover)}:host[data-host-mode=positive]{color:var(--tui-positive)}:host[data-host-mode=positive]:hover{color:var(--tui-positive-hover)}.t-content{display:inline-block}:host._focus-visible .t-content{background:var(--tui-selection)}:host[data-mode=onLight]._focus-visible .t-content{background:var(--tui-clear);color:var(--tui-text-01)}:host[data-mode=onDark]._focus-visible .t-content{background:var(--tui-clear-inverse);color:var(--tui-text-01-night)}:host[data-host-mode=positive]._focus-visible .t-content{background:var(--tui-success-bg)}:host[data-host-mode=negative]._focus-visible .t-content{background:var(--tui-error-bg)}:host._pseudo .t-content{padding-bottom:.15em;-webkit-text-decoration:underline dashed;text-decoration:underline dashed;text-underline-offset:.2em;text-decoration-thickness:.7px}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-top:-.125rem;opacity:.8}.t-icon_left{margin-right:.25rem}.t-icon_right{margin-left:.25rem}:host:hover .t-icon{opacity:1}:host._icon-rotated .t-icon{transform:rotate(180deg)}"]
115
+ styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;color:var(--tui-link);text-decoration:none;text-align:left;text-transform:inherit;font-weight:inherit;cursor:pointer;outline:0}:host:hover{color:var(--tui-link-hover)}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host[data-mode=onLight]{color:var(--tui-text-02)}:host[data-mode=onLight]._active,:host[data-mode=onLight]:hover{color:var(--tui-text-01)}:host[data-mode=onLight]._pseudo{color:var(--tui-text-01)}:host[data-mode=onLight]._pseudo .t-content{-webkit-text-decoration-color:rgba(0,0,0,.48);text-decoration-color:rgba(0,0,0,.48)}:host[data-mode=onLight]._pseudo._active,:host[data-mode=onLight]._pseudo:hover{color:var(--tui-text-03)}:host[data-mode=onLight][data-host-mode=negative]{color:var(--tui-negative-night)}:host[data-mode=onLight][data-host-mode=negative]._active,:host[data-mode=onLight][data-host-mode=negative]:active,:host[data-mode=onLight][data-host-mode=negative]:hover{color:var(--tui-negative-night-hover)}:host[data-mode=onDark]{color:var(--tui-text-03-night)}:host[data-mode=onDark]._active,:host[data-mode=onDark]:active,:host[data-mode=onDark]:hover{color:var(--tui-text-01-night)}:host[data-mode=onDark]._pseudo{color:var(--tui-text-01-night)}:host[data-mode=onDark]._pseudo .t-content{-webkit-text-decoration-color:rgba(255,255,255,.48);text-decoration-color:rgba(255,255,255,.48)}:host[data-mode=onDark]._pseudo._active,:host[data-mode=onDark]._pseudo:active,:host[data-mode=onDark]._pseudo:hover{color:var(--tui-text-03-night)}:host[data-mode=onDark][data-host-mode=positive]{color:var(--tui-positive-night)}:host[data-mode=onDark][data-host-mode=positive]._active,:host[data-mode=onDark][data-host-mode=positive]:active,:host[data-mode=onDark][data-host-mode=positive]:hover{color:var(--tui-positive-night-hover)}:host[data-host-mode=negative]{color:var(--tui-negative)}:host[data-host-mode=negative]:hover{color:var(--tui-negative-hover)}:host[data-host-mode=negative]._pseudo .t-content{-webkit-text-decoration-color:rgba(222,76,30,.48);text-decoration-color:rgba(222,76,30,.48)}:host[data-host-mode=positive]{color:var(--tui-positive)}:host[data-host-mode=positive]:hover{color:var(--tui-positive-hover)}:host[data-host-mode=positive]._pseudo .t-content{-webkit-text-decoration-color:rgba(58,169,129,.48);text-decoration-color:rgba(58,169,129,.48)}.t-content{display:inline-block}:host._focus-visible .t-content{background:var(--tui-selection)}:host[data-mode=onLight]._focus-visible .t-content{background:var(--tui-clear);color:var(--tui-text-01)}:host[data-mode=onDark]._focus-visible .t-content{background:var(--tui-clear-inverse);color:var(--tui-text-01-night)}:host[data-host-mode=positive]._focus-visible .t-content{background:var(--tui-success-bg)}:host[data-host-mode=negative]._focus-visible .t-content{background:var(--tui-error-bg)}:host._pseudo .t-content{padding-bottom:.15em;-webkit-text-decoration:underline dashed rgba(51,111,238,.48);text-decoration:underline dashed rgba(51,111,238,.48);text-underline-offset:.2em;text-decoration-thickness:.7px}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-top:-.125rem;opacity:.8}.t-icon_left{margin-right:.25rem}.t-icon_right{margin-left:.25rem}:host:hover .t-icon{opacity:1}:host._icon-rotated .t-icon{transform:rotate(180deg)}"]
116
116
  }),
117
117
  __param(0, Inject(ElementRef)),
118
118
  __param(1, Inject(TUI_MODE)),
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-link.js","sources":["ng://@taiga-ui/core/components/link/link.component.ts","ng://@taiga-ui/core/components/link/link.module.ts","ng://@taiga-ui/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiNativeFocusableElement,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {merge, Observable} from 'rxjs';\nimport {mapTo} from 'rxjs/operators';\n\n// @bad TODO: Think about extending Interactive\n@Component({\n selector: 'a[tuiLink], button[tuiLink]',\n templateUrl: './link.template.html',\n styleUrls: ['./link.style.less'],\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiLinkComponent),\n },\n TuiFocusVisibleService,\n TuiDestroyService,\n MODE_PROVIDER,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'tuiLink',\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiLinkComponent implements TuiFocusableElementAccessor {\n @Input()\n @HostBinding('class._pseudo')\n @tuiDefaultProp()\n pseudo = false;\n\n // TODO: Remove `null` in 3.0\n @Input()\n @tuiDefaultProp()\n icon: string | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n @Input()\n @HostBinding('class._icon-rotated')\n @tuiDefaultProp()\n iconRotated = false;\n\n @Input()\n @HostBinding('attr.data-host-mode')\n @tuiDefaultProp()\n mode: 'positive' | 'negative' | null = null;\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n readonly focusedChange = merge(\n typedFromEvent(this.elementRef.nativeElement, 'focusin').pipe(mapTo(true)),\n typedFromEvent(this.elementRef.nativeElement, 'focusout').pipe(mapTo(false)),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<TuiNativeFocusableElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TuiFocusVisibleService)\n focusVisible$: TuiFocusVisibleService,\n ) {\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement {\n return this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get hasIcon(): boolean {\n return this.icon !== null;\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","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\n\nimport {TuiLinkComponent} from './link.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiLinkComponent],\n exports: [TuiLink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Y,EAAE,YAAY,CAAC;YACrC,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACXA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-link.js","sources":["ng://@taiga-ui/core/components/link/link.component.ts","ng://@taiga-ui/core/components/link/link.module.ts","ng://@taiga-ui/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiNativeFocusableElement,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {merge, Observable} from 'rxjs';\nimport {mapTo} from 'rxjs/operators';\n\n// @bad TODO: Think about extending Interactive\n@Component({\n selector: 'a[tuiLink], button[tuiLink]',\n templateUrl: './link.template.html',\n styleUrls: ['./link.style.less'],\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiLinkComponent),\n },\n TuiFocusVisibleService,\n TuiDestroyService,\n MODE_PROVIDER,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'tuiLink',\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiLinkComponent implements TuiFocusableElementAccessor {\n @Input()\n @HostBinding('class._pseudo')\n @tuiDefaultProp()\n pseudo = false;\n\n // TODO: 3.0 Remove `null`\n @Input()\n @tuiDefaultProp()\n icon: string | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n @Input()\n @HostBinding('class._icon-rotated')\n @tuiDefaultProp()\n iconRotated = false;\n\n @Input()\n @HostBinding('attr.data-host-mode')\n @tuiDefaultProp()\n mode: 'positive' | 'negative' | null = null;\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n readonly focusedChange = merge(\n typedFromEvent(this.elementRef.nativeElement, 'focusin').pipe(mapTo(true)),\n typedFromEvent(this.elementRef.nativeElement, 'focusout').pipe(mapTo(false)),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<TuiNativeFocusableElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TuiFocusVisibleService)\n focusVisible$: TuiFocusVisibleService,\n ) {\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement {\n return this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get hasIcon(): boolean {\n return this.icon !== null;\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","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\n\nimport {TuiLinkComponent} from './link.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiLinkComponent],\n exports: [TuiLinkComponent],\n})\nexport class TuiLinkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAyBA;;IAqDI,0BAEqB,UAAiD,EACvC,KAAuC,EAElE,aAAqC;QALzC,iBAUC;QARoB,eAAU,GAAV,UAAU,CAAuC;QACvC,UAAK,GAAL,KAAK,CAAkC;QAhCtE,WAAM,GAAG,KAAK,CAAC;;QAKf,SAAI,GAAk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AAc,EAAE;oDACF;IAKf;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;kDACU;IAI3B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;uDAC2B;IAK5C;QAHC,KAAK,EAAE;QACP,WAAW,CAAC,qBAAqB,CAAC;QAClC,cAAc,EAAE;yDACG;IAKpB;QAHC,KAAK,EAAE;QACP,WAAW,CAAC,qBAAqB,CAAC;QAClC,cAAc,EAAE;kDAC2B;IAG5C;QADC,WAAW,CAAC,sBAAsB,CAAC;0DACf;IA1BZ,gBAAgB;QAnB5B,SAAS,CAAC;YACP,QAAQ,EAAE,6BAA6B;YACvC,kTAAmC;YAEnC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,2BAA2B;oBACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,kBAAgB,GAAA,CAAC;iBAClD;gBACD,sBAAsB;gBACtB,iBAAiB;gBACjB,aAAa;aAChB;YACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE;gBACF,oBAAoB,EAAE,OAAO;aAChC;;SACJ,CAAC;QAmCO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChB,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;OArC1B,gBAAgB,CAgE5B;IAAD,uBAAC;CAhED;;;IClCA;KAA6B;IAAhB,aAAa;QALzB,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;YACrC,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACXA;;;;;;"}
@@ -1,11 +1,8 @@
1
- import { __assign, __decorate, __param, __read } from 'tslib';
1
+ import { __assign, __decorate, __param } from 'tslib';
2
2
  import { DOCUMENT, CommonModule } from '@angular/common';
3
- import { InjectionToken, Inject, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, NgZone, Directive, NgModule } from '@angular/core';
4
- import { USER_AGENT, ANIMATION_FRAME } from '@ng-web-apis/common';
5
- import { isEdgeOlderThan, isIE, isSafari, blurNativeFocused, isNativeFocusedIn, TUI_IS_IOS, tuiDefaultProp, tuiRequiredSetter, tuiZonefree, TuiDestroyService } from '@taiga-ui/cdk';
3
+ import { InjectionToken, Inject, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
4
+ import { isSafari, blurNativeFocused, isNativeFocusedIn, TUI_IS_IOS, tuiDefaultProp, tuiRequiredSetter } from '@taiga-ui/cdk';
6
5
  import { sizeBigger } from '@taiga-ui/core/utils/miscellaneous';
7
- import { Observable } from 'rxjs';
8
- import { pairwise, takeUntil } from 'rxjs/operators';
9
6
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
10
7
 
11
8
  /** Default values for the loader options. */
@@ -24,19 +21,17 @@ var tuiLoaderOptionsProvider = function (options) { return ({
24
21
 
25
22
  // @dynamic
26
23
  var TuiLoaderComponent = /** @class */ (function () {
27
- function TuiLoaderComponent(documentRef, elementRef, userAgent, isIos, options) {
24
+ function TuiLoaderComponent(documentRef, elementRef, isIos, options) {
28
25
  this.documentRef = documentRef;
29
26
  this.elementRef = elementRef;
30
- this.userAgent = userAgent;
31
27
  this.isIos = isIos;
32
28
  this.options = options;
33
29
  this.size = this.options.size;
34
30
  this.inheritColor = this.options.inheritColor;
35
31
  this.overlay = this.options.overlay;
36
- // TODO: Remove null in 3.0
32
+ // TODO: 3.0 Remove null
37
33
  this.textContent = null;
38
34
  this.loading = true;
39
- this.animatedWithJs = isEdgeOlderThan(17, this.userAgent) || isIE(this.userAgent);
40
35
  this.isApple = isSafari(this.elementRef.nativeElement) || this.isIos;
41
36
  }
42
37
  Object.defineProperty(TuiLoaderComponent.prototype, "showLoader", {
@@ -81,7 +76,6 @@ var TuiLoaderComponent = /** @class */ (function () {
81
76
  TuiLoaderComponent.ctorParameters = function () { return [
82
77
  { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
83
78
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
84
- { type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] },
85
79
  { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
86
80
  { type: undefined, decorators: [{ type: Inject, args: [TUI_LOADER_OPTIONS,] }] }
87
81
  ]; };
@@ -108,89 +102,28 @@ var TuiLoaderComponent = /** @class */ (function () {
108
102
  __decorate([
109
103
  HostBinding('class._loading')
110
104
  ], TuiLoaderComponent.prototype, "loading", void 0);
111
- __decorate([
112
- HostBinding('class._animated-with-js')
113
- ], TuiLoaderComponent.prototype, "animatedWithJs", void 0);
114
105
  TuiLoaderComponent = __decorate([
115
106
  Component({
116
107
  selector: 'tui-loader',
117
108
  template: "<fieldset\n class=\"t-content\"\n [class.t-content_has-overlay]=\"hasOverlay\"\n [class.t-content_loading]=\"loading\"\n [disabled]=\"loading && !isApple\"\n>\n <ng-content></ng-content>\n</fieldset>\n\n<div\n *ngIf=\"loading\"\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal\"\n [class.t-loader_inherit-color]=\"inheritColor\"\n [attr.data-tui-element-size]=\"size\"\n>\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"50\"\n stroke-dasharray=\"314\"\n class=\"t-circle\"\n ></circle>\n </svg>\n\n <div\n *ngIf=\"hasText\"\n polymorpheus-outlet\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal\"\n [content]=\"textContent\"\n ></div>\n</div>\n",
118
109
  changeDetection: ChangeDetectionStrategy.OnPush,
119
- styles: ["@-webkit-keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@-webkit-keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}@keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}:host{position:relative;display:flex}:host._loading{overflow:hidden}.t-content{z-index:0;min-width:100%;height:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:100%;flex-shrink:0;align-self:center;color:var(--tui-text-01);stroke:var(--tui-primary);-webkit-animation:tuiFadeIn var(--tui-duration);animation:tuiFadeIn var(--tui-duration)}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-loader[data-tui-element-size=xs]{font-size:.75rem;stroke-width:38}.t-loader[data-tui-element-size='s']{font-size:1rem;stroke-width:25}.t-loader[data-tui-element-size='m']{font-size:1.5rem;stroke-width:17}.t-loader[data-tui-element-size='l']{font-size:2.5rem;stroke-width:15}.t-loader[data-tui-element-size=xl]{font-size:3.5rem;stroke-width:14}.t-loader[data-tui-element-size=xxl]{font-size:5rem;stroke-width:10}.t-text{font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1rem;color:inherit;max-width:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0 0 0 1rem}.t-icon{display:block;min-width:1em;max-width:1em;min-height:1em;max-height:1em;margin:.25rem -.5em;border-radius:100%;overflow:hidden;transform:scale(1,-1)}:host:not(._animated-with-js) .t-icon{-webkit-animation:3s linear infinite tuiLoaderRotate;animation:3s linear infinite tuiLoaderRotate}.t-circle{fill:none;stroke:inherit;stroke-width:inherit;-webkit-animation:3s linear infinite tuiLoaderDashOffset;animation:3s linear infinite tuiLoaderDashOffset}"]
110
+ styles: ["@-webkit-keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@-webkit-keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}@keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}:host{position:relative;display:flex}:host._loading{overflow:hidden}.t-content{z-index:0;min-width:100%;height:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:100%;flex-shrink:0;align-self:center;color:var(--tui-text-01);stroke:var(--tui-primary);-webkit-animation:tuiFadeIn var(--tui-duration);animation:tuiFadeIn var(--tui-duration)}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-loader[data-tui-element-size=xs]{font-size:.75rem;stroke-width:38}.t-loader[data-tui-element-size='s']{font-size:1rem;stroke-width:25}.t-loader[data-tui-element-size='m']{font-size:1.5rem;stroke-width:17}.t-loader[data-tui-element-size='l']{font-size:2.5rem;stroke-width:15}.t-loader[data-tui-element-size=xl]{font-size:3.5rem;stroke-width:14}.t-loader[data-tui-element-size=xxl]{font-size:5rem;stroke-width:10}.t-text{font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1rem;color:inherit;max-width:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0 0 0 1rem}.t-icon{display:block;min-width:1em;max-width:1em;min-height:1em;max-height:1em;margin:.25rem -.5em;border-radius:100%;overflow:hidden;transform:scale(1,-1);-webkit-animation:3s linear infinite tuiLoaderRotate;animation:3s linear infinite tuiLoaderRotate}.t-circle{fill:none;stroke:inherit;stroke-width:inherit;-webkit-animation:3s linear infinite tuiLoaderDashOffset;animation:3s linear infinite tuiLoaderDashOffset}"]
120
111
  }),
121
112
  __param(0, Inject(DOCUMENT)),
122
113
  __param(1, Inject(ElementRef)),
123
- __param(2, Inject(USER_AGENT)),
124
- __param(3, Inject(TUI_IS_IOS)),
125
- __param(4, Inject(TUI_LOADER_OPTIONS))
114
+ __param(2, Inject(TUI_IS_IOS)),
115
+ __param(3, Inject(TUI_LOADER_OPTIONS))
126
116
  ], TuiLoaderComponent);
127
117
  return TuiLoaderComponent;
128
118
  }());
129
119
 
130
- var PERIMETER = 314;
131
- var COEFFICIENT = 1.5;
132
- /**
133
- * @deprecated
134
- */
135
- var TuiLoaderDirective = /** @class */ (function () {
136
- function TuiLoaderDirective(animationFrame$, ngZone, destroy$, elementRef, userAgent) {
137
- var _this = this;
138
- this.elementRef = elementRef;
139
- this.strokeDasharray = PERIMETER;
140
- this.strokeDashoffset = 0;
141
- if (!isEdgeOlderThan(17, userAgent) && !isIE(userAgent)) {
142
- return;
143
- }
144
- animationFrame$
145
- .pipe(tuiZonefree(ngZone), pairwise(), takeUntil(destroy$))
146
- .subscribe(function (_a) {
147
- var _b = __read(_a, 2), cur = _b[0], prev = _b[1];
148
- _this.animate(prev - cur);
149
- });
150
- }
151
- TuiLoaderDirective.prototype.animate = function (delta) {
152
- if (this.strokeDasharray < 0) {
153
- this.strokeDasharray = PERIMETER * 2;
154
- this.strokeDashoffset = 0;
155
- }
156
- var strokeDasharray = Math.abs(this.strokeDasharray - PERIMETER);
157
- var fps = 1000 / delta;
158
- var offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);
159
- var style = this.elementRef.nativeElement.style;
160
- style.strokeDashoffset = String(this.strokeDashoffset);
161
- style.strokeDasharray = PERIMETER - strokeDasharray + " " + strokeDasharray;
162
- this.strokeDasharray -= PERIMETER / COEFFICIENT / fps;
163
- this.strokeDashoffset += (offsetStep * PERIMETER) / COEFFICIENT / fps;
164
- // this.elementRef.nativeElement.parentElement!.style.animation = 'none';
165
- };
166
- TuiLoaderDirective.ctorParameters = function () { return [
167
- { type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
168
- { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
169
- { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
170
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
171
- { type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
172
- ]; };
173
- TuiLoaderDirective = __decorate([
174
- Directive({
175
- selector: 'circle',
176
- providers: [TuiDestroyService],
177
- }),
178
- __param(0, Inject(ANIMATION_FRAME)),
179
- __param(1, Inject(NgZone)),
180
- __param(2, Inject(TuiDestroyService)),
181
- __param(3, Inject(ElementRef)),
182
- __param(4, Inject(USER_AGENT))
183
- ], TuiLoaderDirective);
184
- return TuiLoaderDirective;
185
- }());
186
-
187
120
  var TuiLoaderModule = /** @class */ (function () {
188
121
  function TuiLoaderModule() {
189
122
  }
190
123
  TuiLoaderModule = __decorate([
191
124
  NgModule({
192
125
  imports: [CommonModule, PolymorpheusModule],
193
- declarations: [TuiLoaderComponent, TuiLoaderDirective],
126
+ declarations: [TuiLoaderComponent],
194
127
  exports: [TuiLoaderComponent],
195
128
  })
196
129
  ], TuiLoaderModule);
@@ -201,5 +134,5 @@ var TuiLoaderModule = /** @class */ (function () {
201
134
  * Generated bundle index. Do not edit.
202
135
  */
203
136
 
204
- export { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderDirective, TuiLoaderModule, tuiLoaderOptionsProvider };
137
+ export { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderModule, tuiLoaderOptionsProvider };
205
138
  //# sourceMappingURL=taiga-ui-core-components-loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-loader.js","sources":["ng://@taiga-ui/core/components/loader/loader-options.ts","ng://@taiga-ui/core/components/loader/loader.component.ts","ng://@taiga-ui/core/components/loader/loader.directive.ts","ng://@taiga-ui/core/components/loader/loader.module.ts","ng://@taiga-ui/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core/types';\n\nexport interface TuiLoaderOptions {\n readonly size: TuiSizeXS | TuiSizeXXL;\n readonly inheritColor: boolean;\n readonly overlay: boolean;\n}\n\n/** Default values for the loader options. */\nexport const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions = {\n size: 'm',\n inheritColor: false,\n overlay: false,\n};\n\nexport const TUI_LOADER_OPTIONS = new InjectionToken<TuiLoaderOptions>(\n 'Default parameters for loader component',\n {\n factory: () => TUI_LOADER_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiLoaderOptionsProvider: (\n options: Partial<TuiLoaderOptions>,\n) => ValueProvider = (options: Partial<TuiLoaderOptions>) => ({\n provide: TUI_LOADER_OPTIONS,\n useValue: {...TUI_LOADER_DEFAULT_OPTIONS, ...options},\n});\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n blurNativeFocused,\n isEdgeOlderThan,\n isIE,\n isNativeFocusedIn,\n isSafari,\n TUI_IS_IOS,\n tuiDefaultProp,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {sizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_LOADER_OPTIONS, TuiLoaderOptions} from './loader-options';\n\n// @dynamic\n@Component({\n selector: 'tui-loader',\n templateUrl: './loader.template.html',\n styleUrls: ['./loader.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiLoaderComponent {\n @Input()\n @tuiDefaultProp()\n size = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n inheritColor = this.options.inheritColor;\n\n @Input()\n @tuiDefaultProp()\n overlay = this.options.overlay;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n textContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiRequiredSetter()\n set showLoader(value: boolean) {\n // @bad TODO: https://github.com/angular/angular/issues/32083 think of a better way\n if (value && this.focused) {\n blurNativeFocused(this.documentRef);\n }\n\n this.loading = value;\n }\n\n @HostBinding('class._loading')\n loading = true;\n\n @HostBinding('class._animated-with-js')\n animatedWithJs = isEdgeOlderThan(17, this.userAgent) || isIE(this.userAgent);\n\n readonly isApple = isSafari(this.elementRef.nativeElement) || this.isIos;\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_LOADER_OPTIONS) private readonly options: TuiLoaderOptions,\n ) {}\n\n get hasOverlay(): boolean {\n return this.overlay && this.loading;\n }\n\n get hasText(): boolean {\n return !!this.textContent;\n }\n\n get isHorizontal(): boolean {\n return !sizeBigger(this.size);\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n}\n","import {Directive, ElementRef, Inject, NgZone} from '@angular/core';\nimport {ANIMATION_FRAME, USER_AGENT} from '@ng-web-apis/common';\nimport {isEdgeOlderThan, isIE, TuiDestroyService, tuiZonefree} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {pairwise, takeUntil} from 'rxjs/operators';\n\nconst PERIMETER = 314;\nconst COEFFICIENT = 1.5;\n\n/**\n * @deprecated\n */\n@Directive({\n selector: 'circle',\n providers: [TuiDestroyService],\n})\nexport class TuiLoaderDirective {\n private strokeDasharray = PERIMETER;\n\n private strokeDashoffset = 0;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ElementRef) private readonly elementRef: ElementRef<SVGCircleElement>,\n @Inject(USER_AGENT) userAgent: string,\n ) {\n if (!isEdgeOlderThan(17, userAgent) && !isIE(userAgent)) {\n return;\n }\n\n animationFrame$\n .pipe(tuiZonefree(ngZone), pairwise(), takeUntil(destroy$))\n .subscribe(([cur, prev]) => {\n this.animate(prev - cur);\n });\n }\n\n private animate(delta: number): void {\n if (this.strokeDasharray < 0) {\n this.strokeDasharray = PERIMETER * 2;\n this.strokeDashoffset = 0;\n }\n\n const strokeDasharray = Math.abs(this.strokeDasharray - PERIMETER);\n const fps = 1000 / delta;\n const offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);\n const {style} = this.elementRef.nativeElement;\n\n style.strokeDashoffset = String(this.strokeDashoffset);\n style.strokeDasharray = `${PERIMETER - strokeDasharray} ${strokeDasharray}`;\n\n this.strokeDasharray -= PERIMETER / COEFFICIENT / fps;\n this.strokeDashoffset += (offsetStep * PERIMETER) / COEFFICIENT / fps;\n // this.elementRef.nativeElement.parentElement!.style.animation = 'none';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLoaderComponent} from './loader.component';\nimport {TuiLoaderDirective} from './loader.directive';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule],\n declarations: [TuiLoaderComponent, TuiLoaderDirective],\n exports: [TuiLoaderComponent],\n})\nexport class TuiLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AASA;IACa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,KAAK;IACnB,OAAO,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,CAAC,eAAe,IAAI,SAAS,GAAG,WAAW,GAAG,GAAG,CAAC;QACtD,IAAI,CAAC,gBAAgB,IAAI,CAAC,UAAU,GAAG,SAAS,IAAI,WAAW,GAAG,GAAG,CAAC;;KAEzE;;gBAlC6C,UAAU,uBAAnD,MAAM,SAAC,eAAe;gBACC,MAAM,uBAA7B,MAAM,SAAC,MAAM;gBACuB,UAAU,uBAA9C,MAAM,SAAC,iBAAiB;gBACwB,UAAU,uBAA1D,MAAM,SAAC,UAAU;6CACjB,MAAM,SAAC,UAAU;;IAVb,kBAAkB;QAJ9B,SAAS,CAAC;YACP,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,CAAC,iBAAiB,CAAC;SACjC,CAAC;QAOO,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;QACvB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;OAVd,kBAAkB,CAyC9B;IAAD,yBAAC;CAzCD;;;ICJA;KAA+B;IAAlB,eAAe;QAL3B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;YAC3C,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;YACtD,OAAO,EAAE,CAAC,kBAAkB,CAAC;SAChC,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACZA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-loader.js","sources":["ng://@taiga-ui/core/components/loader/loader-options.ts","ng://@taiga-ui/core/components/loader/loader.component.ts","ng://@taiga-ui/core/components/loader/loader.module.ts","ng://@taiga-ui/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core/types';\n\nexport interface TuiLoaderOptions {\n readonly size: TuiSizeXS | TuiSizeXXL;\n readonly inheritColor: boolean;\n readonly overlay: boolean;\n}\n\n/** Default values for the loader options. */\nexport const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions = {\n size: 'm',\n inheritColor: false,\n overlay: false,\n};\n\nexport const TUI_LOADER_OPTIONS = new InjectionToken<TuiLoaderOptions>(\n 'Default parameters for loader component',\n {\n factory: () => TUI_LOADER_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiLoaderOptionsProvider: (\n options: Partial<TuiLoaderOptions>,\n) => ValueProvider = (options: Partial<TuiLoaderOptions>) => ({\n provide: TUI_LOADER_OPTIONS,\n useValue: {...TUI_LOADER_DEFAULT_OPTIONS, ...options},\n});\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n blurNativeFocused,\n isNativeFocusedIn,\n isSafari,\n TUI_IS_IOS,\n tuiDefaultProp,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {sizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_LOADER_OPTIONS, TuiLoaderOptions} from './loader-options';\n\n// @dynamic\n@Component({\n selector: 'tui-loader',\n templateUrl: './loader.template.html',\n styleUrls: ['./loader.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiLoaderComponent {\n @Input()\n @tuiDefaultProp()\n size = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n inheritColor = this.options.inheritColor;\n\n @Input()\n @tuiDefaultProp()\n overlay = this.options.overlay;\n\n // TODO: 3.0 Remove null\n @Input()\n @tuiDefaultProp()\n textContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiRequiredSetter()\n set showLoader(value: boolean) {\n // @bad TODO: https://github.com/angular/angular/issues/32083 think of a better way\n if (value && this.focused) {\n blurNativeFocused(this.documentRef);\n }\n\n this.loading = value;\n }\n\n @HostBinding('class._loading')\n loading = true;\n\n readonly isApple = isSafari(this.elementRef.nativeElement) || this.isIos;\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_LOADER_OPTIONS) private readonly options: TuiLoaderOptions,\n ) {}\n\n get hasOverlay(): boolean {\n return this.overlay && this.loading;\n }\n\n get hasText(): boolean {\n return !!this.textContent;\n }\n\n get isHorizontal(): boolean {\n return !sizeBigger(this.size);\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLoaderComponent} from './loader.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule],\n declarations: [TuiLoaderComponent],\n exports: [TuiLoaderComponent],\n})\nexport class TuiLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AASA;IACa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,KAAK;EAChB;IAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,cAAM,OAAA,0BAA0B,GAAA;CAC5C,EACH;IAEW,wBAAwB,GAEhB,UAAC,OAAkC,IAAK,QAAC;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,wBAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;ACND;;IAyCI,4BACuC,WAAqB,EACnB,UAAmC,EACnC,KAAc,EACN,OAAyB;QAHnC,gBAAW,GAAX,WAAW,CAAU;QACnB,eAAU,GAAV,UAAU,CAAyB;QACnC,UAAK,GA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