@taiga-ui/kit 4.52.0-canary.46625cf → 4.52.0-canary.49575ff

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 (405) hide show
  1. package/README.md +1 -1
  2. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  3. package/components/avatar/avatar-stack.component.d.ts +2 -2
  4. package/components/badge/badge.options.d.ts +1 -3
  5. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  6. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  7. package/components/badged-content/badged-content.directive.d.ts +2 -2
  8. package/components/block/block.options.d.ts +1 -3
  9. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  10. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  11. package/components/button-loading/button-loading.component.d.ts +5 -5
  12. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  13. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  14. package/components/calendar-range/day-range-period.d.ts +2 -1
  15. package/components/carousel/carousel.component.d.ts +15 -18
  16. package/components/carousel/carousel.directive.d.ts +5 -4
  17. package/components/chip/chip.options.d.ts +1 -3
  18. package/components/combo-box/combo-box.d.ts +5 -0
  19. package/components/combo-box/combo-box.directive.d.ts +7 -9
  20. package/components/combo-box/index.d.ts +1 -0
  21. package/components/compass/compass.component.d.ts +2 -2
  22. package/components/confirm/confirm.component.d.ts +5 -4
  23. package/components/confirm/confirm.service.d.ts +1 -1
  24. package/components/copy/copy.component.d.ts +4 -5
  25. package/components/copy/copy.directive.d.ts +3 -4
  26. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -2
  27. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  28. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  29. package/components/data-list-wrapper/index.d.ts +1 -1
  30. package/components/drawer/drawer.component.d.ts +3 -4
  31. package/components/files/file/file.component.d.ts +16 -29
  32. package/components/files/file/file.options.d.ts +1 -1
  33. package/components/files/files/files.component.d.ts +7 -10
  34. package/components/files/input-files/input-files.component.d.ts +2 -2
  35. package/components/files/input-files/input-files.content.d.ts +7 -8
  36. package/components/files/input-files/input-files.directive.d.ts +2 -2
  37. package/components/files/input-files/input-files.options.d.ts +1 -3
  38. package/components/filter/filter.component.d.ts +9 -11
  39. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  40. package/components/index.d.ts +0 -3
  41. package/components/input-chip/input-chip.component.d.ts +9 -8
  42. package/components/input-chip/input-chip.d.ts +5 -1
  43. package/components/input-chip/input-chip.directive.d.ts +7 -12
  44. package/components/input-color/index.d.ts +1 -0
  45. package/components/input-color/input-color.component.d.ts +4 -4
  46. package/components/input-color/input-color.d.ts +5 -0
  47. package/components/input-date/input-date.d.ts +4 -1
  48. package/components/input-date/input-date.directive.d.ts +12 -14
  49. package/components/input-date/input-date.options.d.ts +3 -3
  50. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  51. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  52. package/components/input-date-range/input-date-range.d.ts +4 -1
  53. package/components/input-date-range/input-date-range.directive.d.ts +5 -8
  54. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  55. package/components/input-date-time/input-date-time.d.ts +4 -1
  56. package/components/input-date-time/input-date-time.directive.d.ts +6 -6
  57. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  58. package/components/input-month/input-month.d.ts +4 -1
  59. package/components/input-month/input-month.directive.d.ts +6 -5
  60. package/components/input-month-range/input-month-range.d.ts +4 -1
  61. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  62. package/components/input-number/input-number.d.ts +4 -1
  63. package/components/input-number/input-number.directive.d.ts +7 -11
  64. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  65. package/components/input-phone/index.d.ts +1 -0
  66. package/components/input-phone/input-phone.d.ts +5 -0
  67. package/components/input-phone/input-phone.directive.d.ts +7 -7
  68. package/components/input-phone-international/index.d.ts +1 -0
  69. package/components/input-phone-international/input-phone-international.component.d.ts +11 -11
  70. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  71. package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
  72. package/components/input-pin/index.d.ts +1 -0
  73. package/components/input-pin/input-pin.component.d.ts +4 -4
  74. package/components/input-pin/input-pin.d.ts +5 -0
  75. package/components/input-range/index.d.ts +0 -1
  76. package/components/input-range/input-range.component.d.ts +4 -4
  77. package/components/input-slider/input-slider.d.ts +4 -1
  78. package/components/input-slider/input-slider.directive.d.ts +1 -1
  79. package/components/input-time/input-time.component.d.ts +1 -3
  80. package/components/input-time/input-time.d.ts +4 -1
  81. package/components/input-time/input-time.directive.d.ts +7 -10
  82. package/components/input-year/input-year.d.ts +4 -1
  83. package/components/input-year/input-year.directive.d.ts +5 -5
  84. package/components/input-year/input-year.options.d.ts +2 -2
  85. package/components/like/like.options.d.ts +1 -1
  86. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  87. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  88. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  89. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +5 -7
  90. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  91. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  92. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  93. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  94. package/components/pagination/index.d.ts +1 -0
  95. package/components/pagination/pagination.component.d.ts +25 -54
  96. package/components/pagination/pagination.options.d.ts +7 -0
  97. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  98. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  99. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  100. package/components/preview/index.d.ts +1 -0
  101. package/components/preview/pagination/preview-pagination.component.d.ts +3 -2
  102. package/components/preview/preview.component.d.ts +2 -2
  103. package/components/preview/preview.d.ts +2 -1
  104. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  105. package/components/preview/zoom/preview-zoom.component.d.ts +4 -2
  106. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  107. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  108. package/components/progress/progress.options.d.ts +1 -3
  109. package/components/pulse/pulse.component.d.ts +2 -2
  110. package/components/push/push-alert.component.d.ts +2 -1
  111. package/components/push/push.component.d.ts +1 -1
  112. package/components/push/push.options.d.ts +5 -10
  113. package/components/push/push.service.d.ts +3 -2
  114. package/components/radio/radio.component.d.ts +1 -1
  115. package/components/radio-list/radio-list.component.d.ts +5 -3
  116. package/components/range/range-change.directive.d.ts +1 -2
  117. package/components/range/range.component.d.ts +16 -19
  118. package/components/rating/rating.component.d.ts +1 -1
  119. package/components/rating/rating.options.d.ts +1 -3
  120. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  121. package/components/segmented/segmented.component.d.ts +4 -6
  122. package/components/segmented/segmented.directive.d.ts +6 -7
  123. package/components/select/native-select/native-select.component.d.ts +7 -8
  124. package/components/select/select.d.ts +4 -1
  125. package/components/select/select.directive.d.ts +4 -3
  126. package/components/slider/slider.options.d.ts +1 -6
  127. package/components/stepper/step.component.d.ts +6 -8
  128. package/components/stepper/stepper.component.d.ts +6 -11
  129. package/components/switch/switch.component.d.ts +1 -0
  130. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  131. package/components/tabs/tabs.options.d.ts +1 -6
  132. package/components/textarea/index.d.ts +2 -1
  133. package/components/textarea/textarea.component.d.ts +4 -4
  134. package/components/textarea/textarea.d.ts +6 -0
  135. package/components/textarea/textarea.directive.d.ts +13 -0
  136. package/components/toast/toast.component.d.ts +4 -3
  137. package/components/toast/toast.options.d.ts +5 -5
  138. package/components/toast/toast.service.d.ts +4 -9
  139. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  140. package/components/tree/misc/tree.constants.d.ts +0 -3
  141. package/components/tree/misc/tree.tokens.d.ts +1 -6
  142. package/directives/button-close/button-close.directive.d.ts +2 -1
  143. package/directives/button-select/button-select.directive.d.ts +3 -2
  144. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  145. package/directives/fade/fade.directive.d.ts +5 -6
  146. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  147. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  148. package/directives/highlight/highlight.directive.d.ts +4 -4
  149. package/directives/index.d.ts +0 -1
  150. package/directives/password/password.directive.d.ts +1 -1
  151. package/directives/present/present.directive.d.ts +2 -4
  152. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  153. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  154. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  155. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -9
  156. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  158. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-components-avatar.mjs +34 -48
  160. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
  162. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
  164. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
  166. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  167. package/fesm2022/taiga-ui-kit-components-block.mjs +11 -15
  168. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +19 -39
  170. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +19 -27
  172. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  173. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
  174. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  175. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +25 -26
  176. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  177. package/fesm2022/taiga-ui-kit-components-carousel.mjs +64 -114
  178. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  179. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
  180. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
  182. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +45 -50
  184. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  186. package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
  187. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-confirm.mjs +11 -14
  189. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-copy.mjs +23 -36
  191. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
  193. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  195. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-files.mjs +116 -243
  197. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-filter.mjs +20 -34
  199. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  201. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +70 -75
  203. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -13
  205. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +36 -53
  207. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +30 -36
  209. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +33 -31
  211. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-input-date.mjs +49 -53
  213. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +4 -5
  215. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +29 -27
  217. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-input-month.mjs +35 -27
  219. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-input-number.mjs +54 -72
  221. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +50 -44
  223. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +32 -23
  225. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +18 -9
  227. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-input-range.mjs +11 -13
  229. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +16 -12
  231. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-input-time.mjs +49 -73
  233. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-input-year.mjs +28 -21
  235. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +12 -14
  237. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
  239. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +36 -78
  241. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -8
  243. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  244. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +36 -49
  245. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  246. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -26
  247. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -8
  249. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-pagination.mjs +67 -138
  251. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  253. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-preview.mjs +74 -54
  255. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-progress.mjs +69 -65
  257. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  258. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  259. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components-push.mjs +30 -43
  261. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
  263. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
  265. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-components-range.mjs +40 -75
  267. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
  269. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  271. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  273. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-select.mjs +59 -48
  275. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components-slider.mjs +24 -34
  277. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  279. package/fesm2022/taiga-ui-kit-components-stepper.mjs +45 -79
  280. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  282. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-components-tabs.mjs +29 -37
  284. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-components-textarea.mjs +54 -62
  286. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  287. package/fesm2022/taiga-ui-kit-components-tiles.mjs +14 -15
  288. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  289. package/fesm2022/taiga-ui-kit-components-toast.mjs +35 -61
  290. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-components-tree.mjs +56 -60
  292. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  293. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  294. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +15 -7
  296. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  297. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  298. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +18 -10
  300. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
  302. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  303. package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -7
  304. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  305. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  306. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  307. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  308. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  309. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  310. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  311. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
  312. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-directives-password.mjs +12 -14
  314. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
  316. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  318. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  319. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  320. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +11 -11
  322. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +9 -12
  324. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
  326. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
  328. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  329. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  330. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  331. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  332. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -25
  334. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  336. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  337. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -5
  338. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  340. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  341. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  342. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  343. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  344. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  345. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  346. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  347. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  348. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  349. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -121
  350. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  351. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  352. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  353. package/package.json +42 -47
  354. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  355. package/pipes/auto-color/index.d.ts +1 -0
  356. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
  357. package/pipes/flag/flag.pipe.d.ts +14 -0
  358. package/pipes/flag/index.d.ts +1 -0
  359. package/pipes/index.d.ts +3 -0
  360. package/pipes/initials/index.d.ts +1 -0
  361. package/pipes/initials/initials.pipe.d.ts +7 -0
  362. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  363. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  364. package/styles/components/avatar.less +14 -14
  365. package/styles/components/badge.less +4 -3
  366. package/styles/components/block.less +4 -4
  367. package/styles/components/chip.less +14 -4
  368. package/styles/components/comment.less +1 -1
  369. package/styles/components/message.less +1 -1
  370. package/styles/components/pin.less +3 -3
  371. package/styles/components/switch.less +2 -2
  372. package/styles/components/toast.less +1 -1
  373. package/tokens/i18n.d.ts +26 -26
  374. package/tokens/index.d.ts +0 -7
  375. package/utils/index.d.ts +0 -2
  376. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  377. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  378. package/components/elastic-container/index.d.ts +0 -2
  379. package/components/floating-container/floating-container.directive.d.ts +0 -7
  380. package/components/floating-container/index.d.ts +0 -1
  381. package/components/input-range/input-range.d.ts +0 -3
  382. package/components/slides/index.d.ts +0 -1
  383. package/components/slides/slides.directive.d.ts +0 -11
  384. package/components/textarea/textarea-limit.directive.d.ts +0 -27
  385. package/directives/lazy-loading/index.d.ts +0 -2
  386. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  387. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  388. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  389. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  390. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  391. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  392. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  393. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  394. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  395. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  396. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  397. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  398. package/tokens/calendar-date-stream.d.ts +0 -10
  399. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  400. package/tokens/input-date-options.d.ts +0 -15
  401. package/tokens/items-handlers.d.ts +0 -26
  402. package/tokens/mobile-calendar.d.ts +0 -6
  403. package/tokens/month-formatter.d.ts +0 -5
  404. package/utils/phone.d.ts +0 -3
  405. package/utils/toggle-day.d.ts +0 -2
@@ -1,35 +1,32 @@
1
- import { __decorate } from 'tslib';
2
- import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
3
1
  import * as i0 from '@angular/core';
4
- import { inject, LOCALE_ID, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, TemplateRef, ContentChildren, ViewEncapsulation, InjectionToken, Directive, forwardRef, ContentChild, Pipe } from '@angular/core';
5
- import { DomSanitizer } from '@angular/platform-browser';
2
+ import { inject, LOCALE_ID, computed, input, output, ChangeDetectionStrategy, Component, contentChildren, TemplateRef, model, ViewEncapsulation, Directive, forwardRef, contentChild, Pipe } from '@angular/core';
6
3
  import { WA_WINDOW } from '@ng-web-apis/common';
7
- import { tuiPure, tuiProvideOptions, tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
8
4
  import { TuiButton } from '@taiga-ui/core/components/button';
9
5
  import { TuiIcon } from '@taiga-ui/core/components/icon';
10
6
  import { TuiLoader } from '@taiga-ui/core/components/loader';
11
7
  import * as i1 from '@taiga-ui/core/directives/appearance';
12
8
  import { tuiAppearanceOptionsProvider, TuiAppearance, tuiAppearanceMode, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
13
- import { TuiHintOverflow } from '@taiga-ui/core/directives/hint';
14
- import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
9
+ import { TuiHintOverflow } from '@taiga-ui/core/portals/hint';
10
+ import { TUI_COMMON_ICONS, TUI_BREAKPOINT } from '@taiga-ui/core/tokens';
15
11
  import { TUI_DIGITAL_INFORMATION_UNITS, TUI_FILE_TEXTS, TUI_HIDE_TEXT, TUI_SHOW_ALL_TEXT, TUI_INPUT_FILE_TEXTS } from '@taiga-ui/kit/tokens';
16
12
  import { PolymorpheusOutlet, injectContext, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
17
- import { of, map, combineLatest, timer, switchMap, filter } from 'rxjs';
18
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
13
+ import { tuiCreateOptions, tuiProvide } from '@taiga-ui/cdk/utils/di';
19
14
  import { coerceArray } from '@angular/cdk/coercion';
20
15
  import { tuiRound } from '@taiga-ui/cdk/utils/math';
21
16
  import { TuiItem } from '@taiga-ui/cdk/directives/item';
22
- import { EMPTY_QUERY, EMPTY_ARRAY, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
17
+ import { NgTemplateOutlet } from '@angular/common';
23
18
  import { TuiExpand } from '@taiga-ui/core/components/expand';
24
19
  import * as i1$1 from '@taiga-ui/core/directives/group';
25
20
  import { TuiGroup, tuiGroupOptionsProvider } from '@taiga-ui/core/directives/group';
26
21
  import { TuiLink } from '@taiga-ui/core/components/link';
27
- import { TuiBreakpointService } from '@taiga-ui/core/services';
22
+ import { outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
28
23
  import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
24
+ import { EMPTY_ARRAY, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
29
25
  import * as i1$2 from '@taiga-ui/cdk/directives/native-validator';
30
26
  import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
31
27
  import { tuiZonefreeScheduler, tuiControlValue } from '@taiga-ui/cdk/observables';
32
28
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
29
+ import { timer, switchMap, map, filter, combineLatest } from 'rxjs';
33
30
  import { Validators, NG_VALIDATORS, FormControl } from '@angular/forms';
34
31
  import { TuiValidator } from '@taiga-ui/cdk/directives/validator';
35
32
 
@@ -107,224 +104,114 @@ const [TUI_FILE_OPTIONS, tuiFileOptionsProvider] = tuiCreateOptions(TUI_FILE_DEF
107
104
 
108
105
  class TuiFile {
109
106
  constructor() {
110
- this.sanitizer = inject(DomSanitizer);
111
107
  this.options = inject(TUI_FILE_OPTIONS);
112
108
  this.locale = inject(LOCALE_ID);
113
- this.units$ = inject(TUI_DIGITAL_INFORMATION_UNITS);
109
+ this.units = inject(TUI_DIGITAL_INFORMATION_UNITS);
114
110
  this.win = inject(WA_WINDOW);
115
111
  this.icons = inject(TUI_COMMON_ICONS);
116
- this.fileTexts$ = inject(TUI_FILE_TEXTS);
117
- this.file = { name: '' };
118
- this.state = 'normal';
119
- this.size = 'm';
120
- this.showDelete = true;
121
- this.showSize = true;
122
- this.remove = new EventEmitter();
123
- }
124
- get preview() {
125
- return this.isBig ? this.createPreview(this.file) : '';
126
- }
127
- get isBig() {
128
- return this.size === 'l';
129
- }
130
- get isLoading() {
131
- return this.state === 'loading';
132
- }
133
- get isError() {
134
- return this.state === 'error';
135
- }
136
- get isDeleted() {
137
- return this.state === 'deleted';
112
+ this.fileTexts = inject(TUI_FILE_TEXTS);
113
+ this.content = computed(() => this.state() === 'error' && !this.file().content
114
+ ? this.fileTexts().loadingError
115
+ : this.file().content || '');
116
+ this.fileSize = computed(() => this.options.formatSize(this.units(), this.file().size, this.locale));
117
+ this.preview = computed(() => this.size() === 'l' ? this.createPreview(this.file()) : '');
118
+ this.name = computed(() => {
119
+ const dot = this.file().name.lastIndexOf('.');
120
+ // a dot at position 0 means a “hidden” file, not an extension
121
+ return dot > 0 ? this.file().name.slice(0, dot) : this.file().name;
122
+ });
123
+ this.type = computed(() => {
124
+ const dot = this.file().name.lastIndexOf('.');
125
+ // only return an extension when there is one
126
+ return dot > 0 ? this.file().name.slice(dot) : '';
127
+ });
128
+ this.icon = computed((state = this.state()) => state === 'loading' ? '' : this.options.icons[state]);
129
+ this.file = input({ name: '' });
130
+ this.state = input('normal');
131
+ this.size = input('m');
132
+ this.showDelete = input(true);
133
+ this.showSize = input(true);
134
+ this.leftContent = input();
135
+ this.remove = output();
138
136
  }
139
137
  get allowDelete() {
140
- return this.showDelete && this.remove.observed;
141
- }
142
- get icon() {
143
- return this.state === 'loading' ? '' : this.options.icons[this.state];
144
- }
145
- get name() {
146
- return this.getName(this.file);
147
- }
148
- get type() {
149
- return this.getType(this.file);
150
- }
151
- get content$() {
152
- return this.calculateContent$(this.state, this.file, this.fileTexts$);
153
- }
154
- get fileSize$() {
155
- return this.calculateFileSize$(this.file, this.units$);
156
- }
157
- calculateContent$(state, file, fileTexts$) {
158
- return state === 'error' && !file.content
159
- ? fileTexts$.pipe(map((texts) => texts.loadingError))
160
- : of(this.file.content || '');
161
- }
162
- calculateFileSize$(file, units$) {
163
- return units$.pipe(map((units) => this.options.formatSize(units, file.size, this.locale)));
138
+ return this.showDelete() && !!this.remove['listeners']?.length;
164
139
  }
165
140
  createPreview(file) {
166
141
  if (file.src) {
167
142
  return file.src;
168
143
  }
169
- if (this.win.File &&
144
+ return this.win.File &&
170
145
  file instanceof this.win.File &&
171
- file.type?.startsWith('image/')) {
172
- return this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));
173
- }
174
- return '';
146
+ file.type?.startsWith('image/')
147
+ ? URL.createObjectURL(file)
148
+ : '';
175
149
  }
176
- getName(file) {
177
- const dot = file.name.lastIndexOf('.');
178
- // a dot at position 0 means a “hidden” file, not an extension
179
- return dot > 0 ? file.name.slice(0, dot) : file.name;
180
- }
181
- getType(file) {
182
- const dot = file.name.lastIndexOf('.');
183
- // only return an extension when there is one
184
- return dot > 0 ? file.name.slice(dot) : '';
185
- }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
187
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiFile, isStandalone: true, selector: "tui-file,a[tuiFile],button[tuiFile]", inputs: { file: "file", state: "state", size: "size", showDelete: "showDelete", showSize: "showSize", leftContent: "leftContent" }, outputs: { remove: "remove" }, host: { properties: { "attr.data-delete": "showDelete" } }, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [{ directive: i1.TuiAppearance }], ngImport: i0, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div class=\"t-type\">{{ type }}</div>\n @if (showSize && (fileSize$ | async); as fileSize) {\n <div class=\"t-size\">\n {{ fileSize }}\n </div>\n }\n </div>\n @if (content$ | async; as content) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts$ | async; as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview\"\n />\n } @else {\n @if (isLoading) {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: size}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"isBig || isDeleted\"\n [class.t-icon_error]=\"isError\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-text-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;top:0;left:0;bottom:0;right:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-text-negative)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiHintOverflow, selector: "[tuiHintOverflow]", inputs: ["tuiHintOverflow"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
150
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
151
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiFile, isStandalone: true, selector: "tui-file,a[tuiFile],button[tuiFile]", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showDelete: { classPropertyName: "showDelete", publicName: "showDelete", isSignal: true, isRequired: false, transformFunction: null }, showSize: { classPropertyName: "showSize", publicName: "showSize", isSignal: true, isRequired: false, transformFunction: null }, leftContent: { classPropertyName: "leftContent", publicName: "leftContent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, host: { properties: { "attr.data-delete": "showDelete()" } }, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [{ directive: i1.TuiAppearance }], ngImport: i0, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"size() === 'l'\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent() || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name() }}\n </div>\n <div class=\"t-type\">{{ type() }}</div>\n @if (showSize() && fileSize()) {\n <div class=\"t-size\">\n {{ fileSize() }}\n </div>\n }\n </div>\n @if (content(); as text) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts(); as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview()) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview()\"\n />\n } @else {\n @if (state() === 'loading') {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"size() === 'l'\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon() as src; context: {$implicit: size()}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"size() === 'l' || state() === 'deleted'\"\n [class.t-icon_error]=\"state() === 'error'\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-body-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;inset:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-body-s);color:var(--tui-text-negative)}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiHintOverflow, selector: "[tuiHintOverflow]", inputs: ["tuiHintOverflow"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
188
152
  }
189
- __decorate([
190
- tuiPure
191
- ], TuiFile.prototype, "calculateContent$", null);
192
- __decorate([
193
- tuiPure
194
- ], TuiFile.prototype, "calculateFileSize$", null);
195
- __decorate([
196
- tuiPure
197
- ], TuiFile.prototype, "createPreview", null);
198
- __decorate([
199
- tuiPure
200
- ], TuiFile.prototype, "getName", null);
201
- __decorate([
202
- tuiPure
203
- ], TuiFile.prototype, "getType", null);
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFile, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFile, decorators: [{
205
154
  type: Component,
206
- args: [{ selector: 'tui-file,a[tuiFile],button[tuiFile]', imports: [
207
- AsyncPipe,
208
- PolymorpheusOutlet,
209
- TuiButton,
210
- TuiHintOverflow,
211
- TuiIcon,
212
- TuiLoader,
213
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [TuiAppearance], host: {
214
- '[attr.data-delete]': 'showDelete',
215
- }, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div class=\"t-type\">{{ type }}</div>\n @if (showSize && (fileSize$ | async); as fileSize) {\n <div class=\"t-size\">\n {{ fileSize }}\n </div>\n }\n </div>\n @if (content$ | async; as content) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts$ | async; as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview\"\n />\n } @else {\n @if (isLoading) {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: size}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"isBig || isDeleted\"\n [class.t-icon_error]=\"isError\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-text-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;top:0;left:0;bottom:0;right:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-text-negative)}\n"] }]
216
- }], propDecorators: { file: [{
217
- type: Input
218
- }], state: [{
219
- type: Input
220
- }], size: [{
221
- type: Input
222
- }], showDelete: [{
223
- type: Input
224
- }], showSize: [{
225
- type: Input
226
- }], leftContent: [{
227
- type: Input
228
- }], remove: [{
229
- type: Output
230
- }], calculateContent$: [], calculateFileSize$: [], createPreview: [], getName: [], getType: [] } });
155
+ args: [{ selector: 'tui-file,a[tuiFile],button[tuiFile]', imports: [PolymorpheusOutlet, TuiButton, TuiHintOverflow, TuiIcon, TuiLoader], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [TuiAppearance], host: { '[attr.data-delete]': 'showDelete()' }, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"size() === 'l'\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent() || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name() }}\n </div>\n <div class=\"t-type\">{{ type() }}</div>\n @if (showSize() && fileSize()) {\n <div class=\"t-size\">\n {{ fileSize() }}\n </div>\n }\n </div>\n @if (content(); as text) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts(); as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview()) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview()\"\n />\n } @else {\n @if (state() === 'loading') {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"size() === 'l'\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon() as src; context: {$implicit: size()}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"size() === 'l' || state() === 'deleted'\"\n [class.t-icon_error]=\"state() === 'error'\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-body-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;inset:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-body-s);color:var(--tui-text-negative)}\n"] }]
156
+ }] });
231
157
 
232
158
  class TuiFilesComponent {
233
159
  constructor() {
234
- this.items = EMPTY_QUERY;
235
- this.hideText$ = inject(TUI_HIDE_TEXT);
236
- this.showAllText$ = inject(TUI_SHOW_ALL_TEXT);
237
- this.max = 0;
238
- this.expanded = false;
239
- this.expandedChange = new EventEmitter();
240
- }
241
- get hasExtraItems() {
242
- return !!this.max && this.items.length > this.max;
243
- }
244
- toggle() {
245
- this.expanded = !this.expanded;
246
- this.expandedChange.emit(this.expanded);
247
- }
248
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
249
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiFilesComponent, isStandalone: true, selector: "tui-files", inputs: { max: "max", expanded: "expanded" }, outputs: { expandedChange: "expandedChange" }, providers: [
160
+ this.hideText = inject(TUI_HIDE_TEXT);
161
+ this.showAllText = inject(TUI_SHOW_ALL_TEXT);
162
+ this.items = contentChildren(TuiItem, { read: TemplateRef });
163
+ this.max = input(0);
164
+ this.expanded = model(false);
165
+ }
166
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
167
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiFilesComponent, isStandalone: true, selector: "tui-files", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, providers: [
250
168
  tuiGroupOptionsProvider({ size: 'm', collapsed: true, orientation: 'vertical' }),
251
- ], queries: [{ propertyName: "items", predicate: TuiItem, read: TemplateRef }], hostDirectives: [{ directive: i1$1.TuiGroup }], ngImport: i0, template: "@if (items.changes | async) {}\n<ng-content />\n@for (item of items; track item) {\n @if (!max || $index < max) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n}\n@if (hasExtraItems) {\n <tui-expand [expanded]=\"expanded\">\n <div\n tuiGroup\n class=\"t-extra-items\"\n >\n @for (item of items; track item) {\n @if (max && $index >= max) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n }\n </div>\n </tui-expand>\n}\n@if (hasExtraItems) {\n <div\n class=\"t-bottom\"\n [class.t-bottom_collapsed]=\"!expanded\"\n >\n <button\n appearance=\"outline\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n (click)=\"toggle()\"\n >\n {{ (expanded ? hideText$ : showAllText$) | async }}\n </button>\n </div>\n}\n", styles: ["tui-files{inline-size:100%;overflow:hidden;border-radius:var(--tui-radius-m)}tui-files:empty:empty{display:none}tui-files .t-files{position:relative;display:block;inline-size:100%;block-size:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{inline-size:100%;border-radius:inherit}tui-files .t-bottom{z-index:3;inline-size:100%;background:var(--tui-background-base);mask:none!important}tui-files .t-bottom_collapsed{box-shadow:var(--tui-shadow-popup);margin-block-start:-1.5rem}tui-files .t-extra-items{inline-size:100%}tui-files .t-extra-items>*{border-radius:0!important}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
169
+ ], queries: [{ propertyName: "items", predicate: TuiItem, read: TemplateRef, isSignal: true }], hostDirectives: [{ directive: i1$1.TuiGroup }], ngImport: i0, template: "<ng-content />\n@for (item of items(); track $index) {\n @if (!max() || $index < max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n}\n@if (max() && items().length > max()) {\n <tui-expand [expanded]=\"expanded()\">\n <div\n tuiGroup\n class=\"t-extra-items\"\n >\n @for (item of items(); track $index) {\n @if (max() && $index >= max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n }\n </div>\n </tui-expand>\n <div\n class=\"t-bottom\"\n [class.t-bottom_collapsed]=\"!expanded()\"\n >\n <button\n appearance=\"outline\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n (click)=\"expanded.set(!expanded())\"\n >\n {{ expanded() ? hideText() : showAllText() }}\n </button>\n </div>\n}\n", styles: ["tui-files{inline-size:100%;overflow:hidden;border-radius:var(--tui-radius-m)}tui-files:empty:empty{display:none}tui-files .t-files{position:relative;display:block;inline-size:100%;block-size:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{inline-size:100%;border-radius:inherit}tui-files .t-bottom{z-index:3;inline-size:100%;background:var(--tui-background-base);mask:none!important}tui-files .t-bottom_collapsed{box-shadow:var(--tui-shadow-popup);margin-block-start:-1.5rem}tui-files .t-extra-items{inline-size:100%}tui-files .t-extra-items>*{border-radius:0!important}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
252
170
  }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFilesComponent, decorators: [{
171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFilesComponent, decorators: [{
254
172
  type: Component,
255
- args: [{ selector: 'tui-files', imports: [AsyncPipe, NgTemplateOutlet, TuiButton, TuiExpand, TuiGroup], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
173
+ args: [{ selector: 'tui-files', imports: [NgTemplateOutlet, TuiButton, TuiExpand, TuiGroup], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
256
174
  tuiGroupOptionsProvider({ size: 'm', collapsed: true, orientation: 'vertical' }),
257
- ], hostDirectives: [TuiGroup], template: "@if (items.changes | async) {}\n<ng-content />\n@for (item of items; track item) {\n @if (!max || $index < max) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n}\n@if (hasExtraItems) {\n <tui-expand [expanded]=\"expanded\">\n <div\n tuiGroup\n class=\"t-extra-items\"\n >\n @for (item of items; track item) {\n @if (max && $index >= max) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n }\n </div>\n </tui-expand>\n}\n@if (hasExtraItems) {\n <div\n class=\"t-bottom\"\n [class.t-bottom_collapsed]=\"!expanded\"\n >\n <button\n appearance=\"outline\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n (click)=\"toggle()\"\n >\n {{ (expanded ? hideText$ : showAllText$) | async }}\n </button>\n </div>\n}\n", styles: ["tui-files{inline-size:100%;overflow:hidden;border-radius:var(--tui-radius-m)}tui-files:empty:empty{display:none}tui-files .t-files{position:relative;display:block;inline-size:100%;block-size:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{inline-size:100%;border-radius:inherit}tui-files .t-bottom{z-index:3;inline-size:100%;background:var(--tui-background-base);mask:none!important}tui-files .t-bottom_collapsed{box-shadow:var(--tui-shadow-popup);margin-block-start:-1.5rem}tui-files .t-extra-items{inline-size:100%}tui-files .t-extra-items>*{border-radius:0!important}\n"] }]
258
- }], propDecorators: { items: [{
259
- type: ContentChildren,
260
- args: [TuiItem, { read: TemplateRef }]
261
- }], max: [{
262
- type: Input
263
- }], expanded: [{
264
- type: Input
265
- }], expandedChange: [{
266
- type: Output
267
- }] } });
175
+ ], hostDirectives: [TuiGroup], template: "<ng-content />\n@for (item of items(); track $index) {\n @if (!max() || $index < max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n}\n@if (max() && items().length > max()) {\n <tui-expand [expanded]=\"expanded()\">\n <div\n tuiGroup\n class=\"t-extra-items\"\n >\n @for (item of items(); track $index) {\n @if (max() && $index >= max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n }\n </div>\n </tui-expand>\n <div\n class=\"t-bottom\"\n [class.t-bottom_collapsed]=\"!expanded()\"\n >\n <button\n appearance=\"outline\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n (click)=\"expanded.set(!expanded())\"\n >\n {{ expanded() ? hideText() : showAllText() }}\n </button>\n </div>\n}\n", styles: ["tui-files{inline-size:100%;overflow:hidden;border-radius:var(--tui-radius-m)}tui-files:empty:empty{display:none}tui-files .t-files{position:relative;display:block;inline-size:100%;block-size:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{inline-size:100%;border-radius:inherit}tui-files .t-bottom{z-index:3;inline-size:100%;background:var(--tui-background-base);mask:none!important}tui-files .t-bottom_collapsed{box-shadow:var(--tui-shadow-popup);margin-block-start:-1.5rem}tui-files .t-extra-items{inline-size:100%}tui-files .t-extra-items>*{border-radius:0!important}\n"] }]
176
+ }] });
268
177
 
269
178
  class TuiInputFilesContent {
270
179
  constructor() {
271
- this.breakpoint$ = inject(TuiBreakpointService);
272
- this.text$ = inject(TUI_INPUT_FILE_TEXTS);
273
- this.context = injectContext();
180
+ this.texts = inject(TUI_INPUT_FILE_TEXTS);
274
181
  this.component = inject(TuiInputFiles);
275
- }
276
- get link$() {
277
- return this.computeLink$(this.context.$implicit, !!this.component.input?.input.multiple);
278
- }
279
- get label$() {
280
- return this.computeLabel$(this.context.$implicit, !!this.component.input?.input.multiple);
281
- }
282
- computeLink$(fileDragged, multiple) {
283
- return fileDragged
284
- ? of('')
285
- : this.text$.pipe(map((t) => (multiple ? t.defaultLinkMultiple : t.defaultLinkSingle)));
286
- }
287
- computeLabel$(fileDragged, multiple) {
288
- return fileDragged
289
- ? combineLatest([this.breakpoint$, this.text$]).pipe(map(([breakpoint, text]) => {
290
- if (breakpoint === 'mobile') {
291
- return '';
292
- }
293
- return multiple ? text.dropMultiple : text.drop;
294
- }))
295
- : combineLatest([this.breakpoint$, this.text$]).pipe(map(([breakpoint, text]) => {
296
- if (breakpoint === 'mobile') {
297
- return '';
298
- }
299
- return multiple
300
- ? text.defaultLabelMultiple
301
- : text.defaultLabelSingle;
302
- }));
303
- }
304
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
305
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputFilesContent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
306
- <a tuiLink>{{ link$ | async }}</a>
307
- {{ label$ | async }}
308
- `, isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
182
+ this.breakpoint = inject(TUI_BREAKPOINT);
183
+ this.context = injectContext();
184
+ this.link = computed(() => this.component.input()?.el.multiple
185
+ ? this.texts().defaultLinkMultiple
186
+ : this.texts().defaultLinkSingle);
187
+ this.label = computed(() => this.component.input()?.el.multiple
188
+ ? this.texts().defaultLabelMultiple
189
+ : this.texts().defaultLabelSingle);
190
+ this.dragged = computed(() => this.component.input()?.el.multiple
191
+ ? this.texts().dropMultiple
192
+ : this.texts().drop);
193
+ }
194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
195
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputFilesContent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
196
+ <a tuiLink>{{ context.$implicit ? '' : link() }}</a>
197
+ @if (breakpoint() !== 'mobile') {
198
+ {{ context.$implicit ? dragged() : label() }}
199
+ }
200
+ `, isInline: true, dependencies: [{ kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
309
201
  }
310
- __decorate([
311
- tuiPure
312
- ], TuiInputFilesContent.prototype, "computeLink$", null);
313
- __decorate([
314
- tuiPure
315
- ], TuiInputFilesContent.prototype, "computeLabel$", null);
316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesContent, decorators: [{
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesContent, decorators: [{
317
203
  type: Component,
318
204
  args: [{
319
- imports: [AsyncPipe, TuiLink],
205
+ imports: [TuiLink],
320
206
  template: `
321
- <a tuiLink>{{ link$ | async }}</a>
322
- {{ label$ | async }}
207
+ <a tuiLink>{{ context.$implicit ? '' : link() }}</a>
208
+ @if (breakpoint() !== 'mobile') {
209
+ {{ context.$implicit ? dragged() : label() }}
210
+ }
323
211
  `,
324
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
325
- changeDetection: ChangeDetectionStrategy.Default,
212
+ changeDetection: ChangeDetectionStrategy.OnPush,
326
213
  }]
327
- }], propDecorators: { computeLink$: [], computeLabel$: [] } });
214
+ }] });
328
215
 
329
216
  const TUI_INPUT_FILES_DEFAULT_OPTIONS = {
330
217
  appearance: 'file',
@@ -336,12 +223,7 @@ const TUI_INPUT_FILES_DEFAULT_OPTIONS = {
336
223
  /**
337
224
  * Default parameters for input files component
338
225
  */
339
- const TUI_INPUT_FILES_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_FILES_OPTIONS' : '', {
340
- factory: () => TUI_INPUT_FILES_DEFAULT_OPTIONS,
341
- });
342
- function tuiInputFilesOptionsProvider(options) {
343
- return tuiProvideOptions(TUI_INPUT_FILES_OPTIONS, options, TUI_INPUT_FILES_DEFAULT_OPTIONS);
344
- }
226
+ const [TUI_INPUT_FILES_OPTIONS, tuiInputFilesOptionsProvider] = tuiCreateOptions(TUI_INPUT_FILES_DEFAULT_OPTIONS);
345
227
 
346
228
  class TuiInputFilesValidator extends TuiValidator {
347
229
  constructor() {
@@ -364,13 +246,12 @@ class TuiInputFilesValidator extends TuiValidator {
364
246
  ]) || Validators.nullValidator;
365
247
  this.onChange();
366
248
  }
367
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
368
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputFilesValidator, isStandalone: true, inputs: { accept: "accept", maxFileSize: "maxFileSize" }, host: { properties: { "accept": "accept" } }, providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)], exportAs: ["tuiInputFilesValidator"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
249
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
250
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputFilesValidator, isStandalone: true, inputs: { accept: "accept", maxFileSize: "maxFileSize" }, host: { properties: { "accept": "accept" } }, providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)], exportAs: ["tuiInputFilesValidator"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
369
251
  }
370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesValidator, decorators: [{
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesValidator, decorators: [{
371
253
  type: Directive,
372
254
  args: [{
373
- standalone: true,
374
255
  inputs: ['accept', 'maxFileSize'],
375
256
  providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)],
376
257
  exportAs: 'tuiInputFilesValidator',
@@ -384,12 +265,12 @@ class TuiInputFilesDirective extends TuiControl {
384
265
  constructor() {
385
266
  super(...arguments);
386
267
  this.host = inject(forwardRef(() => TuiInputFiles));
387
- this.m = tuiAppearanceMode(this.mode, {});
388
- this.reject = timer(0, tuiZonefreeScheduler()).pipe(switchMap(() => tuiControlValue(this.control.control)), map(() => tuiFilesRejected(this.control.control)), filter(({ length }) => !!length));
389
- this.input = tuiInjectElement();
268
+ this.m = tuiAppearanceMode(this.mode);
269
+ this.el = tuiInjectElement();
270
+ this.reject = outputFromObservable(timer(0, tuiZonefreeScheduler()).pipe(switchMap(() => tuiControlValue(this.control.control)), map(() => tuiFilesRejected(this.control.control)), filter(({ length }) => !!length)));
390
271
  }
391
272
  process(files) {
392
- const fileOrFiles = this.input.multiple
273
+ const fileOrFiles = this.el.multiple
393
274
  ? [...toArray(this.value()), ...Array.from(files)]
394
275
  : files[0];
395
276
  if (fileOrFiles) {
@@ -397,20 +278,19 @@ class TuiInputFilesDirective extends TuiControl {
397
278
  }
398
279
  }
399
280
  onClick(event) {
400
- if (this.input.readOnly) {
281
+ if (this.el.readOnly) {
401
282
  event.preventDefault();
402
283
  }
403
284
  }
404
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
405
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputFilesDirective, isStandalone: true, selector: "input[tuiInputFiles]", outputs: { reject: "reject" }, host: { attributes: { "title": "", "type": "file" }, listeners: { "blur": "onTouched()", "click": "onClick($event)" }, properties: { "disabled": "disabled()" } }, providers: [
285
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
286
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputFilesDirective, isStandalone: true, selector: "input[tuiInputFiles]", outputs: { reject: "reject" }, host: { attributes: { "title": "", "type": "file" }, listeners: { "blur": "onTouched()", "click": "onClick($event)" }, properties: { "disabled": "disabled()" } }, providers: [
406
287
  tuiAsControl(TuiInputFilesDirective),
407
288
  tuiAppearanceOptionsProvider(TUI_INPUT_FILES_OPTIONS),
408
289
  ], usesInheritance: true, hostDirectives: [{ directive: i1$2.TuiNativeValidator }, { directive: i1.TuiWithAppearance }, { directive: TuiInputFilesValidator, inputs: ["accept", "accept", "maxFileSize", "maxFileSize"] }], ngImport: i0 }); }
409
290
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesDirective, decorators: [{
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesDirective, decorators: [{
411
292
  type: Directive,
412
293
  args: [{
413
- standalone: true,
414
294
  selector: 'input[tuiInputFiles]',
415
295
  providers: [
416
296
  tuiAsControl(TuiInputFilesDirective),
@@ -432,9 +312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
432
312
  '(click)': 'onClick($event)',
433
313
  },
434
314
  }]
435
- }], propDecorators: { reject: [{
436
- type: Output
437
- }] } });
315
+ }] });
438
316
  function toArray(value) {
439
317
  return value ? coerceArray(value) : EMPTY_ARRAY;
440
318
  }
@@ -442,46 +320,48 @@ function toArray(value) {
442
320
  class TuiInputFiles {
443
321
  constructor() {
444
322
  this.content = new PolymorpheusComponent(TuiInputFilesContent);
323
+ this.template = contentChild(TemplateRef);
324
+ this.input = contentChild(TuiInputFilesDirective);
445
325
  }
446
326
  get fileDragged() {
447
- return !!this.files && !this.input?.disabled();
327
+ return !!this.files && !this.input()?.disabled();
448
328
  }
449
329
  onFilesSelected(input) {
450
330
  if (!input?.files) {
451
331
  return;
452
332
  }
453
- this.input?.process(input.files);
333
+ this.input()?.process(input.files);
454
334
  input.value = '';
455
335
  }
456
336
  onDropped({ dataTransfer }) {
457
337
  this.files = null;
458
- if (dataTransfer?.files && !this.input?.disabled()) {
459
- this.input?.process(dataTransfer.files);
338
+ if (dataTransfer?.files && !this.input()?.disabled()) {
339
+ this.input()?.process(dataTransfer.files);
460
340
  }
461
341
  }
462
342
  onDrag(dataTransfer) {
463
343
  this.files = dataTransfer?.files;
464
344
  }
465
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFiles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
466
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputFiles, isStandalone: true, selector: "label[tuiInputFiles]", host: { listeners: { "dragover.prevent.zoneless": "0", "drop.prevent": "onDropped($event)", "dragenter": "onDrag($event.dataTransfer)", "dragleave": "onDrag(null)", "change": "onFilesSelected($event.target)" }, properties: { "class._dragged": "fileDragged" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }, { propertyName: "input", first: true, predicate: TuiInputFilesDirective, descendants: true }], ngImport: i0, template: `
345
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFiles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
346
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.17", type: TuiInputFiles, isStandalone: true, selector: "label[tuiInputFiles]", host: { listeners: { "dragover.prevent.zoneless": "0", "drop.prevent": "onDropped($event)", "dragenter": "onDrag($event.dataTransfer)", "dragleave": "onDrag(null)", "change": "onFilesSelected($event.target)" }, properties: { "class._dragged": "fileDragged" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: TuiInputFilesDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
467
347
  <ng-content />
468
348
  <span
469
349
  *polymorpheusOutlet="
470
- template || content as text;
350
+ template() || content as text;
471
351
  context: {$implicit: fileDragged}
472
352
  "
473
353
  >
474
354
  {{ text }}
475
355
  </span>
476
- `, isInline: true, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-text-m);overflow-wrap:break-word;padding:0 .5rem}label[tuiInputFiles]>:not(input){position:relative;pointer-events:none}label[tuiInputFiles] input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;color:transparent;cursor:pointer}label[tuiInputFiles] input:disabled~*{opacity:var(--tui-disabled-opacity)}label[tuiInputFiles] input::-webkit-file-upload-button{display:none}label[tuiInputFiles] input::file-selector-button{display:none}*:disabled label[tuiInputFiles]{pointer-events:none}[tuiAppearance][data-appearance=file]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;border-radius:inherit;box-sizing:border-box;border:1px dashed var(--tui-text-action);outline:none}tui-root._mobile [tuiAppearance][data-appearance=file]{border-style:solid}[tuiInputFiles]._dragged [tuiAppearance][data-appearance=file]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file][tuiWrapper]:hover:not(._no-hover),[tuiAppearance][data-appearance=file][tuiWrapper][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][data-state=active]{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][tuiWrapper]:active:not(._no-active),[tuiAppearance][data-appearance=file][tuiWrapper][data-state=active],[tuiAppearance][data-appearance=file][tuiWrapper][data-state=active]:hover{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file][tuiWrapper]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][tuiWrapper][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file]:focus-visible:not([data-focus=false]){border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][data-focus=true]{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][tuiWrapper]:not(._focused):has(:focus-visible),[tuiAppearance][data-appearance=file][tuiWrapper]._focused{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file]:not(:disabled)[data-mode~=invalid],[tuiAppearance][data-appearance=file]:invalid:not(:disabled):not([data-mode]){border-color:var(--tui-status-negative)!important}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
356
+ `, isInline: true, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-body-m);overflow-wrap:break-word;padding:0 .5rem}label[tuiInputFiles]>:not(input){position:relative;pointer-events:none}label[tuiInputFiles] input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;color:transparent;cursor:pointer}label[tuiInputFiles] input:disabled~*{opacity:var(--tui-disabled-opacity)}label[tuiInputFiles] input::-webkit-file-upload-button{display:none}label[tuiInputFiles] input::file-selector-button{display:none}*:disabled label[tuiInputFiles]{pointer-events:none}[tuiAppearance][data-appearance=file]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;border-radius:inherit;box-sizing:border-box;border:1px dashed var(--tui-text-action);outline:none}tui-root._mobile [tuiAppearance][data-appearance=file]{border-style:solid}[tuiInputFiles]._dragged [tuiAppearance][data-appearance=file]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][data-state=active]{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file]:focus-visible:not([data-focus=false]){border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][data-focus=true]{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file]:not(:disabled)[data-mode~=invalid],[tuiAppearance][data-appearance=file]:invalid:not(:disabled):not([data-mode]){border-color:var(--tui-status-negative)!important}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
477
357
  }
478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFiles, decorators: [{
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFiles, decorators: [{
479
359
  type: Component,
480
360
  args: [{ selector: 'label[tuiInputFiles]', imports: [PolymorpheusOutlet], template: `
481
361
  <ng-content />
482
362
  <span
483
363
  *polymorpheusOutlet="
484
- template || content as text;
364
+ template() || content as text;
485
365
  context: {$implicit: fileDragged}
486
366
  "
487
367
  >
@@ -494,22 +374,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
494
374
  '(dragleave)': 'onDrag(null)',
495
375
  '[class._dragged]': 'fileDragged',
496
376
  '(change)': 'onFilesSelected($event.target)',
497
- }, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-text-m);overflow-wrap:break-word;padding:0 .5rem}label[tuiInputFiles]>:not(input){position:relative;pointer-events:none}label[tuiInputFiles] input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;color:transparent;cursor:pointer}label[tuiInputFiles] input:disabled~*{opacity:var(--tui-disabled-opacity)}label[tuiInputFiles] input::-webkit-file-upload-button{display:none}label[tuiInputFiles] input::file-selector-button{display:none}*:disabled label[tuiInputFiles]{pointer-events:none}[tuiAppearance][data-appearance=file]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;border-radius:inherit;box-sizing:border-box;border:1px dashed var(--tui-text-action);outline:none}tui-root._mobile [tuiAppearance][data-appearance=file]{border-style:solid}[tuiInputFiles]._dragged [tuiAppearance][data-appearance=file]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file][tuiWrapper]:hover:not(._no-hover),[tuiAppearance][data-appearance=file][tuiWrapper][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][data-state=active]{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][tuiWrapper]:active:not(._no-active),[tuiAppearance][data-appearance=file][tuiWrapper][data-state=active],[tuiAppearance][data-appearance=file][tuiWrapper][data-state=active]:hover{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file][tuiWrapper]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][tuiWrapper][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file]:focus-visible:not([data-focus=false]){border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][data-focus=true]{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][tuiWrapper]:not(._focused):has(:focus-visible),[tuiAppearance][data-appearance=file][tuiWrapper]._focused{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file]:not(:disabled)[data-mode~=invalid],[tuiAppearance][data-appearance=file]:invalid:not(:disabled):not([data-mode]){border-color:var(--tui-status-negative)!important}\n"] }]
498
- }], propDecorators: { template: [{
499
- type: ContentChild,
500
- args: [TemplateRef]
501
- }], input: [{
502
- type: ContentChild,
503
- args: [TuiInputFilesDirective]
504
- }] } });
377
+ }, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-body-m);overflow-wrap:break-word;padding:0 .5rem}label[tuiInputFiles]>:not(input){position:relative;pointer-events:none}label[tuiInputFiles] input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;color:transparent;cursor:pointer}label[tuiInputFiles] input:disabled~*{opacity:var(--tui-disabled-opacity)}label[tuiInputFiles] input::-webkit-file-upload-button{display:none}label[tuiInputFiles] input::file-selector-button{display:none}*:disabled label[tuiInputFiles]{pointer-events:none}[tuiAppearance][data-appearance=file]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;border-radius:inherit;box-sizing:border-box;border:1px dashed var(--tui-text-action);outline:none}tui-root._mobile [tuiAppearance][data-appearance=file]{border-style:solid}[tuiInputFiles]._dragged [tuiAppearance][data-appearance=file]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][data-state=active]{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file]:focus-visible:not([data-focus=false]){border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][data-focus=true]{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file]:not(:disabled)[data-mode~=invalid],[tuiAppearance][data-appearance=file]:invalid:not(:disabled):not([data-mode]){border-color:var(--tui-status-negative)!important}\n"] }]
378
+ }] });
505
379
 
506
380
  class TuiFileRejectedPipe {
507
381
  constructor() {
508
382
  this.options = inject(TUI_INPUT_FILES_OPTIONS);
509
383
  this.formatSize = inject(TUI_FILE_OPTIONS).formatSize;
510
384
  this.locale = inject(LOCALE_ID);
511
- this.text$ = inject(TUI_INPUT_FILE_TEXTS);
512
- this.unit$ = inject(TUI_DIGITAL_INFORMATION_UNITS);
385
+ this.text$ = toObservable(inject(TUI_INPUT_FILE_TEXTS));
386
+ this.unit$ = toObservable(inject(TUI_DIGITAL_INFORMATION_UNITS));
513
387
  }
514
388
  transform(file, { accept = this.options.accept, maxFileSize = this.options.maxFileSize, } = this.options) {
515
389
  const sizeValidator = tuiCreateFileSizeValidator(maxFileSize);
@@ -533,13 +407,12 @@ class TuiFileRejectedPipe {
533
407
  return null;
534
408
  }));
535
409
  }
536
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFileRejectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
537
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFileRejectedPipe, isStandalone: true, name: "tuiFileRejected" }); }
410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFileRejectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
411
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiFileRejectedPipe, isStandalone: true, name: "tuiFileRejected" }); }
538
412
  }
539
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFileRejectedPipe, decorators: [{
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFileRejectedPipe, decorators: [{
540
414
  type: Pipe,
541
415
  args: [{
542
- standalone: true,
543
416
  name: 'tuiFileRejected',
544
417
  }]
545
418
  }] });