@taiga-ui/core 4.51.0 → 4.52.0-canary.1acd1eb

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 (491) hide show
  1. package/classes/driver.d.ts +1 -1
  2. package/components/alert/alert.component.d.ts +5 -6
  3. package/components/alert/alert.directive.d.ts +4 -3
  4. package/components/alert/alert.interfaces.d.ts +3 -2
  5. package/components/alert/alert.service.d.ts +6 -2
  6. package/components/alert/alert.tokens.d.ts +1 -7
  7. package/components/alert/index.d.ts +0 -1
  8. package/components/button/button.directive.d.ts +2 -3
  9. package/components/button/button.options.d.ts +1 -1
  10. package/components/calendar/calendar-sheet.component.d.ts +1 -6
  11. package/components/cell/cell.directive.d.ts +9 -0
  12. package/components/cell/cell.options.d.ts +6 -0
  13. package/components/cell/index.d.ts +2 -0
  14. package/components/data-list/data-list.component.d.ts +1 -1
  15. package/components/dialog/active-zone-adapter.directive.d.ts +11 -0
  16. package/components/dialog/dialog.component.d.ts +6 -11
  17. package/components/dialog/dialog.directive.d.ts +1 -1
  18. package/components/dialog/dialog.factory.d.ts +1 -1
  19. package/components/dialog/dialog.options.d.ts +26 -0
  20. package/components/dialog/{dialog-close.service.d.ts → dialog.providers.d.ts} +4 -1
  21. package/components/dialog/dialog.service.d.ts +1 -1
  22. package/components/dialog/index.d.ts +2 -3
  23. package/components/error/error.component.d.ts +6 -8
  24. package/components/error/error.d.ts +4 -0
  25. package/components/error/error.directive.d.ts +19 -0
  26. package/components/error/error.pipe.d.ts +10 -0
  27. package/components/error/index.d.ts +3 -0
  28. package/components/expand/expand.component.d.ts +9 -28
  29. package/components/expand/index.d.ts +0 -2
  30. package/components/header/header.directive.d.ts +17 -0
  31. package/components/header/index.d.ts +1 -0
  32. package/components/icon/icon.component.d.ts +6 -8
  33. package/components/index.d.ts +2 -1
  34. package/components/notification/notification.directive.d.ts +1 -1
  35. package/components/notification/notification.options.d.ts +1 -1
  36. package/components/root/root.component.d.ts +4 -6
  37. package/components/scrollbar/scrollbar.options.d.ts +1 -1
  38. package/components/spin-button/spin-button.component.d.ts +1 -1
  39. package/components/textfield/index.d.ts +1 -3
  40. package/components/textfield/textfield-content.directive.d.ts +3 -2
  41. package/components/textfield/textfield-icon.d.ts +3 -3
  42. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +6 -8
  43. package/components/textfield/textfield.component.d.ts +11 -10
  44. package/components/textfield/textfield.d.ts +2 -3
  45. package/components/textfield/textfield.directive.d.ts +2 -2
  46. package/components/textfield/textfield.options.d.ts +8 -11
  47. package/directives/appearance/appearance.directive.d.ts +5 -13
  48. package/directives/appearance/appearance.options.d.ts +1 -1
  49. package/directives/dropdown/dropdown-content.directive.d.ts +9 -0
  50. package/directives/dropdown/dropdown-context.directive.d.ts +2 -0
  51. package/directives/dropdown/dropdown.d.ts +2 -2
  52. package/directives/dropdown/dropdown.directive.d.ts +1 -2
  53. package/directives/dropdown/index.d.ts +1 -3
  54. package/directives/hint/hint-describe.directive.d.ts +4 -6
  55. package/directives/hint/hint-host.directive.d.ts +2 -2
  56. package/directives/hint/hint-hover.directive.d.ts +3 -4
  57. package/directives/hint/hint-manual.directive.d.ts +2 -2
  58. package/directives/hint/hint-options.directive.d.ts +3 -3
  59. package/directives/hint/hint-overflow.directive.d.ts +2 -2
  60. package/directives/hint/hint-position.directive.d.ts +4 -5
  61. package/directives/hint/hint-unstyled.component.d.ts +2 -7
  62. package/directives/hint/hint.component.d.ts +10 -11
  63. package/directives/hint/hint.directive.d.ts +9 -11
  64. package/directives/hint/index.d.ts +0 -2
  65. package/directives/icons/icons.bindings.d.ts +5 -0
  66. package/directives/icons/icons.directive.d.ts +8 -14
  67. package/directives/icons/index.d.ts +1 -0
  68. package/directives/index.d.ts +1 -1
  69. package/directives/notification/index.d.ts +2 -0
  70. package/directives/notification/notification.directive.d.ts +11 -0
  71. package/directives/notification/notification.service.d.ts +12 -0
  72. package/directives/popup/popup.directive.d.ts +6 -5
  73. package/directives/popup/popup.service.d.ts +1 -1
  74. package/directives/popup/popups.component.d.ts +2 -2
  75. package/directives/title/title.directive.d.ts +2 -3
  76. package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-core-classes.mjs +3 -3
  78. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-alert.mjs +60 -100
  80. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-button.mjs +13 -21
  82. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-calendar.mjs +24 -25
  84. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
  86. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
  87. package/fesm2022/taiga-ui-core-components-data-list.mjs +32 -34
  88. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-components-dialog.mjs +104 -85
  90. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-components-error.mjs +109 -26
  92. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-components-expand.mjs +34 -132
  94. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-components-header.mjs +42 -0
  96. package/fesm2022/taiga-ui-core-components-header.mjs.map +1 -0
  97. package/fesm2022/taiga-ui-core-components-icon.mjs +22 -30
  98. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-components-label.mjs +10 -13
  100. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-components-link.mjs +10 -13
  102. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-components-loader.mjs +6 -7
  104. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-components-notification.mjs +17 -31
  106. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-components-root.mjs +20 -51
  108. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +28 -28
  110. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-core-components-spin-button.mjs +7 -8
  112. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-core-components-textfield.mjs +182 -281
  114. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-core-components.mjs +2 -1
  116. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  117. package/fesm2022/taiga-ui-core-directives-appearance.mjs +26 -63
  118. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  119. package/fesm2022/taiga-ui-core-directives-date-format.mjs +5 -5
  120. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +96 -131
  122. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-core-directives-group.mjs +10 -13
  124. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-core-directives-hint.mjs +145 -244
  126. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-core-directives-icons.mjs +41 -41
  128. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +12 -12
  130. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-core-directives-notification.mjs +73 -0
  132. package/fesm2022/taiga-ui-core-directives-notification.mjs.map +1 -0
  133. package/fesm2022/taiga-ui-core-directives-number-format.mjs +5 -5
  134. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-core-directives-popup.mjs +20 -27
  136. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-core-directives-title.mjs +13 -19
  138. package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-core-directives.mjs +1 -1
  140. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +3 -3
  141. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
  142. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +3 -3
  143. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
  144. package/fesm2022/taiga-ui-core-pipes-flag.mjs +3 -3
  145. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
  146. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +3 -3
  147. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
  148. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
  149. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  150. package/fesm2022/taiga-ui-core-pipes-initials.mjs +3 -3
  151. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-core-pipes-month.mjs +5 -4
  153. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +3 -3
  155. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-core-pipes.mjs +0 -1
  157. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-core-services.mjs +18 -18
  159. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-core-tokens.mjs +31 -17
  161. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +50 -4
  165. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  166. package/package.json +23 -123
  167. package/pipes/index.d.ts +0 -1
  168. package/styles/components/appearance.less +6 -0
  169. package/styles/components/button.less +0 -2
  170. package/styles/components/icon.less +37 -12
  171. package/styles/components/icons.less +45 -7
  172. package/styles/components/link.less +1 -3
  173. package/styles/mixins/mixins.less +1 -2
  174. package/styles/mixins/mixins.scss +1 -2
  175. package/styles/mixins/slider.less +21 -16
  176. package/styles/theme/appearance/outline.less +1 -2
  177. package/styles/theme/appearance/textfield.less +1 -2
  178. package/tokens/i18n.d.ts +7 -7
  179. package/tokens/icon-resolver.d.ts +1 -4
  180. package/tokens/index.d.ts +1 -0
  181. package/tokens/validation-errors.d.ts +4 -0
  182. package/types/index.d.ts +0 -1
  183. package/utils/miscellaneous/index.d.ts +1 -0
  184. package/utils/miscellaneous/provide-taiga.d.ts +13 -0
  185. package/components/alert/alerts.component.d.ts +0 -12
  186. package/components/dialog/dialog.interfaces.d.ts +0 -34
  187. package/components/dialog/dialog.tokens.d.ts +0 -15
  188. package/components/expand/expand-content.directive.d.ts +0 -8
  189. package/components/expand/expand.d.ts +0 -6
  190. package/components/fullscreen/fullscreen.component.d.ts +0 -14
  191. package/components/fullscreen/index.d.ts +0 -1
  192. package/components/textfield/select.directive.d.ts +0 -19
  193. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  194. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  195. package/directives/dropdown/dropdown.service.d.ts +0 -6
  196. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  197. package/directives/hint/hint.service.d.ts +0 -13
  198. package/directives/hint/hints.component.d.ts +0 -12
  199. package/directives/surface/index.d.ts +0 -1
  200. package/directives/surface/surface.directive.d.ts +0 -8
  201. package/esm2022/animations/animations.mjs +0 -363
  202. package/esm2022/animations/index.mjs +0 -2
  203. package/esm2022/animations/taiga-ui-core-animations.mjs +0 -5
  204. package/esm2022/classes/accessors.mjs +0 -31
  205. package/esm2022/classes/driver.mjs +0 -36
  206. package/esm2022/classes/index.mjs +0 -4
  207. package/esm2022/classes/taiga-ui-core-classes.mjs +0 -5
  208. package/esm2022/classes/vehicle.mjs +0 -7
  209. package/esm2022/components/alert/alert.component.mjs +0 -43
  210. package/esm2022/components/alert/alert.directive.mjs +0 -21
  211. package/esm2022/components/alert/alert.interfaces.mjs +0 -2
  212. package/esm2022/components/alert/alert.service.mjs +0 -18
  213. package/esm2022/components/alert/alert.tokens.mjs +0 -51
  214. package/esm2022/components/alert/alerts.component.mjs +0 -34
  215. package/esm2022/components/alert/index.mjs +0 -6
  216. package/esm2022/components/alert/taiga-ui-core-components-alert.mjs +0 -5
  217. package/esm2022/components/button/button.directive.mjs +0 -43
  218. package/esm2022/components/button/button.options.mjs +0 -7
  219. package/esm2022/components/button/index.mjs +0 -3
  220. package/esm2022/components/button/taiga-ui-core-components-button.mjs +0 -5
  221. package/esm2022/components/calendar/calendar-sheet.component.mjs +0 -167
  222. package/esm2022/components/calendar/calendar-sheet.options.mjs +0 -12
  223. package/esm2022/components/calendar/calendar-spin.component.mjs +0 -53
  224. package/esm2022/components/calendar/calendar-year.component.mjs +0 -128
  225. package/esm2022/components/calendar/calendar.component.mjs +0 -147
  226. package/esm2022/components/calendar/index.mjs +0 -6
  227. package/esm2022/components/calendar/taiga-ui-core-components-calendar.mjs +0 -5
  228. package/esm2022/components/data-list/data-list.component.mjs +0 -139
  229. package/esm2022/components/data-list/data-list.directive.mjs +0 -19
  230. package/esm2022/components/data-list/data-list.mjs +0 -14
  231. package/esm2022/components/data-list/data-list.tokens.mjs +0 -18
  232. package/esm2022/components/data-list/index.mjs +0 -9
  233. package/esm2022/components/data-list/opt-group.directive.mjs +0 -21
  234. package/esm2022/components/data-list/option/option-content.mjs +0 -36
  235. package/esm2022/components/data-list/option/option-legacy.component.mjs +0 -90
  236. package/esm2022/components/data-list/option/option.directive.mjs +0 -109
  237. package/esm2022/components/data-list/taiga-ui-core-components-data-list.mjs +0 -5
  238. package/esm2022/components/dialog/dialog-close.service.mjs +0 -41
  239. package/esm2022/components/dialog/dialog.component.mjs +0 -63
  240. package/esm2022/components/dialog/dialog.directive.mjs +0 -21
  241. package/esm2022/components/dialog/dialog.factory.mjs +0 -15
  242. package/esm2022/components/dialog/dialog.interfaces.mjs +0 -2
  243. package/esm2022/components/dialog/dialog.service.mjs +0 -18
  244. package/esm2022/components/dialog/dialog.tokens.mjs +0 -33
  245. package/esm2022/components/dialog/dialogs.component.mjs +0 -29
  246. package/esm2022/components/dialog/index.mjs +0 -8
  247. package/esm2022/components/dialog/taiga-ui-core-components-dialog.mjs +0 -5
  248. package/esm2022/components/error/error.component.mjs +0 -34
  249. package/esm2022/components/error/index.mjs +0 -2
  250. package/esm2022/components/error/taiga-ui-core-components-error.mjs +0 -5
  251. package/esm2022/components/expand/expand-content.directive.mjs +0 -18
  252. package/esm2022/components/expand/expand.component.mjs +0 -124
  253. package/esm2022/components/expand/expand.mjs +0 -7
  254. package/esm2022/components/expand/index.mjs +0 -4
  255. package/esm2022/components/expand/taiga-ui-core-components-expand.mjs +0 -5
  256. package/esm2022/components/fullscreen/fullscreen.component.mjs +0 -67
  257. package/esm2022/components/fullscreen/index.mjs +0 -2
  258. package/esm2022/components/fullscreen/taiga-ui-core-components-fullscreen.mjs +0 -5
  259. package/esm2022/components/icon/icon.component.mjs +0 -35
  260. package/esm2022/components/icon/icon.pipe.mjs +0 -19
  261. package/esm2022/components/icon/index.mjs +0 -3
  262. package/esm2022/components/icon/taiga-ui-core-components-icon.mjs +0 -5
  263. package/esm2022/components/index.mjs +0 -18
  264. package/esm2022/components/label/index.mjs +0 -2
  265. package/esm2022/components/label/label.directive.mjs +0 -41
  266. package/esm2022/components/label/taiga-ui-core-components-label.mjs +0 -5
  267. package/esm2022/components/link/index.mjs +0 -3
  268. package/esm2022/components/link/link.directive.mjs +0 -47
  269. package/esm2022/components/link/link.options.mjs +0 -13
  270. package/esm2022/components/link/taiga-ui-core-components-link.mjs +0 -5
  271. package/esm2022/components/loader/index.mjs +0 -3
  272. package/esm2022/components/loader/loader.component.mjs +0 -46
  273. package/esm2022/components/loader/loader.options.mjs +0 -18
  274. package/esm2022/components/loader/taiga-ui-core-components-loader.mjs +0 -5
  275. package/esm2022/components/notification/index.mjs +0 -3
  276. package/esm2022/components/notification/notification.directive.mjs +0 -81
  277. package/esm2022/components/notification/notification.options.mjs +0 -23
  278. package/esm2022/components/notification/taiga-ui-core-components-notification.mjs +0 -5
  279. package/esm2022/components/root/index.mjs +0 -2
  280. package/esm2022/components/root/root.component.mjs +0 -85
  281. package/esm2022/components/root/taiga-ui-core-components-root.mjs +0 -5
  282. package/esm2022/components/scrollbar/index.mjs +0 -9
  283. package/esm2022/components/scrollbar/scroll-controls.component.mjs +0 -32
  284. package/esm2022/components/scrollbar/scroll-into-view.directive.mjs +0 -43
  285. package/esm2022/components/scrollbar/scroll-ref.directive.mjs +0 -19
  286. package/esm2022/components/scrollbar/scrollable.directive.mjs +0 -26
  287. package/esm2022/components/scrollbar/scrollbar.component.mjs +0 -72
  288. package/esm2022/components/scrollbar/scrollbar.directive.mjs +0 -93
  289. package/esm2022/components/scrollbar/scrollbar.options.mjs +0 -6
  290. package/esm2022/components/scrollbar/scrollbar.service.mjs +0 -46
  291. package/esm2022/components/scrollbar/taiga-ui-core-components-scrollbar.mjs +0 -5
  292. package/esm2022/components/spin-button/index.mjs +0 -2
  293. package/esm2022/components/spin-button/spin-button.component.mjs +0 -51
  294. package/esm2022/components/spin-button/taiga-ui-core-components-spin-button.mjs +0 -5
  295. package/esm2022/components/taiga-ui-core-components.mjs +0 -5
  296. package/esm2022/components/textfield/index.mjs +0 -16
  297. package/esm2022/components/textfield/select-like.directive.mjs +0 -42
  298. package/esm2022/components/textfield/select.directive.mjs +0 -65
  299. package/esm2022/components/textfield/taiga-ui-core-components-textfield.mjs +0 -5
  300. package/esm2022/components/textfield/textfield-accessor.mjs +0 -7
  301. package/esm2022/components/textfield/textfield-auxiliary.mjs +0 -7
  302. package/esm2022/components/textfield/textfield-content.directive.mjs +0 -22
  303. package/esm2022/components/textfield/textfield-dropdown.directive.mjs +0 -43
  304. package/esm2022/components/textfield/textfield-icon.mjs +0 -10
  305. package/esm2022/components/textfield/textfield-multi/textfield-item.component.mjs +0 -34
  306. package/esm2022/components/textfield/textfield-multi/textfield-multi.component.mjs +0 -137
  307. package/esm2022/components/textfield/textfield.component.mjs +0 -177
  308. package/esm2022/components/textfield/textfield.directive.mjs +0 -131
  309. package/esm2022/components/textfield/textfield.mjs +0 -19
  310. package/esm2022/components/textfield/textfield.options.mjs +0 -63
  311. package/esm2022/components/textfield/with-native-picker.directive.mjs +0 -24
  312. package/esm2022/directives/appearance/appearance.bindings.mjs +0 -15
  313. package/esm2022/directives/appearance/appearance.directive.mjs +0 -79
  314. package/esm2022/directives/appearance/appearance.options.mjs +0 -12
  315. package/esm2022/directives/appearance/index.mjs +0 -5
  316. package/esm2022/directives/appearance/taiga-ui-core-directives-appearance.mjs +0 -5
  317. package/esm2022/directives/appearance/with-appearance.mjs +0 -27
  318. package/esm2022/directives/date-format/date-format.directive.mjs +0 -31
  319. package/esm2022/directives/date-format/index.mjs +0 -2
  320. package/esm2022/directives/date-format/taiga-ui-core-directives-date-format.mjs +0 -5
  321. package/esm2022/directives/dropdown/dropdown-context.directive.mjs +0 -70
  322. package/esm2022/directives/dropdown/dropdown-hover.directive.mjs +0 -70
  323. package/esm2022/directives/dropdown/dropdown-hover.options.mjs +0 -17
  324. package/esm2022/directives/dropdown/dropdown-limit-width.mjs +0 -37
  325. package/esm2022/directives/dropdown/dropdown-manual.directive.mjs +0 -27
  326. package/esm2022/directives/dropdown/dropdown-open-legacy.directive.mjs +0 -33
  327. package/esm2022/directives/dropdown/dropdown-open.directive.mjs +0 -169
  328. package/esm2022/directives/dropdown/dropdown-options.directive.mjs +0 -73
  329. package/esm2022/directives/dropdown/dropdown-portal.directive.mjs +0 -34
  330. package/esm2022/directives/dropdown/dropdown-position-sided.directive.mjs +0 -69
  331. package/esm2022/directives/dropdown/dropdown-position.directive.mjs +0 -88
  332. package/esm2022/directives/dropdown/dropdown-selection.directive.mjs +0 -159
  333. package/esm2022/directives/dropdown/dropdown.bindings.mjs +0 -19
  334. package/esm2022/directives/dropdown/dropdown.component.mjs +0 -92
  335. package/esm2022/directives/dropdown/dropdown.directive.mjs +0 -110
  336. package/esm2022/directives/dropdown/dropdown.driver.mjs +0 -32
  337. package/esm2022/directives/dropdown/dropdown.mjs +0 -29
  338. package/esm2022/directives/dropdown/dropdown.providers.mjs +0 -10
  339. package/esm2022/directives/dropdown/dropdown.service.mjs +0 -15
  340. package/esm2022/directives/dropdown/dropdowns.component.mjs +0 -24
  341. package/esm2022/directives/dropdown/index.mjs +0 -22
  342. package/esm2022/directives/dropdown/taiga-ui-core-directives-dropdown.mjs +0 -5
  343. package/esm2022/directives/dropdown/with-dropdown-open.directive.mjs +0 -23
  344. package/esm2022/directives/group/group.directive.mjs +0 -53
  345. package/esm2022/directives/group/group.options.mjs +0 -15
  346. package/esm2022/directives/group/index.mjs +0 -3
  347. package/esm2022/directives/group/taiga-ui-core-directives-group.mjs +0 -5
  348. package/esm2022/directives/hint/hint-describe.directive.mjs +0 -50
  349. package/esm2022/directives/hint/hint-driver.directive.mjs +0 -19
  350. package/esm2022/directives/hint/hint-host.directive.mjs +0 -27
  351. package/esm2022/directives/hint/hint-hover.directive.mjs +0 -59
  352. package/esm2022/directives/hint/hint-manual.directive.mjs +0 -33
  353. package/esm2022/directives/hint/hint-options.directive.mjs +0 -86
  354. package/esm2022/directives/hint/hint-overflow.directive.mjs +0 -38
  355. package/esm2022/directives/hint/hint-pointer.directive.mjs +0 -33
  356. package/esm2022/directives/hint/hint-position.directive.mjs +0 -112
  357. package/esm2022/directives/hint/hint-unstyled.component.mjs +0 -39
  358. package/esm2022/directives/hint/hint.component.mjs +0 -127
  359. package/esm2022/directives/hint/hint.directive.mjs +0 -99
  360. package/esm2022/directives/hint/hint.mjs +0 -27
  361. package/esm2022/directives/hint/hint.providers.mjs +0 -9
  362. package/esm2022/directives/hint/hint.service.mjs +0 -29
  363. package/esm2022/directives/hint/hints.component.mjs +0 -34
  364. package/esm2022/directives/hint/index.mjs +0 -17
  365. package/esm2022/directives/hint/taiga-ui-core-directives-hint.mjs +0 -5
  366. package/esm2022/directives/icons/icons.directive.mjs +0 -56
  367. package/esm2022/directives/icons/index.mjs +0 -3
  368. package/esm2022/directives/icons/taiga-ui-core-directives-icons.mjs +0 -5
  369. package/esm2022/directives/icons/with-icons.mjs +0 -22
  370. package/esm2022/directives/index.mjs +0 -12
  371. package/esm2022/directives/items-handlers/index.mjs +0 -4
  372. package/esm2022/directives/items-handlers/items-handlers.directive.mjs +0 -63
  373. package/esm2022/directives/items-handlers/items-handlers.tokens.mjs +0 -27
  374. package/esm2022/directives/items-handlers/items-handlers.validator.mjs +0 -32
  375. package/esm2022/directives/items-handlers/taiga-ui-core-directives-items-handlers.mjs +0 -5
  376. package/esm2022/directives/number-format/index.mjs +0 -2
  377. package/esm2022/directives/number-format/number-format.directive.mjs +0 -31
  378. package/esm2022/directives/number-format/taiga-ui-core-directives-number-format.mjs +0 -5
  379. package/esm2022/directives/popup/index.mjs +0 -4
  380. package/esm2022/directives/popup/popup.directive.mjs +0 -31
  381. package/esm2022/directives/popup/popup.service.mjs +0 -15
  382. package/esm2022/directives/popup/popups.component.mjs +0 -20
  383. package/esm2022/directives/popup/taiga-ui-core-directives-popup.mjs +0 -5
  384. package/esm2022/directives/surface/index.mjs +0 -2
  385. package/esm2022/directives/surface/surface.directive.mjs +0 -44
  386. package/esm2022/directives/surface/taiga-ui-core-directives-surface.mjs +0 -5
  387. package/esm2022/directives/taiga-ui-core-directives.mjs +0 -5
  388. package/esm2022/directives/title/index.mjs +0 -2
  389. package/esm2022/directives/title/taiga-ui-core-directives-title.mjs +0 -5
  390. package/esm2022/directives/title/title.directive.mjs +0 -37
  391. package/esm2022/index.mjs +0 -9
  392. package/esm2022/pipes/auto-color/auto-color.pipe.mjs +0 -19
  393. package/esm2022/pipes/auto-color/index.mjs +0 -2
  394. package/esm2022/pipes/auto-color/taiga-ui-core-pipes-auto-color.mjs +0 -5
  395. package/esm2022/pipes/calendar-sheet/calendar-sheet.pipe.mjs +0 -54
  396. package/esm2022/pipes/calendar-sheet/index.mjs +0 -2
  397. package/esm2022/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.mjs +0 -5
  398. package/esm2022/pipes/calendar-sheet/utils.mjs +0 -36
  399. package/esm2022/pipes/fallback-src/fallback-src.pipe.mjs +0 -23
  400. package/esm2022/pipes/fallback-src/index.mjs +0 -2
  401. package/esm2022/pipes/fallback-src/taiga-ui-core-pipes-fallback-src.mjs +0 -5
  402. package/esm2022/pipes/flag/flag.pipe.mjs +0 -26
  403. package/esm2022/pipes/flag/index.mjs +0 -2
  404. package/esm2022/pipes/flag/taiga-ui-core-pipes-flag.mjs +0 -5
  405. package/esm2022/pipes/format-date/format-date.pipe.mjs +0 -22
  406. package/esm2022/pipes/format-date/index.mjs +0 -2
  407. package/esm2022/pipes/format-date/taiga-ui-core-pipes-format-date.mjs +0 -5
  408. package/esm2022/pipes/format-number/format-number.pipe.mjs +0 -36
  409. package/esm2022/pipes/format-number/index.mjs +0 -2
  410. package/esm2022/pipes/format-number/taiga-ui-core-pipes-format-number.mjs +0 -5
  411. package/esm2022/pipes/index.mjs +0 -10
  412. package/esm2022/pipes/initials/index.mjs +0 -2
  413. package/esm2022/pipes/initials/initials.pipe.mjs +0 -23
  414. package/esm2022/pipes/initials/taiga-ui-core-pipes-initials.mjs +0 -5
  415. package/esm2022/pipes/month/index.mjs +0 -2
  416. package/esm2022/pipes/month/month.pipe.mjs +0 -23
  417. package/esm2022/pipes/month/taiga-ui-core-pipes-month.mjs +0 -5
  418. package/esm2022/pipes/order-week-days/index.mjs +0 -2
  419. package/esm2022/pipes/order-week-days/order-week-days.pipe.mjs +0 -30
  420. package/esm2022/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.mjs +0 -5
  421. package/esm2022/pipes/taiga-ui-core-pipes.mjs +0 -5
  422. package/esm2022/services/breakpoint.service.mjs +0 -31
  423. package/esm2022/services/dark-theme.service.mjs +0 -24
  424. package/esm2022/services/format-date.service.mjs +0 -24
  425. package/esm2022/services/index.mjs +0 -6
  426. package/esm2022/services/position.service.mjs +0 -26
  427. package/esm2022/services/taiga-ui-core-services.mjs +0 -5
  428. package/esm2022/services/visual-viewport.service.mjs +0 -29
  429. package/esm2022/taiga-ui-core.mjs +0 -5
  430. package/esm2022/tokens/animations-speed.mjs +0 -9
  431. package/esm2022/tokens/assets-path.mjs +0 -11
  432. package/esm2022/tokens/auxiliary.mjs +0 -9
  433. package/esm2022/tokens/common-icons.mjs +0 -18
  434. package/esm2022/tokens/dark-mode.mjs +0 -41
  435. package/esm2022/tokens/date-format.mjs +0 -20
  436. package/esm2022/tokens/day-type-handler.mjs +0 -8
  437. package/esm2022/tokens/first-day-of-week.mjs +0 -9
  438. package/esm2022/tokens/i18n.mjs +0 -45
  439. package/esm2022/tokens/icon-resolver.mjs +0 -22
  440. package/esm2022/tokens/icon.mjs +0 -8
  441. package/esm2022/tokens/icons.mjs +0 -21
  442. package/esm2022/tokens/index.mjs +0 -21
  443. package/esm2022/tokens/media.mjs +0 -12
  444. package/esm2022/tokens/number-format.mjs +0 -24
  445. package/esm2022/tokens/reduced-motion.mjs +0 -7
  446. package/esm2022/tokens/scroll-ref.mjs +0 -6
  447. package/esm2022/tokens/selection-stream.mjs +0 -14
  448. package/esm2022/tokens/spin-icons.mjs +0 -8
  449. package/esm2022/tokens/taiga-ui-core-tokens.mjs +0 -5
  450. package/esm2022/tokens/theme.mjs +0 -5
  451. package/esm2022/tokens/viewport.mjs +0 -35
  452. package/esm2022/types/direction.mjs +0 -2
  453. package/esm2022/types/index.mjs +0 -2
  454. package/esm2022/types/interactive-state.mjs +0 -2
  455. package/esm2022/types/orientation.mjs +0 -2
  456. package/esm2022/types/point.mjs +0 -2
  457. package/esm2022/types/portal-item.mjs +0 -2
  458. package/esm2022/types/range-state.mjs +0 -2
  459. package/esm2022/types/size.mjs +0 -13
  460. package/esm2022/types/taiga-ui-core-types.mjs +0 -5
  461. package/esm2022/types/value-content-context.mjs +0 -2
  462. package/esm2022/utils/dom/check-fixed-position.mjs +0 -9
  463. package/esm2022/utils/dom/get-viewport.mjs +0 -24
  464. package/esm2022/utils/dom/get-word-range.mjs +0 -51
  465. package/esm2022/utils/dom/index.mjs +0 -4
  466. package/esm2022/utils/dom/taiga-ui-core-utils-dom.mjs +0 -5
  467. package/esm2022/utils/format/format-number.mjs +0 -47
  468. package/esm2022/utils/format/get-fractional-part-padded.mjs +0 -16
  469. package/esm2022/utils/format/index.mjs +0 -5
  470. package/esm2022/utils/format/number-to-string-without-exp.mjs +0 -18
  471. package/esm2022/utils/format/string-hash-to-hsl.mjs +0 -21
  472. package/esm2022/utils/format/taiga-ui-core-utils-format.mjs +0 -5
  473. package/esm2022/utils/index.mjs +0 -4
  474. package/esm2022/utils/miscellaneous/font-scaling.mjs +0 -11
  475. package/esm2022/utils/miscellaneous/index.mjs +0 -7
  476. package/esm2022/utils/miscellaneous/is-editing-key.mjs +0 -18
  477. package/esm2022/utils/miscellaneous/is-obscured.mjs +0 -8
  478. package/esm2022/utils/miscellaneous/override-options.mjs +0 -11
  479. package/esm2022/utils/miscellaneous/size-bigger.mjs +0 -19
  480. package/esm2022/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.mjs +0 -5
  481. package/esm2022/utils/miscellaneous/to-animation-options.mjs +0 -16
  482. package/esm2022/utils/taiga-ui-core-utils.mjs +0 -5
  483. package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -73
  484. package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
  485. package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
  486. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
  487. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
  488. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
  489. package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
  490. package/pipes/fallback-src/index.d.ts +0 -1
  491. package/types/portal-item.d.ts +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-data-list.mjs","sources":["../../../projects/core/components/data-list/data-list.tokens.ts","../../../projects/core/components/data-list/option/option-content.ts","../../../projects/core/components/data-list/option/option.directive.ts","../../../projects/core/components/data-list/option/option-legacy.component.ts","../../../projects/core/components/data-list/data-list.component.ts","../../../projects/core/components/data-list/data-list.template.html","../../../projects/core/components/data-list/data-list.directive.ts","../../../projects/core/components/data-list/opt-group.directive.ts","../../../projects/core/components/data-list/data-list.ts","../../../projects/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {InjectionToken, type Provider, type Signal, type Type} from '@angular/core';\nimport {type TuiIdentityMatcher, type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiDataListAccessor<T = unknown> {\n /**\n * @deprecated Use `options` property instead\n */\n getOptions(includeDisabled?: boolean): readonly T[];\n // TODO(v5): remove `undefined` for this property\n options?: Signal<readonly T[]>;\n}\n\n// TODO: Consider refactoring checkOption, it is only needed in ComboBox\nexport interface TuiDataListHost<T> {\n checkOption?(option: T): void;\n handleOption?(option: T): void;\n /**\n * @deprecated Use `inject(TuiItemsHandlersDirective<T>).identityMatcher` instead\n */\n readonly identityMatcher?: TuiIdentityMatcher<T>;\n /**\n * @deprecated Use `inject(TuiItemsHandlersDirective<T>).stringify` instead\n */\n readonly stringify?: TuiStringHandler<T>;\n readonly size?: TuiSizeL | TuiSizeS;\n}\n\n/**\n * Accessor for data-list options\n */\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n ngDevMode ? 'TUI_DATA_LIST_ACCESSOR' : '',\n);\n\nexport function tuiAsDataListAccessor(accessor: Type<TuiDataListAccessor>): Provider {\n return [tuiProvide(TUI_DATA_LIST_ACCESSOR, accessor), tuiAsAuxiliary(accessor)];\n}\n\n/**\n * DataList controller\n */\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<unknown>>(\n ngDevMode ? 'TUI_DATA_LIST_HOST' : '',\n);\n\nexport function tuiAsDataListHost<T>(host: Type<TuiDataListHost<T>>): Provider {\n return tuiProvide(TUI_DATA_LIST_HOST, host);\n}\n","import {\n ContentChild,\n Directive,\n inject,\n InjectionToken,\n type Provider,\n type TemplateRef,\n type Type,\n} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n/**\n * Content for tuiOption component\n */\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n | PolymorpheusContent<TuiContext<TemplateRef<Record<string, unknown>>>> // TODO(v5): delete\n | Type<any>\n>(ngDevMode ? 'TUI_OPTION_CONTENT' : '');\n\nexport function tuiAsOptionContent(\n useValue:\n | PolymorpheusContent<TuiContext<TemplateRef<Record<string, unknown>>>> // TODO(v5): delete\n | Type<any>,\n): Provider {\n return {\n provide: TUI_OPTION_CONTENT,\n useValue,\n };\n}\n\n@Directive({\n standalone: true,\n})\nexport class TuiWithOptionContent {\n @ContentChild(TUI_OPTION_CONTENT, {descendants: true})\n protected readonly localContent: Type<any> | null = null;\n\n protected readonly globalContent = inject<Type<any>>(TUI_OPTION_CONTENT, {\n optional: true,\n });\n\n public get content(): Type<any> | null {\n return this.globalContent ?? this.localContent;\n }\n}\n","import {\n createComponent,\n Directive,\n EnvironmentInjector,\n forwardRef,\n inject,\n INJECTOR,\n Input,\n type OnDestroy,\n signal,\n type Type,\n ViewContainerRef,\n} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TuiDataListComponent} from '../data-list.component';\nimport {TUI_DATA_LIST_HOST, type TuiDataListHost} from '../data-list.tokens';\nimport {TUI_OPTION_CONTENT} from './option-content';\n\n// TODO(v5): rename `TuiOptionNew` => `TuiOption` & remove [new] from selector\n// TODO: Consider all use cases for aria roles\n@Directive({\n standalone: true,\n selector: 'button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]',\n hostDirectives: [TuiWithIcons],\n host: {\n type: 'button',\n role: 'option',\n '[attr.disabled]': 'disabled || null',\n '[class._with-dropdown]': 'dropdown?.()',\n '(mousemove.zoneless)': 'onMouseMove()',\n },\n})\nexport class TuiOptionNew<T = unknown> implements OnDestroy {\n private readonly vcr = inject(ViewContainerRef);\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly el = tuiInjectElement();\n private readonly dataList = inject<TuiDataListComponent<T>>(\n forwardRef(() => TuiDataListComponent),\n {optional: true},\n );\n\n private readonly content = inject<Type<any> | null>(TUI_OPTION_CONTENT, {\n optional: true,\n });\n\n private readonly ref =\n this.content &&\n createComponent(this.content, {\n environmentInjector: inject(EnvironmentInjector),\n elementInjector: inject(INJECTOR),\n hostElement: tuiInjectElement(),\n });\n\n protected readonly dropdown = inject(TuiDropdownDirective, {\n self: true,\n optional: true,\n })?.ref;\n\n @Input()\n public disabled = false;\n\n constructor() {\n if (this.ref) {\n this.vcr.insert(this.ref.hostView);\n this.ref.changeDetectorRef.detectChanges();\n }\n }\n\n // Preventing focus loss upon focused option removal\n public ngOnDestroy(): void {\n this.dataList?.handleFocusLossIfNecessary(this.el);\n }\n\n protected onMouseMove(): void {\n if (\n !this.isMobile &&\n !tuiIsNativeFocused(this.el) &&\n this.dataList &&\n this.el.closest('[tuiDataListDropdownManager]')\n ) {\n this.el.focus({preventScroll: true});\n }\n }\n}\n\n// TODO(v5): remove [new] from selector\n@Directive({\n standalone: true,\n selector:\n 'button[tuiOption][value][new], a[tuiOption][value][new], label[tuiOption][value][new]',\n host: {\n '(click)': 'onClick()',\n },\n})\nexport class TuiOptionWithValue<T = unknown> {\n private readonly host = inject<TuiDataListHost<T>>(TUI_DATA_LIST_HOST, {\n optional: true,\n });\n\n @Input()\n public disabled = false;\n\n public readonly value = signal<T | undefined>(undefined);\n\n // TODO(v5): use `input.required<T>()` to remove `undefined` from `this.value()`\n @Input({alias: 'value', required: true})\n public set valueSetter(x: T) {\n this.value.set(x);\n }\n\n protected onClick(value = this.value()): void {\n if (this.host?.handleOption && value !== undefined) {\n this.host.handleOption(value);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n inject,\n Input,\n type OnDestroy,\n type TemplateRef,\n} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\nimport {TUI_DATA_LIST_HOST, type TuiDataListHost} from '../data-list.tokens';\nimport {TUI_OPTION_CONTENT} from './option-content';\n\n/**\n * TODO(v5): delete\n * @deprecated use `<button tuiOption new />` / `<a tuiOption new /> / `<label tuiOption new /> instead\n */\n@Component({\n standalone: true,\n selector:\n 'button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])',\n imports: [PolymorpheusOutlet],\n template: `\n <ng-container *polymorpheusOutlet=\"content || t as text; context: {$implicit: t}\">\n {{ text }}\n </ng-container>\n <ng-template #t>\n <ng-content />\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithIcons],\n host: {\n type: 'button',\n role: 'option',\n '[attr.disabled]': 'disabled || null',\n '[class._with-dropdown]': 'dropdown?.()',\n '(click)': 'onClick()',\n '(mousemove.zoneless)': 'onMouseMove()',\n },\n})\nexport class TuiOption<T = unknown> implements OnDestroy {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly el = tuiInjectElement();\n private readonly dataList = inject<TuiDataListComponent<T>>(\n forwardRef(() => TuiDataListComponent),\n {optional: true},\n );\n\n private readonly host = inject<TuiDataListHost<T>>(TUI_DATA_LIST_HOST, {\n optional: true,\n });\n\n protected readonly content: PolymorpheusContent<\n TuiContext<TemplateRef<Record<string, unknown>>>\n > = inject(TUI_OPTION_CONTENT, {optional: true});\n\n protected readonly dropdown = inject(TuiDropdownDirective, {\n self: true,\n optional: true,\n })?.ref;\n\n @Input()\n public disabled = false;\n\n @Input()\n public value?: T;\n\n // Preventing focus loss upon focused option removal\n public ngOnDestroy(): void {\n this.dataList?.handleFocusLossIfNecessary(this.el);\n }\n\n protected onClick(): void {\n if (this.host?.handleOption && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n protected onMouseMove(): void {\n if (\n !this.isMobile &&\n !tuiIsNativeFocused(this.el) &&\n this.dataList &&\n this.el.closest('[tuiDataListDropdownManager]')\n ) {\n this.el.focus({preventScroll: true});\n }\n }\n}\n","import {NgIf} from '@angular/common';\nimport {\n type AfterContentChecked,\n type AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n forwardRef,\n inject,\n Input,\n isSignal,\n NgZone,\n type QueryList,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {\n tuiQueryListChanges,\n tuiTakeUntilDestroyed,\n tuiZonefree,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsNativeFocusedIn, tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {combineLatest, map, ReplaySubject, startWith, switchMap, timer} from 'rxjs';\n\nimport {\n TUI_DATA_LIST_HOST,\n tuiAsDataListAccessor,\n type TuiDataListAccessor,\n} from './data-list.tokens';\nimport {TuiOptionWithValue} from './option/option.directive';\nimport {TUI_OPTION_CONTENT, TuiWithOptionContent} from './option/option-content';\nimport {TuiOption} from './option/option-legacy.component';\n\nexport function tuiInjectDataListSize(): TuiSizeL | TuiSizeS {\n const sizes = ['s', 'm', 'l'] as const;\n const size = inject(TUI_DATA_LIST_HOST, {optional: true})?.size;\n\n return size && sizes.includes(size) ? size : 'l';\n}\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n@Component({\n standalone: true,\n selector: 'tui-data-list',\n imports: [NgIf, PolymorpheusOutlet],\n templateUrl: './data-list.template.html',\n styleUrls: ['./data-list.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsDataListAccessor(TuiDataListComponent),\n {\n provide: TUI_OPTION_CONTENT,\n useFactory: () =>\n inject(TuiWithOptionContent, {optional: true})?.content ??\n // TODO(v5): remove when all legacy controls are deleted\n inject(TUI_OPTION_CONTENT, {\n host: true,\n skipSelf: true,\n optional: true,\n }) ??\n inject(TUI_OPTION_CONTENT, {skipSelf: true, optional: true}),\n },\n ],\n host: {\n role: 'listbox',\n '[attr.data-size]': 'size',\n '(focusin)': 'onFocusIn($event.relatedTarget, $event.currentTarget)',\n '(mousedown.prevent)': '(0)',\n '(wheel.zoneless.passive)': 'handleFocusLossIfNecessary()',\n '(mouseleave)': 'handleFocusLossIfNecessary($event.target)',\n '(keydown.tab)': 'handleFocusLossIfNecessary()',\n '(keydown.shift.tab)': 'handleFocusLossIfNecessary()',\n '(keydown.arrowDown.prevent)': 'onKeyDownArrow($event.target, 1)',\n '(keydown.arrowUp.prevent)': 'onKeyDownArrow($event.target, -1)',\n },\n})\nexport class TuiDataListComponent<T>\n implements TuiDataListAccessor<T>, AfterContentChecked, AfterContentInit\n{\n // TODO(v5): delete\n @ContentChildren(forwardRef(() => TuiOption), {descendants: true})\n private readonly legacyOptionsQuery: QueryList<TuiOption<T>> = EMPTY_QUERY;\n\n @ContentChildren(forwardRef(() => TuiOptionWithValue), {descendants: true})\n private readonly optionsQuery: QueryList<TuiOptionWithValue<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n private readonly ngZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n private readonly el = tuiInjectElement();\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly contentReady$ = new ReplaySubject<boolean>(1);\n\n protected readonly fallback = toSignal(inject(TUI_NOTHING_FOUND_MESSAGE));\n protected readonly empty = signal(false);\n\n @Input()\n public emptyContent: PolymorpheusContent;\n\n @Input()\n public size = tuiInjectDataListSize();\n\n // TODO(v5): use signal `contentChildren`\n public readonly options = toSignal<readonly T[]>(\n this.contentReady$.pipe(\n switchMap(() =>\n combineLatest([\n tuiQueryListChanges(this.legacyOptionsQuery),\n tuiQueryListChanges(this.optionsQuery),\n ]),\n ),\n map(([legacyOptions, options]) =>\n [\n ...legacyOptions.map(({value}) => value),\n ...options.map(({value}) => value()),\n ].filter(tuiIsPresent),\n ),\n startWith([]),\n ),\n {requireSync: true},\n );\n\n public onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n\n public handleFocusLossIfNecessary(element: Element = this.el): void {\n if (tuiIsNativeFocusedIn(element)) {\n this.origin?.focus({preventScroll: true});\n }\n }\n\n public ngAfterContentInit(): void {\n this.contentReady$.next(true);\n }\n\n // TODO: Refactor to :has after Safari support bumped to 15\n public ngAfterContentChecked(): void {\n timer(0)\n .pipe(tuiZonefree(this.ngZone), tuiTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.empty.set(!this.elements.length);\n this.cdr.detectChanges();\n });\n }\n\n // TODO(v5): delete\n public getOptions(includeDisabled = false): readonly T[] {\n return [\n ...this.legacyOptionsQuery, // TODO(v5): delete\n ...this.optionsQuery,\n ]\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => (isSignal(value) ? value() : value))\n .filter(tuiIsPresent);\n }\n\n protected onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.el.querySelectorAll('[tuiOption]'));\n }\n}\n","<ng-content />\n<div\n *ngIf=\"empty()\"\n class=\"t-empty\"\n>\n <ng-container *polymorpheusOutlet=\"emptyContent || fallback() as text\">\n {{ text }}\n </ng-container>\n</div>\n","import {Directive, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n\nexport function tuiAsDataList(list: Type<TuiDataListDirective>): Provider {\n return tuiProvide(TuiDataListDirective, list);\n}\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n '[attr.data-label]': 'label',\n },\n})\nexport class TuiOptGroup {\n @Input()\n public label?: string | null;\n}\n","import {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiOptGroup} from './opt-group.directive';\nimport {TuiOptionNew, TuiOptionWithValue} from './option/option.directive';\nimport {TuiOption} from './option/option-legacy.component';\n\nexport const TuiDataList = [\n TuiDataListComponent,\n TuiDataListDirective,\n TuiOption,\n TuiOptionNew,\n TuiOptionWithValue,\n TuiOptGroup,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA8BA;;AAEG;AACU,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE,EAC3C;AAEI,SAAU,qBAAqB,CAAC,QAAmC,EAAA;AACrE,IAAA,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;AACpF,CAAC;AAED;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACvC;AAEI,SAAU,iBAAiB,CAAI,IAA8B,EAAA;AAC/D,IAAA,OAAO,UAAU,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AAChD;;ACtCA;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAGlD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EAAE;AAEnC,SAAU,kBAAkB,CAC9B,QAEe,EAAA;IAEf,OAAO;AACH,QAAA,OAAO,EAAE,kBAAkB;QAC3B,QAAQ;KACX,CAAC;AACN,CAAC;AAED,MAGa,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;QAKuB,IAAY,CAAA,YAAA,GAAqB,IAAI,CAAC;AAEtC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AChB,oBAAA,QAAQ,EAAE,0BAA0B;AACvC,iBAAA,CAAA;;AAGK,SAAU,aAAa,CAAC,IAAgC,EAAA;AAC1D,IAAA,OAAO,UAAU,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;AAClD;;ACTA,MAQa,WAAW,CAAA;+GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,OAAO;AAC/B,qBAAA;AACJ,iBAAA,CAAA;8BAGU,KAAK,EAAA,CAAA;sBADX,KAAK;;;ACLG,MAAA,WAAW,GAAG;IACvB,oBAAoB;IACpB,oBAAoB;IACpB,SAAS;IACT,YAAY;IACZ,kBAAkB;IAClB,WAAW;;;ACZf;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-data-list.mjs","sources":["../../../projects/core/components/data-list/data-list.tokens.ts","../../../projects/core/components/data-list/option/option-content.ts","../../../projects/core/components/data-list/option/option.directive.ts","../../../projects/core/components/data-list/option/option-legacy.component.ts","../../../projects/core/components/data-list/data-list.component.ts","../../../projects/core/components/data-list/data-list.template.html","../../../projects/core/components/data-list/data-list.directive.ts","../../../projects/core/components/data-list/opt-group.directive.ts","../../../projects/core/components/data-list/data-list.ts","../../../projects/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {InjectionToken, type Provider, type Signal, type Type} from '@angular/core';\nimport {type TuiIdentityMatcher, type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiDataListAccessor<T = unknown> {\n /**\n * @deprecated Use `options` property instead\n */\n getOptions(includeDisabled?: boolean): readonly T[];\n // TODO(v5): remove `undefined` for this property\n options?: Signal<readonly T[]>;\n}\n\n// TODO: Consider refactoring checkOption, it is only needed in ComboBox\nexport interface TuiDataListHost<T> {\n checkOption?(option: T): void;\n handleOption?(option: T): void;\n /**\n * @deprecated Use `inject(TuiItemsHandlersDirective<T>).identityMatcher` instead\n */\n readonly identityMatcher?: TuiIdentityMatcher<T>;\n /**\n * @deprecated Use `inject(TuiItemsHandlersDirective<T>).stringify` instead\n */\n readonly stringify?: TuiStringHandler<T>;\n readonly size?: TuiSizeL | TuiSizeS;\n}\n\n/**\n * Accessor for data-list options\n */\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n ngDevMode ? 'TUI_DATA_LIST_ACCESSOR' : '',\n);\n\nexport function tuiAsDataListAccessor(accessor: Type<TuiDataListAccessor>): Provider {\n return [tuiProvide(TUI_DATA_LIST_ACCESSOR, accessor), tuiAsAuxiliary(accessor)];\n}\n\n/**\n * DataList controller\n */\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<unknown>>(\n ngDevMode ? 'TUI_DATA_LIST_HOST' : '',\n);\n\nexport function tuiAsDataListHost<T>(host: Type<TuiDataListHost<T>>): Provider {\n return tuiProvide(TUI_DATA_LIST_HOST, host);\n}\n","import {\n ContentChild,\n Directive,\n inject,\n InjectionToken,\n type Provider,\n type TemplateRef,\n type Type,\n} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n/**\n * Content for tuiOption component\n */\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n | PolymorpheusContent<TuiContext<TemplateRef<Record<string, unknown>>>> // TODO(v5): delete\n | Type<any>\n>(ngDevMode ? 'TUI_OPTION_CONTENT' : '');\n\nexport function tuiAsOptionContent(\n useValue:\n | PolymorpheusContent<TuiContext<TemplateRef<Record<string, unknown>>>> // TODO(v5): delete\n | Type<any>,\n): Provider {\n return {\n provide: TUI_OPTION_CONTENT,\n useValue,\n };\n}\n\n@Directive({\n standalone: true,\n})\nexport class TuiWithOptionContent {\n @ContentChild(TUI_OPTION_CONTENT, {descendants: true})\n protected readonly localContent: Type<any> | null = null;\n\n protected readonly globalContent = inject<Type<any>>(TUI_OPTION_CONTENT, {\n optional: true,\n });\n\n public get content(): Type<any> | null {\n return this.globalContent ?? this.localContent;\n }\n}\n","import {\n createComponent,\n Directive,\n EnvironmentInjector,\n forwardRef,\n inject,\n INJECTOR,\n Input,\n type OnDestroy,\n signal,\n type Type,\n ViewContainerRef,\n} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TuiDataListComponent} from '../data-list.component';\nimport {TUI_DATA_LIST_HOST, type TuiDataListHost} from '../data-list.tokens';\nimport {TUI_OPTION_CONTENT} from './option-content';\n\n// TODO(v5): rename `TuiOptionNew` => `TuiOption` & remove [new] from selector\n// TODO: Consider all use cases for aria roles\n@Directive({\n standalone: true,\n selector: 'button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]',\n hostDirectives: [TuiWithIcons],\n host: {\n type: 'button',\n role: 'option',\n '[attr.disabled]': 'disabled || null',\n '[class._with-dropdown]': 'dropdown?.()',\n '(mousemove.zoneless)': 'onMouseMove()',\n },\n})\nexport class TuiOptionNew<T = unknown> implements OnDestroy {\n private readonly vcr = inject(ViewContainerRef);\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly el = tuiInjectElement();\n private readonly dataList = inject<TuiDataListComponent<T>>(\n forwardRef(() => TuiDataListComponent),\n {optional: true},\n );\n\n private readonly content = inject<Type<any> | null>(TUI_OPTION_CONTENT, {\n optional: true,\n });\n\n private readonly ref =\n this.content &&\n createComponent(this.content, {\n environmentInjector: inject(EnvironmentInjector),\n elementInjector: inject(INJECTOR),\n hostElement: tuiInjectElement(),\n });\n\n protected readonly dropdown = inject(TuiDropdownDirective, {\n self: true,\n optional: true,\n })?.ref;\n\n @Input()\n public disabled = false;\n\n constructor() {\n if (this.ref) {\n this.vcr.insert(this.ref.hostView);\n this.ref.changeDetectorRef.detectChanges();\n }\n }\n\n // Preventing focus loss upon focused option removal\n public ngOnDestroy(): void {\n this.dataList?.handleFocusLossIfNecessary(this.el);\n }\n\n protected onMouseMove(): void {\n if (\n !this.isMobile &&\n !tuiIsFocused(this.el) &&\n this.dataList &&\n this.el.closest('[tuiDataListDropdownManager]')\n ) {\n this.el.focus({preventScroll: true});\n }\n }\n}\n\n// TODO(v5): remove [new] from selector\n@Directive({\n standalone: true,\n selector:\n 'button[tuiOption][value][new], a[tuiOption][value][new], label[tuiOption][value][new]',\n host: {\n '(click)': 'onClick()',\n },\n})\nexport class TuiOptionWithValue<T = unknown> {\n private readonly host = inject<TuiDataListHost<T>>(TUI_DATA_LIST_HOST, {\n optional: true,\n });\n\n @Input()\n public disabled = false;\n\n public readonly value = signal<T | undefined>(undefined);\n\n // TODO(v5): use `input.required<T>()` to remove `undefined` from `this.value()`\n @Input({alias: 'value', required: true})\n public set valueSetter(x: T) {\n this.value.set(x);\n }\n\n protected onClick(value = this.value()): void {\n if (this.host?.handleOption && value !== undefined) {\n this.host.handleOption(value);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n inject,\n Input,\n type OnDestroy,\n type TemplateRef,\n} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\nimport {TUI_DATA_LIST_HOST, type TuiDataListHost} from '../data-list.tokens';\nimport {TUI_OPTION_CONTENT} from './option-content';\n\n/**\n * TODO(v5): delete\n * @deprecated use `<button tuiOption new />` / `<a tuiOption new /> / `<label tuiOption new /> instead\n */\n@Component({\n selector:\n 'button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])',\n imports: [PolymorpheusOutlet],\n template: `\n <ng-container *polymorpheusOutlet=\"content || t as text; context: {$implicit: t}\">\n {{ text }}\n </ng-container>\n <ng-template #t>\n <ng-content />\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithIcons],\n host: {\n type: 'button',\n role: 'option',\n '[attr.disabled]': 'disabled || null',\n '[class._with-dropdown]': 'dropdown?.()',\n '(click)': 'onClick()',\n '(mousemove.zoneless)': 'onMouseMove()',\n },\n})\nexport class TuiOption<T = unknown> implements OnDestroy {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly el = tuiInjectElement();\n private readonly dataList = inject<TuiDataListComponent<T>>(\n forwardRef(() => TuiDataListComponent),\n {optional: true},\n );\n\n private readonly host = inject<TuiDataListHost<T>>(TUI_DATA_LIST_HOST, {\n optional: true,\n });\n\n protected readonly content: PolymorpheusContent<\n TuiContext<TemplateRef<Record<string, unknown>>>\n > = inject(TUI_OPTION_CONTENT, {optional: true});\n\n protected readonly dropdown = inject(TuiDropdownDirective, {\n self: true,\n optional: true,\n })?.ref;\n\n @Input()\n public disabled = false;\n\n @Input()\n public value?: T;\n\n // Preventing focus loss upon focused option removal\n public ngOnDestroy(): void {\n this.dataList?.handleFocusLossIfNecessary(this.el);\n }\n\n protected onClick(): void {\n if (this.host?.handleOption && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n protected onMouseMove(): void {\n if (\n !this.isMobile &&\n !tuiIsFocused(this.el) &&\n this.dataList &&\n this.el.closest('[tuiDataListDropdownManager]')\n ) {\n this.el.focus({preventScroll: true});\n }\n }\n}\n","import {\n type AfterContentChecked,\n type AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n forwardRef,\n inject,\n Input,\n isSignal,\n NgZone,\n type QueryList,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {\n tuiQueryListChanges,\n tuiTakeUntilDestroyed,\n tuiZonefree,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocusedIn, tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {combineLatest, map, ReplaySubject, startWith, switchMap, timer} from 'rxjs';\n\nimport {\n TUI_DATA_LIST_HOST,\n tuiAsDataListAccessor,\n type TuiDataListAccessor,\n} from './data-list.tokens';\nimport {TuiOptionWithValue} from './option/option.directive';\nimport {TUI_OPTION_CONTENT, TuiWithOptionContent} from './option/option-content';\nimport {TuiOption} from './option/option-legacy.component';\n\nexport function tuiInjectDataListSize(): TuiSizeL | TuiSizeS {\n const sizes = ['s', 'm', 'l'] as const;\n const size = inject(TUI_DATA_LIST_HOST, {optional: true})?.size;\n\n return size && sizes.includes(size) ? size : 'l';\n}\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n@Component({\n selector: 'tui-data-list',\n imports: [PolymorpheusOutlet],\n templateUrl: './data-list.template.html',\n styleUrl: './data-list.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsDataListAccessor(TuiDataListComponent),\n {\n provide: TUI_OPTION_CONTENT,\n useFactory: () =>\n inject(TuiWithOptionContent, {optional: true})?.content ??\n // TODO(v5): remove when all legacy controls are deleted\n inject(TUI_OPTION_CONTENT, {\n host: true,\n skipSelf: true,\n optional: true,\n }) ??\n inject(TUI_OPTION_CONTENT, {skipSelf: true, optional: true}),\n },\n ],\n host: {\n role: 'listbox',\n '[attr.data-size]': 'size',\n '(focusin)': 'onFocusIn($event.relatedTarget, $event.currentTarget)',\n '(mousedown.prevent)': '(0)',\n '(wheel.zoneless.passive)': 'handleFocusLossIfNecessary()',\n '(mouseleave)': 'handleFocusLossIfNecessary($event.target)',\n '(keydown.tab)': 'handleFocusLossIfNecessary()',\n '(keydown.shift.tab)': 'handleFocusLossIfNecessary()',\n '(keydown.arrowDown.prevent)': 'onKeyDownArrow($event.target, 1)',\n '(keydown.arrowUp.prevent)': 'onKeyDownArrow($event.target, -1)',\n },\n})\nexport class TuiDataListComponent<T>\n implements TuiDataListAccessor<T>, AfterContentChecked, AfterContentInit\n{\n // TODO(v5): delete\n @ContentChildren(forwardRef(() => TuiOption), {descendants: true})\n private readonly legacyOptionsQuery: QueryList<TuiOption<T>> = EMPTY_QUERY;\n\n @ContentChildren(forwardRef(() => TuiOptionWithValue), {descendants: true})\n private readonly optionsQuery: QueryList<TuiOptionWithValue<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n private readonly ngZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n private readonly el = tuiInjectElement();\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly contentReady$ = new ReplaySubject<boolean>(1);\n\n protected readonly fallback = inject(TUI_NOTHING_FOUND_MESSAGE);\n protected readonly empty = signal(false);\n\n @Input()\n public emptyContent: PolymorpheusContent;\n\n @Input()\n public size = tuiInjectDataListSize();\n\n // TODO(v5): use signal `contentChildren`\n public readonly options = toSignal<readonly T[]>(\n this.contentReady$.pipe(\n switchMap(() =>\n combineLatest([\n tuiQueryListChanges(this.legacyOptionsQuery),\n tuiQueryListChanges(this.optionsQuery),\n ]),\n ),\n map(([legacyOptions, options]) =>\n [\n ...legacyOptions.map(({value}) => value),\n ...options.map(({value}) => value()),\n ].filter(tuiIsPresent),\n ),\n startWith([]),\n ),\n {requireSync: true},\n );\n\n public onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n\n public handleFocusLossIfNecessary(element: Element = this.el): void {\n if (tuiIsFocusedIn(element)) {\n this.origin?.focus({preventScroll: true});\n }\n }\n\n public ngAfterContentInit(): void {\n this.contentReady$.next(true);\n }\n\n // TODO: Refactor to :has after Safari support bumped to 15\n public ngAfterContentChecked(): void {\n timer(0)\n .pipe(tuiZonefree(this.ngZone), tuiTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.empty.set(!this.elements.length);\n this.cdr.detectChanges();\n });\n }\n\n // TODO(v5): delete\n public getOptions(includeDisabled = false): readonly T[] {\n return [\n ...this.legacyOptionsQuery, // TODO(v5): delete\n ...this.optionsQuery,\n ]\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => (isSignal(value) ? value() : value))\n .filter(tuiIsPresent);\n }\n\n protected onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.el.querySelectorAll('[tuiOption]'));\n }\n}\n","<ng-content />\n@if (empty()) {\n <div class=\"t-empty\">\n <ng-container *polymorpheusOutlet=\"emptyContent || fallback() as text\">\n {{ text }}\n </ng-container>\n </div>\n}\n","import {Directive, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n\nexport function tuiAsDataList(list: Type<TuiDataListDirective>): Provider {\n return tuiProvide(TuiDataListDirective, list);\n}\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n '[attr.data-label]': 'label',\n },\n})\nexport class TuiOptGroup {\n @Input()\n public label?: string | null;\n}\n","import {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiOptGroup} from './opt-group.directive';\nimport {TuiOptionNew, TuiOptionWithValue} from './option/option.directive';\nimport {TuiOption} from './option/option-legacy.component';\n\nexport const TuiDataList = [\n TuiDataListComponent,\n TuiDataListDirective,\n TuiOption,\n TuiOptionNew,\n TuiOptionWithValue,\n TuiOptGroup,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA8BA;;AAEG;AACU,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE;AAGvC,SAAU,qBAAqB,CAAC,QAAmC,EAAA;AACrE,IAAA,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;AACnF;A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AAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,OAAO;AAC/B,qBAAA;AACJ,iBAAA;8BAGU,KAAK,EAAA,CAAA;sBADX;;;ACLQ,MAAA,WAAW,GAAG;IACvB,oBAAoB;IACpB,oBAAoB;IACpB,SAAS;IACT,YAAY;IACZ,kBAAkB;IAClB,WAAW;;;ACZf;;AAEG;;;;"}
@@ -1,57 +1,37 @@
1
- import { DOCUMENT, AsyncPipe, NgIf, NgForOf } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, Injectable, computed, Component, ChangeDetectionStrategy, Directive, assertInInjectionContext, INJECTOR } from '@angular/core';
4
- import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
2
+ import { InjectionToken, inject, Injectable, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, assertInInjectionContext, INJECTOR } from '@angular/core';
3
+ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
5
4
  import { TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
6
5
  import * as i1 from '@taiga-ui/cdk/directives/animated';
7
6
  import { TuiAnimated, TuiAnimatedParent } from '@taiga-ui/cdk/directives/animated';
8
7
  import { TuiAutoFocus } from '@taiga-ui/cdk/directives/auto-focus';
9
8
  import { TuiButton } from '@taiga-ui/core/components/button';
10
- import { TuiBreakpointService } from '@taiga-ui/core/services';
9
+ import { TuiHeader, tuiHeaderOptionsProvider } from '@taiga-ui/core/components/header';
10
+ import { TuiTitle } from '@taiga-ui/core/directives/title';
11
11
  import { TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
12
12
  import { injectContext, PolymorpheusOutlet, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
13
- import { BehaviorSubject, EMPTY, Observable, merge, filter, switchMap, take, map, isObservable, of, Subject, exhaustMap } from 'rxjs';
14
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
13
+ import { BehaviorSubject, filter, Observable, merge, switchMap, take, map, of, isObservable, Subject, exhaustMap } from 'rxjs';
14
+ import { DOCUMENT } from '@angular/common';
15
+ import { Router, ActivationStart } from '@angular/router';
15
16
  import { WA_WINDOW } from '@ng-web-apis/common';
16
17
  import { tuiCloseWatcher, tuiZonefull, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
17
18
  import { tuiInjectElement, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter } from '@taiga-ui/cdk/utils/dom';
18
19
  import { tuiGetViewportWidth } from '@taiga-ui/core/utils';
19
20
  import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
20
21
  import { TuiPopoverService, tuiAsPopover } from '@taiga-ui/cdk/services';
22
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
21
23
  import { TuiFocusTrap } from '@taiga-ui/cdk/directives/focus-trap';
22
24
  import { TuiScrollControls, TuiScrollRef } from '@taiga-ui/core/components/scrollbar';
25
+ import * as i1$1 from '@taiga-ui/cdk/directives/active-zone';
26
+ import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
27
+ import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
23
28
 
24
29
  const TUI_DIALOGS = new InjectionToken(ngDevMode ? 'TUI_DIALOGS' : '', {
25
30
  factory: () => new BehaviorSubject([]),
26
31
  });
27
- const TUI_DIALOG_DEFAULT_OPTIONS = {
28
- appearance: '',
29
- size: 'm',
30
- required: false,
31
- closeable: true,
32
- dismissible: true,
33
- label: '',
34
- header: '',
35
- data: undefined,
36
- };
37
- /**
38
- * A stream to close dialogs
39
- * TODO: use router.events in v5
40
- */
41
32
  const TUI_DIALOGS_CLOSE = new InjectionToken(ngDevMode ? 'TUI_DIALOGS_CLOSE' : '', {
42
- factory: () => EMPTY,
43
- });
44
- /**
45
- * Default parameters for dialog component
46
- */
47
- const TUI_DIALOG_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_DIALOG_OPTIONS' : '', {
48
- factory: () => TUI_DIALOG_DEFAULT_OPTIONS,
33
+ factory: () => inject(Router).events.pipe(filter((e) => e instanceof ActivationStart)),
49
34
  });
50
- function tuiDialogOptionsProvider(options) {
51
- return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);
52
- }
53
-
54
- const SCROLLBAR_PLACEHOLDER = 17;
55
35
  class TuiDialogCloseService extends Observable {
56
36
  constructor() {
57
37
  super((subscriber) => merge(this.esc$, this.mousedown$, tuiCloseWatcher().pipe(tuiZonefull())).subscribe(subscriber));
@@ -67,21 +47,20 @@ class TuiDialogCloseService extends Observable {
67
47
  !event.defaultPrevented &&
68
48
  (this.el.contains(target) || this.isOutside(target)));
69
49
  }));
70
- this.mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(filter((event) => tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER &&
50
+ this.mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(filter((event) =>
51
+ // Scrollbars
52
+ tuiGetViewportWidth(this.win) - event.clientX > 17 &&
71
53
  this.isOutside(tuiGetActualTarget(event))), switchMap(() => tuiTypedFromEvent(this.doc, 'mouseup').pipe(take(1), map(tuiGetActualTarget), filter((target) => this.isOutside(target)))));
72
54
  }
73
55
  isOutside(target) {
74
- return (tuiIsElement(target) &&
75
- (!tuiContainsOrAfter(this.el, target) ||
76
- // TODO: Drop 'new' attribute in v5
77
- (target === this.el && !this.el.hasAttribute('new'))));
56
+ return tuiIsElement(target) && !tuiContainsOrAfter(this.el, target);
78
57
  }
79
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogCloseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
80
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogCloseService }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogCloseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogCloseService }); }
81
60
  }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogCloseService, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogCloseService, decorators: [{
83
62
  type: Injectable
84
- }], ctorParameters: function () { return []; } });
63
+ }], ctorParameters: () => [] });
85
64
 
86
65
  const REQUIRED_ERROR = new Error('Required dialog was dismissed');
87
66
  function toObservable(valueOrStream) {
@@ -90,51 +69,61 @@ function toObservable(valueOrStream) {
90
69
  class TuiDialogComponent {
91
70
  constructor() {
92
71
  this.close$ = new Subject();
93
- this.context = injectContext();
94
- this.closeWord$ = inject(TUI_CLOSE_WORD);
72
+ this.close = inject(TUI_CLOSE_WORD);
95
73
  this.icons = inject(TUI_COMMON_ICONS);
96
- this.from = computed(() => this.size === 'fullscreen' || this.size === 'page' || this.isMobile()
97
- ? 'translateY(100vh)'
98
- : 'translateY(2.5rem)');
99
- this.isMobile = toSignal(inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')));
100
- merge(this.close$.pipe(switchMap(() => toObservable(this.context.closeable))), inject(TuiDialogCloseService).pipe(exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1)))), inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)))
74
+ this.context = injectContext();
75
+ this.primitive = typeof this.context.content === 'function' ||
76
+ Object(this.context.content) !== this.context.content;
77
+ this.sub = merge(this.close$.pipe(switchMap(() => toObservable(this.context.closable))), inject(TuiDialogCloseService).pipe(exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1)))), inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)))
101
78
  .pipe(filter(Boolean), takeUntilDestroyed())
102
79
  .subscribe(() => {
103
- this.close();
80
+ if (this.context.required) {
81
+ this.context.$implicit.error(REQUIRED_ERROR);
82
+ }
83
+ else {
84
+ this.context.$implicit.complete();
85
+ }
104
86
  });
105
87
  }
106
- get size() {
107
- return this.context.size;
108
- }
109
- get header() {
110
- return this.context.header;
111
- }
112
- close() {
113
- if (this.context.required) {
114
- this.context.$implicit.error(REQUIRED_ERROR);
115
- }
116
- else {
117
- this.context.$implicit.complete();
118
- }
119
- }
120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
121
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "size", "class._centered": "header", "style.--tui-from": "from()" } }, providers: [TuiDialogCloseService], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n <div\n *ngIf=\"context.closeable || context.dismissible\"\n class=\"t-buttons\"\n >\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n<button\n *ngIf=\"context.closeable\"\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n>\n {{ closeWord$ | async }}\n</button>\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1.5rem;border:2.5rem solid transparent}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-popup)}:host[data-size=auto]{inline-size:auto}:host[data-size=s]{inline-size:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{font:var(--tui-font-heading-5)}:host[data-size=m]{inline-size:42.5rem}:host[data-size=l]{inline-size:55rem}:host[data-size=fullscreen],:host[data-size=page]{min-inline-size:100vw;min-block-size:100%;border-radius:0;border:none;background:var(--tui-background-elevation-1);box-shadow:0 4rem var(--tui-background-elevation-1)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - 22.5rem)}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{font:var(--tui-font-heading-3)}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-inline-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0;border:none;margin:auto 0 0;background:var(--tui-background-elevation-1);padding-block-end:env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{font:var(--tui-font-heading-5)}:host :host-context(tui-root._mobile)[data-size=fullscreen],:host :host-context(tui-root._mobile)[data-size=page]{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size=fullscreen] .t-close,:host :host-context(tui-root._mobile)[data-size=page] .t-close{top:max(1rem,env(safe-area-inset-top))}:host[data-size=page] .t-content,:host-context(tui-root._mobile) :host[data-size=page] .t-content{padding:0}.t-heading{margin:0 0 .5rem;overflow-wrap:break-word;font:var(--tui-font-heading-4)}.t-heading_closable{padding-inline-end:2rem}.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:1.75rem;background:var(--tui-background-elevation-1)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-content>section{border-radius:inherit}.t-filler{flex-grow:1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:1rem;right:1rem}@supports (inset-inline-end: 0){.t-close{right:unset;inset-inline-end:1rem}}.t-buttons{margin-block-start:1.25rem;text-align:end}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
89
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "context.size", "class._closable": "context.closable" } }, providers: [
90
+ TuiDialogCloseService,
91
+ tuiHeaderOptionsProvider(() => ({ size: getSize(injectContext()) })),
92
+ ], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance === 'fullscreen' ? 'action' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ close() }}\n </button>\n}\n\n@if (!primitive && context.label) {\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n </hgroup>\n </header>\n}\n\n<ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n <p [innerHTML]=\"text\"></p>\n </hgroup>\n </header>\n @if (context.closable || context.dismissible) {\n <footer>\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n</ng-container>\n", styles: ["tui-dialog{position:relative;box-sizing:border-box;font:var(--tui-font-text-m);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-popup)}tui-dialog:not([data-appearance~=fullscreen])._closable>header,tui-dialog:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[data-appearance~=taiga]{max-inline-size:calc(100vw - 5rem);margin:2.5rem;padding:1.75rem;border-radius:1.5rem;--tui-from: translateY(2.5rem)}tui-dialog[data-appearance~=taiga].tui-enter,tui-dialog[data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[data-appearance~=taiga][data-size=s]>footer,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>footer,tui-dialog[data-appearance~=taiga][data-size=s]>tui-confirm>footer{margin-block-start:1.25rem}tui-dialog[data-appearance~=taiga][data-size=m]{inline-size:37.5rem}tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[data-appearance~=taiga]>header:not(:last-child),tui-dialog[data-appearance~=taiga]>ng-component>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[data-appearance~=taiga]>footer,tui-dialog[data-appearance~=taiga]>ng-component>footer,tui-dialog[data-appearance~=taiga]>tui-confirm>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[data-appearance~=fullscreen]{display:flex;flex-direction:column;block-size:100%;inline-size:100%;padding:env(safe-area-inset-top) max(calc(50vw - var(--tui-width) / 2),1rem) max(2rem,env(safe-area-inset-bottom));background:var(--tui-background-base);box-shadow:none;--tui-width: 45rem;--tui-from: translateY(2rem)}tui-dialog[data-appearance~=fullscreen].tui-enter,tui-dialog[data-appearance~=fullscreen].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=fullscreen]>.t-close{position:sticky;top:env(safe-area-inset-top);block-size:4rem;inline-size:auto;align-self:flex-end;margin-block-end:2rem;border-radius:0!important;font:var(--tui-font-text-m)!important;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0 / 0 / env(safe-area-inset-top) 100vw 0}tui-dialog[data-appearance~=fullscreen]>.t-close:before{display:none}tui-dialog[data-appearance~=fullscreen].tui-app-bar .t-close{display:none}tui-dialog[data-appearance~=fullscreen]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[data-appearance~=fullscreen]>tui-app-bar,tui-dialog[data-appearance~=fullscreen]>ng-component>tui-app-bar{position:sticky;top:0;z-index:1;order:-1;border-inline-end:calc(50vw - var(--tui-width) / 2) solid transparent;border-inline-start:calc(50vw - var(--tui-width) / 2) solid transparent;margin:0 calc(var(--tui-width) / 2 - 50vw) 2rem}tui-dialog[data-appearance~=fullscreen]>header,tui-dialog[data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-dialog[data-appearance~=fullscreen]>ng-component>header,tui-dialog[data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin-block-end:2rem}tui-dialog[data-appearance~=fullscreen]>footer,tui-dialog[data-appearance~=fullscreen]>ng-component>footer{display:flex;gap:.5rem .75rem;padding:2rem calc(50vw - var(--tui-width) / 2);margin:0 calc(var(--tui-width) / 2 - 50vw) calc(-2rem - env(safe-area-inset-top))}tui-dialog[data-appearance~=fullscreen]>footer:before,tui-dialog[data-appearance~=fullscreen]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer{flex-direction:row;background:color-mix(in hsl,var(--tui-background-base) 80%,transparent);-webkit-backdrop-filter:blur(2rem);backdrop-filter:blur(2rem)}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer:before,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer>a,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[data-appearance~=fullscreen]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[data-appearance~=fullscreen] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>tui-app-bar,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>tui-app-bar{margin:calc(-1*env(safe-area-inset-top)) -1rem 1rem;padding-block-start:env(safe-area-inset-top);box-sizing:content-box}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>footer,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>footer{padding:0 1rem max(1rem,env(safe-area-inset-bottom));margin:1.5rem -1rem calc(-1*max(1rem,env(safe-area-inset-bottom)))}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
122
93
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogComponent, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, decorators: [{
124
95
  type: Component,
125
- args: [{ standalone: true, selector: 'tui-dialog', imports: [AsyncPipe, NgIf, PolymorpheusOutlet, TuiAutoFocus, TuiButton], changeDetection: ChangeDetectionStrategy.Default, providers: [TuiDialogCloseService], hostDirectives: [TuiAnimated], host: {
96
+ args: [{ selector: 'tui-dialog', imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton, TuiHeader, TuiTitle], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [
97
+ TuiDialogCloseService,
98
+ tuiHeaderOptionsProvider(() => ({ size: getSize(injectContext()) })),
99
+ ], hostDirectives: [TuiAnimated], host: {
126
100
  '[attr.data-appearance]': 'context.appearance',
127
- '[attr.data-size]': 'size',
128
- '[class._centered]': 'header',
129
- '[style.--tui-from]': 'from()',
130
- }, template: "<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n <div\n *ngIf=\"context.closeable || context.dismissible\"\n class=\"t-buttons\"\n >\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n<button\n *ngIf=\"context.closeable\"\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n>\n {{ closeWord$ | async }}\n</button>\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1.5rem;border:2.5rem solid transparent}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-popup)}:host[data-size=auto]{inline-size:auto}:host[data-size=s]{inline-size:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{font:var(--tui-font-heading-5)}:host[data-size=m]{inline-size:42.5rem}:host[data-size=l]{inline-size:55rem}:host[data-size=fullscreen],:host[data-size=page]{min-inline-size:100vw;min-block-size:100%;border-radius:0;border:none;background:var(--tui-background-elevation-1);box-shadow:0 4rem var(--tui-background-elevation-1)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - 22.5rem)}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{font:var(--tui-font-heading-3)}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-inline-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0;border:none;margin:auto 0 0;background:var(--tui-background-elevation-1);padding-block-end:env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{font:var(--tui-font-heading-5)}:host :host-context(tui-root._mobile)[data-size=fullscreen],:host :host-context(tui-root._mobile)[data-size=page]{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size=fullscreen] .t-close,:host :host-context(tui-root._mobile)[data-size=page] .t-close{top:max(1rem,env(safe-area-inset-top))}:host[data-size=page] .t-content,:host-context(tui-root._mobile) :host[data-size=page] .t-content{padding:0}.t-heading{margin:0 0 .5rem;overflow-wrap:break-word;font:var(--tui-font-heading-4)}.t-heading_closable{padding-inline-end:2rem}.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:1.75rem;background:var(--tui-background-elevation-1)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-content>section{border-radius:inherit}.t-filler{flex-grow:1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:1rem;right:1rem}@supports (inset-inline-end: 0){.t-close{right:unset;inset-inline-end:1rem}}.t-buttons{margin-block-start:1.25rem;text-align:end}\n"] }]
131
- }], ctorParameters: function () { return []; } });
101
+ '[attr.data-size]': 'context.size',
102
+ '[class._closable]': 'context.closable',
103
+ }, template: "@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance === 'fullscreen' ? 'action' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ close() }}\n </button>\n}\n\n@if (!primitive && context.label) {\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n </hgroup>\n </header>\n}\n\n<ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n <p [innerHTML]=\"text\"></p>\n </hgroup>\n </header>\n @if (context.closable || context.dismissible) {\n <footer>\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n</ng-container>\n", styles: ["tui-dialog{position:relative;box-sizing:border-box;font:var(--tui-font-text-m);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-popup)}tui-dialog:not([data-appearance~=fullscreen])._closable>header,tui-dialog:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[data-appearance~=taiga]{max-inline-size:calc(100vw - 5rem);margin:2.5rem;padding:1.75rem;border-radius:1.5rem;--tui-from: translateY(2.5rem)}tui-dialog[data-appearance~=taiga].tui-enter,tui-dialog[data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[data-appearance~=taiga][data-size=s]>footer,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>footer,tui-dialog[data-appearance~=taiga][data-size=s]>tui-confirm>footer{margin-block-start:1.25rem}tui-dialog[data-appearance~=taiga][data-size=m]{inline-size:37.5rem}tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[data-appearance~=taiga]>header:not(:last-child),tui-dialog[data-appearance~=taiga]>ng-component>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[data-appearance~=taiga]>footer,tui-dialog[data-appearance~=taiga]>ng-component>footer,tui-dialog[data-appearance~=taiga]>tui-confirm>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[data-appearance~=fullscreen]{display:flex;flex-direction:column;block-size:100%;inline-size:100%;padding:env(safe-area-inset-top) max(calc(50vw - var(--tui-width) / 2),1rem) max(2rem,env(safe-area-inset-bottom));background:var(--tui-background-base);box-shadow:none;--tui-width: 45rem;--tui-from: translateY(2rem)}tui-dialog[data-appearance~=fullscreen].tui-enter,tui-dialog[data-appearance~=fullscreen].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=fullscreen]>.t-close{position:sticky;top:env(safe-area-inset-top);block-size:4rem;inline-size:auto;align-self:flex-end;margin-block-end:2rem;border-radius:0!important;font:var(--tui-font-text-m)!important;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0 / 0 / env(safe-area-inset-top) 100vw 0}tui-dialog[data-appearance~=fullscreen]>.t-close:before{display:none}tui-dialog[data-appearance~=fullscreen].tui-app-bar .t-close{display:none}tui-dialog[data-appearance~=fullscreen]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[data-appearance~=fullscreen]>tui-app-bar,tui-dialog[data-appearance~=fullscreen]>ng-component>tui-app-bar{position:sticky;top:0;z-index:1;order:-1;border-inline-end:calc(50vw - var(--tui-width) / 2) solid transparent;border-inline-start:calc(50vw - var(--tui-width) / 2) solid transparent;margin:0 calc(var(--tui-width) / 2 - 50vw) 2rem}tui-dialog[data-appearance~=fullscreen]>header,tui-dialog[data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-dialog[data-appearance~=fullscreen]>ng-component>header,tui-dialog[data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin-block-end:2rem}tui-dialog[data-appearance~=fullscreen]>footer,tui-dialog[data-appearance~=fullscreen]>ng-component>footer{display:flex;gap:.5rem .75rem;padding:2rem calc(50vw - var(--tui-width) / 2);margin:0 calc(var(--tui-width) / 2 - 50vw) calc(-2rem - env(safe-area-inset-top))}tui-dialog[data-appearance~=fullscreen]>footer:before,tui-dialog[data-appearance~=fullscreen]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer{flex-direction:row;background:color-mix(in hsl,var(--tui-background-base) 80%,transparent);-webkit-backdrop-filter:blur(2rem);backdrop-filter:blur(2rem)}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer:before,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer>a,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[data-appearance~=fullscreen]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[data-appearance~=fullscreen] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>tui-app-bar,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>tui-app-bar{margin:calc(-1*env(safe-area-inset-top)) -1rem 1rem;padding-block-start:env(safe-area-inset-top);box-sizing:content-box}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>footer,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>footer{padding:0 1rem max(1rem,env(safe-area-inset-bottom));margin:1.5rem -1rem calc(-1*max(1rem,env(safe-area-inset-bottom)))}\n"] }]
104
+ }] });
105
+ function getSize({ appearance, size }) {
106
+ if (appearance.includes('fullscreen')) {
107
+ return 'h3';
108
+ }
109
+ return size === 's' ? 'h5' : 'h4';
110
+ }
111
+
112
+ const [TUI_DIALOG_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions({
113
+ appearance: 'taiga',
114
+ size: 'm',
115
+ required: false,
116
+ closable: true,
117
+ dismissible: true,
118
+ label: '',
119
+ data: undefined,
120
+ });
132
121
 
133
122
  class TuiDialogService extends TuiPopoverService {
134
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
135
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogService, providedIn: 'root', useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)) }); }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
124
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, providedIn: 'root', useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)) }); }
136
125
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogService, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, decorators: [{
138
127
  type: Injectable,
139
128
  args: [{
140
129
  providedIn: 'root',
@@ -143,10 +132,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
143
132
  }] });
144
133
 
145
134
  class TuiDialog extends TuiPopoverDirective {
146
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialog, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
147
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDialog, isStandalone: true, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [tuiAsPopover(TuiDialogService)], usesInheritance: true, ngImport: i0 }); }
135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
136
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDialog, isStandalone: true, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [tuiAsPopover(TuiDialogService)], usesInheritance: true, ngImport: i0 }); }
148
137
  }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialog, decorators: [{
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, decorators: [{
150
139
  type: Directive,
151
140
  args: [{
152
141
  standalone: true,
@@ -169,28 +158,58 @@ function tuiDialog(component, { injector, ...options } = {}) {
169
158
  });
170
159
  }
171
160
 
161
+ class TuiActiveZoneAdapter {
162
+ constructor() {
163
+ this.current = inject(TuiActiveZone);
164
+ this.parent = findActive(inject(TuiActiveZone, { skipSelf: true }), tuiGetFocused(inject(DOCUMENT)));
165
+ }
166
+ ngOnInit() {
167
+ this.current.tuiActiveZoneParentSetter = this.parent;
168
+ }
169
+ ngOnDestroy() {
170
+ this.current.tuiActiveZoneParentSetter = null;
171
+ }
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiActiveZoneAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
173
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiActiveZoneAdapter, isStandalone: true, selector: "[tuiActiveZoneAdapter]", hostDirectives: [{ directive: i1$1.TuiActiveZone }], ngImport: i0 }); }
174
+ }
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiActiveZoneAdapter, decorators: [{
176
+ type: Directive,
177
+ args: [{
178
+ standalone: true,
179
+ selector: '[tuiActiveZoneAdapter]',
180
+ hostDirectives: [TuiActiveZone],
181
+ }]
182
+ }] });
183
+ function findActive(zone, el) {
184
+ if (!el || !zone.contains(el)) {
185
+ return null;
186
+ }
187
+ const active = zone.children.find((child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el));
188
+ return active ? findActive(active, el) : zone;
189
+ }
190
+
172
191
  class TuiDialogs {
173
192
  constructor() {
174
193
  this.dialogs = toSignal(inject(TUI_DIALOGS), { initialValue: [] });
175
194
  }
176
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
177
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDialogs, isStandalone: true, selector: "tui-dialogs", ngImport: i0, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n<section\n *ngFor=\"let item of dialogs()\"\n aria-modal=\"true\"\n role=\"dialog\"\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n>\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n</section>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(tui-dialog[new][data-appearance~=fullscreen]) .t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;overscroll-behavior:none;filter:brightness(.25)}.t-dialog:has(tui-dialog[new]){display:grid;place-items:center}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}:host-context(tui-root:has(tui-dropdown-mobile._sheet)) .t-dialog:last-child{filter:brightness(.5)}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }, { kind: "directive", type: TuiFocusTrap, selector: "[tuiFocusTrap]" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }, { kind: "directive", type: TuiScrollRef, selector: "[tuiScrollRef]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
195
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
196
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogs, isStandalone: true, selector: "tui-dialogs", ngImport: i0, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(section:only-of-type ::ng-deep tui-dialog[data-appearance~=fullscreen])>.t-overlay,:host:has(section:only-of-type ::ng-deep tui-notification-middle)>.t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;display:grid;place-items:center;overscroll-behavior:none;filter:brightness(.25)}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZoneAdapter, selector: "[tuiActiveZoneAdapter]" }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }, { kind: "directive", type: TuiFocusTrap, selector: "[tuiFocusTrap]" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }, { kind: "directive", type: TuiScrollRef, selector: "[tuiScrollRef]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
178
197
  }
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDialogs, decorators: [{
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogs, decorators: [{
180
199
  type: Component,
181
- args: [{ standalone: true, selector: 'tui-dialogs', imports: [
182
- NgForOf,
200
+ args: [{ selector: 'tui-dialogs', imports: [
183
201
  PolymorpheusOutlet,
202
+ TuiActiveZoneAdapter,
184
203
  TuiAnimatedParent,
185
204
  TuiFocusTrap,
186
205
  TuiScrollControls,
187
206
  TuiScrollRef,
188
- ], changeDetection: ChangeDetectionStrategy.Default, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n<section\n *ngFor=\"let item of dialogs()\"\n aria-modal=\"true\"\n role=\"dialog\"\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n>\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n</section>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(tui-dialog[new][data-appearance~=fullscreen]) .t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;overscroll-behavior:none;filter:brightness(.25)}.t-dialog:has(tui-dialog[new]){display:grid;place-items:center}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}:host-context(tui-root:has(tui-dropdown-mobile._sheet)) .t-dialog:last-child{filter:brightness(.5)}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"] }]
207
+ ], changeDetection: ChangeDetectionStrategy.Default, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(section:only-of-type ::ng-deep tui-dialog[data-appearance~=fullscreen])>.t-overlay,:host:has(section:only-of-type ::ng-deep tui-notification-middle)>.t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;display:grid;place-items:center;overscroll-behavior:none;filter:brightness(.25)}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"] }]
189
208
  }] });
190
209
 
191
210
  /**
192
211
  * Generated bundle index. Do not edit.
193
212
  */
194
213
 
195
- export { TUI_DIALOGS, TUI_DIALOGS_CLOSE, TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialog, TuiDialogCloseService, TuiDialogComponent, TuiDialogService, TuiDialogs, tuiDialog, tuiDialogOptionsProvider };
214
+ export { TUI_DIALOGS, TUI_DIALOGS_CLOSE, TUI_DIALOG_OPTIONS, TuiDialog, TuiDialogCloseService, TuiDialogComponent, TuiDialogService, TuiDialogs, tuiDialog, tuiDialogOptionsProvider };
196
215
  //# sourceMappingURL=taiga-ui-core-components-dialog.mjs.map