@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
@@ -15,7 +15,7 @@ function shouldFocus({ currentTarget, }) {
15
15
  }
16
16
  // TODO: Consider all use cases for aria roles
17
17
  let TuiOptionComponent = class TuiOptionComponent {
18
- // TODO: Fix dataList type when updated to Ivy and compilation drops metadata
18
+ // TODO: 3.0 Fix dataList type when updated to Ivy and compilation drops metadata
19
19
  constructor(content, dataList, elementRef, host, dropdown) {
20
20
  this.content = content;
21
21
  this.dataList = dataList;
@@ -81,14 +81,14 @@ __decorate([
81
81
  TuiOptionComponent = __decorate([
82
82
  Component({
83
83
  selector: `button[tuiOption], a[tuiOption]`,
84
- template: "<span\n *ngIf=\"content; else base\"\n polymorpheus-outlet\n class=\"content\"\n [content]=\"content\"\n [context]=\"{$implicit: base}\"\n></span>\n<ng-template #base>\n <ng-content></ng-content>\n <tui-svg\n *ngIf=\"dropdown\"\n src=\"tuiIconChevronRight\"\n class=\"arrow\"\n ></tui-svg>\n</ng-template>\n",
84
+ template: "<span\n *ngIf=\"content; else base\"\n polymorpheus-outlet\n class=\"t-content\"\n [content]=\"content\"\n [context]=\"{$implicit: base}\"\n></span>\n<ng-template #base>\n <ng-content></ng-content>\n <tui-svg\n *ngIf=\"dropdown\"\n src=\"tuiIconChevronRight\"\n class=\"t-arrow\"\n ></tui-svg>\n</ng-template>\n",
85
85
  changeDetection: ChangeDetectionStrategy.OnPush,
86
86
  host: {
87
87
  tabIndex: '-1',
88
88
  type: 'button',
89
89
  '[attr.disabled]': 'disabled || null',
90
90
  },
91
- styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 1rem;border:0;background:padding-box;font-size:inherit;line-height:inherit;transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;font:var(--tui-font-text-m);width:100%;align-items:center;justify-content:space-between;text-align:left;box-sizing:border-box;color:var(--tui-text-01);outline:0;text-decoration:none;cursor:pointer;border-top:8px solid transparent;border-bottom:8px solid transparent;margin:-.5rem 0}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host._with-dropdown,:host:focus{background-color:var(--tui-base-02)}:host[data-size=xs]{font:var(--tui-font-text-s);min-height:3rem}:host[data-size='s']{min-height:3rem}:host[data-size='m']{min-height:3.75rem}:host[data-size='l']{min-height:4.5rem}.content{display:flex;flex:1;max-width:100%}.arrow{margin:0 -.5rem 0 .75rem}"]
91
+ styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:padding-box;font-size:inherit;line-height:inherit;transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;font:var(--tui-font-text-m);width:100%;align-items:center;justify-content:space-between;text-align:left;box-sizing:border-box;color:var(--tui-text-01);outline:0;text-decoration:none;cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host._with-dropdown,:host:focus{background-color:var(--tui-base-02)}:host[data-size=xs]{font:var(--tui-font-text-s);min-height:2rem;padding:.3125rem .75rem}:host[data-size='s']{min-height:2rem;padding:.3125rem .75rem}:host[data-size='m']{min-height:2.75rem;padding:.375rem 1rem}:host[data-size='l']{min-height:3.5rem;padding:.75rem 1rem}.t-content{display:flex;flex:1;max-width:100%}.t-arrow{margin:0 -.5rem 0 .75rem}"]
92
92
  }),
93
93
  __param(0, Optional()),
94
94
  __param(0, Inject(TUI_OPTION_CONTENT)),
@@ -184,7 +184,7 @@ __decorate([
184
184
  TuiDataListComponent = TuiDataListComponent_1 = __decorate([
185
185
  Component({
186
186
  selector: 'tui-data-list',
187
- template: "<div\n tabindex=\"0\"\n class=\"trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n polymorpheus-outlet\n class=\"empty\"\n [content]=\"emptyContent || (defaultEmptyContent$ | async)\"\n></div>\n<div\n tabindex=\"0\"\n class=\"trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n",
187
+ template: "<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n polymorpheus-outlet\n class=\"t-empty\"\n [content]=\"emptyContent || (defaultEmptyContent$ | async)\"\n></div>\n<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n",
188
188
  changeDetection: ChangeDetectionStrategy.OnPush,
189
189
  encapsulation: ViewEncapsulation.None,
190
190
  providers: [
@@ -193,7 +193,7 @@ TuiDataListComponent = TuiDataListComponent_1 = __decorate([
193
193
  useExisting: forwardRef(() => TuiDataListComponent_1),
194
194
  },
195
195
  ],
196
- styles: ["tui-data-list{display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:.5rem 0;color:var(--tui-text-03)}tui-data-list:focus-within .trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list>.empty{margin:.75rem 1rem}tui-opt-group{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;font:var(--tui-font-text-xs);flex-direction:column;line-height:2rem;padding:.5rem 0;margin:-.5rem 0}tui-opt-group:empty:after,tui-opt-group:empty:before{display:none}tui-opt-group:before{content:attr(data-label);padding:0 1rem;color:var(--tui-text-02)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-top:1rem}tui-opt-group:not(:empty)~tui-opt-group:after{content:'';position:absolute;left:0;right:0;top:.4375rem;height:1px;background:var(--tui-base-03)}"]
196
+ styles: ["tui-data-list{display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:.5rem 0;color:var(--tui-text-03)}tui-data-list:focus-within .t-trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list>.t-empty{margin:.75rem 1rem}tui-opt-group{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;font:var(--tui-font-text-xs);flex-direction:column;line-height:2rem}tui-opt-group:empty:after,tui-opt-group:empty:before{display:none}tui-opt-group:before{content:attr(data-label);padding:0 1rem;color:var(--tui-text-02)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-top:1rem}tui-opt-group:not(:empty)~tui-opt-group:after{content:'';position:absolute;left:0;right:0;top:.5rem;height:1px;background:var(--tui-base-03)}"]
197
197
  }),
198
198
  __param(0, Inject(ElementRef)),
199
199
  __param(1, Inject(TUI_NOTHING_FOUND_MESSAGE))
@@ -207,7 +207,7 @@ TuiDataListDirective = __decorate([
207
207
  })
208
208
  ], TuiDataListDirective);
209
209
 
210
- // TODO: Move into separate module in 3.0
210
+ // TODO: 3.0 Move into separate module
211
211
  let TuiDataListDropdownManagerDirective = class TuiDataListDropdownManagerDirective {
212
212
  constructor() {
213
213
  this.dropdowns = EMPTY_QUERY;
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-data-list.js","sources":["ng://@taiga-ui/core/components/data-list/option/option.component.ts","ng://@taiga-ui/core/components/data-list/data-list.component.ts","ng://@taiga-ui/core/components/data-list/data-list.directive.ts","ng://@taiga-ui/core/components/data-list/data-list-dropdown-manager.directive.ts","ng://@taiga-ui/core/components/data-list/opt-group.directive.ts","ng://@taiga-ui/core/components/data-list/data-list.module.ts","ng://@taiga-ui/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Self,\n TemplateRef,\n} from '@angular/core';\nimport {\n isNativeFocused,\n setNativeFocused,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiEventWith,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core/tokens';\nimport {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\n\nexport function shouldFocus({\n currentTarget,\n}: TuiEventWith<MouseEvent, HTMLElement>): boolean {\n return !isNativeFocused(currentTarget);\n}\n\n// TODO: Consider all use cases for aria roles\n@Component({\n selector: `button[tuiOption], a[tuiOption]`,\n templateUrl: './option.template.html',\n styleUrls: ['./option.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tabIndex: '-1',\n type: 'button',\n '[attr.disabled]': 'disabled || null',\n },\n})\nexport class TuiOptionComponent<T = unknown> implements OnDestroy {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = 'm';\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiOptionRole = 'option';\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n value?: T;\n\n // TODO: Fix dataList type when updated to Ivy and compilation drops metadata\n constructor(\n @Optional()\n @Inject(TUI_OPTION_CONTENT)\n readonly content: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n > | null,\n @Inject(forwardRef(() => TuiDataListComponent))\n private readonly dataList: any,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DATA_LIST_HOST)\n private readonly host: TuiDataListHost<T> | null,\n @Optional()\n @Self()\n @Inject(TuiDropdownDirective)\n readonly dropdown: TuiDropdownDirective | null,\n ) {}\n\n @HostBinding('class._with-dropdown')\n get active(): boolean {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n @shouldCall(shouldFocus)\n @HostListener('mousemove.init', ['$event'])\n @HostListener('mousemove.silent', ['$event'])\n onMouseMove({currentTarget}: TuiEventWith<MouseEvent, HTMLElement>): void {\n setNativeFocused(currentTarget, true, true);\n }\n\n // Preventing focus loss upon focused option removal\n ngOnDestroy(): void {\n this.dataList.handleFocusLossIfNecessary(this.elementRef.nativeElement);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n isNativeFocusedIn,\n isPresent,\n itemsQueryListObservable,\n moveFocus,\n setNativeMouseFocused,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_ACCESSOR, TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TuiDataListRole} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiOptionComponent} from './option/option.component';\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n// @dynamic\n@Component({\n selector: 'tui-data-list',\n templateUrl: './data-list.template.html',\n styleUrls: ['./data-list.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListComponent),\n },\n ],\n})\nexport class TuiDataListComponent<T> implements TuiDataListAccessor<T> {\n @ContentChildren(forwardRef(() => TuiOptionComponent), {descendants: true})\n private readonly options: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiDataListRole = 'listbox';\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = '';\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_NOTHING_FOUND_MESSAGE)\n readonly defaultEmptyContent$: Observable<string>,\n ) {}\n\n @tuiPure\n get empty$(): Observable<boolean> {\n return itemsQueryListObservable(this.options).pipe(map(({length}) => !length));\n }\n\n @HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])\n onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n @HostListener('mousedown.prevent')\n noop(): void {}\n\n @HostListener('keydown.arrowDown.prevent', ['$event.target', '1'])\n @HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])\n onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n moveFocus(elements.indexOf(current), elements, step);\n }\n\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n @HostListener('wheel.silent.passive', ['$event.currentTarget'])\n @HostListener('mouseleave', ['$event.target'])\n handleFocusLossIfNecessary(element: HTMLElement): void {\n if (this.origin && isNativeFocusedIn(element)) {\n setNativeMouseFocused(this.origin, true, true);\n }\n }\n\n getOptions(includeDisabled: boolean = false): readonly T[] {\n return this.options\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n\n onFocus({target}: Event, top: boolean): void {\n tuiAssertIsHTMLElement(target);\n\n const {elements} = this;\n\n moveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));\n }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n","import {\n AfterViewInit,\n ContentChildren,\n Directive,\n ElementRef,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getClosestKeyboardFocusable,\n itemsQueryListObservable,\n preventDefault,\n setNativeFocused,\n tuiPure,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n mapTo,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs/operators';\n\n// TODO: Move into separate module in 3.0\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManagerDirective implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n ngAfterViewInit(): void {\n this.right$.subscribe(index => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap(active => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.open = index === active;\n });\n\n const element = this.elements.toArray()[active];\n const dropdown = this.dropdowns.toArray()[active];\n\n if (!element || !dropdown || !dropdown.dropdownBoxRef) {\n return EMPTY;\n }\n\n const {nativeElement} = dropdown.dropdownBoxRef.location;\n const mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(\n take(1),\n );\n const esc$ = merge(\n typedFromEvent(element.nativeElement, 'keydown'),\n typedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({keyCode}) => keyCode === 27));\n\n return merge(mouseEnter$, esc$).pipe(\n tap(event => {\n if (dropdown.dropdownBoxRef) {\n event.stopPropagation();\n }\n\n setNativeFocused(element.nativeElement);\n // TODO: iframe warning\n dropdown.open = event instanceof MouseEvent;\n }),\n );\n }),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return itemsQueryListObservable(this.elements).pipe(\n map(array => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'keydown').pipe(\n filter(({keyCode}) => keyCode === 39),\n preventDefault(),\n mapTo(index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'click').pipe(mapTo(index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n merge(\n typedFromEvent(element, 'focus'),\n typedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n const dropdown = this.dropdowns.toArray()[index];\n\n return (\n !dropdown ||\n !dropdown.dropdownBoxRef ||\n !dropdown.dropdownBoxRef.location.nativeElement.contains(element)\n );\n }\n\n private tryToFocus(index: number): void {\n const dropdown = this.dropdowns.toArray()[index];\n const content =\n dropdown &&\n dropdown.dropdownBoxRef &&\n dropdown.dropdownBoxRef.instance.contentElementRef;\n\n if (!content) {\n return;\n }\n\n const item = getClosestKeyboardFocusable(\n content.nativeElement,\n false,\n content.nativeElement,\n );\n\n if (item) {\n setNativeFocused(item);\n }\n }\n}\n","import {Directive, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n },\n})\nexport class TuiOptGroupDirective {\n @Input()\n @HostBinding('attr.data-label')\n @tuiDefaultProp()\n label = '';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';\nimport {TuiOptGroupDirective} from './opt-group.directive';\nimport {TuiOptionComponent} from './option/option.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, PolymorpheusModule],\n declarations: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n exports: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n})\nexport class TuiDataListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;SA8BgB,WAAW,CAAC,EACxB,aAAa,GACuB;IACpC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAED;IAYa,kBAAkB,GAA/B,MAAa,kBAAkB;;IAmB3B,YAGa,OAED,EAES,QAAa,EACO,UAAmC,EAGvD,IAA+B,EAIvC,QAAqC;QAZrC,YAAO,GAAP,OAAO,CAER;QAES,aAAQ,GAAR,QAAQ,CAAK;QACO,eAAU,GAAV,U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GACW,iBAAiB,CAAG;;AC5BjC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-data-list.js","sources":["ng://@taiga-ui/core/components/data-list/option/option.component.ts","ng://@taiga-ui/core/components/data-list/data-list.component.ts","ng://@taiga-ui/core/components/data-list/data-list.directive.ts","ng://@taiga-ui/core/components/data-list/data-list-dropdown-manager.directive.ts","ng://@taiga-ui/core/components/data-list/opt-group.directive.ts","ng://@taiga-ui/core/components/data-list/data-list.module.ts","ng://@taiga-ui/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Self,\n TemplateRef,\n} from '@angular/core';\nimport {\n isNativeFocused,\n setNativeFocused,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiEventWith,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core/tokens';\nimport {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\n\nexport function shouldFocus({\n currentTarget,\n}: TuiEventWith<MouseEvent, HTMLElement>): boolean {\n return !isNativeFocused(currentTarget);\n}\n\n// TODO: Consider all use cases for aria roles\n@Component({\n selector: `button[tuiOption], a[tuiOption]`,\n templateUrl: './option.template.html',\n styleUrls: ['./option.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tabIndex: '-1',\n type: 'button',\n '[attr.disabled]': 'disabled || null',\n },\n})\nexport class TuiOptionComponent<T = unknown> implements OnDestroy {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = 'm';\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiOptionRole = 'option';\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n value?: T;\n\n // TODO: 3.0 Fix dataList type when updated to Ivy and compilation drops metadata\n constructor(\n @Optional()\n @Inject(TUI_OPTION_CONTENT)\n readonly content: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n > | null,\n @Inject(forwardRef(() => TuiDataListComponent))\n private readonly dataList: any,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DATA_LIST_HOST)\n private readonly host: TuiDataListHost<T> | null,\n @Optional()\n @Self()\n @Inject(TuiDropdownDirective)\n readonly dropdown: TuiDropdownDirective | null,\n ) {}\n\n @HostBinding('class._with-dropdown')\n get active(): boolean {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n @shouldCall(shouldFocus)\n @HostListener('mousemove.init', ['$event'])\n @HostListener('mousemove.silent', ['$event'])\n onMouseMove({currentTarget}: TuiEventWith<MouseEvent, HTMLElement>): void {\n setNativeFocused(currentTarget, true, true);\n }\n\n // Preventing focus loss upon focused option removal\n ngOnDestroy(): void {\n this.dataList.handleFocusLossIfNecessary(this.elementRef.nativeElement);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n isNativeFocusedIn,\n isPresent,\n itemsQueryListObservable,\n moveFocus,\n setNativeMouseFocused,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_ACCESSOR, TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TuiDataListRole} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiOptionComponent} from './option/option.component';\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n// @dynamic\n@Component({\n selector: 'tui-data-list',\n templateUrl: './data-list.template.html',\n styleUrls: ['./data-list.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListComponent),\n },\n ],\n})\nexport class TuiDataListComponent<T> implements TuiDataListAccessor<T> {\n @ContentChildren(forwardRef(() => TuiOptionComponent), {descendants: true})\n private readonly options: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiDataListRole = 'listbox';\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = '';\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_NOTHING_FOUND_MESSAGE)\n readonly defaultEmptyContent$: Observable<string>,\n ) {}\n\n @tuiPure\n get empty$(): Observable<boolean> {\n return itemsQueryListObservable(this.options).pipe(map(({length}) => !length));\n }\n\n @HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])\n onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n @HostListener('mousedown.prevent')\n noop(): void {}\n\n @HostListener('keydown.arrowDown.prevent', ['$event.target', '1'])\n @HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])\n onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n moveFocus(elements.indexOf(current), elements, step);\n }\n\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n @HostListener('wheel.silent.passive', ['$event.currentTarget'])\n @HostListener('mouseleave', ['$event.target'])\n handleFocusLossIfNecessary(element: HTMLElement): void {\n if (this.origin && isNativeFocusedIn(element)) {\n setNativeMouseFocused(this.origin, true, true);\n }\n }\n\n getOptions(includeDisabled: boolean = false): readonly T[] {\n return this.options\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n\n onFocus({target}: Event, top: boolean): void {\n tuiAssertIsHTMLElement(target);\n\n const {elements} = this;\n\n moveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));\n }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n","import {\n AfterViewInit,\n ContentChildren,\n Directive,\n ElementRef,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getClosestKeyboardFocusable,\n itemsQueryListObservable,\n preventDefault,\n setNativeFocused,\n tuiPure,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n mapTo,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs/operators';\n\n// TODO: 3.0 Move into separate module\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManagerDirective implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n ngAfterViewInit(): void {\n this.right$.subscribe(index => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap(active => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.open = index === active;\n });\n\n const element = this.elements.toArray()[active];\n const dropdown = this.dropdowns.toArray()[active];\n\n if (!element || !dropdown || !dropdown.dropdownBoxRef) {\n return EMPTY;\n }\n\n const {nativeElement} = dropdown.dropdownBoxRef.location;\n const mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(\n take(1),\n );\n const esc$ = merge(\n typedFromEvent(element.nativeElement, 'keydown'),\n typedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({keyCode}) => keyCode === 27));\n\n return merge(mouseEnter$, esc$).pipe(\n tap(event => {\n if (dropdown.dropdownBoxRef) {\n event.stopPropagation();\n }\n\n setNativeFocused(element.nativeElement);\n // TODO: iframe warning\n dropdown.open = event instanceof MouseEvent;\n }),\n );\n }),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return itemsQueryListObservable(this.elements).pipe(\n map(array => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'keydown').pipe(\n filter(({keyCode}) => keyCode === 39),\n preventDefault(),\n mapTo(index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'click').pipe(mapTo(index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n merge(\n typedFromEvent(element, 'focus'),\n typedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n const dropdown = this.dropdowns.toArray()[index];\n\n return (\n !dropdown ||\n !dropdown.dropdownBoxRef ||\n !dropdown.dropdownBoxRef.location.nativeElement.contains(element)\n );\n }\n\n private tryToFocus(index: number): void {\n const dropdown = this.dropdowns.toArray()[index];\n const content =\n dropdown &&\n dropdown.dropdownBoxRef &&\n dropdown.dropdownBoxRef.instance.contentElementRef;\n\n if (!content) {\n return;\n }\n\n const item = getClosestKeyboardFocusable(\n content.nativeElement,\n false,\n content.nativeElement,\n );\n\n if (item) {\n setNativeFocused(item);\n }\n }\n}\n","import {Directive, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n },\n})\nexport class TuiOptGroupDirective {\n @Input()\n @HostBinding('attr.data-label')\n @tuiDefaultProp()\n label = '';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';\nimport {TuiOptGroupDirective} from './opt-group.directive';\nimport {TuiOptionComponent} from './option/option.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, PolymorpheusModule],\n declarations: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n exports: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n})\nexport class TuiDataListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;SA8BgB,WAAW,CAAC,EACxB,aAAa,GACuB;IACpC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAED;IAYa,kBAAkB,GAA/B,MAAa,kBAAkB;;IAmB3B,YAGa,OAED,EAES,QAAa,EACO,UAAmC,EAGvD,IAA+B,EAIvC,QAAqC;QAZrC,YAAO,GAAP,OAAO,CAER;QAES,aAAQ,GAAR,QAAQ,CAAK;QACO,eAAU,GAAV,UAAU,CAAyB;QAGvD,SAAI,GAAJ,IAAI,CAA2B;QAIvC,aAAQ,GAAR,QAAQ,CAA6B;QA9BlD,SAAI,GAAyB,GAAG,CAAC;QAKjC,SAAI,GAAkB,QAAQ,CAAC;QAI/B,aAAQ,GAAG,KAAK,CAAC;KAsBb;IAGJ,IAAI,MAAM;QACN,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;KAC5D;IAGD,OAAO;QACH,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YACvC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtC;KACJ;;IAMD,WAAW,CAAC,EAAC,aAAa,EAAwC;QAC9D,gBAAgB,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;KAC/C;;IAGD,WAAW;QACP,IAAI,CAAC,QAAQ,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;KAC3E;EACJ;;4CAzCQ,QAAQ,YACR,MAAM,SAAC,kBAAkB;4CAIzB,MAAM,SAAC,UAAU,CAAC,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AS,CAAC;QACP,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE;YACF,IAAI,EAAE,OAAO;SAChB;KACJ,CAAC;GACW,oBAAoB,CAKhC;;ICcY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAjB7B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACzD,YAAY,EAAE;YACV,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;KACJ,CAAC;GACW,iBAAiB,CAAG;;AC5BjC;;;;;;"}
@@ -119,7 +119,7 @@ TuiDialogComponent = __decorate([
119
119
  changeDetection: ChangeDetectionStrategy.OnPush,
120
120
  providers: TUI_DIALOG_PROVIDERS,
121
121
  animations: [tuiSlideInTop, tuiFadeIn],
122
- styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:40px solid transparent}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 1.125rem 1.875rem rgba(0,0,0,.48);content:'';border-radius:inherit;pointer-events:none}:host[data-size='s']{width:30rem}:host[data-size='s'] .t-content{padding:1.5rem}:host[data-size='s'] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}:host[data-size='m']{width:42.5rem}:host[data-size='m'] .t-heading{margin-bottom:.75rem;font:var(--tui-font-heading-4)}:host[data-size='l']{width:55rem}:host[data-size='l'] .t-heading{margin-bottom:1rem}:host[data-size=fullscreen],:host[data-size=page]{width:100vw;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-base-01)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - (45rem / 2))}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{margin-bottom:1rem}:host[data-size=page] .t-content{padding:0}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-width:100vw;width:100vw;max-width:100vw;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:2rem 1.5rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:2rem;background:var(--tui-base-01)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper{position:-webkit-sticky;position:sticky;top:0;order:-1}.t-close{transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;color:var(--tui-base-01);background:rgba(104,104,104,.96)}.t-close:hover{background:rgba(159,159,159,.86)}:host:not([data-size=fullscreen]) .t-close{-webkit-animation:tuiFadeIn var(--tui-duration);animation:tuiFadeIn var(--tui-duration)}:host:not([data-size=fullscreen]).ng-animating .t-close{display:none}:host-context(tui-root._mobile) .t-close{position:absolute;top:0;right:0;background:0 0;color:var(--tui-base-06)}:host-context(tui-root._mobile) .t-close:hover{color:var(--tui-base-07)}.t-buttons{margin-top:1.25rem;text-align:right}"]
122
+ styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 1.125rem 1.875rem rgba(0,0,0,.48);content:'';border-radius:inherit;pointer-events:none}:host[data-size='s']{width:30rem}:host[data-size='s'] .t-content{padding:1.5rem}:host[data-size='s'] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}:host[data-size='m']{width:42.5rem}:host[data-size='m'] .t-heading{margin-bottom:.75rem;font:var(--tui-font-heading-4)}:host[data-size='l']{width:55rem}:host[data-size='l'] .t-heading{margin-bottom:1rem}:host[data-size=fullscreen],:host[data-size=page]{width:100vw;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-base-01)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - (45rem / 2))}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{margin-bottom:1rem}:host[data-size=page] .t-content{padding:0}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-width:100vw;width:100vw;max-width:100vw;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:2rem 1.5rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:2rem;background:var(--tui-base-01)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper{position:-webkit-sticky;position:sticky;top:0;order:-1}.t-close{transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;color:var(--tui-base-01);background:rgba(104,104,104,.96)}.t-close:hover{background:rgba(159,159,159,.86)}:host:not([data-size=fullscreen]) .t-close{-webkit-animation:tuiFadeIn var(--tui-duration);animation:tuiFadeIn var(--tui-duration)}:host:not([data-size=fullscreen]).ng-animating .t-close{display:none}:host-context(tui-root._mobile) .t-close{position:absolute;top:0;right:0;background:0 0;color:var(--tui-base-06)}:host-context(tui-root._mobile) .t-close:hover{color:var(--tui-base-07)}.t-buttons{margin-top:1.25rem;text-align:right}"]
123
123
  }),
124
124
  __param(0, Inject(TUI_ANIMATIONS_DURATION)),
125
125
  __param(1, Inject(TUI_IS_MOBILE)),
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from 'tslib';
2
2
  import { Inject, NgZone, ElementRef, HostBinding, ViewChild, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import { WINDOW, ANIMATION_FRAME } from '@ng-web-apis/common';
4
- import { POLLING_TIME, tuiZonefree, getClosestElement, inRange, px, tuiAssertIsHTMLElement, getClosestFocusable, setNativeFocused, TuiDestroyService, TuiDropdownHostComponent, AbstractTuiPortalHostComponent, tuiPure, TuiActiveZoneModule, TuiOverscrollModule } from '@taiga-ui/cdk';
4
+ import { POLLING_TIME, tuiZonefree, inRange, px, tuiAssertIsHTMLElement, getClosestFocusable, TuiDestroyService, TuiDropdownHostComponent, AbstractTuiPortalHostComponent, tuiPure, TuiActiveZoneModule, TuiOverscrollModule } from '@taiga-ui/cdk';
5
5
  import { tuiDropdownAnimation } from '@taiga-ui/core/animations';
6
6
  import { DEFAULT_MARGIN, DEFAULT_MAX_WIDTH } from '@taiga-ui/core/constants';
7
7
  import { TUI_DROPDOWN_DIRECTIVE, TUI_ANIMATION_OPTIONS } from '@taiga-ui/core/tokens';
@@ -54,7 +54,11 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
54
54
  }
55
55
  get inModal() {
56
56
  // @awful TODO: get rid of component tag name dependency
57
- return !!getClosestElement(this.directive.host, 'tui-dialog-host');
57
+ return !!this.directive.host.closest('tui-dialog-host');
58
+ }
59
+ get inOption() {
60
+ // @awful TODO: get rid of component tag name dependency
61
+ return !!this.directive.host.closest('[tuiOption]');
58
62
  }
59
63
  calculatePositionAndSize() {
60
64
  const { clientRect } = this.directive;
@@ -151,17 +155,26 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
151
155
  const topAvailableHeight = directiveRect.top - offset;
152
156
  const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;
153
157
  const finalDirection = this.getFinalDirection(directiveRect);
158
+ const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;
154
159
  this.prevDirectionIsTop = finalDirection === 'top';
155
160
  if (finalDirection === 'top') {
156
161
  this.dropdownAnimation = this.animationBottom;
157
162
  style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));
158
163
  style.top = 'auto';
159
- style.bottom = px(hostRect.bottom - directiveRect.top - DEFAULT_MARGIN + offset);
164
+ style.bottom = px(hostRect.bottom -
165
+ directiveRect.top -
166
+ DEFAULT_MARGIN +
167
+ offset -
168
+ optionOffset);
160
169
  }
161
170
  else {
162
171
  this.dropdownAnimation = this.animationTop;
163
172
  style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));
164
- style.top = px(directiveRect.bottom - hostRect.top - DEFAULT_MARGIN + offset);
173
+ style.top = px(directiveRect.bottom -
174
+ hostRect.top -
175
+ DEFAULT_MARGIN +
176
+ offset -
177
+ optionOffset);
165
178
  style.bottom = 'auto';
166
179
  }
167
180
  }
@@ -239,10 +252,7 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
239
252
  while (focusable !== null && host.contains(focusable)) {
240
253
  focusable = getClosestFocusable(focusable, previous, root);
241
254
  }
242
- if (focusable === null) {
243
- return;
244
- }
245
- setNativeFocused(focusable);
255
+ focusable === null || focusable === void 0 ? void 0 : focusable.focus();
246
256
  }
247
257
  };
248
258
  TuiDropdownBoxComponent.ctorParameters = () => [
@@ -267,6 +277,9 @@ __decorate([
267
277
  __decorate([
268
278
  tuiPure
269
279
  ], TuiDropdownBoxComponent.prototype, "inModal", null);
280
+ __decorate([
281
+ tuiPure
282
+ ], TuiDropdownBoxComponent.prototype, "inOption", null);
270
283
  TuiDropdownBoxComponent = __decorate([
271
284
  Component({
272
285
  selector: 'tui-dropdown-box',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-dropdown-box.js","sources":["ng://@taiga-ui/core/components/dropdown-box/dropdown-box.component.ts","ng://@taiga-ui/core/components/dropdown-box/dropdown-box.module.ts","ng://@taiga-ui/core/components/dropdown-box/taiga-ui-core-components-dropdown-box.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n AbstractTuiPortalHostComponent,\n getClosestElement,\n getClosestFocusable,\n inRange,\n POLLING_TIME,\n px,\n setNativeFocused,\n TuiActiveZoneDirective,\n tuiAssertIsHTMLElement,\n TuiDestroyService,\n TuiDropdownHostComponent,\n TuiOverscrollModeT,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {tuiDropdownAnimation} from '@taiga-ui/core/animations';\nimport {DEFAULT_MARGIN, DEFAULT_MAX_WIDTH} from '@taiga-ui/core/constants';\nimport {TuiDropdownAnimation} from '@taiga-ui/core/enums';\nimport {TuiAnimationOptions, TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\nimport {TuiHorizontalDirection, TuiVerticalDirection} from '@taiga-ui/core/types';\nimport {getScreenWidth} from '@taiga-ui/core/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {takeUntil, throttleTime} from 'rxjs/operators';\n\n/**\n * This component is used to show template in a portal using default style of white rounded box with a shadow\n */\n// @bad TODO: OnPush\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-dropdown-box',\n templateUrl: './dropdown-box.template.html',\n styleUrls: ['./dropdown-box.style.less'],\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [tuiDropdownAnimation],\n})\nexport class TuiDropdownBoxComponent implements AfterViewChecked {\n private readonly animationTop = {\n value: TuiDropdownAnimation.FadeInTop,\n ...this.options,\n };\n\n private readonly animationBottom = {\n value: TuiDropdownAnimation.FadeInBottom,\n ...this.options,\n };\n\n /**\n * Is previous position on top (to prevent jumping up and down on scroll)\n */\n private prevDirectionIsTop = false;\n\n @HostBinding('@tuiDropdownAnimation')\n dropdownAnimation!: TuiAnimationOptions;\n\n @ViewChild('content', {read: ElementRef})\n readonly contentElementRef?: ElementRef<HTMLElement>;\n\n constructor(\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_DROPDOWN_DIRECTIVE) readonly directive: TuiDropdown,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalHostComponent)\n private readonly portalHost: TuiDropdownHostComponent,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n merge(\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n this.directive.refresh$,\n fromEvent(this.windowRef, 'resize'),\n )\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => {\n this.calculatePositionAndSize();\n });\n }\n\n get overscroll(): TuiOverscrollModeT {\n return this.inModal ? 'all' : 'scroll';\n }\n\n @tuiPure\n getContext<T extends object>(\n context?: T,\n activeZone?: TuiActiveZoneDirective,\n ):\n | (T & {activeZone?: TuiActiveZoneDirective})\n | {activeZone?: TuiActiveZoneDirective} {\n return {...context, activeZone};\n }\n\n ngAfterViewChecked(): void {\n this.calculatePositionAndSize();\n }\n\n onTopFocus(): void {\n this.moveFocusOutside(true);\n }\n\n onBottomFocus(): void {\n this.moveFocusOutside(false);\n }\n\n @tuiPure\n private get inModal(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!getClosestElement(this.directive.host, 'tui-dialog-host');\n }\n\n private calculatePositionAndSize(): void {\n const {clientRect} = this.directive;\n const {style} = this.elementRef.nativeElement;\n const hostRect = this.directive.fixed\n ? this.portalHost.fixedPositionOffset()\n : this.portalHost.clientRect;\n\n style.position = this.directive.fixed ? 'fixed' : 'absolute';\n\n this.calculateVerticalPosition(style, clientRect, hostRect);\n this.calculateHorizontalPosition(style, clientRect, hostRect);\n this.calculateWidth(style, clientRect);\n }\n\n private getFinalAlign(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n ): TuiHorizontalDirection {\n const dropdownRect = this.elementRef.nativeElement.getBoundingClientRect();\n const dropdownWidth = this.elementRef.nativeElement.offsetWidth;\n const screenWidth = getScreenWidth(this.windowRef.document);\n const isDropdownSizeHypotheticallyFitsViewport =\n directiveRect.left + dropdownWidth < screenWidth ||\n directiveRect.right - dropdownWidth > 0;\n const isDropdownSizeActuallyFitsViewport =\n dropdownRect.right <= screenWidth && dropdownRect.left >= 0;\n let finalAlign: TuiHorizontalDirection = this.directive.align;\n\n switch (this.directive.align) {\n case 'left':\n if (\n isDropdownSizeHypotheticallyFitsViewport &&\n dropdownRect.right > screenWidth\n ) {\n finalAlign = 'right';\n }\n\n break;\n case 'right':\n if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {\n finalAlign = 'left';\n }\n\n break;\n }\n\n if (style.right === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'left';\n }\n\n if (style.left === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'right';\n }\n\n return finalAlign;\n }\n\n /**\n * Calculates horizontal position\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateHorizontalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const offset = this.directive.sided\n ? this.elementRef.nativeElement.getBoundingClientRect().width + DEFAULT_MARGIN\n : 0;\n const left = Math.ceil(directiveRect.left - hostRect.left - offset);\n const right = Math.floor(hostRect.right - directiveRect.right - offset);\n\n switch (this.getFinalAlign(style, directiveRect)) {\n case 'left':\n if (\n right + DEFAULT_MARGIN > this.windowRef.innerWidth ||\n inRange(left + DEFAULT_MARGIN, 0, this.windowRef.innerWidth)\n ) {\n style.left = px(left);\n style.right = 'auto';\n } else {\n style.left = 'auto';\n style.right = px(right);\n }\n\n break;\n case 'right':\n if (\n inRange(right + DEFAULT_MARGIN, 0, this.windowRef.innerWidth) ||\n left + DEFAULT_MARGIN > this.windowRef.innerWidth\n ) {\n style.left = 'auto';\n style.right = px(right);\n } else {\n style.left = px(left);\n style.right = 'auto';\n }\n\n break;\n }\n }\n\n /**\n * Calculates vertical position and height\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateVerticalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const windowHeight = this.windowRef.innerHeight;\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n const finalDirection = this.getFinalDirection(directiveRect);\n\n this.prevDirectionIsTop = finalDirection === 'top';\n\n if (finalDirection === 'top') {\n this.dropdownAnimation = this.animationBottom;\n\n style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));\n style.top = 'auto';\n style.bottom = px(\n hostRect.bottom - directiveRect.top - DEFAULT_MARGIN + offset,\n );\n } else {\n this.dropdownAnimation = this.animationTop;\n\n style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));\n style.top = px(directiveRect.bottom - hostRect.top - DEFAULT_MARGIN + offset);\n style.bottom = 'auto';\n }\n }\n\n private getFinalDirection(directiveRect: ClientRect): TuiVerticalDirection | null {\n const windowHeight = this.windowRef.innerHeight;\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n\n // Maximum space available on top and on the bottom in the viewport\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n\n let finalDirection: TuiVerticalDirection | null = null;\n\n // Given direction is applied if we can fit the box in the limits that way\n switch (this.directive.direction) {\n case 'top':\n if (topAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'top';\n }\n\n break;\n case 'bottom':\n if (bottomAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'bottom';\n }\n\n break;\n }\n\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n\n // Choose direction if given direction did not fit\n if (finalDirection === null && this.contentElementRef) {\n // Box height if it fits without scroll\n const visualHeight = Math.min(\n this.contentElementRef.nativeElement.getBoundingClientRect().height +\n (this.elementRef.nativeElement.offsetHeight -\n this.elementRef.nativeElement.clientHeight),\n boxHeightLimit,\n );\n\n // If there is enough space to fit below without scroll,\n // choose 'bottom', unless it was previously on the top\n if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {\n finalDirection = 'top';\n } else if (bottomAvailableHeight >= visualHeight) {\n finalDirection = 'bottom';\n } else {\n // Corner case — select direction with more space\n finalDirection =\n bottomAvailableHeight >= topAvailableHeight ? 'bottom' : 'top';\n }\n }\n\n return finalDirection;\n }\n\n /**\n * Calculates width\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n */\n private calculateWidth(style: CSSStyleDeclaration, directiveRect: ClientRect): void {\n style.width =\n this.directive.limitMinWidth === 'fixed' && !this.directive.sided\n ? px(directiveRect.width)\n : '';\n\n if (this.directive.limitMinWidth === 'min' && !this.directive.sided) {\n style.minWidth = px(directiveRect.width);\n style.maxWidth = px(DEFAULT_MAX_WIDTH);\n\n return;\n }\n\n style.minWidth = '';\n style.maxWidth = '';\n }\n\n private moveFocusOutside(previous: boolean): void {\n const {host} = this.directive;\n const {ownerDocument} = host;\n const root = ownerDocument ? ownerDocument.body : host;\n\n tuiAssertIsHTMLElement(host);\n\n let focusable = getClosestFocusable(host, previous, root);\n\n while (focusable !== null && host.contains(focusable)) {\n focusable = getClosestFocusable(focusable, previous, root);\n }\n\n if (focusable === null) {\n return;\n }\n\n setNativeFocused(focusable);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiOverscrollModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiModeModule} from '@taiga-ui/core/directives/mode';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDropdownBoxComponent} from './dropdown-box.component';\n\n@NgModule({\n imports: [\n TuiActiveZoneModule,\n PolymorpheusModule,\n TuiOverscrollModule,\n TuiScrollbarModule,\n TuiModeModule,\n ],\n entryComponents: [TuiDropdownBoxComponent],\n declarations: [TuiDropdownBoxComponent],\n exports: [TuiDropdownBoxComponent],\n})\nexport class TuiDropdownBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsCA;;;AAGA;AACA;AACA;IASa,uBAAuB,GAApC,MAAa,uBAAuB;IAsBhC,YAEI,QAA2B,EACX,MAAc,EACW,SAAsB,EAC9B,SAAiB,EACb,UAAmC,EAEvD,UAAoC,EACL,OAAyB,EAChD,eAAmC;QANnB,cAAS,GAAT,SAAS,CAAa;QAC9B,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAEvD,eAAU,GAAV,UAAU,CAA0B;QACL,YAAO,GAAP,OAAO,CAAkB;QA9B5D,iBAAY,mBACzB,KAAK,iCACF,IAAI,CAAC,OAAO,EACjB;QAEe,oBAAe,mBAC5B,KAAK,uCACF,IAAI,CAAC,OAAO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,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;IAC9B,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;IAEtC,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;GAhCnB,uBAAuB,CAwUnC;;ICxWY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAZhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,mBAAmB;YACnB,kBAAkB;YAClB,mBAAmB;YACnB,kBAAkB;YAClB,aAAa;SAChB;QACD,eAAe,EAAE,CAAC,uBAAuB,CAAC;QAC1C,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACpBpC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-dropdown-box.js","sources":["ng://@taiga-ui/core/components/dropdown-box/dropdown-box.component.ts","ng://@taiga-ui/core/components/dropdown-box/dropdown-box.module.ts","ng://@taiga-ui/core/components/dropdown-box/taiga-ui-core-components-dropdown-box.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n AbstractTuiPortalHostComponent,\n getClosestFocusable,\n inRange,\n POLLING_TIME,\n px,\n TuiActiveZoneDirective,\n tuiAssertIsHTMLElement,\n TuiDestroyService,\n TuiDropdownHostComponent,\n TuiOverscrollModeT,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {tuiDropdownAnimation} from '@taiga-ui/core/animations';\nimport {DEFAULT_MARGIN, DEFAULT_MAX_WIDTH} from '@taiga-ui/core/constants';\nimport {TuiDropdownAnimation} from '@taiga-ui/core/enums';\nimport {TuiAnimationOptions, TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\nimport {TuiHorizontalDirection, TuiVerticalDirection} from '@taiga-ui/core/types';\nimport {getScreenWidth} from '@taiga-ui/core/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {takeUntil, throttleTime} from 'rxjs/operators';\n\n/**\n * This component is used to show template in a portal using default style of white rounded box with a shadow\n */\n// @bad TODO: OnPush\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-dropdown-box',\n templateUrl: './dropdown-box.template.html',\n styleUrls: ['./dropdown-box.style.less'],\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [tuiDropdownAnimation],\n})\nexport class TuiDropdownBoxComponent implements AfterViewChecked {\n private readonly animationTop = {\n value: TuiDropdownAnimation.FadeInTop,\n ...this.options,\n };\n\n private readonly animationBottom = {\n value: TuiDropdownAnimation.FadeInBottom,\n ...this.options,\n };\n\n /**\n * Is previous position on top (to prevent jumping up and down on scroll)\n */\n private prevDirectionIsTop = false;\n\n @HostBinding('@tuiDropdownAnimation')\n dropdownAnimation!: TuiAnimationOptions;\n\n @ViewChild('content', {read: ElementRef})\n readonly contentElementRef?: ElementRef<HTMLElement>;\n\n constructor(\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_DROPDOWN_DIRECTIVE) readonly directive: TuiDropdown,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalHostComponent)\n private readonly portalHost: TuiDropdownHostComponent,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n merge(\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n this.directive.refresh$,\n fromEvent(this.windowRef, 'resize'),\n )\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => {\n this.calculatePositionAndSize();\n });\n }\n\n get overscroll(): TuiOverscrollModeT {\n return this.inModal ? 'all' : 'scroll';\n }\n\n @tuiPure\n getContext<T extends object>(\n context?: T,\n activeZone?: TuiActiveZoneDirective,\n ):\n | (T & {activeZone?: TuiActiveZoneDirective})\n | {activeZone?: TuiActiveZoneDirective} {\n return {...context, activeZone};\n }\n\n ngAfterViewChecked(): void {\n this.calculatePositionAndSize();\n }\n\n onTopFocus(): void {\n this.moveFocusOutside(true);\n }\n\n onBottomFocus(): void {\n this.moveFocusOutside(false);\n }\n\n @tuiPure\n private get inModal(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest('tui-dialog-host');\n }\n\n @tuiPure\n private get inOption(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest('[tuiOption]');\n }\n\n private calculatePositionAndSize(): void {\n const {clientRect} = this.directive;\n const {style} = this.elementRef.nativeElement;\n const hostRect = this.directive.fixed\n ? this.portalHost.fixedPositionOffset()\n : this.portalHost.clientRect;\n\n style.position = this.directive.fixed ? 'fixed' : 'absolute';\n\n this.calculateVerticalPosition(style, clientRect, hostRect);\n this.calculateHorizontalPosition(style, clientRect, hostRect);\n this.calculateWidth(style, clientRect);\n }\n\n private getFinalAlign(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n ): TuiHorizontalDirection {\n const dropdownRect = this.elementRef.nativeElement.getBoundingClientRect();\n const dropdownWidth = this.elementRef.nativeElement.offsetWidth;\n const screenWidth = getScreenWidth(this.windowRef.document);\n const isDropdownSizeHypotheticallyFitsViewport =\n directiveRect.left + dropdownWidth < screenWidth ||\n directiveRect.right - dropdownWidth > 0;\n const isDropdownSizeActuallyFitsViewport =\n dropdownRect.right <= screenWidth && dropdownRect.left >= 0;\n let finalAlign: TuiHorizontalDirection = this.directive.align;\n\n switch (this.directive.align) {\n case 'left':\n if (\n isDropdownSizeHypotheticallyFitsViewport &&\n dropdownRect.right > screenWidth\n ) {\n finalAlign = 'right';\n }\n\n break;\n case 'right':\n if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {\n finalAlign = 'left';\n }\n\n break;\n }\n\n if (style.right === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'left';\n }\n\n if (style.left === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'right';\n }\n\n return finalAlign;\n }\n\n /**\n * Calculates horizontal position\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateHorizontalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const offset = this.directive.sided\n ? this.elementRef.nativeElement.getBoundingClientRect().width + DEFAULT_MARGIN\n : 0;\n const left = Math.ceil(directiveRect.left - hostRect.left - offset);\n const right = Math.floor(hostRect.right - directiveRect.right - offset);\n\n switch (this.getFinalAlign(style, directiveRect)) {\n case 'left':\n if (\n right + DEFAULT_MARGIN > this.windowRef.innerWidth ||\n inRange(left + DEFAULT_MARGIN, 0, this.windowRef.innerWidth)\n ) {\n style.left = px(left);\n style.right = 'auto';\n } else {\n style.left = 'auto';\n style.right = px(right);\n }\n\n break;\n case 'right':\n if (\n inRange(right + DEFAULT_MARGIN, 0, this.windowRef.innerWidth) ||\n left + DEFAULT_MARGIN > this.windowRef.innerWidth\n ) {\n style.left = 'auto';\n style.right = px(right);\n } else {\n style.left = px(left);\n style.right = 'auto';\n }\n\n break;\n }\n }\n\n /**\n * Calculates vertical position and height\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateVerticalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const windowHeight = this.windowRef.innerHeight;\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n const finalDirection = this.getFinalDirection(directiveRect);\n const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;\n\n this.prevDirectionIsTop = finalDirection === 'top';\n\n if (finalDirection === 'top') {\n this.dropdownAnimation = this.animationBottom;\n\n style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));\n style.top = 'auto';\n style.bottom = px(\n hostRect.bottom -\n directiveRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n } else {\n this.dropdownAnimation = this.animationTop;\n\n style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));\n style.top = px(\n directiveRect.bottom -\n hostRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n style.bottom = 'auto';\n }\n }\n\n private getFinalDirection(directiveRect: ClientRect): TuiVerticalDirection | null {\n const windowHeight = this.windowRef.innerHeight;\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n\n // Maximum space available on top and on the bottom in the viewport\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n\n let finalDirection: TuiVerticalDirection | null = null;\n\n // Given direction is applied if we can fit the box in the limits that way\n switch (this.directive.direction) {\n case 'top':\n if (topAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'top';\n }\n\n break;\n case 'bottom':\n if (bottomAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'bottom';\n }\n\n break;\n }\n\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n\n // Choose direction if given direction did not fit\n if (finalDirection === null && this.contentElementRef) {\n // Box height if it fits without scroll\n const visualHeight = Math.min(\n this.contentElementRef.nativeElement.getBoundingClientRect().height +\n (this.elementRef.nativeElement.offsetHeight -\n this.elementRef.nativeElement.clientHeight),\n boxHeightLimit,\n );\n\n // If there is enough space to fit below without scroll,\n // choose 'bottom', unless it was previously on the top\n if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {\n finalDirection = 'top';\n } else if (bottomAvailableHeight >= visualHeight) {\n finalDirection = 'bottom';\n } else {\n // Corner case — select direction with more space\n finalDirection =\n bottomAvailableHeight >= topAvailableHeight ? 'bottom' : 'top';\n }\n }\n\n return finalDirection;\n }\n\n /**\n * Calculates width\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n */\n private calculateWidth(style: CSSStyleDeclaration, directiveRect: ClientRect): void {\n style.width =\n this.directive.limitMinWidth === 'fixed' && !this.directive.sided\n ? px(directiveRect.width)\n : '';\n\n if (this.directive.limitMinWidth === 'min' && !this.directive.sided) {\n style.minWidth = px(directiveRect.width);\n style.maxWidth = px(DEFAULT_MAX_WIDTH);\n\n return;\n }\n\n style.minWidth = '';\n style.maxWidth = '';\n }\n\n private moveFocusOutside(previous: boolean): void {\n const {host} = this.directive;\n const {ownerDocument} = host;\n const root = ownerDocument ? ownerDocument.body : host;\n\n tuiAssertIsHTMLElement(host);\n\n let focusable = getClosestFocusable(host, previous, root);\n\n while (focusable !== null && host.contains(focusable)) {\n focusable = getClosestFocusable(focusable, previous, root);\n }\n\n focusable?.focus();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiOverscrollModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiModeModule} from '@taiga-ui/core/directives/mode';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDropdownBoxComponent} from './dropdown-box.component';\n\n@NgModule({\n imports: [\n TuiActiveZoneModule,\n PolymorpheusModule,\n TuiOverscrollModule,\n TuiScrollbarModule,\n TuiModeModule,\n ],\n entryComponents: [TuiDropdownBoxComponent],\n declarations: [TuiDropdownBoxComponent],\n exports: [TuiDropdownBoxComponent],\n})\nexport class TuiDropdownBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA;;;AAGA;AACA;AACA;IASa,uBAAuB,GAApC,MAAa,uBAAuB;IAsBhC,YAEI,QAA2B,EACX,MAAc,EACW,SAAsB,EAC9B,SAAiB,EACb,UAAmC,EAEvD,UAAoC,EACL,OAAyB,EAChD,eAAmC;QANnB,cAAS,GAAT,SAAS,CAAa;QAC9B,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAEvD,eAAU,GAAV,UAAU,CAA0B;QACL,YAAO,GAAP,OAAO,CAAkB;QA9B5D,iBAAY,mBACzB,KAAK,iCACF,IAAI,CAAC,OAAO,EACjB;QAEe,oBAAe,mBAC5B,KAAK,uCACF,IAAI,CAAC,OAAO,EACjB;;;;QAKM,uBAAkB,GAAG,KAAK,CAAC;QAoB/B,KAAK,CACD,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAChD,IAAI,CAAC,SAAS,CAAC,QAAQ,EACvB,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CACtC;aACI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC9C,SAAS,CAAC;YACP,IAAI,CAAC,wBAAwB,EAAE,CAAC;SACnC,CAAC,CAAC;KACV;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CA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8B,CAAC,CAAA;IAEtC,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;GAhCnB,uBAAuB,CAqVnC;;ICnXY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAZhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,mBAAmB;YACnB,kBAAkB;YAClB,mBAAmB;YACnB,kBAAkB;YAClB,aAAa;SAChB;QACD,eAAe,EAAE,CAAC,uBAAuB,CAAC;QAC1C,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACpBpC;;;;;;"}
@@ -5,7 +5,7 @@ import { TUI_EXPAND_LOADED } from '@taiga-ui/core/constants';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import { TuiLoaderModule } from '@taiga-ui/core/components/loader';
7
7
 
8
- // @bad TODO Replace with PolymorpheusContent
8
+ // @bad TODO: 3.0 Replace with PolymorpheusContent
9
9
  let TuiExpandContentDirective = class TuiExpandContentDirective {
10
10
  };
11
11
  TuiExpandContentDirective = __decorate([
@@ -132,7 +132,7 @@ __decorate([
132
132
  TuiExpandComponent = __decorate([
133
133
  Component({
134
134
  selector: 'tui-expand',
135
- template: "<div\n #wrapper\n class=\"wrapper\"\n>\n <ng-container *ngIf=\"contentVisible\">\n <ng-content></ng-content>\n <!-- TODO: collision with async pipe, fix after upgrade to ng11 -->\n <tui-loader\n *ngIf=\"this.async; else content\"\n size=\"l\"\n [overlay]=\"true\"\n [showLoader]=\"loading\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </tui-loader>\n </ng-container>\n</div>\n",
135
+ template: "<div\n #wrapper\n class=\"wrapper\"\n>\n <ng-container *ngIf=\"contentVisible\">\n <ng-content></ng-content>\n <!-- TODO: 3.0 collision with async pipe, fix after upgrade to ng11 -->\n <tui-loader\n *ngIf=\"this.async; else content\"\n size=\"l\"\n [overlay]=\"true\"\n [showLoader]=\"loading\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </tui-loader>\n </ng-container>\n</div>\n",
136
136
  changeDetection: ChangeDetectionStrategy.OnPush,
137
137
  styles: [":host{display:block;transition-property:opacity,height,visibility;transition-duration:var(--tui-duration,300ms);opacity:0}:host._overflow{overflow:hidden}:host._expanded{opacity:1;transform:translate3d(0,0,0)}:host._loading{opacity:.99}.wrapper:after,.wrapper:before{content:'';display:table}"]
138
138
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-expand.js","sources":["ng://@taiga-ui/core/components/expand/expand-content.directive.ts","ng://@taiga-ui/core/components/expand/expand.component.ts","ng://@taiga-ui/core/components/expand/expand.module.ts","ng://@taiga-ui/core/components/expand/taiga-ui-core-components-expand.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n// @bad TODO Replace with PolymorpheusContent\n@Directive({\n selector: '[tuiExpandContent]',\n})\nexport class TuiExpandContentDirective {}\n","import {NgIfContext} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {isCurrentTarget, tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk';\nimport {TUI_EXPAND_LOADED} from '@taiga-ui/core/constants';\n\nimport {TuiExpandContentDirective} from './expand-content.directive';\n\nenum State {\n Idle,\n Loading,\n Prepared,\n Animated,\n}\n\nconst LOADER_HEIGHT = 48;\n\n@Component({\n selector: 'tui-expand',\n templateUrl: './expand.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./expand.style.less'],\n})\nexport class TuiExpandComponent {\n @ViewChild('wrapper')\n private readonly contentWrapper?: ElementRef<HTMLDivElement>;\n\n private state = State.Idle;\n\n @Input()\n @tuiDefaultProp()\n async = false;\n\n @Input('expanded')\n @tuiRequiredSetter()\n set expandedSetter(expanded: boolean | null) {\n if (this.expanded === null) {\n this.expanded = expanded;\n\n return;\n }\n\n if (this.state !== State.Idle) {\n this.expanded = expanded;\n this.state = State.Animated;\n\n return;\n }\n\n this.expanded = expanded;\n this.retrigger(this.async && expanded ? State.Loading : State.Animated);\n }\n\n @ContentChild(TuiExpandContentDirective, {read: TemplateRef})\n content: TemplateRef<NgIfContext<boolean>> | null = null;\n\n @HostBinding('class._expanded')\n @HostBinding('attr.aria-expanded')\n expanded: boolean | null = null;\n\n constructor(\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n ) {}\n\n @HostBinding('class._overflow')\n get overflow(): boolean {\n return this.state !== State.Idle;\n }\n\n @HostBinding('class._loading')\n get loading(): boolean {\n return !!this.expanded && this.async && this.state === State.Loading;\n }\n\n @HostBinding('style.height.px')\n get height(): number | null {\n const {expanded, state, contentWrapper} = this;\n\n if (\n (expanded && state === State.Prepared) ||\n (!expanded && state === State.Animated)\n ) {\n return 0;\n }\n\n if (\n contentWrapper &&\n ((!expanded && state === State.Prepared) ||\n (expanded && state === State.Animated))\n ) {\n return contentWrapper.nativeElement.offsetHeight;\n }\n\n if (contentWrapper && expanded && state === State.Loading) {\n return Math.max(contentWrapper.nativeElement.offsetHeight, LOADER_HEIGHT);\n }\n\n return null;\n }\n\n get contentVisible(): boolean {\n return this.expanded || this.state !== State.Idle;\n }\n\n @HostListener('transitionend', ['$event'])\n onTransitionEnd(event: TransitionEvent): void {\n if (\n isCurrentTarget(event) &&\n event.propertyName === 'opacity' &&\n this.state === State.Animated\n ) {\n this.state = State.Idle;\n }\n }\n\n @HostListener(TUI_EXPAND_LOADED, ['$event'])\n onExpandLoaded(event: Event): void {\n event.stopPropagation();\n\n if (this.state === State.Loading) {\n this.retrigger(State.Animated);\n }\n }\n\n private retrigger(state: State): void {\n this.state = State.Prepared;\n\n // We need delay to re-trigger CSS height transition from the correct number\n setTimeout(() => {\n if (this.state !== State.Prepared) {\n return;\n }\n\n this.state = state;\n this.changeDetectorRef.markForCheck();\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\n\nimport {TuiExpandComponent} from './expand.component';\nimport {TuiExpandContentDirective} from './expand-content.directive';\n\n@NgModule({\n imports: [CommonModule, TuiLoaderModule],\n declarations: [TuiExpandComponent, TuiExpandContentDirective],\n exports: [TuiExpandComponent, TuiExpandContentDirective],\n})\nexport class TuiExpandModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA;IAIa,yBAAyB,GAAtC,MAAa,yBAAyB;EAAG;AAA5B,yBAAyB;IAHrC,SAAS,CAAC;QACP,QAAQ,EAAE,oBAAoB;KACjC,CAAC;GACW,yBAAyB,CAAG;;ACazC,IAAK,KAKJ;AALD,WAAK,KAAK;IACN,iCAAI,CAAA;IACJ,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,yCAAQ,CAAA;AACZ,CAAC,EALI,KAAK,KAAL,KAAK,QAKT;AAED,MAAM,aAAa,GAAG,EAAE,CAAC;IAQZ,kBAAkB,GAA/B,MAAa,kBAAkB;IAqC3B,YACgD,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;QAlC5E,UAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QAI3B,UAAK,GAAG,KAAK,CAAC;QAuBd,YAAO,GAA6C,IAAI,CAAC;QAIzD,aAAQ,GAAmB,IAAI,CAAC;KAI5B;IA3BJ,IAAI,cAAc,CAAC,QAAwB;QACvC,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE;YACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAEzB,OAAO;SACV;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ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IADC,YAAY,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAC;yDASzC;AAGD;IADC,YAAY,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAC;wDAO3C;AAnGQ,kBAAkB;IAN9B,SAAS,CAAC;QACP,QAAQ,EAAE,YAAY;QACtB,kgBAAqC;QACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAElD,CAAC;IAuCO,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GAtCrB,kBAAkB,CAkH9B;;ICxIY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAL3B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;QACxC,YAAY,EAAE,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;QAC7D,OAAO,EAAE,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;KAC3D,CAAC;GACW,eAAe,CAAG;;ACZ/B;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-expand.js","sources":["ng://@taiga-ui/core/components/expand/expand-content.directive.ts","ng://@taiga-ui/core/components/expand/expand.component.ts","ng://@taiga-ui/core/components/expand/expand.module.ts","ng://@taiga-ui/core/components/expand/taiga-ui-core-components-expand.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n// @bad TODO: 3.0 Replace with PolymorpheusContent\n@Directive({\n selector: '[tuiExpandContent]',\n})\nexport class TuiExpandContentDirective {}\n","import {NgIfContext} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {isCurrentTarget, tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk';\nimport {TUI_EXPAND_LOADED} from '@taiga-ui/core/constants';\n\nimport {TuiExpandContentDirective} from './expand-content.directive';\n\nenum State {\n Idle,\n Loading,\n Prepared,\n Animated,\n}\n\nconst LOADER_HEIGHT = 48;\n\n@Component({\n selector: 'tui-expand',\n templateUrl: './expand.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./expand.style.less'],\n})\nexport class TuiExpandComponent {\n @ViewChild('wrapper')\n private readonly contentWrapper?: ElementRef<HTMLDivElement>;\n\n private state = State.Idle;\n\n @Input()\n @tuiDefaultProp()\n async = false;\n\n @Input('expanded')\n @tuiRequiredSetter()\n set expandedSetter(expanded: boolean | null) {\n if (this.expanded === null) {\n this.expanded = expanded;\n\n return;\n }\n\n if (this.state !== State.Idle) {\n this.expanded = expanded;\n this.state = State.Animated;\n\n return;\n }\n\n this.expanded = expanded;\n this.retrigger(this.async && expanded ? State.Loading : State.Animated);\n }\n\n @ContentChild(TuiExpandContentDirective, {read: TemplateRef})\n content: TemplateRef<NgIfContext<boolean>> | null = null;\n\n @HostBinding('class._expanded')\n @HostBinding('attr.aria-expanded')\n expanded: boolean | null = null;\n\n constructor(\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n ) {}\n\n @HostBinding('class._overflow')\n get overflow(): boolean {\n return this.state !== State.Idle;\n }\n\n @HostBinding('class._loading')\n get loading(): boolean {\n return !!this.expanded && this.async && this.state === State.Loading;\n }\n\n @HostBinding('style.height.px')\n get height(): number | null {\n const {expanded, state, contentWrapper} = this;\n\n if (\n (expanded && state === State.Prepared) ||\n (!expanded && state === State.Animated)\n ) {\n return 0;\n }\n\n if (\n contentWrapper &&\n ((!expanded && state === State.Prepared) ||\n (expanded && state === State.Animated))\n ) {\n return contentWrapper.nativeElement.offsetHeight;\n }\n\n if (contentWrapper && expanded && state === State.Loading) {\n return Math.max(contentWrapper.nativeElement.offsetHeight, LOADER_HEIGHT);\n }\n\n return null;\n }\n\n get contentVisible(): boolean {\n return this.expanded || this.state !== State.Idle;\n }\n\n @HostListener('transitionend', ['$event'])\n onTransitionEnd(event: TransitionEvent): void {\n if (\n isCurrentTarget(event) &&\n event.propertyName === 'opacity' &&\n this.state === State.Animated\n ) {\n this.state = State.Idle;\n }\n }\n\n @HostListener(TUI_EXPAND_LOADED, ['$event'])\n onExpandLoaded(event: Event): void {\n event.stopPropagation();\n\n if (this.state === State.Loading) {\n this.retrigger(State.Animated);\n }\n }\n\n private retrigger(state: State): void {\n this.state = State.Prepared;\n\n // We need delay to re-trigger CSS height transition from the correct number\n setTimeout(() => {\n if (this.state !== State.Prepared) {\n return;\n }\n\n this.state = state;\n this.changeDetectorRef.markForCheck();\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\n\nimport {TuiExpandComponent} from './expand.component';\nimport {TuiExpandContentDirective} from './expand-content.directive';\n\n@NgModule({\n imports: [CommonModule, TuiLoaderModule],\n declarations: [TuiExpandComponent, TuiExpandContentDirective],\n exports: [TuiExpandComponent, TuiExpandContentDirective],\n})\nexport class TuiExpandModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA;IAIa,yBAAyB,GAAtC,MAAa,yBAAyB;EAAG;AAA5B,yBAAyB;IAHrC,SAAS,CAAC;QACP,QAAQ,EAAE,oBAAoB;KACjC,CAAC;GACW,yBAAyB,CAAG;;ACazC,IAAK,KAKJ;AALD,WAAK,KAAK;IACN,iCAAI,CAAA;IACJ,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,yCAAQ,CAAA;AACZ,CAAC,EALI,KAAK,KAAL,KAAK,QAKT;AAED,MAAM,aAAa,GAAG,EAAE,CAAC;IAQZ,kBAAkB,GAA/B,MAAa,kBAAkB;IAqC3B,YACgD,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;QAlC5E,UAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QAI3B,UAAK,GAAG,KAAK,CAAC;QAuBd,YAAO,GAA6C,IAAI,CAAC;QAIzD,aAAQ,GAAmB,I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