@taiga-ui/kit 4.52.0-canary.bf9131e → 4.52.0-canary.c8448e0

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 (443) 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 -3
  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 +5 -5
  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-autoscroll.directive.d.ts +1 -2
  16. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  17. package/components/carousel/carousel.component.d.ts +15 -18
  18. package/components/carousel/carousel.directive.d.ts +5 -4
  19. package/components/chip/chip.options.d.ts +1 -3
  20. package/components/combo-box/combo-box.d.ts +5 -0
  21. package/components/combo-box/combo-box.directive.d.ts +7 -9
  22. package/components/combo-box/index.d.ts +1 -0
  23. package/components/compass/compass.component.d.ts +2 -2
  24. package/components/confirm/confirm.component.d.ts +4 -3
  25. package/components/confirm/confirm.service.d.ts +1 -1
  26. package/components/copy/copy.component.d.ts +3 -4
  27. package/components/copy/copy.directive.d.ts +2 -4
  28. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
  29. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  30. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  31. package/components/data-list-wrapper/index.d.ts +1 -1
  32. package/components/drawer/drawer.component.d.ts +3 -4
  33. package/components/files/file/file.component.d.ts +16 -29
  34. package/components/files/file/file.options.d.ts +1 -1
  35. package/components/files/files/files.component.d.ts +5 -8
  36. package/components/files/input-files/input-files.component.d.ts +2 -2
  37. package/components/files/input-files/input-files.content.d.ts +7 -8
  38. package/components/files/input-files/input-files.directive.d.ts +2 -2
  39. package/components/files/input-files/input-files.options.d.ts +1 -3
  40. package/components/filter/filter.component.d.ts +9 -12
  41. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  42. package/components/index.d.ts +0 -3
  43. package/components/input-chip/input-chip.component.d.ts +9 -8
  44. package/components/input-chip/input-chip.d.ts +5 -1
  45. package/components/input-chip/input-chip.directive.d.ts +7 -12
  46. package/components/input-color/index.d.ts +1 -0
  47. package/components/input-color/input-color.component.d.ts +9 -13
  48. package/components/input-color/input-color.d.ts +5 -0
  49. package/components/input-date/input-date.component.d.ts +2 -2
  50. package/components/input-date/input-date.d.ts +4 -1
  51. package/components/input-date/input-date.directive.d.ts +21 -22
  52. package/components/input-date/input-date.options.d.ts +3 -3
  53. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  54. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  55. package/components/input-date-range/input-date-range.d.ts +4 -1
  56. package/components/input-date-range/input-date-range.directive.d.ts +9 -10
  57. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  58. package/components/input-date-time/input-date-time.d.ts +4 -1
  59. package/components/input-date-time/input-date-time.directive.d.ts +14 -14
  60. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  61. package/components/input-inline/input-inline.component.d.ts +3 -2
  62. package/components/input-month/input-month.component.d.ts +3 -5
  63. package/components/input-month/input-month.d.ts +4 -1
  64. package/components/input-month/input-month.directive.d.ts +6 -5
  65. package/components/input-month-range/input-month-range.d.ts +4 -1
  66. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  67. package/components/input-number/index.d.ts +3 -0
  68. package/components/input-number/input-number.d.ts +7 -2
  69. package/components/input-number/input-number.directive.d.ts +11 -28
  70. package/components/input-number/input-number.options.d.ts +4 -7
  71. package/components/input-number/number-mask.directive.d.ts +42 -0
  72. package/components/input-number/quantum.directive.d.ts +10 -8
  73. package/components/input-number/step/input-number-step.component.d.ts +10 -9
  74. package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
  75. package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
  76. package/components/input-phone/index.d.ts +1 -0
  77. package/components/input-phone/input-phone.d.ts +5 -0
  78. package/components/input-phone/input-phone.directive.d.ts +12 -14
  79. package/components/input-phone-international/index.d.ts +1 -0
  80. package/components/input-phone-international/input-phone-international.component.d.ts +14 -16
  81. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  82. package/components/input-phone-international/input-phone-international.options.d.ts +2 -3
  83. package/components/input-pin/index.d.ts +1 -0
  84. package/components/input-pin/input-pin.component.d.ts +5 -6
  85. package/components/input-pin/input-pin.d.ts +5 -0
  86. package/components/input-range/index.d.ts +0 -1
  87. package/components/input-range/input-range.component.d.ts +23 -53
  88. package/components/input-slider/input-slider.d.ts +4 -1
  89. package/components/input-slider/input-slider.directive.d.ts +4 -3
  90. package/components/input-time/input-time.component.d.ts +1 -3
  91. package/components/input-time/input-time.d.ts +4 -1
  92. package/components/input-time/input-time.directive.d.ts +5 -5
  93. package/components/input-year/input-year.d.ts +4 -1
  94. package/components/input-year/input-year.directive.d.ts +8 -10
  95. package/components/input-year/input-year.options.d.ts +2 -2
  96. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  97. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  98. package/components/like/like.options.d.ts +1 -1
  99. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  100. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  101. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
  102. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  103. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  104. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  105. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  106. package/components/pager/pager.component.d.ts +12 -12
  107. package/components/pagination/index.d.ts +1 -0
  108. package/components/pagination/pagination.component.d.ts +24 -54
  109. package/components/pagination/pagination.options.d.ts +7 -0
  110. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  111. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  112. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  113. package/components/preview/index.d.ts +1 -0
  114. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  115. package/components/preview/preview.component.d.ts +6 -6
  116. package/components/preview/preview.d.ts +2 -1
  117. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  118. package/components/preview/zoom/preview-zoom.component.d.ts +11 -17
  119. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  120. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  121. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  122. package/components/progress/progress.options.d.ts +1 -3
  123. package/components/pulse/pulse.component.d.ts +2 -2
  124. package/components/push/push-alert.component.d.ts +2 -2
  125. package/components/push/push.component.d.ts +6 -7
  126. package/components/push/push.options.d.ts +4 -3
  127. package/components/push/push.service.d.ts +2 -2
  128. package/components/radio/radio.component.d.ts +1 -1
  129. package/components/radio-list/radio-list.component.d.ts +11 -9
  130. package/components/range/range.component.d.ts +3 -4
  131. package/components/rating/rating.component.d.ts +1 -1
  132. package/components/rating/rating.options.d.ts +1 -3
  133. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  134. package/components/segmented/segmented.component.d.ts +4 -6
  135. package/components/segmented/segmented.directive.d.ts +6 -7
  136. package/components/select/native-select/native-select.component.d.ts +7 -8
  137. package/components/select/select.d.ts +4 -1
  138. package/components/select/select.directive.d.ts +4 -3
  139. package/components/slider/helpers/slider-key-steps.directive.d.ts +10 -7
  140. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  141. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  142. package/components/slider/slider.component.d.ts +4 -7
  143. package/components/slider/slider.options.d.ts +1 -6
  144. package/components/stepper/step.component.d.ts +14 -9
  145. package/components/stepper/stepper.component.d.ts +5 -12
  146. package/components/switch/switch.component.d.ts +1 -0
  147. package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
  148. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  149. package/components/tabs/tabs-with-more.component.d.ts +12 -16
  150. package/components/tabs/tabs.directive.d.ts +5 -7
  151. package/components/tabs/tabs.options.d.ts +1 -6
  152. package/components/textarea/index.d.ts +2 -1
  153. package/components/textarea/textarea.component.d.ts +10 -11
  154. package/components/textarea/textarea.d.ts +6 -0
  155. package/components/textarea/textarea.directive.d.ts +13 -0
  156. package/components/tiles/tile-handle.directive.d.ts +2 -1
  157. package/components/tiles/tile.component.d.ts +7 -10
  158. package/components/tiles/tile.service.d.ts +1 -1
  159. package/components/tiles/tiles.component.d.ts +4 -7
  160. package/components/toast/toast.component.d.ts +4 -4
  161. package/components/toast/toast.options.d.ts +4 -3
  162. package/components/toast/toast.service.d.ts +2 -2
  163. package/components/tree/components/tree/tree.component.d.ts +7 -7
  164. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  165. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +7 -0
  166. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  167. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  168. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  169. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  170. package/components/tree/misc/tree.constants.d.ts +0 -3
  171. package/components/tree/misc/tree.tokens.d.ts +1 -6
  172. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  173. package/directives/appearance-proxy/index.d.ts +1 -0
  174. package/directives/button-select/button-select.directive.d.ts +3 -2
  175. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  176. package/directives/fade/fade.directive.d.ts +5 -6
  177. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  178. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  179. package/directives/highlight/highlight.directive.d.ts +4 -4
  180. package/directives/index.d.ts +1 -2
  181. package/directives/password/password.directive.d.ts +1 -1
  182. package/directives/present/present.directive.d.ts +2 -4
  183. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  184. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  185. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  186. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -9
  187. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  189. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-avatar.mjs +35 -49
  191. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
  193. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
  195. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
  197. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-block.mjs +11 -15
  199. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +18 -37
  201. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  203. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +13 -35
  205. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +26 -35
  207. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-carousel.mjs +70 -123
  209. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
  211. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
  213. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -45
  215. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  217. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
  219. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-confirm.mjs +10 -12
  221. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -33
  223. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
  225. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-drawer.mjs +11 -32
  227. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-files.mjs +112 -240
  229. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -34
  231. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  233. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -77
  235. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-input-color.mjs +31 -32
  237. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +35 -51
  239. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +37 -37
  241. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +41 -57
  243. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  244. package/fesm2022/taiga-ui-kit-components-input-date.mjs +55 -68
  245. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  246. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -13
  247. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +26 -23
  249. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-input-month.mjs +39 -46
  251. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-input-number.mjs +266 -211
  253. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +64 -74
  255. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +38 -43
  257. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  258. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +24 -22
  259. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
  261. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +27 -17
  263. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-components-input-time.mjs +39 -41
  265. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-components-input-year.mjs +31 -37
  267. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -72
  269. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
  271. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +18 -23
  273. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -8
  275. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +38 -53
  277. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -26
  279. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-components-pager.mjs +30 -44
  281. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-components-pagination.mjs +75 -149
  283. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  285. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-components-preview.mjs +97 -157
  287. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  288. package/fesm2022/taiga-ui-kit-components-progress.mjs +81 -92
  289. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  291. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  292. package/fesm2022/taiga-ui-kit-components-push.mjs +27 -40
  293. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  294. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
  295. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  296. package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
  297. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  298. package/fesm2022/taiga-ui-kit-components-range.mjs +20 -33
  299. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  300. package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
  301. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  303. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  305. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-components-select.mjs +57 -45
  307. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  308. package/fesm2022/taiga-ui-kit-components-slider.mjs +56 -88
  309. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  311. package/fesm2022/taiga-ui-kit-components-stepper.mjs +61 -88
  312. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  314. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-components-tabs.mjs +90 -157
  316. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-components-textarea.mjs +60 -73
  318. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  319. package/fesm2022/taiga-ui-kit-components-tiles.mjs +54 -99
  320. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-components-toast.mjs +27 -28
  322. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-components-tree.mjs +90 -125
  324. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  326. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  328. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  329. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  330. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -12
  332. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
  334. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -8
  336. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  337. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  338. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  340. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  341. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  342. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  343. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
  344. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  345. package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -9
  346. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  347. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
  348. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  349. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  350. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  351. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  352. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  353. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +9 -9
  354. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  355. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -11
  356. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  357. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
  358. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  359. package/fesm2022/taiga-ui-kit-directives.mjs +1 -2
  360. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  361. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  362. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  363. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  364. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  365. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +22 -36
  366. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  367. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  368. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  369. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +23 -27
  370. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  371. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  372. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  373. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -9
  374. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  375. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  376. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  377. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  378. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  379. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  380. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  381. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -123
  382. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  383. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  384. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  385. package/package.json +75 -80
  386. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  387. package/pipes/auto-color/index.d.ts +1 -0
  388. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +5 -2
  389. package/pipes/flag/flag.pipe.d.ts +13 -0
  390. package/pipes/flag/index.d.ts +1 -0
  391. package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -0
  392. package/pipes/index.d.ts +3 -0
  393. package/pipes/initials/index.d.ts +1 -0
  394. package/pipes/initials/initials.pipe.d.ts +7 -0
  395. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  396. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  397. package/styles/components/avatar.less +14 -14
  398. package/styles/components/badge.less +3 -3
  399. package/styles/components/block.less +4 -4
  400. package/styles/components/chip.less +4 -4
  401. package/styles/components/comment.less +15 -17
  402. package/styles/components/message.less +1 -1
  403. package/styles/components/pin.less +3 -3
  404. package/styles/components/switch.less +3 -2
  405. package/styles/components/toast.less +1 -1
  406. package/tokens/i18n.d.ts +1 -0
  407. package/tokens/index.d.ts +0 -7
  408. package/utils/index.d.ts +0 -2
  409. package/utils/maskito.binding.d.ts +1 -1
  410. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  411. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  412. package/components/elastic-container/index.d.ts +0 -2
  413. package/components/floating-container/floating-container.directive.d.ts +0 -7
  414. package/components/floating-container/index.d.ts +0 -1
  415. package/components/input-range/input-range.d.ts +0 -3
  416. package/components/slides/index.d.ts +0 -1
  417. package/components/slides/slides.directive.d.ts +0 -11
  418. package/components/textarea/textarea-limit.directive.d.ts +0 -26
  419. package/directives/button-close/button-close.directive.d.ts +0 -5
  420. package/directives/button-close/index.d.ts +0 -1
  421. package/directives/lazy-loading/index.d.ts +0 -2
  422. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  423. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  424. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  425. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  426. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  427. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  428. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  429. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  430. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  431. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  432. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +0 -39
  433. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +0 -1
  434. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  435. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  436. package/tokens/calendar-date-stream.d.ts +0 -10
  437. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  438. package/tokens/input-date-options.d.ts +0 -15
  439. package/tokens/items-handlers.d.ts +0 -26
  440. package/tokens/mobile-calendar.d.ts +0 -6
  441. package/tokens/month-formatter.d.ts +0 -5
  442. package/utils/phone.d.ts +0 -3
  443. package/utils/toggle-day.d.ts +0 -2
@@ -1,20 +1,19 @@
1
1
  import { TuiItem } from '@taiga-ui/cdk/directives/item';
2
- import { __decorate } from 'tslib';
3
- import { isPlatformServer, AsyncPipe, NgTemplateOutlet } from '@angular/common';
2
+ import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
4
3
  import * as i0 from '@angular/core';
5
- import { inject, PLATFORM_ID, NgZone, Input, Directive, Output, ChangeDetectorRef, EventEmitter, TemplateRef, ContentChildren, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { inject, PLATFORM_ID, NgZone, input, Directive, signal, computed, contentChildren, TemplateRef, effect, model, output, ChangeDetectionStrategy, Component } from '@angular/core';
6
5
  import * as i2 from '@ng-web-apis/intersection-observer';
7
6
  import { WaIntersectionObserver } from '@ng-web-apis/intersection-observer';
8
- import { TUI_FALSE_HANDLER, TUI_TRUE_HANDLER, EMPTY_QUERY } from '@taiga-ui/cdk/constants';
9
7
  import { TuiPan } from '@taiga-ui/cdk/directives/pan';
10
8
  import { TuiSwipe, TUI_SWIPE_OPTIONS } from '@taiga-ui/cdk/directives/swipe';
11
9
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
12
10
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
13
11
  import { tuiClamp } from '@taiga-ui/cdk/utils/math';
14
- import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
15
12
  import { WA_PAGE_VISIBILITY } from '@ng-web-apis/common';
13
+ import { TUI_FALSE_HANDLER, TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
16
14
  import { tuiTypedFromEvent, tuiIfMap, tuiZoneOptimized, tuiZonefreeScheduler } from '@taiga-ui/cdk/observables';
17
- import { Observable, BehaviorSubject, merge, map, EMPTY, combineLatest, interval, filter, throttleTime, tap } from 'rxjs';
15
+ import { Observable, Subject, merge, map, EMPTY, combineLatest, interval, filter, throttleTime, tap } from 'rxjs';
16
+ import { outputFromObservable } from '@angular/core/rxjs-interop';
18
17
  import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
19
18
 
20
19
  class TuiCarouselDirective extends Observable {
@@ -24,135 +23,113 @@ class TuiCarouselDirective extends Observable {
24
23
  this.platform = inject(PLATFORM_ID);
25
24
  this.visible$ = inject(WA_PAGE_VISIBILITY);
26
25
  this.zone = inject(NgZone);
27
- this.duration$ = new BehaviorSubject(0);
26
+ this.trigger$ = new Subject();
28
27
  this.running$ = merge(tuiTypedFromEvent(this.el, 'mouseenter').pipe(map(TUI_FALSE_HANDLER)), tuiTypedFromEvent(this.el, 'touchstart').pipe(map(TUI_FALSE_HANDLER)), tuiTypedFromEvent(this.el, 'touchend').pipe(map(TUI_TRUE_HANDLER)), tuiTypedFromEvent(this.el, 'mouseleave').pipe(map(TUI_TRUE_HANDLER)), this.visible$);
28
+ this.duration = input(0);
29
29
  this.output$ = isPlatformServer(this.platform)
30
30
  ? EMPTY
31
- : combineLatest([this.duration$, this.running$]).pipe(tuiIfMap(([duration]) => interval(duration).pipe(tuiZoneOptimized(this.zone)), (values) => values.every(Boolean)));
31
+ : combineLatest([
32
+ this.trigger$.pipe(map(() => this.duration())),
33
+ this.running$,
34
+ ]).pipe(tuiIfMap(([duration]) => interval(duration).pipe(tuiZoneOptimized(this.zone)), (values) => values.every(Boolean)));
32
35
  }
33
- set duration(duration) {
34
- this.duration$.next(Number.isNaN(duration) ? this.duration$.value : duration);
36
+ restart() {
37
+ this.trigger$.next();
35
38
  }
36
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
37
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiCarouselDirective, isStandalone: true, inputs: { duration: "duration" }, usesInheritance: true, ngImport: i0 }); }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
40
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiCarouselDirective, isStandalone: true, inputs: { duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
38
41
  }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselDirective, decorators: [{
40
- type: Directive,
41
- args: [{
42
- standalone: true,
43
- }]
44
- }], ctorParameters: () => [], propDecorators: { duration: [{
45
- type: Input
46
- }] } });
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselDirective, decorators: [{
43
+ type: Directive
44
+ }], ctorParameters: () => [] });
47
45
 
48
46
  class TuiCarouselAutoscroll {
49
47
  constructor() {
50
- this.tuiCarouselAutoscroll = inject(TuiCarouselDirective);
48
+ this.tuiCarouselAutoscroll = outputFromObservable(inject(TuiCarouselDirective));
51
49
  }
52
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselAutoscroll, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
53
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiCarouselAutoscroll, isStandalone: true, selector: "[tuiCarouselAutoscroll]", outputs: { tuiCarouselAutoscroll: "tuiCarouselAutoscroll" }, ngImport: i0 }); }
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselAutoscroll, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
51
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiCarouselAutoscroll, isStandalone: true, selector: "[tuiCarouselAutoscroll]", outputs: { tuiCarouselAutoscroll: "tuiCarouselAutoscroll" }, ngImport: i0 }); }
54
52
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselAutoscroll, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselAutoscroll, decorators: [{
56
54
  type: Directive,
57
55
  args: [{
58
- standalone: true,
59
56
  selector: '[tuiCarouselAutoscroll]',
60
57
  }]
61
- }], propDecorators: { tuiCarouselAutoscroll: [{
62
- type: Output
63
- }] } });
58
+ }] });
64
59
 
65
60
  class TuiCarouselScroll {
66
61
  constructor() {
67
62
  this.el = tuiInjectElement();
68
- this.tuiCarouselScroll = tuiTypedFromEvent(this.el, 'wheel').pipe(filter(({ deltaX }) => Math.abs(deltaX) > 20), throttleTime(500, tuiZonefreeScheduler()), map(({ deltaX }) => Math.sign(deltaX)), tap(() => {
63
+ this.tuiCarouselScroll = outputFromObservable(tuiTypedFromEvent(this.el, 'wheel').pipe(filter(({ deltaX }) => Math.abs(deltaX) > 20), throttleTime(500, tuiZonefreeScheduler()), map(({ deltaX }) => Math.sign(deltaX)), tap(() => {
69
64
  // So we always have space to scroll and overflow-behavior saves us from back nav
70
65
  this.el.scrollLeft = 10;
71
- }));
66
+ })));
72
67
  }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
74
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiCarouselScroll, isStandalone: true, selector: "[tuiCarouselScroll]", outputs: { tuiCarouselScroll: "tuiCarouselScroll" }, ngImport: i0 }); }
68
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
69
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiCarouselScroll, isStandalone: true, selector: "[tuiCarouselScroll]", outputs: { tuiCarouselScroll: "tuiCarouselScroll" }, ngImport: i0 }); }
75
70
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselScroll, decorators: [{
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselScroll, decorators: [{
77
72
  type: Directive,
78
73
  args: [{
79
- standalone: true,
80
74
  selector: '[tuiCarouselScroll]',
81
75
  }]
82
- }], propDecorators: { tuiCarouselScroll: [{
83
- type: Output
84
- }] } });
76
+ }] });
85
77
 
86
78
  class TuiCarouselComponent {
87
79
  constructor() {
88
80
  this.el = tuiInjectElement();
89
- this.cdr = inject(ChangeDetectorRef);
90
81
  this.isMobile = inject(TUI_IS_MOBILE);
91
82
  this.directive = inject(TuiCarouselDirective);
92
- this.translate = 0;
93
- this.items = EMPTY_QUERY;
94
- this.transitioned = true;
95
- this.index = 0;
96
- this.draggable = false;
97
- this.itemsCount = 1;
98
- this.indexChange = new EventEmitter();
99
- this.shift = new EventEmitter();
100
- }
101
- set indexSetter(index) {
102
- this.index = index;
103
- this.directive.duration = NaN;
83
+ this.translate = signal(0);
84
+ this.transitioned = signal(true);
85
+ this.transform = computed(() => `translateX(${100 * this.x()}%)`);
86
+ this.items = contentChildren(TuiItem, { read: TemplateRef });
87
+ this.computedDraggable = computed(() => this.isMobile || this.draggable());
88
+ this.computedTranslate = computed(() => -this.index() / this.itemsCount());
89
+ this.x = computed(() => this.transitioned() ? this.computedTranslate() : this.translate());
90
+ this.resetDuration = effect(() => {
91
+ this.index();
92
+ this.directive.restart();
93
+ });
94
+ this.draggable = input(false);
95
+ this.itemsCount = input(1);
96
+ this.index = model(0);
97
+ this.shift = output();
104
98
  }
105
99
  next() {
106
- if (this.items && this.index === this.items.length - this.itemsCount) {
107
- return;
100
+ if (this.index() !== this.items().length - this.itemsCount()) {
101
+ this.updateIndex(this.index() + 1);
108
102
  }
109
- this.updateIndex(this.index + 1);
110
103
  }
111
104
  prev() {
112
- this.updateIndex(this.index - 1);
113
- }
114
- get transform() {
115
- return `translateX(${100 * this.x}%)`;
116
- }
117
- getStyle(itemsCount) {
118
- const percent = `${100 / itemsCount}%`;
119
- return {
120
- flexBasis: percent,
121
- minWidth: percent,
122
- maxWidth: percent,
123
- };
105
+ this.updateIndex(this.index() - 1);
124
106
  }
125
107
  onTransitioned(transitioned) {
126
- this.transitioned = transitioned;
108
+ this.transitioned.set(transitioned);
127
109
  if (!transitioned) {
128
- this.translate = this.computedTranslate;
110
+ this.translate.set(this.computedTranslate());
129
111
  }
130
112
  this.onShift();
131
113
  }
132
114
  isDisabled(index) {
133
- return index < this.index || index >= this.index + this.itemsCount;
115
+ return index < this.index() || index >= this.index() + this.itemsCount();
134
116
  }
135
- onIntersection({ intersectionRatio }, index) {
136
- if (intersectionRatio && intersectionRatio >= 0.5 && !this.transitioned) {
137
- this.updateIndex(this.index < index ? index - this.itemsCount + 1 : index);
117
+ onIntersection(ratio, index) {
118
+ if (ratio && ratio >= 0.5 && !this.transitioned()) {
119
+ this.updateIndex(this.index() < index ? index - this.itemsCount() + 1 : index);
138
120
  }
139
121
  }
140
122
  onScroll(delta) {
141
123
  if (!this.isMobile) {
142
- if (delta > 0) {
143
- this.next();
144
- }
145
- else {
146
- this.prev();
147
- }
124
+ this.onSwipe(delta > 0 ? 'left' : 'right');
148
125
  }
149
126
  }
150
127
  onPan(x) {
151
- if (!this.computedDraggable) {
128
+ if (!this.computedDraggable()) {
152
129
  return;
153
130
  }
154
- const min = 1 - this.items.length / this.itemsCount;
155
- this.translate = tuiClamp(x / this.el.clientWidth + this.translate, min, 0);
131
+ const min = 1 - this.items().length / this.itemsCount();
132
+ this.translate.set(tuiClamp(x / this.el.clientWidth + this.translate(), min, 0));
156
133
  this.onShift();
157
134
  }
158
135
  onSwipe(direction) {
@@ -164,35 +141,20 @@ class TuiCarouselComponent {
164
141
  }
165
142
  }
166
143
  onAutoscroll() {
167
- this.updateIndex(this.index === this.items.length - 1 ? 0 : this.index + 1);
144
+ this.updateIndex(this.index() === this.items().length - 1 ? 0 : this.index() + 1);
168
145
  }
169
146
  onShift() {
170
- this.shift.emit(Math.abs((this.x % 1) + 0.5) * 2);
171
- }
172
- get x() {
173
- return this.transitioned ? this.computedTranslate : this.translate;
174
- }
175
- get computedTranslate() {
176
- return -this.index / this.itemsCount;
177
- }
178
- get computedDraggable() {
179
- return this.isMobile || this.draggable;
147
+ this.shift.emit(Math.abs((this.x() % 1) + 0.5) * 2);
180
148
  }
181
149
  updateIndex(index) {
182
- this.index = tuiClamp(index, 0, this.items.length - 1);
183
- this.indexChange.emit(this.index);
184
- this.cdr.markForCheck();
150
+ this.index.set(tuiClamp(index, 0, this.items().length - 1));
185
151
  }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
187
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiCarouselComponent, isStandalone: true, selector: "tui-carousel", inputs: { draggable: "draggable", itemsCount: "itemsCount", indexSetter: ["index", "indexSetter"] }, outputs: { indexChange: "indexChange", shift: "shift" }, host: { listeners: { "touchstart": "onTransitioned(false)", "touchend": "onTransitioned(true)", "mousedown": "onTransitioned(false)", "document:mouseup.zoneless": "onTransitioned(true)" }, properties: { "class._transitioned": "transitioned", "class._draggable": "draggable" } }, providers: [{ provide: TUI_SWIPE_OPTIONS, useValue: { timeout: 200, threshold: 30 } }], queries: [{ propertyName: "items", predicate: TuiItem, read: TemplateRef }], hostDirectives: [{ directive: TuiCarouselDirective, inputs: ["duration", "duration"] }], ngImport: i0, template: "@if (items.changes | async) {}\n<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0.5\"\n class=\"t-wrapper\"\n >\n <div\n class=\"t-items\"\n [style.transform]=\"transform\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n >\n @for (item of items; track item) {\n <fieldset\n class=\"t-item\"\n [disabled]=\"isDisabled($index)\"\n [style]=\"getStyle(itemsCount)\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0], $index)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\" />\n </fieldset>\n }\n </div>\n </div>\n</div>\n", styles: [":host{position:relative;display:block;overflow:hidden}:host._draggable{-webkit-user-select:none;user-select:none}:host._draggable:hover{cursor:grab}:host._draggable:active{cursor:grabbing}.t-items{display:flex}:host._transitioned .t-items{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}::ng-deep [tuiCarouselButtons] [tuiIconButton]{border-radius:100%}.t-item{display:flex;flex-direction:column;justify-content:center;padding:var(--tui-carousel-padding, 0 1.25rem);flex:1;min-inline-size:100%;max-inline-size:100%;box-sizing:border-box;border:none;margin:0}.t-wrapper{position:sticky;left:0;right:0;min-inline-size:100%;overflow:hidden}.t-scroller{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;overscroll-behavior-x:none;touch-action:pan-y}.t-scroller::-webkit-scrollbar,.t-scroller::-webkit-scrollbar-thumb{display:none}.t-scroller:before,.t-scroller:after{content:\"\";display:block;min-inline-size:1rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiCarouselAutoscroll, selector: "[tuiCarouselAutoscroll]", outputs: ["tuiCarouselAutoscroll"] }, { kind: "directive", type: TuiCarouselScroll, selector: "[tuiCarouselScroll]", outputs: ["tuiCarouselScroll"] }, { kind: "directive", type: TuiPan, selector: "[tuiPan]", outputs: ["tuiPan"] }, { kind: "directive", type: TuiSwipe, selector: "[tuiSwipe]", outputs: ["tuiSwipe"] }, { kind: "directive", type: i2.WaIntersectionObserverDirective, selector: "[waIntersectionObserver]", inputs: ["waIntersectionRootMargin", "waIntersectionThreshold"], exportAs: ["IntersectionObserver"] }, { kind: "directive", type: i2.WaIntersectionObservee, selector: "[waIntersectionObservee]", outputs: ["waIntersectionObservee"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
153
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiCarouselComponent, isStandalone: true, selector: "tui-carousel", inputs: { draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, itemsCount: { classPropertyName: "itemsCount", publicName: "itemsCount", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { index: "indexChange", shift: "shift" }, host: { listeners: { "touchstart": "onTransitioned(false)", "touchend": "onTransitioned(true)", "mousedown": "onTransitioned(false)", "document:mouseup.zoneless": "onTransitioned(true)" }, properties: { "class._transitioned": "transitioned()", "class._draggable": "draggable()" } }, providers: [{ provide: TUI_SWIPE_OPTIONS, useValue: { timeout: 200, threshold: 30 } }], queries: [{ propertyName: "items", predicate: TuiItem, read: TemplateRef, isSignal: true }], hostDirectives: [{ directive: TuiCarouselDirective, inputs: ["duration", "duration"] }], ngImport: i0, template: "<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0.5\"\n class=\"t-wrapper\"\n >\n <div\n class=\"t-items\"\n [style.transform]=\"transform()\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n >\n @for (item of items(); track $index) {\n <fieldset\n class=\"t-item\"\n [disabled]=\"isDisabled($index)\"\n [style.flex-basis.%]=\"100 / itemsCount()\"\n [style.max-width.%]=\"100 / itemsCount()\"\n [style.min-width.%]=\"100 / itemsCount()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0].intersectionRatio, $index)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\" />\n </fieldset>\n }\n </div>\n </div>\n</div>\n\n<ng-content />\n", styles: [":host{position:relative;display:block;overflow:hidden}:host._draggable{-webkit-user-select:none;user-select:none}:host._draggable:hover{cursor:grab}:host._draggable:active{cursor:grabbing}.t-items{display:flex}:host._transitioned .t-items{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}::ng-deep [tuiCarouselButtons] [tuiIconButton]{border-radius:100%}.t-item{display:flex;flex-direction:column;justify-content:center;padding:var(--tui-carousel-padding, 0 1.25rem);flex:1;min-inline-size:100%;max-inline-size:100%;box-sizing:border-box;border:none;margin:0}.t-wrapper{position:sticky;left:0;right:0;min-inline-size:100%;overflow:hidden}.t-scroller{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;overscroll-behavior-x:none;touch-action:pan-y}.t-scroller::-webkit-scrollbar,.t-scroller::-webkit-scrollbar-thumb{display:none}.t-scroller:before,.t-scroller:after{content:\"\";display:block;min-inline-size:1rem}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiCarouselAutoscroll, selector: "[tuiCarouselAutoscroll]", outputs: ["tuiCarouselAutoscroll"] }, { kind: "directive", type: TuiCarouselScroll, selector: "[tuiCarouselScroll]", outputs: ["tuiCarouselScroll"] }, { kind: "directive", type: TuiPan, selector: "[tuiPan]", outputs: ["tuiPan"] }, { kind: "directive", type: TuiSwipe, selector: "[tuiSwipe]", outputs: ["tuiSwipe"] }, { kind: "directive", type: i2.WaIntersectionObserverDirective, selector: "[waIntersectionObserver]", inputs: ["waIntersectionRootMargin", "waIntersectionThreshold"], exportAs: ["IntersectionObserver"] }, { kind: "directive", type: i2.WaIntersectionObservee, selector: "[waIntersectionObservee]", outputs: ["waIntersectionObservee"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
188
154
  }
189
- __decorate([
190
- tuiPure
191
- ], TuiCarouselComponent.prototype, "getStyle", null);
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselComponent, decorators: [{
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselComponent, decorators: [{
193
156
  type: Component,
194
157
  args: [{ selector: 'tui-carousel', imports: [
195
- AsyncPipe,
196
158
  NgTemplateOutlet,
197
159
  TuiCarouselAutoscroll,
198
160
  TuiCarouselScroll,
@@ -205,42 +167,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
205
167
  inputs: ['duration'],
206
168
  },
207
169
  ], host: {
208
- '[class._transitioned]': 'transitioned',
209
- '[class._draggable]': 'draggable',
170
+ '[class._transitioned]': 'transitioned()',
171
+ '[class._draggable]': 'draggable()',
210
172
  '(touchstart)': 'onTransitioned(false)',
211
173
  '(touchend)': 'onTransitioned(true)',
212
174
  '(mousedown)': 'onTransitioned(false)',
213
175
  '(document:mouseup.zoneless)': 'onTransitioned(true)',
214
- }, template: "@if (items.changes | async) {}\n<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0.5\"\n class=\"t-wrapper\"\n >\n <div\n class=\"t-items\"\n [style.transform]=\"transform\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n >\n @for (item of items; track item) {\n <fieldset\n class=\"t-item\"\n [disabled]=\"isDisabled($index)\"\n [style]=\"getStyle(itemsCount)\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0], $index)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\" />\n </fieldset>\n }\n </div>\n </div>\n</div>\n", styles: [":host{position:relative;display:block;overflow:hidden}:host._draggable{-webkit-user-select:none;user-select:none}:host._draggable:hover{cursor:grab}:host._draggable:active{cursor:grabbing}.t-items{display:flex}:host._transitioned .t-items{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}::ng-deep [tuiCarouselButtons] [tuiIconButton]{border-radius:100%}.t-item{display:flex;flex-direction:column;justify-content:center;padding:var(--tui-carousel-padding, 0 1.25rem);flex:1;min-inline-size:100%;max-inline-size:100%;box-sizing:border-box;border:none;margin:0}.t-wrapper{position:sticky;left:0;right:0;min-inline-size:100%;overflow:hidden}.t-scroller{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;overscroll-behavior-x:none;touch-action:pan-y}.t-scroller::-webkit-scrollbar,.t-scroller::-webkit-scrollbar-thumb{display:none}.t-scroller:before,.t-scroller:after{content:\"\";display:block;min-inline-size:1rem}\n"] }]
215
- }], propDecorators: { items: [{
216
- type: ContentChildren,
217
- args: [TuiItem, { read: TemplateRef }]
218
- }], draggable: [{
219
- type: Input
220
- }], itemsCount: [{
221
- type: Input
222
- }], indexChange: [{
223
- type: Output
224
- }], shift: [{
225
- type: Output
226
- }], indexSetter: [{
227
- type: Input,
228
- args: ['index']
229
- }], getStyle: [] } });
176
+ }, template: "<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0.5\"\n class=\"t-wrapper\"\n >\n <div\n class=\"t-items\"\n [style.transform]=\"transform()\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n >\n @for (item of items(); track $index) {\n <fieldset\n class=\"t-item\"\n [disabled]=\"isDisabled($index)\"\n [style.flex-basis.%]=\"100 / itemsCount()\"\n [style.max-width.%]=\"100 / itemsCount()\"\n [style.min-width.%]=\"100 / itemsCount()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0].intersectionRatio, $index)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\" />\n </fieldset>\n }\n </div>\n </div>\n</div>\n\n<ng-content />\n", styles: [":host{position:relative;display:block;overflow:hidden}:host._draggable{-webkit-user-select:none;user-select:none}:host._draggable:hover{cursor:grab}:host._draggable:active{cursor:grabbing}.t-items{display:flex}:host._transitioned .t-items{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}::ng-deep [tuiCarouselButtons] [tuiIconButton]{border-radius:100%}.t-item{display:flex;flex-direction:column;justify-content:center;padding:var(--tui-carousel-padding, 0 1.25rem);flex:1;min-inline-size:100%;max-inline-size:100%;box-sizing:border-box;border:none;margin:0}.t-wrapper{position:sticky;left:0;right:0;min-inline-size:100%;overflow:hidden}.t-scroller{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;overscroll-behavior-x:none;touch-action:pan-y}.t-scroller::-webkit-scrollbar,.t-scroller::-webkit-scrollbar-thumb{display:none}.t-scroller:before,.t-scroller:after{content:\"\";display:block;min-inline-size:1rem}\n"] }]
177
+ }] });
230
178
 
231
179
  class TuiCarouselButtons {
232
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselButtons, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
233
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiCarouselButtons, isStandalone: true, selector: "[tuiCarouselButtons]", providers: [
180
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselButtons, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
181
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiCarouselButtons, isStandalone: true, selector: "[tuiCarouselButtons]", providers: [
234
182
  tuiButtonOptionsProvider({
235
183
  appearance: 'secondary',
236
184
  size: 'm',
237
185
  }),
238
186
  ], ngImport: i0 }); }
239
187
  }
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCarouselButtons, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCarouselButtons, decorators: [{
241
189
  type: Directive,
242
190
  args: [{
243
- standalone: true,
244
191
  selector: '[tuiCarouselButtons]',
245
192
  providers: [
246
193
  tuiButtonOptionsProvider({
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-carousel.mjs","sources":["../../../projects/kit/components/carousel/carousel.directive.ts","../../../projects/kit/components/carousel/carousel-autoscroll.directive.ts","../../../projects/kit/components/carousel/carousel-scroll.directive.ts","../../../projects/kit/components/carousel/carousel.component.ts","../../../projects/kit/components/carousel/carousel.template.html","../../../projects/kit/components/carousel/carousel-buttons.directive.ts","../../../projects/kit/components/carousel/carousel.ts","../../../projects/kit/components/carousel/taiga-ui-kit-components-carousel.ts"],"sourcesContent":["import {isPlatformServer} from '@angular/common';\nimport {Directive, inject, Input, NgZone, PLATFORM_ID} from '@angular/core';\nimport {WA_PAGE_VISIBILITY} from '@ng-web-apis/common';\nimport {TUI_FALSE_HANDLER, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiIfMap, tuiTypedFromEvent, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n BehaviorSubject,\n combineLatest,\n EMPTY,\n interval,\n map,\n merge,\n Observable,\n} from 'rxjs';\n\n@Directive({\n standalone: true,\n})\nexport class TuiCarouselDirective extends Observable<unknown> {\n private readonly el = tuiInjectElement();\n private readonly platform = inject(PLATFORM_ID);\n private readonly visible$ = inject(WA_PAGE_VISIBILITY);\n private readonly zone = inject(NgZone);\n private readonly duration$ = new BehaviorSubject(0);\n private readonly running$ = merge(\n tuiTypedFromEvent(this.el, 'mouseenter').pipe(map(TUI_FALSE_HANDLER)),\n tuiTypedFromEvent(this.el, 'touchstart').pipe(map(TUI_FALSE_HANDLER)),\n tuiTypedFromEvent(this.el, 'touchend').pipe(map(TUI_TRUE_HANDLER)),\n tuiTypedFromEvent(this.el, 'mouseleave').pipe(map(TUI_TRUE_HANDLER)),\n this.visible$,\n );\n\n private readonly output$ = isPlatformServer(this.platform)\n ? EMPTY\n : combineLatest([this.duration$, this.running$]).pipe(\n tuiIfMap(\n ([duration]) => interval(duration).pipe(tuiZoneOptimized(this.zone)),\n (values) => values.every(Boolean),\n ),\n );\n\n constructor() {\n super((subscriber) => this.output$.subscribe(subscriber));\n }\n\n @Input()\n public set duration(duration: number) {\n this.duration$.next(Number.isNaN(duration) ? this.duration$.value : duration);\n }\n}\n","import {Directive, inject, Output} from '@angular/core';\n\nimport {TuiCarouselDirective} from './carousel.directive';\n\n@Directive({\n standalone: true,\n selector: '[tuiCarouselAutoscroll]',\n})\nexport class TuiCarouselAutoscroll {\n @Output()\n public readonly tuiCarouselAutoscroll = inject(TuiCarouselDirective);\n}\n","import {Directive, Output} from '@angular/core';\nimport {tuiTypedFromEvent, tuiZonefreeScheduler} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {filter, map, tap, throttleTime} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[tuiCarouselScroll]',\n})\nexport class TuiCarouselScroll {\n private readonly el = tuiInjectElement();\n\n @Output()\n public readonly tuiCarouselScroll = tuiTypedFromEvent(this.el, 'wheel').pipe(\n filter(({deltaX}) => Math.abs(deltaX) > 20),\n throttleTime(500, tuiZonefreeScheduler()),\n map(({deltaX}) => Math.sign(deltaX)),\n tap(() => {\n // So we always have space to scroll and overflow-behavior saves us from back nav\n this.el.scrollLeft = 10;\n }),\n );\n}\n","import {AsyncPipe, NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n EventEmitter,\n inject,\n Input,\n Output,\n type QueryList,\n TemplateRef,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiItem} from '@taiga-ui/cdk/directives/item';\nimport {TuiPan} from '@taiga-ui/cdk/directives/pan';\nimport {\n TUI_SWIPE_OPTIONS,\n TuiSwipe,\n type TuiSwipeDirection,\n} from '@taiga-ui/cdk/directives/swipe';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselAutoscroll} from './carousel-autoscroll.directive';\nimport {TuiCarouselScroll} from './carousel-scroll.directive';\n\n@Component({\n selector: 'tui-carousel',\n imports: [\n AsyncPipe,\n NgTemplateOutlet,\n TuiCarouselAutoscroll,\n TuiCarouselScroll,\n TuiPan,\n TuiSwipe,\n WaIntersectionObserver,\n ],\n templateUrl: './carousel.template.html',\n styleUrl: './carousel.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: TUI_SWIPE_OPTIONS, useValue: {timeout: 200, threshold: 30}}],\n hostDirectives: [\n {\n directive: TuiCarouselDirective,\n inputs: ['duration'],\n },\n ],\n host: {\n '[class._transitioned]': 'transitioned',\n '[class._draggable]': 'draggable',\n '(touchstart)': 'onTransitioned(false)',\n '(touchend)': 'onTransitioned(true)',\n '(mousedown)': 'onTransitioned(false)',\n '(document:mouseup.zoneless)': 'onTransitioned(true)',\n },\n})\nexport class TuiCarouselComponent {\n private readonly el = tuiInjectElement();\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly directive = inject(TuiCarouselDirective);\n private translate = 0;\n\n @ContentChildren(TuiItem, {read: TemplateRef})\n protected readonly items: QueryList<TemplateRef<Record<string, unknown>>> =\n EMPTY_QUERY;\n\n protected transitioned = true;\n\n protected index = 0;\n\n @Input()\n public draggable = false;\n\n @Input()\n public itemsCount = 1;\n\n @Output()\n public readonly indexChange = new EventEmitter<number>();\n\n @Output()\n public readonly shift = new EventEmitter<number>();\n\n @Input('index')\n public set indexSetter(index: number) {\n this.index = index;\n this.directive.duration = NaN;\n }\n\n public next(): void {\n if (this.items && this.index === this.items.length - this.itemsCount) {\n return;\n }\n\n this.updateIndex(this.index + 1);\n }\n\n public prev(): void {\n this.updateIndex(this.index - 1);\n }\n\n protected get transform(): string {\n return `translateX(${100 * this.x}%)`;\n }\n\n @tuiPure\n protected getStyle(itemsCount: number): Partial<CSSStyleDeclaration> {\n const percent = `${100 / itemsCount}%`;\n\n return {\n flexBasis: percent,\n minWidth: percent,\n maxWidth: percent,\n };\n }\n\n protected onTransitioned(transitioned: boolean): void {\n this.transitioned = transitioned;\n\n if (!transitioned) {\n this.translate = this.computedTranslate;\n }\n\n this.onShift();\n }\n\n protected isDisabled(index: number): boolean {\n return index < this.index || index >= this.index + this.itemsCount;\n }\n\n protected onIntersection(\n {intersectionRatio}: IntersectionObserverEntry,\n index: number,\n ): void {\n if (intersectionRatio && intersectionRatio >= 0.5 && !this.transitioned) {\n this.updateIndex(this.index < index ? index - this.itemsCount + 1 : index);\n }\n }\n\n protected onScroll(delta: number): void {\n if (!this.isMobile) {\n if (delta > 0) {\n this.next();\n } else {\n this.prev();\n }\n }\n }\n\n protected onPan(x: number): void {\n if (!this.computedDraggable) {\n return;\n }\n\n const min = 1 - this.items.length / this.itemsCount;\n\n this.translate = tuiClamp(x / this.el.clientWidth + this.translate, min, 0);\n\n this.onShift();\n }\n\n protected onSwipe(direction: TuiSwipeDirection): void {\n if (direction === 'left') {\n this.next();\n } else if (direction === 'right') {\n this.prev();\n }\n }\n\n protected onAutoscroll(): void {\n this.updateIndex(this.index === this.items.length - 1 ? 0 : this.index + 1);\n }\n\n protected onShift(): void {\n this.shift.emit(Math.abs((this.x % 1) + 0.5) * 2);\n }\n\n private get x(): number {\n return this.transitioned ? this.computedTranslate : this.translate;\n }\n\n private get computedTranslate(): number {\n return -this.index / this.itemsCount;\n }\n\n private get computedDraggable(): boolean {\n return this.isMobile || this.draggable;\n }\n\n private updateIndex(index: number): void {\n this.index = tuiClamp(index, 0, this.items.length - 1);\n this.indexChange.emit(this.index);\n this.cdr.markForCheck();\n }\n}\n","@if (items.changes | async) {}\n<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0.5\"\n class=\"t-wrapper\"\n >\n <div\n class=\"t-items\"\n [style.transform]=\"transform\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n >\n @for (item of items; track item) {\n <fieldset\n class=\"t-item\"\n [disabled]=\"isDisabled($index)\"\n [style]=\"getStyle(itemsCount)\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0], $index)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\" />\n </fieldset>\n }\n </div>\n </div>\n</div>\n","import {Directive} from '@angular/core';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\n\n@Directive({\n standalone: true,\n selector: '[tuiCarouselButtons]',\n providers: [\n tuiButtonOptionsProvider({\n appearance: 'secondary',\n size: 'm',\n }),\n ],\n})\nexport class TuiCarouselButtons {}\n","import {TuiItem} from '@taiga-ui/cdk/directives/item';\n\nimport {TuiCarouselComponent} from './carousel.component';\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselAutoscroll} from './carousel-autoscroll.directive';\nimport {TuiCarouselButtons} from './carousel-buttons.directive';\nimport {TuiCarouselScroll} from './carousel-scroll.directive';\n\nexport const TuiCarousel = [\n TuiItem,\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselAutoscroll,\n TuiCarouselButtons,\n TuiCarouselScroll,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TuiCarouselDirective"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBM,MAAO,oBAAqB,SAAQ,UAAmB,CAAA;AAuBzD,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAvB5C,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA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AAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,EAPhB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,SAAA,EAAA;AACP,YAAA,wBAAwB,CAAC;AACrB,gBAAA,UAAU,EAAE,WAAW;AACvB,gBAAA,IAAI,EAAE,GAAG;aACZ,CAAC;AACL,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAV9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,SAAS,EAAE;AACP,wBAAA,wBAAwB,CAAC;AACrB,4BAAA,UAAU,EAAE,WAAW;AACvB,4BAAA,IAAI,EAAE,GAAG;yBACZ,CAAC;AACL,qBAAA;AACJ,iBAAA;;;ACJY,MAAA,WAAW,GAAG;IACvB,OAAO;IACP,oBAAoB;IACpB,oBAAoB;IACpB,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;;;ACdrB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-carousel.mjs","sources":["../../../projects/kit/components/carousel/carousel.directive.ts","../../../projects/kit/components/carousel/carousel-autoscroll.directive.ts","../../../projects/kit/components/carousel/carousel-scroll.directive.ts","../../../projects/kit/components/carousel/carousel.component.ts","../../../projects/kit/components/carousel/carousel.template.html","../../../projects/kit/components/carousel/carousel-buttons.directive.ts","../../../projects/kit/components/carousel/carousel.ts","../../../projects/kit/components/carousel/taiga-ui-kit-components-carousel.ts"],"sourcesContent":["import {isPlatformServer} from '@angular/common';\nimport {Directive, inject, input, NgZone, PLATFORM_ID} from '@angular/core';\nimport {WA_PAGE_VISIBILITY} from '@ng-web-apis/common';\nimport {TUI_FALSE_HANDLER, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiIfMap, tuiTypedFromEvent, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {combineLatest, EMPTY, interval, map, merge, Observable, Subject} from 'rxjs';\n\n@Directive()\nexport class TuiCarouselDirective extends Observable<unknown> {\n private readonly el = tuiInjectElement();\n private readonly platform = inject(PLATFORM_ID);\n private readonly visible$ = inject(WA_PAGE_VISIBILITY);\n private readonly zone = inject(NgZone);\n private readonly trigger$ = new Subject<void>();\n private readonly running$ = merge(\n tuiTypedFromEvent(this.el, 'mouseenter').pipe(map(TUI_FALSE_HANDLER)),\n tuiTypedFromEvent(this.el, 'touchstart').pipe(map(TUI_FALSE_HANDLER)),\n tuiTypedFromEvent(this.el, 'touchend').pipe(map(TUI_TRUE_HANDLER)),\n tuiTypedFromEvent(this.el, 'mouseleave').pipe(map(TUI_TRUE_HANDLER)),\n this.visible$,\n );\n\n public readonly duration = input(0);\n\n protected readonly output$ = isPlatformServer(this.platform)\n ? EMPTY\n : combineLatest([\n this.trigger$.pipe(map(() => this.duration())),\n this.running$,\n ]).pipe(\n tuiIfMap(\n ([duration]) => interval(duration).pipe(tuiZoneOptimized(this.zone)),\n (values) => values.every(Boolean),\n ),\n );\n\n constructor() {\n super((subscriber) => this.output$.subscribe(subscriber));\n }\n\n public restart(): void {\n this.trigger$.next();\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\n\nimport {TuiCarouselDirective} from './carousel.directive';\n\n@Directive({\n selector: '[tuiCarouselAutoscroll]',\n})\nexport class TuiCarouselAutoscroll {\n public readonly tuiCarouselAutoscroll = outputFromObservable(\n inject(TuiCarouselDirective),\n );\n}\n","import {Directive} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent, tuiZonefreeScheduler} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {filter, map, tap, throttleTime} from 'rxjs';\n\n@Directive({\n selector: '[tuiCarouselScroll]',\n})\nexport class TuiCarouselScroll {\n private readonly el = tuiInjectElement();\n\n public readonly tuiCarouselScroll = outputFromObservable(\n tuiTypedFromEvent(this.el, 'wheel').pipe(\n filter(({deltaX}) => Math.abs(deltaX) > 20),\n throttleTime(500, tuiZonefreeScheduler()),\n map(({deltaX}) => Math.sign(deltaX)),\n tap(() => {\n // So we always have space to scroll and overflow-behavior saves us from back nav\n this.el.scrollLeft = 10;\n }),\n ),\n );\n}\n","import {NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiItem} from '@taiga-ui/cdk/directives/item';\nimport {TuiPan} from '@taiga-ui/cdk/directives/pan';\nimport {\n TUI_SWIPE_OPTIONS,\n TuiSwipe,\n type TuiSwipeDirection,\n} from '@taiga-ui/cdk/directives/swipe';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\n\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselAutoscroll} from './carousel-autoscroll.directive';\nimport {TuiCarouselScroll} from './carousel-scroll.directive';\n\n@Component({\n selector: 'tui-carousel',\n imports: [\n NgTemplateOutlet,\n TuiCarouselAutoscroll,\n TuiCarouselScroll,\n TuiPan,\n TuiSwipe,\n WaIntersectionObserver,\n ],\n templateUrl: './carousel.template.html',\n styleUrl: './carousel.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: TUI_SWIPE_OPTIONS, useValue: {timeout: 200, threshold: 30}}],\n hostDirectives: [\n {\n directive: TuiCarouselDirective,\n inputs: ['duration'],\n },\n ],\n host: {\n '[class._transitioned]': 'transitioned()',\n '[class._draggable]': 'draggable()',\n '(touchstart)': 'onTransitioned(false)',\n '(touchend)': 'onTransitioned(true)',\n '(mousedown)': 'onTransitioned(false)',\n '(document:mouseup.zoneless)': 'onTransitioned(true)',\n },\n})\nexport class TuiCarouselComponent {\n private readonly el = tuiInjectElement();\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly directive = inject(TuiCarouselDirective);\n private readonly translate = signal(0);\n\n protected readonly transitioned = signal(true);\n protected readonly transform = computed(() => `translateX(${100 * this.x()}%)`);\n protected readonly items = contentChildren(TuiItem, {read: TemplateRef});\n protected readonly computedDraggable = computed(\n () => this.isMobile || this.draggable(),\n );\n\n protected readonly computedTranslate = computed(\n () => -this.index() / this.itemsCount(),\n );\n\n protected readonly x = computed(() =>\n this.transitioned() ? this.computedTranslate() : this.translate(),\n );\n\n protected readonly resetDuration = effect(() => {\n this.index();\n this.directive.restart();\n });\n\n public readonly draggable = input(false);\n public readonly itemsCount = input(1);\n public readonly index = model(0);\n public readonly shift = output<number>();\n\n public next(): void {\n if (this.index() !== this.items().length - this.itemsCount()) {\n this.updateIndex(this.index() + 1);\n }\n }\n\n public prev(): void {\n this.updateIndex(this.index() - 1);\n }\n\n protected onTransitioned(transitioned: boolean): void {\n this.transitioned.set(transitioned);\n\n if (!transitioned) {\n this.translate.set(this.computedTranslate());\n }\n\n this.onShift();\n }\n\n protected isDisabled(index: number): boolean {\n return index < this.index() || index >= this.index() + this.itemsCount();\n }\n\n protected onIntersection(ratio: number, index: number): void {\n if (ratio && ratio >= 0.5 && !this.transitioned()) {\n this.updateIndex(\n this.index() < index ? index - this.itemsCount() + 1 : index,\n );\n }\n }\n\n protected onScroll(delta: number): void {\n if (!this.isMobile) {\n this.onSwipe(delta > 0 ? 'left' : 'right');\n }\n }\n\n protected onPan(x: number): void {\n if (!this.computedDraggable()) {\n return;\n }\n\n const min = 1 - this.items().length / this.itemsCount();\n\n this.translate.set(tuiClamp(x / this.el.clientWidth + this.translate(), min, 0));\n this.onShift();\n }\n\n protected onSwipe(direction: TuiSwipeDirection): void {\n if (direction === 'left') {\n this.next();\n } else if (direction === 'right') {\n this.prev();\n }\n }\n\n protected onAutoscroll(): void {\n this.updateIndex(this.index() === this.items().length - 1 ? 0 : this.index() + 1);\n }\n\n protected onShift(): void {\n this.shift.emit(Math.abs((this.x() % 1) + 0.5) * 2);\n }\n\n private updateIndex(index: number): void {\n this.index.set(tuiClamp(index, 0, this.items().length - 1));\n }\n}\n","<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0.5\"\n class=\"t-wrapper\"\n >\n <div\n class=\"t-items\"\n [style.transform]=\"transform()\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n >\n @for (item of items(); track $index) {\n <fieldset\n class=\"t-item\"\n [disabled]=\"isDisabled($index)\"\n [style.flex-basis.%]=\"100 / itemsCount()\"\n [style.max-width.%]=\"100 / itemsCount()\"\n [style.min-width.%]=\"100 / itemsCount()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0].intersectionRatio, $index)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\" />\n </fieldset>\n }\n </div>\n </div>\n</div>\n\n<ng-content />\n","import {Directive} from '@angular/core';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\n\n@Directive({\n selector: '[tuiCarouselButtons]',\n providers: [\n tuiButtonOptionsProvider({\n appearance: 'secondary',\n size: 'm',\n }),\n ],\n})\nexport class TuiCarouselButtons {}\n","import {TuiItem} from '@taiga-ui/cdk/directives/item';\n\nimport {TuiCarouselComponent} from './carousel.component';\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselAutoscroll} from './carousel-autoscroll.directive';\nimport {TuiCarouselButtons} from './carousel-buttons.directive';\nimport {TuiCarouselScroll} from './carousel-scroll.directive';\n\nexport const TuiCarousel = [\n TuiItem,\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselAutoscroll,\n TuiCarouselButtons,\n TuiCarouselScroll,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AASM,MAAO,oBAAqB,SAAQ,UAAmB,CAAA;AA4BzD,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QA5B5C,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AACrB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAC7B,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,EACrE,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,EACrE,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAClE,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EACpE,IAAI,CAAC,QAAQ,CAChB;AAEe,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC;AAEhB,QAAA,IAAA,CAAA,OAAO,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BAAwB,CAAC;AACrB,4BAAA,UAAU,EAAE,WAAW;AACvB,4BAAA,IAAI,EAAE,GAAG;yBACZ,CAAC;AACL,qBAAA;AACJ,iBAAA;;;ACHY,MAAA,WAAW,GAAG;IACvB,OAAO;IACP,oBAAoB;IACpB,oBAAoB;IACpB,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;;;ACdrB;;AAEG;;;;"}
@@ -1,10 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
3
+ import { tuiCreateOptions, tuiProvide } from '@taiga-ui/cdk/utils/di';
4
4
  import * as i1 from '@taiga-ui/core/directives/icons';
5
5
  import { tuiIconStart, tuiIconEnd, TuiIcons } from '@taiga-ui/core/directives/icons';
6
6
  import { TuiRadioComponent, TUI_RADIO_OPTIONS } from '@taiga-ui/kit/components/radio';
7
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
8
7
 
9
8
  const [TUI_CHECKBOX_OPTIONS, tuiCheckboxOptionsProvider] = tuiCreateOptions({
10
9
  size: 'm',
@@ -21,12 +20,12 @@ class TuiCheckbox extends TuiRadioComponent {
21
20
  this.check = tuiIconStart(computed(() => this.options.icons.checked(this.size())));
22
21
  this.indeterminate = tuiIconEnd(computed(() => this.options.icons.indeterminate(this.size())));
23
22
  }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiCheckbox, isStandalone: true, selector: "input[type=\"checkbox\"][tuiCheckbox]", providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_CHECKBOX_OPTIONS)], usesInheritance: true, hostDirectives: [{ directive: i1.TuiIcons }], ngImport: i0, template: '', isInline: true, styles: ["[tuiCheckbox]{--t-size: 1.5rem;--t-radius: var(--tui-radius-s);inline-size:var(--t-size);block-size:var(--t-size);border-radius:var(--t-radius);cursor:pointer;margin:0;flex-shrink:0}[tuiCheckbox]:before{position:absolute;block-size:100%;inline-size:100%;font-size:1rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out}[tuiCheckbox]:after{display:none}[tuiCheckbox]:disabled._readonly._readonly{opacity:1;pointer-events:none}[tuiCheckbox]:checked:before,[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-start);mask-image:var(--t-icon-start);transform:scale(1);transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out;transition-duration:inherit}[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-end);mask-image:var(--t-icon-end)}[tuiCheckbox][data-size=s]{--t-size: 1rem;--t-radius: var(--tui-radius-xs)}[tuiCheckbox][data-size=s]:before{font-size:.875rem}[tuiCheckbox]:invalid:not([data-mode]),[tuiCheckbox][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiCheckbox, isStandalone: true, selector: "input[type=\"checkbox\"][tuiCheckbox]", providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_CHECKBOX_OPTIONS)], usesInheritance: true, hostDirectives: [{ directive: i1.TuiIcons }], ngImport: i0, template: '', isInline: true, styles: ["[tuiCheckbox]{--t-size: 1.5rem;--t-radius: var(--tui-radius-s);inline-size:var(--t-size);block-size:var(--t-size);border-radius:var(--t-radius);cursor:pointer;margin:0;flex-shrink:0}[tuiCheckbox]:before{position:absolute;block-size:100%;inline-size:100%;font-size:1rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out}[tuiCheckbox]:after{display:none}[tuiCheckbox]:disabled._readonly._readonly{opacity:1;pointer-events:none}[tuiCheckbox]:checked:before,[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-start);mask-image:var(--t-icon-start);transform:scale(1);transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out;transition-duration:inherit}[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-end);mask-image:var(--t-icon-end)}[tuiCheckbox][data-size=s]{--t-size: 1rem;--t-radius: var(--tui-radius-xs)}[tuiCheckbox][data-size=s]:before{font-size:.875rem}[tuiCheckbox]:invalid:not([data-mode]),[tuiCheckbox][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
26
25
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCheckbox, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCheckbox, decorators: [{
28
27
  type: Component,
29
- args: [{ standalone: true, selector: 'input[type="checkbox"][tuiCheckbox]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_CHECKBOX_OPTIONS)], hostDirectives: [TuiIcons], styles: ["[tuiCheckbox]{--t-size: 1.5rem;--t-radius: var(--tui-radius-s);inline-size:var(--t-size);block-size:var(--t-size);border-radius:var(--t-radius);cursor:pointer;margin:0;flex-shrink:0}[tuiCheckbox]:before{position:absolute;block-size:100%;inline-size:100%;font-size:1rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out}[tuiCheckbox]:after{display:none}[tuiCheckbox]:disabled._readonly._readonly{opacity:1;pointer-events:none}[tuiCheckbox]:checked:before,[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-start);mask-image:var(--t-icon-start);transform:scale(1);transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out;transition-duration:inherit}[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-end);mask-image:var(--t-icon-end)}[tuiCheckbox][data-size=s]{--t-size: 1rem;--t-radius: var(--tui-radius-xs)}[tuiCheckbox][data-size=s]:before{font-size:.875rem}[tuiCheckbox]:invalid:not([data-mode]),[tuiCheckbox][data-mode~=invalid]{color:#fff}\n"] }]
28
+ args: [{ selector: 'input[type="checkbox"][tuiCheckbox]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_CHECKBOX_OPTIONS)], hostDirectives: [TuiIcons], styles: ["[tuiCheckbox]{--t-size: 1.5rem;--t-radius: var(--tui-radius-s);inline-size:var(--t-size);block-size:var(--t-size);border-radius:var(--t-radius);cursor:pointer;margin:0;flex-shrink:0}[tuiCheckbox]:before{position:absolute;block-size:100%;inline-size:100%;font-size:1rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>');transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out}[tuiCheckbox]:after{display:none}[tuiCheckbox]:disabled._readonly._readonly{opacity:1;pointer-events:none}[tuiCheckbox]:checked:before,[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-start);mask-image:var(--t-icon-start);transform:scale(1);transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out;transition-duration:inherit}[tuiCheckbox]:indeterminate:before{-webkit-mask-image:var(--t-icon-end);mask-image:var(--t-icon-end)}[tuiCheckbox][data-size=s]{--t-size: 1rem;--t-radius: var(--tui-radius-xs)}[tuiCheckbox][data-size=s]:before{font-size:.875rem}[tuiCheckbox]:invalid:not([data-mode]),[tuiCheckbox][data-mode~=invalid]{color:#fff}\n"] }]
30
29
  }] });
31
30
 
32
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-checkbox.mjs","sources":["../../../projects/kit/components/checkbox/checkbox.options.ts","../../../projects/kit/components/checkbox/checkbox.component.ts","../../../projects/kit/components/checkbox/taiga-ui-kit-components-checkbox.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {type TuiRadioOptions} from '@taiga-ui/kit/components/radio';\n\nexport interface TuiCheckboxOptions extends TuiRadioOptions {\n readonly icons: Readonly<{\n checked: TuiStringHandler<TuiSizeS>;\n indeterminate: TuiStringHandler<TuiSizeS>;\n }>;\n}\n\nexport const [TUI_CHECKBOX_OPTIONS, tuiCheckboxOptionsProvider] =\n tuiCreateOptions<TuiCheckboxOptions>({\n size: 'm',\n appearance: (el) =>\n el.checked || el.indeterminate ? 'primary' : 'outline-grayscale',\n icons: {\n checked: () => '@tui.check',\n indeterminate: () => '@tui.minus',\n },\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiIconEnd, TuiIcons, tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_RADIO_OPTIONS, TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\nimport {TUI_CHECKBOX_OPTIONS, type TuiCheckboxOptions} from './checkbox.options';\n\n@Component({\n standalone: true,\n selector: 'input[type=\"checkbox\"][tuiCheckbox]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/checkbox.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_CHECKBOX_OPTIONS)],\n hostDirectives: [TuiIcons],\n})\nexport class TuiCheckbox extends TuiRadioComponent<TuiCheckboxOptions> {\n protected readonly check = tuiIconStart(\n computed(() => this.options.icons.checked(this.size())),\n );\n\n protected readonly indeterminate = tuiIconEnd(\n computed(() => this.options.icons.indeterminate(this.size())),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYa,CAAC,oBAAoB,EAAE,0BAA0B,CAAC,GAC3D,gBAAgB,CAAqB;AACjC,IAAA,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,CAAC,EAAE,KACX,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,aAAa,GAAG,SAAS,GAAG,mBAAmB;AACpE,IAAA,KAAK,EAAE;AACH,QAAA,OAAO,EAAE,MAAM,YAAY;AAC3B,QAAA,aAAa,EAAE,MAAM,YAAY;AACpC,KAAA;AACJ,CAAA;;ACCC,MAAO,WAAY,SAAQ,iBAAqC,CAAA;AAVtE,IAAA,WAAA,GAAA;;QAWuB,IAAK,CAAA,KAAA,GAAG,YAAY,CACnC,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAC1D;QAEkB,IAAa,CAAA,aAAA,GAAG,UAAU,CACzC,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAChE;AACJ;+GARY,WAAW,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uCAAA,EAAA,SAAA,EAHT,CAAC,UAAU,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAJtD,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qtCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAOH,WAAW,EAAA,UAAA,EAAA,CAAA;kBAVvB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,qCAAqC,EAAA,QAAA,EACrC,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,aACpC,CAAC,UAAU,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC,EAAA,cAAA,EAChD,CAAC,QAAQ,CAAC,EAAA,MAAA,EAAA,CAAA,qtCAAA,CAAA,EAAA;;;ACpB9B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-checkbox.mjs","sources":["../../../projects/kit/components/checkbox/checkbox.options.ts","../../../projects/kit/components/checkbox/checkbox.component.ts","../../../projects/kit/components/checkbox/taiga-ui-kit-components-checkbox.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {type TuiRadioOptions} from '@taiga-ui/kit/components/radio';\n\nexport interface TuiCheckboxOptions extends TuiRadioOptions {\n readonly icons: Readonly<{\n checked: TuiStringHandler<TuiSizeS>;\n indeterminate: TuiStringHandler<TuiSizeS>;\n }>;\n}\n\nexport const [TUI_CHECKBOX_OPTIONS, tuiCheckboxOptionsProvider] =\n tuiCreateOptions<TuiCheckboxOptions>({\n size: 'm',\n appearance: (el) =>\n el.checked || el.indeterminate ? 'primary' : 'outline-grayscale',\n icons: {\n checked: () => '@tui.check',\n indeterminate: () => '@tui.minus',\n },\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {tuiIconEnd, TuiIcons, tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_RADIO_OPTIONS, TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\nimport {TUI_CHECKBOX_OPTIONS, type TuiCheckboxOptions} from './checkbox.options';\n\n@Component({\n selector: 'input[type=\"checkbox\"][tuiCheckbox]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/checkbox.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_CHECKBOX_OPTIONS)],\n hostDirectives: [TuiIcons],\n})\nexport class TuiCheckbox extends TuiRadioComponent<TuiCheckboxOptions> {\n protected readonly check = tuiIconStart(\n computed(() => this.options.icons.checked(this.size())),\n );\n\n protected readonly indeterminate = tuiIconEnd(\n computed(() => this.options.icons.indeterminate(this.size())),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,CAAC,oBAAo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CAAA;;4FAOH,WAAW,EAAA,UAAA,EAAA,CAAA;kBATvB,SAAS;+BACI,qCAAqC,EAAA,QAAA,EACrC,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,UAAU,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC,EAAA,cAAA,EAChD,CAAC,QAAQ,CAAC,EAAA,MAAA,EAAA,CAAA,qtCAAA,CAAA,EAAA;;;ACnB9B;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, ChangeDetectionStrategy, ViewEncapsulation, Component, input, inject, Directive } from '@angular/core';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, inject, Directive } from '@angular/core';
3
3
  import { TUI_PLATFORM } from '@taiga-ui/cdk/tokens';
4
- import { tuiProvideOptions, tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
4
+ import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
5
5
  import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
6
6
  import * as i1 from '@taiga-ui/core/directives/appearance';
7
7
  import { tuiAppearanceOptionsProvider, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
@@ -10,33 +10,29 @@ import { TuiWithIcons } from '@taiga-ui/core/directives/icons';
10
10
  import { tuiAvatarOptionsProvider } from '@taiga-ui/kit/components/avatar';
11
11
  import { tuiCheckboxOptionsProvider } from '@taiga-ui/kit/components/checkbox';
12
12
  import { tuiSwitchOptionsProvider } from '@taiga-ui/kit/components/switch';
13
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
13
14
 
14
15
  const TUI_CHIP_DEFAULT_OPTIONS = {
15
16
  appearance: 'neutral',
16
17
  size: 's',
17
18
  };
18
- const TUI_CHIP_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_CHIP_OPTIONS' : '', {
19
- factory: () => TUI_CHIP_DEFAULT_OPTIONS,
20
- });
21
- function tuiChipOptionsProvider(options) {
22
- return tuiProvideOptions(TUI_CHIP_OPTIONS, options, TUI_CHIP_DEFAULT_OPTIONS);
23
- }
19
+ const [TUI_CHIP_OPTIONS, tuiChipOptionsProvider] = tuiCreateOptions(TUI_CHIP_DEFAULT_OPTIONS);
24
20
 
25
21
  class Styles {
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
27
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-chip" }, ngImport: i0, template: '', isInline: true, styles: ["tui-chip,[tuiChip]{--t-gap: .125rem;--t-margin: -.125rem;--t-icon-size: 1rem;--t-padding: 0 .625rem;--t-size: var(--tui-height-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-inline-size:100%;gap:calc(var(--t-gap, 0rem) - 2 * var(--t-margin, 0rem));font:var(--tui-font-text-s);border-radius:var(--tui-radius-m);padding:var(--t-padding);block-size:var(--t-size);inline-size:fit-content;isolation:isolate;max-inline-size:stretch}tui-chip>img,[tuiChip]>img,tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip>[tuiAvatar],[tuiChip]>[tuiAvatar],tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge],tui-chip>[tuiRadio],[tuiChip]>[tuiRadio],tui-chip>[tuiSwitch],[tuiChip]>[tuiSwitch],tui-chip>[tuiCheckbox],[tuiChip]>[tuiCheckbox],tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{margin:var(--t-margin)}tui-chip:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled),[tuiChip]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}tui-chip:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled),[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{font-size:var(--t-icon-size)!important}tui-chip>[tuiIconButton],[tuiChip]>[tuiIconButton]{margin:-.375rem}tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge]{margin-inline-end:0}tui-chip[data-size=xxs],[tuiChip][data-size=xxs]{--t-gap: 0rem;--t-padding: 0 .25rem;--t-size: 1rem;--t-icon-size: .75rem;font:var(--tui-font-text-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xxs]>[tuiIconButton],[tuiChip][data-size=xxs]>[tuiIconButton]{margin:-.5rem;transform:scale(.75)}tui-chip[data-size=xs],[tuiChip][data-size=xs]{--t-padding: 0 .375rem;--t-size: var(--tui-height-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xs]>[tuiIconButton],[tuiChip][data-size=xs]>[tuiIconButton]{margin:-.375rem}tui-chip[data-size=m],[tuiChip][data-size=m]{--t-margin: -.375rem;--t-icon-size: 1.5rem;--t-padding: 0 1rem;--t-size: var(--tui-height-m);font:var(--tui-font-text-m)}tui-chip[data-size=m]>[tuiIconButton],[tuiChip][data-size=m]>[tuiIconButton]{margin:-.75rem}tui-chip[data-size=m]>tui-badge,[tuiChip][data-size=m]>tui-badge,tui-chip[data-size=m]>[tuiBadge],[tuiChip][data-size=m]>[tuiBadge]{margin-inline-start:-.375rem}tui-chip>img,[tuiChip]>img,tui-chip [tuiAvatar],[tuiChip] [tuiAvatar]{inline-size:1.5rem;margin-inline-start:-.375rem}tui-chip>[tuiFade]:first-of-type,[tuiChip]>[tuiFade]:first-of-type{flex:1 0 30%;max-inline-size:fit-content}tui-chip>[tuiFade]:last-of-type,[tuiChip]>[tuiFade]:last-of-type{flex:0 1 auto}tui-chip>input[tuiChip],[tuiChip]>input[tuiChip]{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;margin:0}tui-chip>input[tuiChip][type=checkbox],[tuiChip]>input[tuiChip][type=checkbox],tui-chip>input[tuiChip][type=radio],[tuiChip]>input[tuiChip][type=radio]{z-index:-1}tui-chip[tuiAppearance][data-appearance=negative],[tuiChip][tuiAppearance][data-appearance=negative],tui-chip[tuiAppearance][data-appearance=positive],[tuiChip][tuiAppearance][data-appearance=positive],tui-chip[tuiAppearance][data-appearance=warning],[tuiChip][tuiAppearance][data-appearance=warning],tui-chip[tuiAppearance][data-appearance=info],[tuiChip][tuiAppearance][data-appearance=info],tui-chip[tuiAppearance][data-appearance=neutral],[tuiChip][tuiAppearance][data-appearance=neutral]{color:var(--tui-text-primary)}input[tuiChip]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:text}input[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:text}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
22
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-chip" }, ngImport: i0, template: '', isInline: true, styles: ["tui-chip,[tuiChip]{--t-gap: .125rem;--t-margin: -.125rem;--t-icon-size: 1rem;--t-padding: 0 .625rem;--t-size: var(--tui-height-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;gap:calc(var(--t-gap, 0rem) - 2 * var(--t-margin, 0rem));font:var(--tui-font-body-s);border-radius:var(--tui-radius-m);padding:var(--t-padding);block-size:var(--t-size);inline-size:fit-content;max-inline-size:100%;isolation:isolate}tui-chip>img,[tuiChip]>img,tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip>[tuiAvatar],[tuiChip]>[tuiAvatar],tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge],tui-chip>[tuiRadio],[tuiChip]>[tuiRadio],tui-chip>[tuiSwitch],[tuiChip]>[tuiSwitch],tui-chip>[tuiCheckbox],[tuiChip]>[tuiCheckbox],tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{margin:var(--t-margin)}tui-chip:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled),[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{font-size:var(--t-icon-size)!important}tui-chip>[tuiIconButton],[tuiChip]>[tuiIconButton]{margin:-.375rem}tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge]{margin-inline-end:0}tui-chip[data-size=xxs],[tuiChip][data-size=xxs]{--t-gap: 0rem;--t-padding: 0 .25rem;--t-size: 1rem;--t-icon-size: .75rem;font:var(--tui-font-body-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xxs]>[tuiIconButton],[tuiChip][data-size=xxs]>[tuiIconButton]{margin:-.5rem;transform:scale(.75)}tui-chip[data-size=xs],[tuiChip][data-size=xs]{--t-padding: 0 .375rem;--t-size: var(--tui-height-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xs]>[tuiIconButton],[tuiChip][data-size=xs]>[tuiIconButton]{margin:-.375rem}tui-chip[data-size=m],[tuiChip][data-size=m]{--t-margin: -.375rem;--t-icon-size: 1.5rem;--t-padding: 0 1rem;--t-size: var(--tui-height-m);font:var(--tui-font-body-m)}tui-chip[data-size=m]>[tuiIconButton],[tuiChip][data-size=m]>[tuiIconButton]{margin:-.75rem}tui-chip[data-size=m]>tui-badge,[tuiChip][data-size=m]>tui-badge,tui-chip[data-size=m]>[tuiBadge],[tuiChip][data-size=m]>[tuiBadge]{margin-inline-start:-.375rem}tui-chip>img,[tuiChip]>img,tui-chip [tuiAvatar],[tuiChip] [tuiAvatar]{inline-size:1.5rem;margin-inline-start:-.375rem}tui-chip>[tuiFade]:first-of-type,[tuiChip]>[tuiFade]:first-of-type{flex:1 0 30%;max-inline-size:fit-content}tui-chip>[tuiFade]:last-of-type,[tuiChip]>[tuiFade]:last-of-type{flex:0 1 auto}tui-chip>input[tuiChip],[tuiChip]>input[tuiChip]{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;margin:0}tui-chip>input[tuiChip][type=checkbox],[tuiChip]>input[tuiChip][type=checkbox],tui-chip>input[tuiChip][type=radio],[tuiChip]>input[tuiChip][type=radio]{z-index:-1}tui-chip[tuiAppearance][data-appearance=negative],[tuiChip][tuiAppearance][data-appearance=negative],tui-chip[tuiAppearance][data-appearance=positive],[tuiChip][tuiAppearance][data-appearance=positive],tui-chip[tuiAppearance][data-appearance=warning],[tuiChip][tuiAppearance][data-appearance=warning],tui-chip[tuiAppearance][data-appearance=info],[tuiChip][tuiAppearance][data-appearance=info],tui-chip[tuiAppearance][data-appearance=neutral],[tuiChip][tuiAppearance][data-appearance=neutral]{color:var(--tui-text-primary)}input[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:text}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
28
24
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, decorators: [{
30
26
  type: Component,
31
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-chip' }, styles: ["tui-chip,[tuiChip]{--t-gap: .125rem;--t-margin: -.125rem;--t-icon-size: 1rem;--t-padding: 0 .625rem;--t-size: var(--tui-height-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-inline-size:100%;gap:calc(var(--t-gap, 0rem) - 2 * var(--t-margin, 0rem));font:var(--tui-font-text-s);border-radius:var(--tui-radius-m);padding:var(--t-padding);block-size:var(--t-size);inline-size:fit-content;isolation:isolate;max-inline-size:stretch}tui-chip>img,[tuiChip]>img,tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip>[tuiAvatar],[tuiChip]>[tuiAvatar],tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge],tui-chip>[tuiRadio],[tuiChip]>[tuiRadio],tui-chip>[tuiSwitch],[tuiChip]>[tuiSwitch],tui-chip>[tuiCheckbox],[tuiChip]>[tuiCheckbox],tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{margin:var(--t-margin)}tui-chip:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled),[tuiChip]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}tui-chip:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled),[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{font-size:var(--t-icon-size)!important}tui-chip>[tuiIconButton],[tuiChip]>[tuiIconButton]{margin:-.375rem}tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge]{margin-inline-end:0}tui-chip[data-size=xxs],[tuiChip][data-size=xxs]{--t-gap: 0rem;--t-padding: 0 .25rem;--t-size: 1rem;--t-icon-size: .75rem;font:var(--tui-font-text-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xxs]>[tuiIconButton],[tuiChip][data-size=xxs]>[tuiIconButton]{margin:-.5rem;transform:scale(.75)}tui-chip[data-size=xs],[tuiChip][data-size=xs]{--t-padding: 0 .375rem;--t-size: var(--tui-height-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xs]>[tuiIconButton],[tuiChip][data-size=xs]>[tuiIconButton]{margin:-.375rem}tui-chip[data-size=m],[tuiChip][data-size=m]{--t-margin: -.375rem;--t-icon-size: 1.5rem;--t-padding: 0 1rem;--t-size: var(--tui-height-m);font:var(--tui-font-text-m)}tui-chip[data-size=m]>[tuiIconButton],[tuiChip][data-size=m]>[tuiIconButton]{margin:-.75rem}tui-chip[data-size=m]>tui-badge,[tuiChip][data-size=m]>tui-badge,tui-chip[data-size=m]>[tuiBadge],[tuiChip][data-size=m]>[tuiBadge]{margin-inline-start:-.375rem}tui-chip>img,[tuiChip]>img,tui-chip [tuiAvatar],[tuiChip] [tuiAvatar]{inline-size:1.5rem;margin-inline-start:-.375rem}tui-chip>[tuiFade]:first-of-type,[tuiChip]>[tuiFade]:first-of-type{flex:1 0 30%;max-inline-size:fit-content}tui-chip>[tuiFade]:last-of-type,[tuiChip]>[tuiFade]:last-of-type{flex:0 1 auto}tui-chip>input[tuiChip],[tuiChip]>input[tuiChip]{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;margin:0}tui-chip>input[tuiChip][type=checkbox],[tuiChip]>input[tuiChip][type=checkbox],tui-chip>input[tuiChip][type=radio],[tuiChip]>input[tuiChip][type=radio]{z-index:-1}tui-chip[tuiAppearance][data-appearance=negative],[tuiChip][tuiAppearance][data-appearance=negative],tui-chip[tuiAppearance][data-appearance=positive],[tuiChip][tuiAppearance][data-appearance=positive],tui-chip[tuiAppearance][data-appearance=warning],[tuiChip][tuiAppearance][data-appearance=warning],tui-chip[tuiAppearance][data-appearance=info],[tuiChip][tuiAppearance][data-appearance=info],tui-chip[tuiAppearance][data-appearance=neutral],[tuiChip][tuiAppearance][data-appearance=neutral]{color:var(--tui-text-primary)}input[tuiChip]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:text}input[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:text}\n"] }]
27
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-chip' }, styles: ["tui-chip,[tuiChip]{--t-gap: .125rem;--t-margin: -.125rem;--t-icon-size: 1rem;--t-padding: 0 .625rem;--t-size: var(--tui-height-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;gap:calc(var(--t-gap, 0rem) - 2 * var(--t-margin, 0rem));font:var(--tui-font-body-s);border-radius:var(--tui-radius-m);padding:var(--t-padding);block-size:var(--t-size);inline-size:fit-content;max-inline-size:100%;isolation:isolate}tui-chip>img,[tuiChip]>img,tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip>[tuiAvatar],[tuiChip]>[tuiAvatar],tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge],tui-chip>[tuiRadio],[tuiChip]>[tuiRadio],tui-chip>[tuiSwitch],[tuiChip]>[tuiSwitch],tui-chip>[tuiCheckbox],[tuiChip]>[tuiCheckbox],tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{margin:var(--t-margin)}tui-chip:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled),[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}tui-chip>tui-icon,[tuiChip]>tui-icon,tui-chip[tuiIcons]:before,[tuiChip][tuiIcons]:before,tui-chip[tuiIcons]:after,[tuiChip][tuiIcons]:after{font-size:var(--t-icon-size)!important}tui-chip>[tuiIconButton],[tuiChip]>[tuiIconButton]{margin:-.375rem}tui-chip>tui-badge,[tuiChip]>tui-badge,tui-chip>[tuiBadge],[tuiChip]>[tuiBadge]{margin-inline-end:0}tui-chip[data-size=xxs],[tuiChip][data-size=xxs]{--t-gap: 0rem;--t-padding: 0 .25rem;--t-size: 1rem;--t-icon-size: .75rem;font:var(--tui-font-body-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xxs]>[tuiIconButton],[tuiChip][data-size=xxs]>[tuiIconButton]{margin:-.5rem;transform:scale(.75)}tui-chip[data-size=xs],[tuiChip][data-size=xs]{--t-padding: 0 .375rem;--t-size: var(--tui-height-xs);border-radius:var(--tui-radius-xs)}tui-chip[data-size=xs]>[tuiIconButton],[tuiChip][data-size=xs]>[tuiIconButton]{margin:-.375rem}tui-chip[data-size=m],[tuiChip][data-size=m]{--t-margin: -.375rem;--t-icon-size: 1.5rem;--t-padding: 0 1rem;--t-size: var(--tui-height-m);font:var(--tui-font-body-m)}tui-chip[data-size=m]>[tuiIconButton],[tuiChip][data-size=m]>[tuiIconButton]{margin:-.75rem}tui-chip[data-size=m]>tui-badge,[tuiChip][data-size=m]>tui-badge,tui-chip[data-size=m]>[tuiBadge],[tuiChip][data-size=m]>[tuiBadge]{margin-inline-start:-.375rem}tui-chip>img,[tuiChip]>img,tui-chip [tuiAvatar],[tuiChip] [tuiAvatar]{inline-size:1.5rem;margin-inline-start:-.375rem}tui-chip>[tuiFade]:first-of-type,[tuiChip]>[tuiFade]:first-of-type{flex:1 0 30%;max-inline-size:fit-content}tui-chip>[tuiFade]:last-of-type,[tuiChip]>[tuiFade]:last-of-type{flex:0 1 auto}tui-chip>input[tuiChip],[tuiChip]>input[tuiChip]{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;margin:0}tui-chip>input[tuiChip][type=checkbox],[tuiChip]>input[tuiChip][type=checkbox],tui-chip>input[tuiChip][type=radio],[tuiChip]>input[tuiChip][type=radio]{z-index:-1}tui-chip[tuiAppearance][data-appearance=negative],[tuiChip][tuiAppearance][data-appearance=negative],tui-chip[tuiAppearance][data-appearance=positive],[tuiChip][tuiAppearance][data-appearance=positive],tui-chip[tuiAppearance][data-appearance=warning],[tuiChip][tuiAppearance][data-appearance=warning],tui-chip[tuiAppearance][data-appearance=info],[tuiChip][tuiAppearance][data-appearance=info],tui-chip[tuiAppearance][data-appearance=neutral],[tuiChip][tuiAppearance][data-appearance=neutral]{color:var(--tui-text-primary)}input[tuiChip]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:text}\n"] }]
32
28
  }] });
33
29
  class TuiChip {
34
30
  constructor() {
35
31
  this.nothing = tuiWithStyles(Styles);
36
32
  this.size = input(inject(TUI_CHIP_OPTIONS).size);
37
33
  }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiChip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
39
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiChip, isStandalone: true, selector: "tui-chip,[tuiChip]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()" } }, providers: [
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiChip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiChip, isStandalone: true, selector: "tui-chip,[tuiChip]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()" } }, providers: [
40
36
  tuiAppearanceOptionsProvider(TUI_CHIP_OPTIONS),
41
37
  tuiSwitchOptionsProvider({ size: 's' }),
42
38
  tuiCheckboxOptionsProvider({ size: 's' }),
@@ -47,7 +43,7 @@ class TuiChip {
47
43
  tuiButtonOptionsProvider({ size: 'xs', appearance: 'icon' }),
48
44
  ], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiWithIcons }], ngImport: i0 }); }
49
45
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiChip, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiChip, decorators: [{
51
47
  type: Directive,
52
48
  args: [{
53
49
  selector: 'tui-chip,[tuiChip]',