@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
1
  import { __decorate, __param } from 'tslib';
2
- import { Inject, ElementRef, Component, ChangeDetectionStrategy, NgZone, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
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
  let TuiHintsHostComponent = class TuiHintsHostComponent {
16
- constructor(options, elementRef, hints$) {
17
- this.options = options;
16
+ constructor(elementRef, hints$) {
18
17
  this.elementRef = elementRef;
19
18
  this.hints$ = hints$;
20
- this.animation = Object.assign({ value: '' }, this.options);
19
+ this.component = new PolymorpheusComponent(TuiHintBoxComponent);
21
20
  }
22
21
  get clientRect() {
23
22
  return this.elementRef.nativeElement.getBoundingClientRect();
@@ -29,24 +28,22 @@ let TuiHintsHostComponent = class TuiHintsHostComponent {
29
28
  }
30
29
  };
31
30
  TuiHintsHostComponent.ctorParameters = () => [
32
- { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
33
31
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
34
32
  { type: TuiHintService, decorators: [{ type: Inject, args: [TuiHintService,] }] }
35
33
  ];
36
34
  TuiHintsHostComponent = __decorate([
37
35
  Component({
38
36
  selector: 'tui-hints-host',
39
- 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",
37
+ 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",
40
38
  changeDetection: ChangeDetectionStrategy.OnPush,
41
- animations: [tuiFadeIn],
39
+ animations: [TUI_PARENT_ANIMATION],
42
40
  host: {
43
41
  'aria-live': 'polite',
44
42
  },
45
- styles: [":host{position:fixed;bottom:0;left:0;width:100%;height:0}.t-text{white-space:pre-wrap}"]
43
+ styles: [":host{position:fixed;bottom:0;left:0;width:100%;height:0}"]
46
44
  }),
47
- __param(0, Inject(TUI_ANIMATION_OPTIONS)),
48
- __param(1, Inject(ElementRef)),
49
- __param(2, Inject(TuiHintService))
45
+ __param(0, Inject(ElementRef)),
46
+ __param(1, Inject(TuiHintService))
50
47
  ], TuiHintsHostComponent);
51
48
 
52
49
  const SPACE = 8;
@@ -80,15 +77,21 @@ const reverseDirectionsHorizontal = {
80
77
  // Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
81
78
  // @dynamic
82
79
  let TuiHintBoxComponent = class TuiHintBoxComponent {
83
- constructor(animationFrame$, destroy$, ngZone, elementRef, windowRef, media, hintsHost) {
80
+ constructor(animationFrame$, destroy$, ngZone, options, elementRef, windowRef, media, hintsHost, context) {
81
+ this.options = options;
84
82
  this.elementRef = elementRef;
85
83
  this.windowRef = windowRef;
86
84
  this.media = media;
87
85
  this.hintsHost = hintsHost;
86
+ this.context = context;
87
+ this.animation = Object.assign({ value: '' }, this.options);
88
88
  animationFrame$
89
89
  .pipe(tuiZonefree(ngZone), takeUntil(destroy$))
90
90
  .subscribe(() => this.calculatePosition());
91
91
  }
92
+ get hint() {
93
+ return this.context.$implicit;
94
+ }
92
95
  get isUntouchable() {
93
96
  return this.hint instanceof TuiPointerHintDirective;
94
97
  }
@@ -245,17 +248,19 @@ TuiHintBoxComponent.ctorParameters = () => [
245
248
  { type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
246
249
  { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
247
250
  { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
251
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
248
252
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
249
253
  { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] },
250
254
  { type: undefined, decorators: [{ type: Inject, args: [TUI_MEDIA,] }] },
251
- { type: TuiHintsHostComponent, decorators: [{ type: Inject, args: [TuiHintsHostComponent,] }] }
255
+ { type: TuiHintsHostComponent, decorators: [{ type: Inject, args: [forwardRef(() => TuiHintsHostComponent),] }] },
256
+ { type: undefined, decorators: [{ type: Inject, args: [POLYMORPHEUS_CONTEXT,] }] }
252
257
  ];
253
258
  __decorate([
254
259
  ViewChild('arrow')
255
260
  ], TuiHintBoxComponent.prototype, "arrow", void 0);
256
261
  __decorate([
257
- Input()
258
- ], TuiHintBoxComponent.prototype, "hint", void 0);
262
+ HostBinding('@tuiFadeIn')
263
+ ], TuiHintBoxComponent.prototype, "animation", void 0);
259
264
  __decorate([
260
265
  tuiPure,
261
266
  HostBinding('class._untouchable')
@@ -266,27 +271,31 @@ __decorate([
266
271
  TuiHintBoxComponent = __decorate([
267
272
  Component({
268
273
  selector: 'tui-hint-box[hint]',
269
- 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",
274
+ 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",
270
275
  changeDetection: ChangeDetectionStrategy.OnPush,
271
276
  providers: [TuiDestroyService],
272
- 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}"]
277
+ animations: [tuiFadeIn],
278
+ 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}"]
273
279
  }),
274
280
  __param(0, Inject(ANIMATION_FRAME)),
275
281
  __param(1, Inject(TuiDestroyService)),
276
282
  __param(2, Inject(NgZone)),
277
- __param(3, Inject(ElementRef)),
278
- __param(4, Inject(WINDOW)),
279
- __param(5, Inject(TUI_MEDIA)),
280
- __param(6, Inject(TuiHintsHostComponent))
283
+ __param(3, Inject(TUI_ANIMATION_OPTIONS)),
284
+ __param(4, Inject(ElementRef)),
285
+ __param(5, Inject(WINDOW)),
286
+ __param(6, Inject(TUI_MEDIA)),
287
+ __param(7, Inject(forwardRef(() => TuiHintsHostComponent))),
288
+ __param(8, Inject(POLYMORPHEUS_CONTEXT))
281
289
  ], TuiHintBoxComponent);
282
290
 
283
291
  let TuiHintBoxModule = class TuiHintBoxModule {
284
292
  };
285
293
  TuiHintBoxModule = __decorate([
286
294
  NgModule({
287
- imports: [CommonModule],
295
+ imports: [CommonModule, PolymorpheusModule],
288
296
  declarations: [TuiHintBoxComponent],
289
297
  exports: [TuiHintBoxComponent],
298
+ entryComponents: [TuiHintBoxComponent],
290
299
  })
291
300
  ], TuiHintBoxModule);
292
301
 
@@ -303,7 +312,6 @@ TuiHintsHostModule = __decorate([
303
312
  ],
304
313
  declarations: [TuiHintsHostComponent],
305
314
  exports: [TuiHintsHostComponent],
306
- entryComponents: [TuiHintsHostComponent],
307
315
  })
308
316
  ], TuiHintsHostModule);
309
317
 
@@ -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":";;;;;;;;;;;;;;IAkBa,qBAAqB,GAAlC,MAAa,qBAAqB;IAM9B,YACoD,OAAyB,EACpC,UAAmC,EACvC,MAAsB;QAFP,YAAO,GAAP,OAAO,CAAkB;QACpC,eAAU,GAAV,UAAU,CAAy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B;YAChB,gBAAgB;YAChB,mBAAmB;SACtB;QACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;QAChC,eAAe,EAAE,CAAC,qBAAqB,CAAC;KAC3C,CAAC;GACW,kBAAkB,CAAG;;ACpBlC;;;;;;"}
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":";;;;;;;;;;;;;;IAmBa,qBAAqB,GAAlC,MAAa,qBAAqB;IAG9B,YACyC,UAAmC,EACvC,MAAsB;QADlB,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgB;QAJlD,cAAS,GAAG,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;KAKhE;IAEJ,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;KAChE;IAED,SAAS,CAAC,OAAgB,EAAE,SAA0B;QAClD,IAAI,SAAS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AC;QAC9B,eAAe,EAAE,CAAC,mBAAmB,CAAC;KACzC,CAAC;GACW,gBAAgB,CAAG;;ICOnB,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAX9B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;SACtB;QACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACnBlC;;;;;;"}
@@ -10,7 +10,7 @@ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
10
10
  let TuiLabelComponent = class TuiLabelComponent {
11
11
  constructor(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":";;;;;;;;;IA0Ba,iBAAiB,GAA9B,MAAa,iBAAiB;IAgB1B,YAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;;QAZ9E,UAAK,GAAwB,EAAE,CAAC;QAIhC,YAAO,GAAqC;YACxC,SAAS,EAAE,IAAI;SAClB,CAAC;KAMgF;EACrF;;YADiD,UAAU,uBAA3C,MAAM,SAAC,QAAQ;;AAZ5B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;gDACe;AAIhC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;kDAGf;AAIF;IAFC,YAAY,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,gBAAgB,CAAC;kDACD;AAdpB,iBAAiB;IAV7B,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,2RAAoC;QAEpC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAiBe,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;GAhBpB,iBAAiB,CAiB7B;;ICjCY,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAL1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC/B,CAAC;GACW,cAAc,CAAG;;ACV9B;;;;;;"}
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":";;;;;;;;;IA0Ba,iBAAiB,GAA9B,MAAa,iBAAiB;IAgB1B,YAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;;QAZ9E,UAAK,GAAwB,EAAE,CAAC;QAIhC,YAAO,GAAqC;YACxC,SAAS,EAAE,IAAI;SAClB,CAAC;KAMgF;EACrF;;YADiD,UAAU,uBAA3C,MAAM,SAAC,QAAQ;;AAZ5B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;gDACe;AAIhC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;kDAGf;AAIF;IAFC,YAAY,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,gBAAgB,CAAC;kDACD;AAdpB,iBAAiB;IAV7B,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,2RAAoC;QAEpC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAiBe,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;GAhBpB,iBAAiB,CAiB7B;;ICjCY,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAL1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC/B,CAAC;GACW,cAAc,CAAG;;ACV9B;;;;;;"}
@@ -15,7 +15,7 @@ let TuiLinkComponent = TuiLinkComponent_1 = class TuiLinkComponent {
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;
@@ -91,7 +91,7 @@ TuiLinkComponent = TuiLinkComponent_1 = __decorate([
91
91
  host: {
92
92
  '($.data-mode.attr)': 'mode$',
93
93
  },
94
- 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)}"]
94
+ 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)}"]
95
95
  }),
96
96
  __param(0, Inject(ElementRef)),
97
97
  __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: [TuiLinkComponent],\n})\nexport class TuiLinkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAyBA;IAoBa,gBAAgB,wBAA7B,MAAa,gBAAgB;IAiCzB,YAEqB,UAAiD,EACvC,KAAuC,EAElE,aAAqC;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,cAAc,EAAE;gDACF;AAKf;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;8CACU;AAI3B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mDAC2B;AAK5C;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,qBAAqB,CAAC;IAClC,cAAc,EAAE;qDACG;AAKpB;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,qBAAqB,CAAC;IAClC,cAAc,EAAE;8CAC2B;AAG5C;IADC,WAAW,CAAC,sBAAsB,CAAC;sDACf;AA1BZ,gBAAgB;IAnB5B,SAAS,CAAC;QACP,QAAQ,EAAE,6BAA6B;QACvC,kTAAmC;QAEnC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAgB,CAAC;aAClD;YACD,sBAAsB;YACtB,iBAAiB;YACjB,aAAa;SAChB;QACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAmCO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAElB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;GArC1B,gBAAgB,CAgE5B;;IClGY,aAAa,GAA1B,MAAa,aAAa;EAAG;AAAhB,aAAa;IALzB,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,gBAAgB,CAAC;QAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;KAC9B,CAAC;GACW,aAAa,CAAG;;ACX7B;;;;;;"}
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;IAoBa,gBAAgB,wBAA7B,MAAa,gBAAgB;IAiCzB,YAEqB,UAAiD,EACvC,KAAuC,EAElE,aAAqC;QAHpB,eAAU,GAAV,UAAU,CAAuC;QACvC,UAAK,GAAL,KAAK,CAAkC;QAhCtE,WAAM,GAAG,KAAK,CAAC;;QAKf,SAAI,GAAkB,IAAI,CAAC;QAI3B,cAAS,GAA2B,OAAO,CAAC;QAK5C,gBAAW,GAAG,KAAK,CAAC;QAKpB,SAAI,GAAmC,IAAI,CAAC;QAG5C,iBAAY,GAAG,KAAK,CAAC;QAEZ,kBAAa,GAAG,KAAK,CAC1B,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EA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QAEnC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAgB,CAAC;aAClD;YACD,sBAAsB;YACtB,iBAAiB;YACjB,aAAa;SAChB;QACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAmCO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAElB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;GArC1B,gBAAgB,CAgE5B;;IClGY,aAAa,GAA1B,MAAa,aAAa;EAAG;AAAhB,aAAa;IALzB,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,gBAAgB,CAAC;QAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;KAC9B,CAAC;GACW,aAAa,CAAG;;ACX7B;;;;;;"}
@@ -1,11 +1,8 @@
1
1
  import { __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 @@ const tuiLoaderOptionsProvider = (options) => ({
24
21
 
25
22
  // @dynamic
26
23
  let TuiLoaderComponent = class TuiLoaderComponent {
27
- constructor(documentRef, elementRef, userAgent, isIos, options) {
24
+ constructor(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
  set showLoader(value) {
@@ -62,7 +57,6 @@ let TuiLoaderComponent = class TuiLoaderComponent {
62
57
  TuiLoaderComponent.ctorParameters = () => [
63
58
  { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
64
59
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
65
- { type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] },
66
60
  { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
67
61
  { type: undefined, decorators: [{ type: Inject, args: [TUI_LOADER_OPTIONS,] }] }
68
62
  ];
@@ -89,83 +83,25 @@ __decorate([
89
83
  __decorate([
90
84
  HostBinding('class._loading')
91
85
  ], TuiLoaderComponent.prototype, "loading", void 0);
92
- __decorate([
93
- HostBinding('class._animated-with-js')
94
- ], TuiLoaderComponent.prototype, "animatedWithJs", void 0);
95
86
  TuiLoaderComponent = __decorate([
96
87
  Component({
97
88
  selector: 'tui-loader',
98
89
  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",
99
90
  changeDetection: ChangeDetectionStrategy.OnPush,
100
- 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}"]
91
+ 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}"]
101
92
  }),
102
93
  __param(0, Inject(DOCUMENT)),
103
94
  __param(1, Inject(ElementRef)),
104
- __param(2, Inject(USER_AGENT)),
105
- __param(3, Inject(TUI_IS_IOS)),
106
- __param(4, Inject(TUI_LOADER_OPTIONS))
95
+ __param(2, Inject(TUI_IS_IOS)),
96
+ __param(3, Inject(TUI_LOADER_OPTIONS))
107
97
  ], TuiLoaderComponent);
108
98
 
109
- const PERIMETER = 314;
110
- const COEFFICIENT = 1.5;
111
- /**
112
- * @deprecated
113
- */
114
- let TuiLoaderDirective = class TuiLoaderDirective {
115
- constructor(animationFrame$, ngZone, destroy$, elementRef, userAgent) {
116
- this.elementRef = elementRef;
117
- this.strokeDasharray = PERIMETER;
118
- this.strokeDashoffset = 0;
119
- if (!isEdgeOlderThan(17, userAgent) && !isIE(userAgent)) {
120
- return;
121
- }
122
- animationFrame$
123
- .pipe(tuiZonefree(ngZone), pairwise(), takeUntil(destroy$))
124
- .subscribe(([cur, prev]) => {
125
- this.animate(prev - cur);
126
- });
127
- }
128
- animate(delta) {
129
- if (this.strokeDasharray < 0) {
130
- this.strokeDasharray = PERIMETER * 2;
131
- this.strokeDashoffset = 0;
132
- }
133
- const strokeDasharray = Math.abs(this.strokeDasharray - PERIMETER);
134
- const fps = 1000 / delta;
135
- const offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);
136
- const { style } = this.elementRef.nativeElement;
137
- style.strokeDashoffset = String(this.strokeDashoffset);
138
- style.strokeDasharray = `${PERIMETER - strokeDasharray} ${strokeDasharray}`;
139
- this.strokeDasharray -= PERIMETER / COEFFICIENT / fps;
140
- this.strokeDashoffset += (offsetStep * PERIMETER) / COEFFICIENT / fps;
141
- // this.elementRef.nativeElement.parentElement!.style.animation = 'none';
142
- }
143
- };
144
- TuiLoaderDirective.ctorParameters = () => [
145
- { type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
146
- { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
147
- { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
148
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
149
- { type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
150
- ];
151
- TuiLoaderDirective = __decorate([
152
- Directive({
153
- selector: 'circle',
154
- providers: [TuiDestroyService],
155
- }),
156
- __param(0, Inject(ANIMATION_FRAME)),
157
- __param(1, Inject(NgZone)),
158
- __param(2, Inject(TuiDestroyService)),
159
- __param(3, Inject(ElementRef)),
160
- __param(4, Inject(USER_AGENT))
161
- ], TuiLoaderDirective);
162
-
163
99
  let TuiLoaderModule = class TuiLoaderModule {
164
100
  };
165
101
  TuiLoaderModule = __decorate([
166
102
  NgModule({
167
103
  imports: [CommonModule, PolymorpheusModule],
168
- declarations: [TuiLoaderComponent, TuiLoaderDirective],
104
+ declarations: [TuiLoaderComponent],
169
105
  exports: [TuiLoaderComponent],
170
106
  })
171
107
  ], TuiLoaderModule);
@@ -174,5 +110,5 @@ TuiLoaderModule = __decorate([
174
110
  * Generated bundle index. Do not edit.
175
111
  */
176
112
 
177
- export { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderDirective, TuiLoaderModule, tuiLoaderOptionsProvider };
113
+ export { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderModule, tuiLoaderOptionsProvider };
178
114
  //# 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;MACa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,KAAK;EAChB;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;ACHD;IAOa,kBAAkB,GAA/B,MAAa,kBAAkB;IAqC3B,YACuC,WAAqB,EACnB,UAAmC,EACnC,SAAiB,EACjB,KAAc,EACN,OAAyB;QAJnC,gBAAW,GAAX,WAAW,CAAU;QACnB,eAAU,GAAV,UAAU,CAAyB;QACnC,cAAS,GAAT,SAAS,CAAQ;QACjB,UAAK,GAAL,KAAK,CAAS;QACN,YAAO,GAAP,OAAO,CAAkB;QAvC1E,SAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAIzB,iBAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;QAIzC,YAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;;QAK/B,gBAAW,GAA+B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B,eAAe;IAL3B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;QAC3C,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QACtD,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;ACZ/B;;;;;;"}
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":";;;;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