@taiga-ui/core 4.52.0-canary.ece97e9 → 4.52.0-canary.efbd0d4

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 (306) hide show
  1. package/README.md +1 -1
  2. package/classes/accessors.d.ts +2 -2
  3. package/components/calendar/calendar-sheet.component.d.ts +1 -1
  4. package/components/calendar/calendar-sheet.options.d.ts +1 -3
  5. package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +2 -2
  6. package/components/calendar/calendar-spin.component.d.ts +1 -0
  7. package/components/calendar/calendar-year.component.d.ts +1 -1
  8. package/components/calendar/calendar.options.d.ts +9 -0
  9. package/components/calendar/index.d.ts +3 -0
  10. package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +1 -1
  11. package/components/data-list/data-list.component.d.ts +7 -11
  12. package/components/data-list/data-list.d.ts +3 -4
  13. package/components/data-list/data-list.tokens.d.ts +1 -23
  14. package/components/data-list/index.d.ts +3 -4
  15. package/components/data-list/opt-group.directive.d.ts +2 -2
  16. package/components/data-list/option-content.directive.d.ts +14 -0
  17. package/components/data-list/option-with-value.directive.d.ts +9 -0
  18. package/components/data-list/option.directive.d.ts +19 -0
  19. package/components/icon/icon.component.d.ts +2 -2
  20. package/components/index.d.ts +2 -4
  21. package/components/input/index.d.ts +2 -0
  22. package/components/input/input.d.ts +5 -0
  23. package/components/input/input.directive.d.ts +29 -0
  24. package/components/label/label.directive.d.ts +1 -1
  25. package/components/link/index.d.ts +0 -1
  26. package/components/link/link.directive.d.ts +8 -6
  27. package/components/loader/loader.options.d.ts +1 -3
  28. package/components/notification/index.d.ts +3 -0
  29. package/components/notification/notification.component.d.ts +14 -0
  30. package/components/notification/notification.d.ts +3 -0
  31. package/components/notification/notification.directive.d.ts +4 -5
  32. package/components/notification/notification.options.d.ts +10 -7
  33. package/components/notification/notification.service.d.ts +17 -0
  34. package/components/root/root.component.d.ts +1 -1
  35. package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
  36. package/components/scrollbar/scrollbar.component.d.ts +1 -5
  37. package/components/spin-button/spin-button.component.d.ts +1 -1
  38. package/components/textfield/index.d.ts +0 -1
  39. package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
  40. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +8 -13
  41. package/components/textfield/textfield.component.d.ts +20 -32
  42. package/components/textfield/textfield.d.ts +2 -3
  43. package/directives/date-format/date-format.directive.d.ts +3 -7
  44. package/directives/group/group.directive.d.ts +7 -7
  45. package/directives/group/group.options.d.ts +1 -3
  46. package/directives/index.d.ts +0 -5
  47. package/directives/items-handlers/items-handlers.directive.d.ts +5 -9
  48. package/directives/items-handlers/items-handlers.tokens.d.ts +4 -4
  49. package/directives/number-format/number-format.directive.d.ts +3 -7
  50. package/fesm2022/taiga-ui-core-classes.mjs +9 -11
  51. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-core-components-button.mjs +7 -7
  53. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-core-components-calendar.mjs +137 -32
  55. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-core-components-cell.mjs +7 -7
  57. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-core-components-data-list.mjs +110 -279
  59. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-core-components-error.mjs +12 -11
  61. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-core-components-expand.mjs +3 -3
  63. package/fesm2022/taiga-ui-core-components-icon.mjs +10 -11
  64. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-input.mjs +103 -0
  66. package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
  67. package/fesm2022/taiga-ui-core-components-label.mjs +11 -13
  68. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-core-components-link.mjs +13 -28
  70. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-core-components-loader.mjs +7 -12
  72. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-core-components-notification.mjs +99 -29
  74. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-core-components-root.mjs +9 -13
  76. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +42 -51
  78. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-spin-button.mjs +6 -6
  80. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-textfield.mjs +100 -262
  82. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  83. package/fesm2022/{taiga-ui-core-directives-title.mjs → taiga-ui-core-components-title.mjs} +8 -8
  84. package/fesm2022/{taiga-ui-core-directives-title.mjs.map → taiga-ui-core-components-title.mjs.map} +1 -1
  85. package/fesm2022/taiga-ui-core-components.mjs +2 -4
  86. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-core-directives-appearance.mjs +16 -16
  88. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-directives-date-format.mjs +26 -20
  90. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-directives-group.mjs +23 -35
  92. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-directives-icons.mjs +12 -12
  94. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +16 -40
  96. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-core-directives-number-format.mjs +32 -20
  98. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-directives.mjs +0 -5
  100. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -15
  102. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-pipes.mjs +0 -7
  104. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
  106. package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
  107. package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
  108. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
  109. package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +171 -302
  110. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
  111. package/fesm2022/{taiga-ui-core-directives-hint.mjs → taiga-ui-core-portals-hint.mjs} +67 -69
  112. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
  113. package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
  114. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
  115. package/fesm2022/{taiga-ui-core-directives-popup.mjs → taiga-ui-core-portals-popup.mjs} +11 -11
  116. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
  117. package/fesm2022/taiga-ui-core-portals.mjs +11 -0
  118. package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
  119. package/fesm2022/taiga-ui-core-services.mjs +15 -79
  120. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-core-tokens.mjs +51 -60
  122. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
  124. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +19 -19
  126. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-core.mjs +1 -1
  128. package/index.d.ts +1 -1
  129. package/package.json +65 -95
  130. package/pipes/format-number/format-number.pipe.d.ts +6 -4
  131. package/pipes/index.d.ts +0 -7
  132. package/{directives/notification/notification.directive.d.ts → portals/alert/alert.directive.d.ts} +3 -3
  133. package/{directives/notification/notification.service.d.ts → portals/alert/alert.service.d.ts} +3 -3
  134. package/portals/alert/index.d.ts +2 -0
  135. package/{components → portals}/dialog/dialog.component.d.ts +2 -3
  136. package/{components → portals}/dialog/dialog.options.d.ts +2 -3
  137. package/{components → portals}/dialog/dialog.providers.d.ts +1 -2
  138. package/{components → portals}/dialog/dialog.service.d.ts +1 -1
  139. package/{components → portals}/dialog/index.d.ts +0 -1
  140. package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
  141. package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
  142. package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
  143. package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
  144. package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -4
  145. package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
  146. package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +5 -5
  147. package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
  148. package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
  149. package/{directives → portals}/dropdown/dropdown.d.ts +1 -2
  150. package/{directives → portals}/dropdown/dropdown.directive.d.ts +5 -6
  151. package/{directives → portals}/dropdown/index.d.ts +0 -1
  152. package/{directives → portals}/hint/hint-position.directive.d.ts +3 -3
  153. package/{directives → portals}/hint/hint.directive.d.ts +1 -1
  154. package/portals/index.d.ts +6 -0
  155. package/{components → portals}/modal/modal.component.d.ts +3 -3
  156. package/{components → portals}/modal/modal.service.d.ts +3 -3
  157. package/services/index.d.ts +0 -3
  158. package/styles/components/appearance.less +5 -0
  159. package/styles/components/button.less +10 -20
  160. package/styles/components/icon.less +11 -0
  161. package/styles/components/icons.less +2 -1
  162. package/styles/components/label.less +3 -12
  163. package/styles/components/link.less +9 -24
  164. package/styles/components/notification.less +21 -22
  165. package/styles/components/textfield.less +129 -211
  166. package/styles/components/title.less +8 -8
  167. package/styles/mixins/appearance.less +10 -26
  168. package/styles/mixins/appearance.scss +8 -24
  169. package/styles/mixins/date-picker.less +1 -1
  170. package/styles/mixins/mixins.less +0 -5
  171. package/styles/mixins/mixins.scss +0 -5
  172. package/styles/mixins/picker.less +1 -1
  173. package/styles/mixins/picker.scss +1 -1
  174. package/styles/mixins/slider.less +1 -1
  175. package/styles/mixins/slider.scss +2 -3
  176. package/styles/taiga-ui-local.less +0 -1
  177. package/styles/taiga-ui-local.scss +0 -1
  178. package/styles/taiga-ui-theme.less +0 -1
  179. package/styles/theme/appearance/outline.less +9 -18
  180. package/styles/theme/appearance/primary.less +2 -4
  181. package/styles/theme/appearance/secondary.less +6 -14
  182. package/styles/theme/appearance/status.less +0 -4
  183. package/styles/theme/appearance/table.less +36 -35
  184. package/styles/theme/appearance/textfield.less +30 -27
  185. package/styles/theme/appearance.less +0 -1
  186. package/styles/theme/variables.less +16 -19
  187. package/tokens/breakpoint.d.ts +4 -0
  188. package/tokens/common-icons.d.ts +3 -3
  189. package/tokens/date-format.d.ts +2 -3
  190. package/tokens/icons.d.ts +0 -4
  191. package/tokens/index.d.ts +1 -4
  192. package/tokens/number-format.d.ts +2 -3
  193. package/types/index.d.ts +0 -2
  194. package/types/point.d.ts +1 -1
  195. package/types/size.d.ts +0 -11
  196. package/utils/format/index.d.ts +0 -1
  197. package/utils/miscellaneous/font-scaling.d.ts +2 -1
  198. package/utils/miscellaneous/get-duration.d.ts +2 -0
  199. package/utils/miscellaneous/index.d.ts +1 -1
  200. package/animations/animations.d.ts +0 -109
  201. package/animations/index.d.ts +0 -1
  202. package/components/alert/alert.component.d.ts +0 -14
  203. package/components/alert/alert.directive.d.ts +0 -8
  204. package/components/alert/alert.interfaces.d.ts +0 -13
  205. package/components/alert/alert.service.d.ts +0 -11
  206. package/components/alert/alert.tokens.d.ts +0 -6
  207. package/components/alert/index.d.ts +0 -5
  208. package/components/data-list/data-list.directive.d.ts +0 -7
  209. package/components/data-list/option/option-content.d.ts +0 -16
  210. package/components/data-list/option/option-legacy.component.d.ts +0 -24
  211. package/components/data-list/option/option.directive.d.ts +0 -27
  212. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  213. package/components/dialog/dialogs.component.d.ts +0 -8
  214. package/components/header/header.directive.d.ts +0 -17
  215. package/components/header/index.d.ts +0 -1
  216. package/components/link/link.options.d.ts +0 -12
  217. package/components/textfield/textfield.directive.d.ts +0 -35
  218. package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
  219. package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
  220. package/directives/notification/index.d.ts +0 -2
  221. package/fesm2022/taiga-ui-core-animations.mjs +0 -370
  222. package/fesm2022/taiga-ui-core-animations.mjs.map +0 -1
  223. package/fesm2022/taiga-ui-core-components-alert.mjs +0 -110
  224. package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
  225. package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -227
  226. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
  227. package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
  228. package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
  229. package/fesm2022/taiga-ui-core-components-modal.mjs +0 -89
  230. package/fesm2022/taiga-ui-core-components-modal.mjs.map +0 -1
  231. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
  232. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
  233. package/fesm2022/taiga-ui-core-directives-notification.mjs +0 -73
  234. package/fesm2022/taiga-ui-core-directives-notification.mjs.map +0 -1
  235. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
  236. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
  237. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
  238. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
  239. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
  240. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
  241. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
  242. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
  243. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
  244. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
  245. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
  246. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -30
  247. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
  248. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
  249. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
  250. package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
  251. package/pipes/auto-color/index.d.ts +0 -1
  252. package/pipes/calendar-sheet/index.d.ts +0 -1
  253. package/pipes/calendar-sheet/utils.d.ts +0 -20
  254. package/pipes/flag/flag.pipe.d.ts +0 -14
  255. package/pipes/flag/index.d.ts +0 -1
  256. package/pipes/format-date/format-date.pipe.d.ts +0 -9
  257. package/pipes/format-date/index.d.ts +0 -1
  258. package/pipes/initials/index.d.ts +0 -1
  259. package/pipes/initials/initials.pipe.d.ts +0 -7
  260. package/pipes/month/index.d.ts +0 -1
  261. package/pipes/month/month.pipe.d.ts +0 -10
  262. package/pipes/order-week-days/index.d.ts +0 -1
  263. package/services/breakpoint.service.d.ts +0 -16
  264. package/services/dark-theme.service.d.ts +0 -10
  265. package/services/format-date.service.d.ts +0 -8
  266. package/styles/mixins/wrapper.less +0 -64
  267. package/styles/mixins/wrapper.scss +0 -61
  268. package/styles/theme/appearance/opposite.less +0 -17
  269. package/styles/theme/wrapper.less +0 -211
  270. package/tokens/day-type-handler.d.ts +0 -7
  271. package/tokens/first-day-of-week.d.ts +0 -5
  272. package/tokens/scroll-ref.d.ts +0 -2
  273. package/tokens/spin-icons.d.ts +0 -6
  274. package/types/range-state.d.ts +0 -4
  275. package/types/value-content-context.d.ts +0 -4
  276. package/utils/format/string-hash-to-hsl.d.ts +0 -6
  277. package/utils/miscellaneous/to-animation-options.d.ts +0 -4
  278. /package/{directives → components}/title/index.d.ts +0 -0
  279. /package/{directives → components}/title/title.directive.d.ts +0 -0
  280. /package/{components → portals}/dialog/dialog.directive.d.ts +0 -0
  281. /package/{components → portals}/dialog/dialog.factory.d.ts +0 -0
  282. /package/{directives → portals}/dropdown/dropdown-content.directive.d.ts +0 -0
  283. /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
  284. /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
  285. /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
  286. /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
  287. /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
  288. /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
  289. /package/{directives → portals}/hint/hint-describe.directive.d.ts +0 -0
  290. /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
  291. /package/{directives → portals}/hint/hint-host.directive.d.ts +0 -0
  292. /package/{directives → portals}/hint/hint-hover.directive.d.ts +0 -0
  293. /package/{directives → portals}/hint/hint-manual.directive.d.ts +0 -0
  294. /package/{directives → portals}/hint/hint-options.directive.d.ts +0 -0
  295. /package/{directives → portals}/hint/hint-overflow.directive.d.ts +0 -0
  296. /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
  297. /package/{directives → portals}/hint/hint-unstyled.component.d.ts +0 -0
  298. /package/{directives → portals}/hint/hint.component.d.ts +0 -0
  299. /package/{directives → portals}/hint/hint.d.ts +0 -0
  300. /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
  301. /package/{directives → portals}/hint/index.d.ts +0 -0
  302. /package/{components → portals}/modal/index.d.ts +0 -0
  303. /package/{directives → portals}/popup/index.d.ts +0 -0
  304. /package/{directives → portals}/popup/popup.directive.d.ts +0 -0
  305. /package/{directives → portals}/popup/popup.service.d.ts +0 -0
  306. /package/{directives → portals}/popup/popups.component.d.ts +0 -0
@@ -0,0 +1,89 @@
1
+ import { DOCUMENT } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, signal, ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable } from '@angular/core';
4
+ import * as i1 from '@taiga-ui/cdk/directives/active-zone';
5
+ import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
6
+ import * as i2 from '@taiga-ui/cdk/directives/focus-trap';
7
+ import { TuiFocusTrap } from '@taiga-ui/cdk/directives/focus-trap';
8
+ import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
9
+ import * as i3 from '@taiga-ui/core/components/scrollbar';
10
+ import { TuiScrollControls, TuiScrollRef } from '@taiga-ui/core/components/scrollbar';
11
+ import { injectContext, PolymorpheusOutlet, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
12
+ import { TUI_LEAVE } from '@taiga-ui/cdk/directives/animated';
13
+ import { TuiPortal } from '@taiga-ui/cdk/portals';
14
+ import { TuiPopupService } from '@taiga-ui/core/portals/popup';
15
+
16
+ class TuiModalComponent {
17
+ constructor() {
18
+ this.current = inject(TuiActiveZone);
19
+ this.parent = findActive(inject(TuiActiveZone, { skipSelf: true }), tuiGetFocused(inject(DOCUMENT)));
20
+ this.context = injectContext();
21
+ this.component = signal(null);
22
+ }
23
+ ngOnInit() {
24
+ this.current.tuiActiveZoneParentSetter = this.parent;
25
+ }
26
+ ngOnDestroy() {
27
+ this.current.tuiActiveZoneParentSetter = null;
28
+ }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiModalComponent, isStandalone: true, selector: "tui-modal", host: { attributes: { "role": "dialog", "aria-modal": "true" }, listeners: { "animationend.self": "$event.target.classList.remove(\"tui-enter\")" }, properties: { "attr.aria-labelledby": "context.id" }, classAttribute: "tui-enter" }, hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiFocusTrap }, { directive: i3.TuiScrollRef }], ngImport: i0, template: `
31
+ <ng-container *polymorpheusOutlet="component(); context: context" />
32
+ <tui-scroll-controls class="t-scrollbars" />
33
+ `, isInline: true, styles: ["@keyframes tuiModalBackdrop{0%{-webkit-backdrop-filter:none;backdrop-filter:none}to{-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}}tui-modal{transition-property:backdrop-filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;display:grid;inset:0;grid-template-rows:0;place-items:center;outline:none;overflow:auto;overscroll-behavior:none contain;transition-timing-function:linear;animation-timing-function:cubic-bezier(.14,.52,.35,.84)!important;perspective:10rem;transform:translateY(var(--t-root-top))}tui-modal::-webkit-scrollbar,tui-modal::-webkit-scrollbar-thumb{display:none}@supports not (selector(:has(*))) or not (selector(:nth-child(1 of *))){tui-modal:last-of-type:not(.tui-leave){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}tui-modal:last-of-type.tui-enter,tui-modal:last-of-type.tui-leave{animation-name:tuiModalBackdrop}}@supports (selector(:has(*))) and (selector(:nth-child(1 of *))){tui-modal:nth-last-child(1 of tui-modal:not(.tui-leave):not(:has(.tui-backdrop-hidden))){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}tui-modal:nth-last-child(1 of tui-modal:not(:has(.tui-backdrop-hidden))):is(.tui-enter,.tui-leave){animation-name:tuiModalBackdrop}}tui-modal:before{content:\"\";block-size:1px;inline-size:calc(100% + 1px)}tui-modal>.t-scrollbars{position:fixed;inset:0;margin:0;color:#747474}tui-modal>.t-scrollbars .t-bar_horizontal,tui-modal>.t-scrollbars .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}tui-modal>.tui-enter+.t-scrollbars .t-bar_vertical,tui-modal>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiModalComponent, decorators: [{
36
+ type: Component,
37
+ args: [{ selector: 'tui-modal', imports: [PolymorpheusOutlet, TuiScrollControls], template: `
38
+ <ng-container *polymorpheusOutlet="component(); context: context" />
39
+ <tui-scroll-controls class="t-scrollbars" />
40
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiFocusTrap, TuiScrollRef], host: {
41
+ role: 'dialog',
42
+ class: 'tui-enter',
43
+ 'aria-modal': 'true',
44
+ '[attr.aria-labelledby]': 'context.id',
45
+ '(animationend.self)': '$event.target.classList.remove("tui-enter")',
46
+ }, styles: ["@keyframes tuiModalBackdrop{0%{-webkit-backdrop-filter:none;backdrop-filter:none}to{-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}}tui-modal{transition-property:backdrop-filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;display:grid;inset:0;grid-template-rows:0;place-items:center;outline:none;overflow:auto;overscroll-behavior:none contain;transition-timing-function:linear;animation-timing-function:cubic-bezier(.14,.52,.35,.84)!important;perspective:10rem;transform:translateY(var(--t-root-top))}tui-modal::-webkit-scrollbar,tui-modal::-webkit-scrollbar-thumb{display:none}@supports not (selector(:has(*))) or not (selector(:nth-child(1 of *))){tui-modal:last-of-type:not(.tui-leave){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}tui-modal:last-of-type.tui-enter,tui-modal:last-of-type.tui-leave{animation-name:tuiModalBackdrop}}@supports (selector(:has(*))) and (selector(:nth-child(1 of *))){tui-modal:nth-last-child(1 of tui-modal:not(.tui-leave):not(:has(.tui-backdrop-hidden))){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}tui-modal:nth-last-child(1 of tui-modal:not(:has(.tui-backdrop-hidden))):is(.tui-enter,.tui-leave){animation-name:tuiModalBackdrop}}tui-modal:before{content:\"\";block-size:1px;inline-size:calc(100% + 1px)}tui-modal>.t-scrollbars{position:fixed;inset:0;margin:0;color:#747474}tui-modal>.t-scrollbars .t-bar_horizontal,tui-modal>.t-scrollbars .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}tui-modal>.tui-enter+.t-scrollbars .t-bar_vertical,tui-modal>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}\n"] }]
47
+ }] });
48
+ function findActive(zone, el) {
49
+ if (!el || !zone.contains(el)) {
50
+ return null;
51
+ }
52
+ const active = zone.children.find((child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el));
53
+ return active ? findActive(active, el) : zone;
54
+ }
55
+
56
+ class TuiModalService extends TuiPortal {
57
+ constructor() {
58
+ super(inject(TuiPopupService));
59
+ this.component = TuiModalComponent;
60
+ }
61
+ add(component) {
62
+ const ref = this.service.add(component);
63
+ const el = ref.location.nativeElement;
64
+ ref.instance.component.set(new PolymorpheusComponent(this.content));
65
+ return () => {
66
+ ref.instance.component.set(null);
67
+ ref.changeDetectorRef.detectChanges();
68
+ el.classList.add(TUI_LEAVE);
69
+ Promise.allSettled(getAnimations(el))
70
+ .then(async () => Promise.allSettled(getAnimations(el.firstElementChild)))
71
+ .then(() => ref.destroy());
72
+ };
73
+ }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
75
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiModalService }); }
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiModalService, decorators: [{
78
+ type: Injectable
79
+ }], ctorParameters: () => [] });
80
+ function getAnimations(el) {
81
+ return el?.getAnimations().map(async ({ finished }) => finished) || [];
82
+ }
83
+
84
+ /**
85
+ * Generated bundle index. Do not edit.
86
+ */
87
+
88
+ export { TuiModalComponent, TuiModalService };
89
+ //# sourceMappingURL=taiga-ui-core-portals-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-portals-modal.mjs","sources":["../../../projects/core/portals/modal/modal.component.ts","../../../projects/core/portals/modal/modal.service.ts","../../../projects/core/portals/modal/taiga-ui-core-portals-modal.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n type OnInit,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiFocusTrap} from '@taiga-ui/cdk/directives/focus-trap';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {\n injectContext,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-modal',\n imports: [PolymorpheusOutlet, TuiScrollControls],\n template: `\n <ng-container *polymorpheusOutlet=\"component(); context: context\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n `,\n styleUrl: './modal.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiFocusTrap, TuiScrollRef],\n host: {\n role: 'dialog',\n class: 'tui-enter',\n 'aria-modal': 'true',\n '[attr.aria-labelledby]': 'context.id',\n '(animationend.self)': '$event.target.classList.remove(\"tui-enter\")',\n },\n})\nexport class TuiModalComponent<T> implements OnDestroy, OnInit {\n private readonly current = inject(TuiActiveZone);\n private readonly parent = findActive(\n inject(TuiActiveZone, {skipSelf: true}),\n tuiGetFocused(inject(DOCUMENT)),\n );\n\n public readonly context = injectContext<TuiPortalContext<T>>();\n public readonly component = signal<PolymorpheusContent<TuiPortalContext<T>>>(null);\n\n public ngOnInit(): void {\n this.current.tuiActiveZoneParentSetter = this.parent;\n }\n\n public ngOnDestroy(): void {\n this.current.tuiActiveZoneParentSetter = null;\n }\n}\n\nfunction findActive(zone: TuiActiveZone, el: Element | null): TuiActiveZone | null {\n if (!el || !zone.contains(el)) {\n return null;\n }\n\n const active = zone.children.find(\n (child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el),\n );\n\n return active ? findActive(active, el) : zone;\n}\n","import {inject, Injectable, type Type} from '@angular/core';\nimport {TUI_LEAVE} from '@taiga-ui/cdk/directives/animated';\nimport {TuiPortal} from '@taiga-ui/cdk/portals';\nimport {TuiPopupService} from '@taiga-ui/core/portals/popup';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TuiModalComponent} from './modal.component';\n\n@Injectable()\nexport abstract class TuiModalService<T, K = void> extends TuiPortal<T, K> {\n protected abstract readonly content: Type<unknown>;\n protected readonly component = TuiModalComponent;\n\n constructor() {\n super(inject(TuiPopupService));\n }\n\n protected override add(\n component: PolymorpheusComponent<TuiModalComponent<T>>,\n ): () => void {\n const ref = this.service.add(component);\n const el: HTMLElement = ref.location.nativeElement;\n\n ref.instance.component.set(new PolymorpheusComponent(this.content));\n\n return () => {\n ref.instance.component.set(null);\n ref.changeDetectorRef.detectChanges();\n el.classList.add(TUI_LEAVE);\n\n Promise.allSettled(getAnimations(el))\n .then(async () => Promise.allSettled(getAnimations(el.firstElementChild)))\n .then(() => ref.destroy());\n };\n }\n}\n\nfunction getAnimations(el: Element | null): ReadonlyArray<Promise<unknown>> {\n return el?.getAnimations().map(async ({finished}) => finished) || [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAwCa,iBAAiB,CAAA;AAnB9B,IAAA,WAAA,GAAA;AAoBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;QAC/B,IAAM,CAAA,MAAA,GAAG,UAAU,CAChC,MAAM,CAAC,aAAa,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EACvC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAClC;QAEe,IAAO,CAAA,OAAA,GAAG,aAAa,EAAuB;AAC9C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAA2C,IAAI,CAAC;AASrF;IAPU,QAAQ,GAAA;QACX,IAAI,CAAC,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,MAAM;;IAGjD,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,OAAO,CAAC,yBAAyB,GAAG,IAAI;;+GAfxC,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA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CAAC;AAChC,YAAA,GAAG,CAAC,iBAAiB,CAAC,aAAa,EAAE;AACrC,YAAA,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC;AAE3B,YAAA,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;AAC/B,iBAAA,IAAI,CAAC,YAAY,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;iBACxE,IAAI,CAAC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;AAClC,SAAC;;+GAxBa,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAf,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBADpC;;AA6BD,SAAS,aAAa,CAAC,EAAkB,EAAA;AACrC,IAAA,OAAO,EAAE,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,OAAO,EAAC,QAAQ,EAAC,KAAK,QAAQ,CAAC,IAAI,EAAE;AACxE;;ACvCA;;AAEG;;;;"}
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, TemplateRef, input, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { TuiPortalService, TuiPortals } from '@taiga-ui/cdk/portals';
4
- import { tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
4
+ import { tuiProvide } from '@taiga-ui/cdk/utils/di';
5
5
 
6
6
  class TuiPopupService extends TuiPortalService {
7
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopupService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
8
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopupService, providedIn: 'root' }); }
7
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopupService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
8
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopupService, providedIn: 'root' }); }
9
9
  }
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopupService, decorators: [{
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopupService, decorators: [{
11
11
  type: Injectable,
12
12
  args: [{
13
13
  providedIn: 'root',
@@ -29,10 +29,10 @@ class TuiPopup {
29
29
  ngOnDestroy() {
30
30
  this.ref?.destroy();
31
31
  }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiPopup, isStandalone: true, selector: "ng-template[tuiPopup]", inputs: { show: { classPropertyName: "show", publicName: "tuiPopup", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiPopup, isStandalone: true, selector: "ng-template[tuiPopup]", inputs: { show: { classPropertyName: "show", publicName: "tuiPopup", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
34
34
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopup, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopup, decorators: [{
36
36
  type: Directive,
37
37
  args: [{
38
38
  selector: 'ng-template[tuiPopup]',
@@ -40,10 +40,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
40
40
  }] });
41
41
 
42
42
  class TuiPopups extends TuiPortals {
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopups, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
44
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiPopups, isStandalone: true, selector: "tui-popups", providers: [tuiProvide(TuiPortalService, TuiPopupService)], usesInheritance: true, ngImport: i0, template: '<ng-content/><ng-container #vcr />', isInline: true, styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:grid;grid-template-rows:repeat(9,min-content) 1fr;pointer-events:none;overflow:hidden;overflow-wrap:break-word;box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right)}:host ::ng-deep>*{pointer-events:auto}:host:after{content:\"\";grid-row:10}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopups, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
44
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiPopups, isStandalone: true, selector: "tui-popups", providers: [tuiProvide(TuiPortalService, TuiPopupService)], usesInheritance: true, ngImport: i0, template: '<ng-content/><ng-container #vcr />', isInline: true, styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:grid;grid-template-rows:repeat(9,min-content) 1fr;pointer-events:none;overflow:hidden;overflow-wrap:break-word;box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right)}:host ::ng-deep>*{pointer-events:auto}:host:after{content:\"\";grid-row:10}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
45
45
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopups, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPopups, decorators: [{
47
47
  type: Component,
48
48
  args: [{ selector: 'tui-popups', template: '<ng-content/><ng-container #vcr />', changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TuiPortalService, TuiPopupService)], styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:grid;grid-template-rows:repeat(9,min-content) 1fr;pointer-events:none;overflow:hidden;overflow-wrap:break-word;box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right)}:host ::ng-deep>*{pointer-events:auto}:host:after{content:\"\";grid-row:10}\n"] }]
49
49
  }] });
@@ -53,4 +53,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
53
53
  */
54
54
 
55
55
  export { TuiPopup, TuiPopupService, TuiPopups };
56
- //# sourceMappingURL=taiga-ui-core-directives-popup.mjs.map
56
+ //# sourceMappingURL=taiga-ui-core-portals-popup.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-portals-popup.mjs","sources":["../../../projects/core/portals/popup/popup.service.ts","../../../projects/core/portals/popup/popup.directive.ts","../../../projects/core/portals/popup/popups.component.ts","../../../projects/core/portals/popup/taiga-ui-core-portals-popup.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {TuiPortalService} from '@taiga-ui/cdk/portals';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiPopupService extends TuiPortalService {}\n","import {\n Directive,\n type EmbeddedViewRef,\n inject,\n input,\n type OnChanges,\n type OnDestroy,\n TemplateRef,\n} from '@angular/core';\n\nimport {TuiPopupService} from './popup.service';\n\n@Directive({\n selector: 'ng-template[tuiPopup]',\n})\nexport class TuiPopup implements OnChanges, OnDestroy {\n private readonly template = inject(TemplateRef);\n private readonly service = inject(TuiPopupService);\n private ref?: EmbeddedViewRef<unknown>;\n\n public readonly show = input(false, {alias: 'tuiPopup'});\n\n public ngOnChanges(): void {\n this.ref?.destroy();\n\n if (this.show()) {\n this.ref = this.service.add(this.template);\n }\n }\n\n public ngOnDestroy(): void {\n this.ref?.destroy();\n }\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {TuiPortals, TuiPortalService} from '@taiga-ui/cdk/portals';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nimport {TuiPopupService} from './popup.service';\n\n@Component({\n selector: 'tui-popups',\n template: '<ng-content/><ng-container #vcr />',\n styleUrl: './popups.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TuiPortalService, TuiPopupService)],\n})\nexport class TuiPopups extends TuiPortals {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMM,MAAO,eAAgB,SAAQ,gBAAgB,CAAA;+GAAxC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFZ,MAAM,EAAA,CAAA,CAAA;;4FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oB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eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,SAAA,EAFP,CAAC,UAAU,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAHhD,oCAAoC,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,iZAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKrC,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EACZ,QAAA,EAAA,oCAAoC,EAE7B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,UAAU,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC,EAAA,MAAA,EAAA,CAAA,iZAAA,CAAA,EAAA;;;ACX9D;;AAEG;;;;"}
@@ -0,0 +1,11 @@
1
+ export * from '@taiga-ui/core/portals/alert';
2
+ export * from '@taiga-ui/core/portals/dialog';
3
+ export * from '@taiga-ui/core/portals/dropdown';
4
+ export * from '@taiga-ui/core/portals/hint';
5
+ export * from '@taiga-ui/core/portals/modal';
6
+ export * from '@taiga-ui/core/portals/popup';
7
+
8
+ /**
9
+ * Generated bundle index. Do not edit.
10
+ */
11
+ //# sourceMappingURL=taiga-ui-core-portals.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-portals.mjs","sources":["../../../projects/core/portals/taiga-ui-core-portals.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG"}
@@ -1,91 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Injectable, LOCALE_ID, NgZone } from '@angular/core';
3
- import { tuiZoneOptimized, tuiZonefree } from '@taiga-ui/cdk/observables';
4
- import { TUI_WINDOW_SIZE, TUI_IS_WEBKIT } from '@taiga-ui/cdk/tokens';
5
- import { TUI_MEDIA } from '@taiga-ui/core/tokens';
6
- import { Observable, map, distinctUntilChanged, shareReplay, fromEvent, startWith, of, finalize } from 'rxjs';
7
- import { WA_WINDOW, WA_ANIMATION_FRAME } from '@ng-web-apis/common';
2
+ import { inject, NgZone, Injectable } from '@angular/core';
3
+ import { WA_ANIMATION_FRAME, WA_WINDOW } from '@ng-web-apis/common';
8
4
  import { EMPTY_CLIENT_RECT } from '@taiga-ui/cdk/constants';
5
+ import { tuiZonefree } from '@taiga-ui/cdk/observables';
9
6
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
10
7
  import { TuiPositionAccessor } from '@taiga-ui/core/classes';
11
-
12
- /**
13
- * Service to provide the current breakpoint based on Taiga UI's media queries
14
- */
15
- class TuiBreakpointService extends Observable {
16
- constructor() {
17
- super((subscriber) => this.stream$.subscribe(subscriber));
18
- this.media = inject(TUI_MEDIA);
19
- this.sorted = Object.values(this.media).sort((a, b) => a - b);
20
- this.invert = Object.keys(this.media).reduce((ret, key) => ({
21
- ...ret,
22
- [this.media[key]]: key,
23
- }), {});
24
- this.stream$ = inject(TUI_WINDOW_SIZE).pipe(map(({ width }) => this.sorted.find((size) => size > width)), map((key) => this.invert[key || this.sorted[this.sorted.length - 1] || 0] ?? null), distinctUntilChanged(), tuiZoneOptimized(), shareReplay({ bufferSize: 1, refCount: true }));
25
- }
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiBreakpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
27
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiBreakpointService, providedIn: 'root' }); }
28
- }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiBreakpointService, decorators: [{
30
- type: Injectable,
31
- args: [{
32
- providedIn: 'root',
33
- }]
34
- }], ctorParameters: () => [] });
35
-
36
- /**
37
- * @deprecated use {@link TUI_DARK_MODE} instead
38
- */
39
- class TuiDarkThemeService extends Observable {
40
- constructor() {
41
- const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');
42
- const media$ = fromEvent(media, 'change').pipe(startWith(null), map(() => media.matches), shareReplay({ bufferSize: 1, refCount: true }));
43
- super((subscriber) => media$.subscribe(subscriber));
44
- }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDarkThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
46
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDarkThemeService, providedIn: 'root' }); }
47
- }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDarkThemeService, decorators: [{
49
- type: Injectable,
50
- args: [{
51
- providedIn: 'root',
52
- }]
53
- }], ctorParameters: () => [] });
54
-
55
- class TuiFormatDateService {
56
- constructor() {
57
- this.locale = inject(LOCALE_ID);
58
- }
59
- format(timestamp) {
60
- return of(new Date(timestamp).toLocaleTimeString(this.locale, {
61
- hour: 'numeric',
62
- minute: '2-digit',
63
- }));
64
- }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatDateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
66
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatDateService, providedIn: 'root' }); }
67
- }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatDateService, decorators: [{
69
- type: Injectable,
70
- args: [{
71
- providedIn: 'root',
72
- }]
73
- }] });
8
+ import { Observable, startWith, map, finalize } from 'rxjs';
9
+ import { TUI_IS_WEBKIT } from '@taiga-ui/cdk/tokens';
74
10
 
75
11
  class TuiPositionService extends Observable {
76
12
  constructor() {
77
13
  const animationFrame$ = inject(WA_ANIMATION_FRAME);
78
14
  const zone = inject(NgZone);
79
15
  super((subscriber) => animationFrame$
80
- .pipe(startWith(null), map(() => this.accessor.getPosition(this.el.getBoundingClientRect(), this.el)), tuiZonefree(zone), finalize(() => this.accessor.getPosition(EMPTY_CLIENT_RECT)))
16
+ .pipe(startWith(null), map(() => this.accessor.getPosition(this.el.getBoundingClientRect())), tuiZonefree(zone), finalize(() => this.accessor.getPosition(EMPTY_CLIENT_RECT)))
81
17
  .subscribe(subscriber));
82
18
  this.el = tuiInjectElement();
83
19
  this.accessor = inject(TuiPositionAccessor);
84
20
  }
85
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPositionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
86
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPositionService }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPositionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
22
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPositionService }); }
87
23
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPositionService, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPositionService, decorators: [{
89
25
  type: Injectable
90
26
  }], ctorParameters: () => [] });
91
27
 
@@ -98,15 +34,15 @@ class TuiVisualViewportService {
98
34
  correct(point) {
99
35
  return this.isWebkit
100
36
  ? [
101
- point[0] + (this.win.visualViewport?.offsetTop ?? 0),
102
- point[1] + (this.win.visualViewport?.offsetLeft ?? 0),
37
+ point[0] + (this.win.visualViewport?.offsetLeft ?? 0),
38
+ point[1] + (this.win.visualViewport?.offsetTop ?? 0),
103
39
  ]
104
40
  : point;
105
41
  }
106
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiVisualViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
107
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiVisualViewportService, providedIn: 'root' }); }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiVisualViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
43
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiVisualViewportService, providedIn: 'root' }); }
108
44
  }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiVisualViewportService, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiVisualViewportService, decorators: [{
110
46
  type: Injectable,
111
47
  args: [{
112
48
  providedIn: 'root',
@@ -117,5 +53,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
117
53
  * Generated bundle index. Do not edit.
118
54
  */
119
55
 
120
- export { TuiBreakpointService, TuiDarkThemeService, TuiFormatDateService, TuiPositionService, TuiVisualViewportService };
56
+ export { TuiPositionService, TuiVisualViewportService };
121
57
  //# sourceMappingURL=taiga-ui-core-services.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-services.mjs","sources":["../../../projects/core/services/breakpoint.service.ts","../../../projects/core/services/dark-theme.service.ts","../../../projects/core/services/format-date.service.ts","../../../projects/core/services/position.service.ts","../../../projects/core/services/visual-viewport.service.ts","../../../projects/core/services/taiga-ui-core-services.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_WINDOW_SIZE} from '@taiga-ui/cdk/tokens';\nimport {TUI_MEDIA, type TuiMedia} from '@taiga-ui/core/tokens';\nimport {distinctUntilChanged, map, Observable, shareReplay} from 'rxjs';\n\nexport type TuiBreakpointMediaKey = keyof Omit<TuiMedia, 'tablet'>;\n\n/**\n * Service to provide the current breakpoint based on Taiga UI's media queries\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiBreakpointService extends Observable<TuiBreakpointMediaKey | null> {\n private readonly media = inject(TUI_MEDIA);\n private readonly sorted: number[] = Object.values(this.media).sort((a, b) => a - b);\n private readonly invert: Record<number, TuiBreakpointMediaKey> = Object.keys(\n this.media,\n ).reduce(\n (ret, key) => ({\n ...ret,\n [this.media[key as TuiBreakpointMediaKey]]: key,\n }),\n {},\n );\n\n private readonly stream$ = inject(TUI_WINDOW_SIZE).pipe(\n map(({width}) => this.sorted.find((size) => size > width)),\n map(\n (key) => this.invert[key || this.sorted[this.sorted.length - 1] || 0] ?? null,\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n}\n","import {inject, Injectable} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {fromEvent, map, Observable, shareReplay, startWith} from 'rxjs';\n\n/**\n * @deprecated use {@link TUI_DARK_MODE} instead\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiDarkThemeService extends Observable<boolean> {\n constructor() {\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const media$ = fromEvent(media, 'change').pipe(\n startWith(null),\n map(() => media.matches),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n\n super((subscriber) => media$.subscribe(subscriber));\n }\n}\n","import {inject, Injectable, LOCALE_ID} from '@angular/core';\nimport {type Observable, of} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiFormatDateService {\n protected readonly locale = inject(LOCALE_ID);\n\n public format(timestamp: number): Observable<string> {\n return of(\n new Date(timestamp).toLocaleTimeString(this.locale, {\n hour: 'numeric',\n minute: '2-digit',\n }),\n );\n }\n}\n","import {inject, Injectable, NgZone} from '@angular/core';\nimport {WA_ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {EMPTY_CLIENT_RECT} from '@taiga-ui/cdk/constants';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiPositionAccessor} from '@taiga-ui/core/classes';\nimport {type TuiPoint} from '@taiga-ui/core/types';\nimport {finalize, map, Observable, startWith} from 'rxjs';\n\n@Injectable()\nexport class TuiPositionService extends Observable<TuiPoint> {\n private readonly el = tuiInjectElement();\n private readonly accessor = inject(TuiPositionAccessor);\n\n constructor() {\n const animationFrame$ = inject(WA_ANIMATION_FRAME);\n const zone = inject(NgZone);\n\n super((subscriber) =>\n animationFrame$\n .pipe(\n startWith(null),\n map(() =>\n this.accessor.getPosition(\n this.el.getBoundingClientRect(),\n this.el,\n ),\n ),\n tuiZonefree(zone),\n finalize(() => this.accessor.getPosition(EMPTY_CLIENT_RECT)),\n )\n .subscribe(subscriber),\n );\n }\n}\n","import {inject, Injectable} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {TUI_IS_WEBKIT} from '@taiga-ui/cdk/tokens';\nimport {type TuiPoint} from '@taiga-ui/core/types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiVisualViewportService {\n private readonly isWebkit = inject(TUI_IS_WEBKIT);\n private readonly win = inject(WA_WINDOW);\n\n // https://bugs.webkit.org/show_bug.cgi?id=207089\n public correct(point: TuiPoint): TuiPoint {\n return this.isWebkit\n ? [\n point[0] + (this.win.visualViewport?.offsetTop ?? 0),\n point[1] + (this.win.visualViewport?.offsetLeft ?? 0),\n ]\n : point;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAQA;;AAEG;AAIG,MAAO,oBAAqB,SAAQ,UAAwC,CAAA;AAuB9E,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AAvB5C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;QACzB,IAAM,CAAA,MAAA,GAAa,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAClE,QAAA,IAAA,CAAA,MAAM,GAA0C,MAAM,CAAC,IAAI,CACxE,IAAI,CAAC,KAAK,CACb,CAAC,MAAM,CACJ,CAAC,GAAG,EAAE,GAAG,MAAM;AACX,YAAA,GAAG,GAAG;YACN,CAAC,IAAI,CAAC,KAAK,CAAC,GAA4B,CAAC,GAAG,GAAG;SAClD,CAAC,EACF,EAAE,CACL;AAEgB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CACnD,GAAG,CAAC,CAAC,EAAC,KAAK,EAAC,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,CAAC,EAC1D,GAAG,CACC,CAAC,GAAG,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC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,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFrB,MAAM,EAAA,CAAA,CAAA;;4FAET,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-services.mjs","sources":["../../../projects/core/services/position.service.ts","../../../projects/core/services/visual-viewport.service.ts","../../../projects/core/services/taiga-ui-core-services.ts"],"sourcesContent":["import {inject, Injectable, NgZone} from '@angular/core';\nimport {WA_ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {EMPTY_CLIENT_RECT} from '@taiga-ui/cdk/constants';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiPositionAccessor} from '@taiga-ui/core/classes';\nimport {type TuiPoint} from '@taiga-ui/core/types';\nimport {finalize, map, Observable, startWith} from 'rxjs';\n\n@Injectable()\nexport class TuiPositionService extends Observable<TuiPoint> {\n private readonly el = tuiInjectElement();\n private readonly accessor = inject(TuiPositionAccessor);\n\n constructor() {\n const animationFrame$ = inject(WA_ANIMATION_FRAME);\n const zone = inject(NgZone);\n\n super((subscriber) =>\n animationFrame$\n .pipe(\n startWith(null),\n map(() => this.accessor.getPosition(this.el.getBoundingClientRect())),\n tuiZonefree(zone),\n finalize(() => this.accessor.getPosition(EMPTY_CLIENT_RECT)),\n )\n .subscribe(subscriber),\n );\n }\n}\n","import {inject, Injectable} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {TUI_IS_WEBKIT} from '@taiga-ui/cdk/tokens';\nimport {type TuiPoint} from '@taiga-ui/core/types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiVisualViewportService {\n private readonly isWebkit = inject(TUI_IS_WEBKIT);\n private readonly win = inject(WA_WINDOW);\n\n // https://bugs.webkit.org/show_bug.cgi?id=207089\n public correct(point: TuiPoint): TuiPoint {\n return this.isWebkit\n ? [\n point[0] + (this.win.visualViewport?.offsetLeft ?? 0),\n point[1] + (this.win.visualViewport?.offsetTop ?? 0),\n ]\n : point;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAUM,MAAO,kBAAmB,SAAQ,UAAoB,CAAA;AAIxD,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAClD,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AAE3B,QAAA,KAAK,CAAC,CAAC,UAAU,KACb;aACK,IAAI,CACD,SAAS,CAAC,IAAI,CAAC,EACf,GAAG,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,CAAC,EACrE,WAAW,CAAC,IAAI,CAAC,EACjB,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAE/D,aAAA,SAAS,CAAC,UAAU,CAAC,CAC7B;QAhBY,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;;+GAF9C,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAlB,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B;;;MCDY,wBAAwB,CAAA;AAHrC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC;AAW3C;;AARU,IAAA,OAAO,CAAC,KAAe,EAAA;QAC1B,OAAO,IAAI,CAAC;AACR,cAAE;AACI,gBAAA,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,UAAU,IAAI,CAAC,CAAC;AACrD,gBAAA,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,SAAS,IAAI,CAAC,CAAC;AACvD;cACD,KAAK;;+GAXN,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFrB,MAAM,EAAA,CAAA,CAAA;;4FAET,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -1,13 +1,13 @@
1
- import { InjectionToken, inject, signal, untracked, effect, Optional, SkipSelf, ElementRef } from '@angular/core';
1
+ import { InjectionToken, inject, signal, untracked, effect, computed } from '@angular/core';
2
2
  import { DOCUMENT } from '@angular/common';
3
- import { tuiProvide, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
+ import { tuiProvide, tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
4
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { tuiZoneOptimized, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
6
+ import { TUI_WINDOW_SIZE } from '@taiga-ui/cdk/tokens';
7
+ import { map, distinctUntilChanged, fromEvent, filter, merge, switchMap, takeUntil, share } from 'rxjs';
5
8
  import { WA_LOCAL_STORAGE, WA_WINDOW } from '@ng-web-apis/common';
6
- import { fromEvent, filter, of, map, merge, switchMap, takeUntil, share } from 'rxjs';
7
- import { TuiDayOfWeek } from '@taiga-ui/cdk/date-time';
8
9
  import { tuiExtractI18n } from '@taiga-ui/i18n/utils';
9
10
  import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
10
- import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
11
11
 
12
12
  const TUI_REDUCED_MOTION = new InjectionToken(ngDevMode ? 'TUI_REDUCED_MOTION' : '', {
13
13
  factory: () => inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')
@@ -38,6 +38,30 @@ function tuiAsAuxiliary(x) {
38
38
  return tuiProvide(TUI_AUXILIARY, x);
39
39
  }
40
40
 
41
+ /**
42
+ * Token for media constant
43
+ */
44
+ const TUI_MEDIA = new InjectionToken(ngDevMode ? 'TUI_MEDIA' : '', {
45
+ factory: () => ({
46
+ mobile: 768,
47
+ desktopSmall: 1280,
48
+ desktopLarge: Infinity,
49
+ }),
50
+ });
51
+
52
+ const TUI_BREAKPOINT = new InjectionToken(ngDevMode ? 'TUI_BREAKPOINT' : '', {
53
+ factory: () => {
54
+ const media = inject(TUI_MEDIA);
55
+ const sorted = Object.values(media).sort((a, b) => a - b);
56
+ const invert = Object.keys(media).reduce((ret, key) => ({
57
+ ...ret,
58
+ [media[key]]: key,
59
+ }), {});
60
+ const stream$ = inject(TUI_WINDOW_SIZE).pipe(map(({ width }) => sorted.find((size) => size > width)), map((key) => invert[key || sorted[sorted.length - 1] || 0] ?? 'desktopLarge'), distinctUntilChanged(), tuiZoneOptimized());
61
+ return toSignal(stream$, { initialValue: 'desktopLarge' });
62
+ },
63
+ });
64
+
41
65
  // TODO: Rename `ellipsis` to `more` in the next major version
42
66
  const COMMON_ICONS = {
43
67
  check: '@tui.check',
@@ -46,13 +70,10 @@ const COMMON_ICONS = {
46
70
  more: '@tui.chevron-right',
47
71
  search: '@tui.search',
48
72
  ellipsis: '@tui.ellipsis',
73
+ decrement: '@tui.chevron-left',
74
+ increment: '@tui.chevron-right',
49
75
  };
50
- const TUI_COMMON_ICONS = new InjectionToken(ngDevMode ? 'TUI_COMMON_ICONS' : '', {
51
- factory: () => COMMON_ICONS,
52
- });
53
- function tuiCommonIconsProvider(icons) {
54
- return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);
55
- }
76
+ const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);
56
77
 
57
78
  const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';
58
79
  const TUI_DARK_MODE_KEY = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE_KEY' : '', {
@@ -94,37 +115,28 @@ const TUI_DARK_MODE = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE' : '', {
94
115
  });
95
116
 
96
117
  const TUI_DEFAULT_DATE_FORMAT = {
97
- mode: 'DMY',
118
+ mode: 'dd/mm/yyyy',
98
119
  separator: '.',
99
120
  };
100
121
  /**
101
122
  * Formatting configuration for displayed dates
102
123
  */
103
124
  const TUI_DATE_FORMAT = new InjectionToken(ngDevMode ? 'TUI_DATE_FORMAT' : '', {
104
- factory: () => of(TUI_DEFAULT_DATE_FORMAT),
125
+ factory: () => signal(TUI_DEFAULT_DATE_FORMAT),
105
126
  });
106
127
  function tuiDateFormatProvider(options) {
107
128
  return {
108
129
  provide: TUI_DATE_FORMAT,
109
- deps: [[new Optional(), new SkipSelf(), TUI_DATE_FORMAT]],
110
- useFactory: (parent) => (parent || of(TUI_DEFAULT_DATE_FORMAT)).pipe(map((format) => ({ ...format, ...options }))),
130
+ useFactory: () => {
131
+ const parent = inject(TUI_DATE_FORMAT, { optional: true, skipSelf: true });
132
+ return computed(() => ({
133
+ ...(parent?.() || TUI_DEFAULT_DATE_FORMAT),
134
+ ...options,
135
+ }));
136
+ },
111
137
  };
112
138
  }
113
139
 
114
- /**
115
- * Token for adding data-type attribute to calendar cell
116
- */
117
- const TUI_DAY_TYPE_HANDLER = new InjectionToken(ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '', {
118
- factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),
119
- });
120
-
121
- /**
122
- * The first day of the week index
123
- */
124
- const TUI_FIRST_DAY_OF_WEEK = new InjectionToken(ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '', {
125
- factory: () => TuiDayOfWeek.Monday,
126
- });
127
-
128
140
  /**
129
141
  * Localized months names
130
142
  */
@@ -178,10 +190,6 @@ const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {
178
190
  const TUI_ICON_REGISTRY = new InjectionToken(ngDevMode ? 'TUI_ICON_REGISTRY' : '', {
179
191
  factory: () => ({}),
180
192
  });
181
- /**
182
- * @deprecated: use {@link TUI_ICON_REGISTRY}
183
- */
184
- const TUI_ICON_STARTS = TUI_ICON_REGISTRY;
185
193
  function tuiIconsProvider(icons) {
186
194
  return {
187
195
  provide: TUI_ICON_REGISTRY,
@@ -221,17 +229,6 @@ function tuiIconResolverProvider(useValue) {
221
229
  return { provide: TUI_ICON_RESOLVER, useValue };
222
230
  }
223
231
 
224
- /**
225
- * Token for media constant
226
- */
227
- const TUI_MEDIA = new InjectionToken(ngDevMode ? 'TUI_MEDIA' : '', {
228
- factory: () => ({
229
- mobile: 768,
230
- desktopSmall: 1024,
231
- desktopLarge: 1280,
232
- }),
233
- });
234
-
235
232
  const TUI_DEFAULT_NUMBER_FORMAT = {
236
233
  precision: NaN,
237
234
  decimalSeparator: '.',
@@ -243,20 +240,21 @@ const TUI_DEFAULT_NUMBER_FORMAT = {
243
240
  * Formatting configuration for displayed numbers
244
241
  */
245
242
  const TUI_NUMBER_FORMAT = new InjectionToken(ngDevMode ? 'TUI_NUMBER_FORMAT' : '', {
246
- factory: () => of(TUI_DEFAULT_NUMBER_FORMAT),
243
+ factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT),
247
244
  });
248
245
  function tuiNumberFormatProvider(options) {
249
246
  return {
250
247
  provide: TUI_NUMBER_FORMAT,
251
- deps: [[new Optional(), new SkipSelf(), TUI_NUMBER_FORMAT]],
252
- useFactory: (parent) => (parent || of(TUI_DEFAULT_NUMBER_FORMAT)).pipe(map((format) => ({ ...format, ...options }))),
248
+ useFactory: () => {
249
+ const parent = inject(TUI_NUMBER_FORMAT, { optional: true, skipSelf: true });
250
+ return computed(() => ({
251
+ ...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),
252
+ ...options,
253
+ }));
254
+ },
253
255
  };
254
256
  }
255
257
 
256
- const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {
257
- factory: () => new ElementRef(inject(DOCUMENT).documentElement),
258
- });
259
-
260
258
  /**
261
259
  * A stream of possible selection changes
262
260
  */
@@ -267,13 +265,6 @@ const TUI_SELECTION_STREAM = new InjectionToken(ngDevMode ? 'TUI_SELECTION_STREA
267
265
  },
268
266
  });
269
267
 
270
- const TUI_SPIN_ICONS = new InjectionToken(ngDevMode ? 'TUI_SPIN_ICONS' : '', {
271
- factory: () => ({
272
- decrement: '@tui.chevron-left',
273
- increment: '@tui.chevron-right',
274
- }),
275
- });
276
-
277
268
  const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {
278
269
  factory: () => 'Taiga UI',
279
270
  });
@@ -319,5 +310,5 @@ function tuiAsViewport(accessor) {
319
310
  * Generated bundle index. Do not edit.
320
311
  */
321
312
 
322
- export { TUI_ANIMATIONS_SPEED, TUI_ASSETS_PATH, TUI_AUXILIARY, TUI_CLEAR_WORD, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DARK_MODE, TUI_DARK_MODE_DEFAULT_KEY, TUI_DARK_MODE_KEY, TUI_DATE_FORMAT, TUI_DAY_TYPE_HANDLER, TUI_DEFAULT_DATE_FORMAT, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_NUMBER_FORMAT, TUI_FIRST_DAY_OF_WEEK, TUI_ICON_END, TUI_ICON_REGISTRY, TUI_ICON_RESOLVER, TUI_ICON_START, TUI_ICON_STARTS, TUI_MEDIA, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NUMBER_FORMAT, TUI_REDUCED_MOTION, TUI_SCROLL_REF, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_ICONS, TUI_SPIN_TEXTS, TUI_THEME, TUI_VALIDATION_ERRORS, TUI_VIEWPORT, tuiAsAuxiliary, tuiAsViewport, tuiAssetsPathProvider, tuiCommonIconsProvider, tuiDateFormatProvider, tuiGetIconMode, tuiIconResolverProvider, tuiIconsProvider, tuiInjectIconResolver, tuiNumberFormatProvider, tuiValidationErrorsProvider };
313
+ export { TUI_ANIMATIONS_SPEED, TUI_ASSETS_PATH, TUI_AUXILIARY, TUI_BREAKPOINT, TUI_CLEAR_WORD, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DARK_MODE, TUI_DARK_MODE_DEFAULT_KEY, TUI_DARK_MODE_KEY, TUI_DATE_FORMAT, TUI_DEFAULT_DATE_FORMAT, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_NUMBER_FORMAT, TUI_ICON_END, TUI_ICON_REGISTRY, TUI_ICON_RESOLVER, TUI_ICON_START, TUI_MEDIA, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NUMBER_FORMAT, TUI_REDUCED_MOTION, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_TEXTS, TUI_THEME, TUI_VALIDATION_ERRORS, TUI_VIEWPORT, tuiAsAuxiliary, tuiAsViewport, tuiAssetsPathProvider, tuiCommonIconsProvider, tuiDateFormatProvider, tuiGetIconMode, tuiIconResolverProvider, tuiIconsProvider, tuiInjectIconResolver, tuiNumberFormatProvider, tuiValidationErrorsProvider };
323
314
  //# sourceMappingURL=taiga-ui-core-tokens.mjs.map