@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,69 +1,55 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, DestroyRef, EventEmitter, ElementRef, Output, Input, forwardRef, ContentChildren, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { contentChildren, forwardRef, ElementRef, inject, input, model, ChangeDetectionStrategy, Component, computed } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { RouterLinkActive } from '@angular/router';
5
+ import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
5
6
  import { tuiInjectElement, tuiIsElement } from '@taiga-ui/cdk/utils/dom';
6
- import { TuiIcon } from '@taiga-ui/core/components/icon';
7
- import { TUI_ANIMATIONS_SPEED, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
8
- import { delay, EMPTY, filter } from 'rxjs';
9
- import { __decorate } from 'tslib';
10
- import { AsyncPipe } from '@angular/common';
7
+ import * as i1 from '@taiga-ui/core/components/cell';
8
+ import { TuiCell } from '@taiga-ui/core/components/cell';
9
+ import * as i2 from '@taiga-ui/core/directives/appearance';
10
+ import { tuiAppearance, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
11
+ import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
12
+ import { TuiAvatar } from '@taiga-ui/kit/components/avatar';
13
+ import { EMPTY, filter } from 'rxjs';
11
14
  import { ResizeObserverService } from '@ng-web-apis/resize-observer';
12
- import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
13
- import { tuiQueryListChanges } from '@taiga-ui/cdk/observables';
14
- import { TuiScrollService } from '@taiga-ui/cdk/services';
15
15
  import { tuiMoveFocus } from '@taiga-ui/cdk/utils/focus';
16
- import { tuiGetOriginalArrayFromQueryList, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
17
- import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
18
16
 
19
17
  class TuiStepperComponent {
20
18
  constructor() {
21
- this.steps = EMPTY_QUERY;
22
- this.cdr = inject(ChangeDetectorRef);
23
19
  this.el = tuiInjectElement();
24
- this.scrollService = inject(TuiScrollService);
25
- this.speed = inject(TUI_ANIMATIONS_SPEED);
26
- this.destroyRef = inject(DestroyRef);
20
+ this.steps = contentChildren(forwardRef(() => TuiStep), { read: ElementRef });
27
21
  this.$ = inject(ResizeObserverService, { self: true })
28
22
  .pipe(takeUntilDestroyed())
29
- .subscribe(() => this.scrollIntoView(this.activeItemIndex));
30
- this.activeItemIndex = 0;
31
- this.orientation = 'horizontal';
32
- this.activeItemIndexChange = new EventEmitter();
23
+ .subscribe(() => this.scrollIntoView(this.activeItemIndex()));
24
+ this.orientation = input('horizontal');
25
+ this.activeItemIndex = model(0);
33
26
  }
34
27
  ngOnChanges() {
35
- this.scrollIntoView(this.activeItemIndex);
28
+ this.scrollIntoView(this.activeItemIndex());
36
29
  }
37
30
  indexOf(step) {
38
- const index = tuiGetOriginalArrayFromQueryList(this.steps).findIndex(({ nativeElement }) => nativeElement === step);
31
+ const index = this.steps().findIndex(({ nativeElement }) => nativeElement === step);
39
32
  return index < 0 ? NaN : index;
40
33
  }
41
34
  isActive(index) {
42
- return index === this.activeItemIndex;
35
+ return index === this.activeItemIndex();
43
36
  }
44
37
  activate(index) {
45
- if (this.activeItemIndex === index) {
38
+ if (this.activeItemIndex() === index) {
46
39
  return;
47
40
  }
48
- this.activeItemIndex = index;
49
- this.activeItemIndexChange.emit(index);
50
- this.cdr.markForCheck();
41
+ this.activeItemIndex.set(index);
51
42
  this.scrollIntoView(index);
52
43
  }
53
- get changes$() {
54
- // Delay is required to trigger change detection after steps are rendered,
55
- // so they can update their "active" status
56
- return tuiQueryListChanges(this.steps).pipe(delay(0));
57
- }
58
44
  onHorizontal(event, step) {
59
- if (this.orientation !== 'horizontal' || !event.target) {
45
+ if (this.orientation() !== 'horizontal' || !event.target) {
60
46
  return;
61
47
  }
62
48
  event.preventDefault();
63
49
  this.moveFocus(event.target, step);
64
50
  }
65
51
  onVertical(event, step) {
66
- if (this.orientation !== 'vertical' || !event.target) {
52
+ if (this.orientation() !== 'vertical' || !event.target) {
67
53
  return;
68
54
  }
69
55
  event.preventDefault();
@@ -73,12 +59,12 @@ class TuiStepperComponent {
73
59
  if (!tuiIsElement(current)) {
74
60
  return;
75
61
  }
76
- const stepElements = this.steps.toArray().map(({ nativeElement }) => nativeElement);
62
+ const stepElements = this.steps().map(({ nativeElement }) => nativeElement);
77
63
  const index = stepElements.findIndex((element) => element === current);
78
64
  tuiMoveFocus(index, stepElements, step);
79
65
  }
80
66
  scrollIntoView(index) {
81
- const step = this.steps.get(index)?.nativeElement;
67
+ const step = this.steps()[index]?.nativeElement;
82
68
  if (!step) {
83
69
  return;
84
70
  }
@@ -86,57 +72,50 @@ class TuiStepperComponent {
86
72
  const { offsetHeight, offsetWidth, offsetTop: stepOffsetTop, offsetLeft: stepOffsetLeft, } = step;
87
73
  const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;
88
74
  const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;
89
- this.scrollService
90
- .scroll$(this.el, Math.max(0, top), Math.max(0, left), tuiGetDuration(this.speed) / 3)
91
- .pipe(takeUntilDestroyed(this.destroyRef))
92
- .subscribe();
75
+ this.el.scrollTo?.({ left: Math.max(0, left), top: Math.max(0, top) });
93
76
  }
94
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
95
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiStepperComponent, isStandalone: true, selector: "tui-stepper, nav[tuiStepper]", inputs: { activeItemIndex: "activeItemIndex", orientation: "orientation" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { listeners: { "keydown.arrowRight": "onHorizontal($event, 1)", "keydown.arrowLeft": "onHorizontal($event, -1)", "keydown.arrowDown": "onVertical($event, 1)", "keydown.arrowUp": "onVertical($event, -1)" }, properties: { "attr.data-orientation": "orientation" } }, providers: [ResizeObserverService], queries: [{ propertyName: "steps", predicate: i0.forwardRef(() => TuiStep), read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "@if (changes$ | async) {}\n<ng-content />\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;scroll-behavior:var(--tui-scroll-behavior);overflow:auto;counter-reset:steps;font:var(--tui-font-text-m)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host[data-orientation=vertical]{flex-direction:column}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.17", type: TuiStepperComponent, isStandalone: true, selector: "tui-stepper, nav[tuiStepper]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, host: { listeners: { "keydown.arrowRight": "onHorizontal($event, 1)", "keydown.arrowLeft": "onHorizontal($event, -1)", "keydown.arrowDown": "onVertical($event, 1)", "keydown.arrowUp": "onVertical($event, -1)" }, properties: { "attr.data-orientation": "orientation()" } }, providers: [ResizeObserverService], queries: [{ propertyName: "steps", predicate: i0.forwardRef(() => TuiStep), read: ElementRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: `
79
+ <ng-content />
80
+ `, isInline: true, styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;scroll-behavior:var(--tui-scroll-behavior);overflow:auto;counter-reset:steps;font:var(--tui-font-body-m)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host[data-orientation=vertical]{flex-direction:column}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
96
81
  }
97
- __decorate([
98
- tuiPure
99
- ], TuiStepperComponent.prototype, "changes$", null);
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStepperComponent, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, decorators: [{
101
83
  type: Component,
102
- args: [{ selector: 'tui-stepper, nav[tuiStepper]', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService], host: {
103
- '[attr.data-orientation]': 'orientation',
84
+ args: [{ selector: 'tui-stepper, nav[tuiStepper]', template: `
85
+ <ng-content />
86
+ `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService], host: {
87
+ '[attr.data-orientation]': 'orientation()',
104
88
  '(keydown.arrowRight)': 'onHorizontal($event, 1)',
105
89
  '(keydown.arrowLeft)': 'onHorizontal($event, -1)',
106
90
  '(keydown.arrowDown)': 'onVertical($event, 1)',
107
91
  '(keydown.arrowUp)': 'onVertical($event, -1)',
108
- }, template: "@if (changes$ | async) {}\n<ng-content />\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;scroll-behavior:var(--tui-scroll-behavior);overflow:auto;counter-reset:steps;font:var(--tui-font-text-m)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host[data-orientation=vertical]{flex-direction:column}\n"] }]
109
- }], propDecorators: { steps: [{
110
- type: ContentChildren,
111
- args: [forwardRef(() => TuiStep), { read: ElementRef }]
112
- }], activeItemIndex: [{
113
- type: Input
114
- }], orientation: [{
115
- type: Input
116
- }], activeItemIndexChange: [{
117
- type: Output
118
- }], changes$: [] } });
92
+ }, styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;scroll-behavior:var(--tui-scroll-behavior);overflow:auto;counter-reset:steps;font:var(--tui-font-body-m)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host[data-orientation=vertical]{flex-direction:column}\n"] }]
93
+ }] });
119
94
 
120
95
  class TuiStep {
121
96
  constructor() {
122
- this.stepper = inject(TuiStepperComponent);
123
97
  this.el = tuiInjectElement();
98
+ this.icons = inject(TUI_COMMON_ICONS);
99
+ this.appearance = tuiAppearance(computed(() => (this.isActive() ? 'none' : 'action')));
100
+ this.size = tuiDirectiveBinding(TuiCell, 'size', 'm');
101
+ this.stepper = inject(TuiStepperComponent);
124
102
  this.$ = (inject(RouterLinkActive, { optional: true })?.isActiveChange.asObservable() ?? EMPTY)
125
103
  .pipe(filter(Boolean), takeUntilDestroyed())
126
104
  .subscribe(() => this.activate());
127
- this.focusVisible = false;
128
- this.icons = inject(TUI_COMMON_ICONS);
129
- this.stepState = 'normal';
130
- this.icon = '';
131
- }
132
- get isActive() {
133
- return this.stepper.isActive(this.index);
134
- }
135
- get isVertical() {
136
- return this.stepper.orientation === 'vertical';
137
- }
138
- get tabIndex() {
139
- return this.isActive ? 0 : -1;
105
+ this.stepState = input('normal');
106
+ this.icon = input('');
107
+ this.isActive = computed(() => this.stepper.activeItemIndex() === this.index);
108
+ this.avatarAppearance = computed(() => {
109
+ if (this.isActive()) {
110
+ return 'primary';
111
+ }
112
+ return this.stepState() === 'error' ? 'negative' : 'secondary';
113
+ });
114
+ this.avatarContent = computed(() => this.isActive() || (this.stepState() === 'normal' && !this.icon())
115
+ ? `${this.index + 1}`
116
+ : this.avatarIcon());
117
+ this.avatarIcon = computed(() => this.icon() ||
118
+ (this.stepState() === 'error' ? this.icons.error : this.icons.check));
140
119
  }
141
120
  get index() {
142
121
  return this.stepper.indexOf(this.el);
@@ -144,25 +123,19 @@ class TuiStep {
144
123
  activate() {
145
124
  this.stepper.activate(this.index);
146
125
  }
147
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
148
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiStep, isStandalone: true, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: { stepState: "stepState", icon: "icon" }, host: { attributes: { "type": "button" }, listeners: { "click": "activate()" }, properties: { "attr.data-state": "stepState", "class._vertical": "isVertical", "class._focus-visible": "focusVisible", "class._active": "isActive", "tabIndex": "tabIndex" } }, ngImport: i0, template: "@if (icon) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-inline-end:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-block-end:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-block-start:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-inline-end:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);box-sizing:border-box}.t-marker:before{font-size:1rem}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"], dependencies: [{ kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
127
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiStep, isStandalone: true, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: { stepState: { classPropertyName: "stepState", publicName: "stepState", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "activate()" }, properties: { "tabIndex": "isActive() ? 0 : -1", "class._active": "isActive()", "class._vertical": "stepper.orientation() === \"vertical\"" } }, hostDirectives: [{ directive: i1.TuiCell }, { directive: i2.TuiWithAppearance }], ngImport: i0, template: "<div\n [appearance]=\"avatarAppearance()\"\n [tuiAvatar]=\"avatarContent()\"\n></div>\n<ng-content />\n", styles: [":host{min-inline-size:fit-content}:host:hover{background:unset!important}:host._active._active:not(:disabled){cursor:unset}:host:not(._vertical):first-of-type{padding-inline-start:0}:host:not(._vertical):last-of-type{padding-inline-end:0}:host._vertical{padding-inline:0;margin-block-end:.5rem}[tuiAvatar][data-size]:before{transition:none}[tuiAvatar][data-size]._initials:before{font-weight:400}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
149
128
  }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStep, decorators: [{
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, decorators: [{
151
130
  type: Component,
152
- args: [{ selector: 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]', imports: [TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
131
+ args: [{ selector: 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]', imports: [TuiAvatar], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiCell, TuiWithAppearance], host: {
153
132
  type: 'button',
154
- '[attr.data-state]': 'stepState',
155
- '[class._vertical]': 'isVertical',
156
- '[class._focus-visible]': 'focusVisible',
157
- '[class._active]': 'isActive',
158
- '[tabIndex]': 'tabIndex',
133
+ '[tabIndex]': 'isActive() ? 0 : -1',
134
+ '[class._active]': 'isActive()',
135
+ '[class._vertical]': 'stepper.orientation() === "vertical"',
159
136
  '(click)': 'activate()',
160
- }, template: "@if (icon) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-inline-end:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-block-end:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-block-start:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-inline-end:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);box-sizing:border-box}.t-marker:before{font-size:1rem}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"] }]
161
- }], propDecorators: { stepState: [{
162
- type: Input
163
- }], icon: [{
164
- type: Input
165
- }] } });
137
+ }, template: "<div\n [appearance]=\"avatarAppearance()\"\n [tuiAvatar]=\"avatarContent()\"\n></div>\n<ng-content />\n", styles: [":host{min-inline-size:fit-content}:host:hover{background:unset!important}:host._active._active:not(:disabled){cursor:unset}:host:not(._vertical):first-of-type{padding-inline-start:0}:host:not(._vertical):last-of-type{padding-inline-end:0}:host._vertical{padding-inline:0;margin-block-end:.5rem}[tuiAvatar][data-size]:before{transition:none}[tuiAvatar][data-size]._initials:before{font-weight:400}\n"] }]
138
+ }] });
166
139
 
167
140
  const TuiStepper = [TuiStepperComponent, TuiStep];
168
141
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-stepper.mjs","sources":["../../../projects/kit/components/stepper/stepper.component.ts","../../../projects/kit/components/stepper/stepper.template.html","../../../projects/kit/components/stepper/step.component.ts","../../../projects/kit/components/stepper/step.template.html","../../../projects/kit/components/stepper/stepper.ts","../../../projects/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n type OnChanges,\n Output,\n type QueryList,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiQueryListChanges} from '@taiga-ui/cdk/observables';\nimport {TuiScrollService} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {\n tuiGetOriginalArrayFromQueryList,\n tuiPure,\n} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {delay, type Observable} from 'rxjs';\n\nimport {TuiStep} from './step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n imports: [AsyncPipe],\n templateUrl: './stepper.template.html',\n styleUrl: './stepper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ResizeObserverService],\n host: {\n '[attr.data-orientation]': 'orientation',\n '(keydown.arrowRight)': 'onHorizontal($event, 1)',\n '(keydown.arrowLeft)': 'onHorizontal($event, -1)',\n '(keydown.arrowDown)': 'onVertical($event, 1)',\n '(keydown.arrowUp)': 'onVertical($event, -1)',\n },\n})\nexport class TuiStepperComponent implements OnChanges {\n @ContentChildren(forwardRef(() => TuiStep), {read: ElementRef})\n private readonly steps: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly el = tuiInjectElement();\n private readonly scrollService = inject(TuiScrollService);\n private readonly speed = inject(TUI_ANIMATIONS_SPEED);\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly $ = inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.scrollIntoView(this.activeItemIndex));\n\n @Input()\n public activeItemIndex = 0;\n\n @Input()\n public orientation: TuiOrientation = 'horizontal';\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n public ngOnChanges(): void {\n this.scrollIntoView(this.activeItemIndex);\n }\n\n public indexOf(step: HTMLElement): number {\n const index = tuiGetOriginalArrayFromQueryList(this.steps).findIndex(\n ({nativeElement}) => nativeElement === step,\n );\n\n return index < 0 ? NaN : index;\n }\n\n public isActive(index: number): boolean {\n return index === this.activeItemIndex;\n }\n\n public activate(index: number): void {\n if (this.activeItemIndex === index) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n this.cdr.markForCheck();\n this.scrollIntoView(index);\n }\n\n @tuiPure\n protected get changes$(): Observable<unknown> {\n // Delay is required to trigger change detection after steps are rendered,\n // so they can update their \"active\" status\n return tuiQueryListChanges(this.steps).pipe(delay(0));\n }\n\n protected onHorizontal(event: Event, step: number): void {\n if (this.orientation !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n protected onVertical(event: Event, step: number): void {\n if (this.orientation !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n private moveFocus(current: EventTarget, step: number): void {\n if (!tuiIsElement(current)) {\n return;\n }\n\n const stepElements = this.steps.toArray().map(({nativeElement}) => nativeElement);\n const index = stepElements.findIndex((element) => element === current);\n\n tuiMoveFocus(index, stepElements, step);\n }\n\n private scrollIntoView(index: number): void {\n const step = this.steps.get(index)?.nativeElement;\n\n if (!step) {\n return;\n }\n\n const {clientHeight, clientWidth, offsetTop, offsetLeft} = this.el;\n const {\n offsetHeight,\n offsetWidth,\n offsetTop: stepOffsetTop,\n offsetLeft: stepOffsetLeft,\n } = step;\n const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;\n const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;\n\n this.scrollService\n .scroll$(\n this.el,\n Math.max(0, top),\n Math.max(0, left),\n tuiGetDuration(this.speed) / 3,\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe();\n }\n}\n","@if (changes$ | async) {}\n<ng-content />\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {EMPTY, filter} from 'rxjs';\n\nimport {TuiStepperComponent} from './stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n imports: [TuiIcon],\n templateUrl: './step.template.html',\n styleUrl: './step.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n type: 'button',\n '[attr.data-state]': 'stepState',\n '[class._vertical]': 'isVertical',\n '[class._focus-visible]': 'focusVisible',\n '[class._active]': 'isActive',\n '[tabIndex]': 'tabIndex',\n '(click)': 'activate()',\n },\n})\nexport class TuiStep {\n private readonly stepper = inject(TuiStepperComponent);\n private readonly el = tuiInjectElement();\n protected readonly $ = (\n inject(RouterLinkActive, {optional: true})?.isActiveChange.asObservable() ?? EMPTY\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => this.activate());\n\n protected focusVisible = false;\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n\n @Input()\n public stepState: 'error' | 'normal' | 'pass' = 'normal';\n\n @Input()\n public icon = '';\n\n protected get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n protected get isVertical(): boolean {\n return this.stepper.orientation === 'vertical';\n }\n\n protected get tabIndex(): number {\n return this.isActive ? 0 : -1;\n }\n\n protected get index(): number {\n return this.stepper.indexOf(this.el);\n }\n\n protected activate(): void {\n this.stepper.activate(this.index);\n }\n}\n","@if (icon) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n","import {TuiStep} from './step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\nexport const TuiStepper = [TuiStepperComponent, TuiStep] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAiDa,mBAAmB,CAAA;AAfhC,IAAA,WAAA,GAAA;QAiBqB,IAAK,CAAA,KAAA,GAAuC,WAAW;AAEvD,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAC/B,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACpC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAE7B,IAAC,CAAA,CAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC;aAC5D,IAAI,CAAC,kBAAkB,EAAE;AACzB,aAAA,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAGxD,IAAe,CAAA,eAAA,GAAG,CAAC;QAGnB,IAAW,CAAA,WAAA,GAAmB,YAAY;AAGjC,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,YAAY,EAAU;AA4FrE;IA1FU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC;;AAGtC,IAAA,OAAO,CAAC,IAAiB,EAAA;QAC5B,MAAM,KAAK,GAAG,gCAAgC,C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4FAcR,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;+BAEF,yFAAyF,EAAA,OAAA,EACpF,CAAC,OAAO,CAAC,mBAGD,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,mBAAmB,EAAE,WAAW;AAChC,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,wBAAwB,EAAE,cAAc;AACxC,wBAAA,iBAAiB,EAAE,UAAU;AAC7B,wBAAA,YAAY,EAAE,UAAU;AACxB,wBAAA,SAAS,EAAE,YAAY;AAC1B,qBAAA,EAAA,QAAA,EAAA,iVAAA,EAAA,MAAA,EAAA,CAAA,wuEAAA,CAAA,EAAA;8BAgBM,SAAS,EAAA,CAAA;sBADf;gBAIM,IAAI,EAAA,CAAA;sBADV;;;MExCQ,UAAU,GAAG,CAAC,mBAAmB,EAAE,OAAO;;ACHvD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-stepper.mjs","sources":["../../../projects/kit/components/stepper/stepper.component.ts","../../../projects/kit/components/stepper/step.component.ts","../../../projects/kit/components/stepper/step.template.html","../../../projects/kit/components/stepper/stepper.ts","../../../projects/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n type OnChanges,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\n\nimport {TuiStep} from './step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n template: `\n <ng-content />\n `,\n styleUrl: './stepper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ResizeObserverService],\n host: {\n '[attr.data-orientation]': 'orientation()',\n '(keydown.arrowRight)': 'onHorizontal($event, 1)',\n '(keydown.arrowLeft)': 'onHorizontal($event, -1)',\n '(keydown.arrowDown)': 'onVertical($event, 1)',\n '(keydown.arrowUp)': 'onVertical($event, -1)',\n },\n})\nexport class TuiStepperComponent implements OnChanges {\n private readonly el = tuiInjectElement();\n private readonly steps = contentChildren(\n forwardRef(() => TuiStep),\n {read: ElementRef},\n );\n\n protected readonly $ = inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.scrollIntoView(this.activeItemIndex()));\n\n public readonly orientation = input<TuiOrientation>('horizontal');\n public readonly activeItemIndex = model(0);\n\n public ngOnChanges(): void {\n this.scrollIntoView(this.activeItemIndex());\n }\n\n public indexOf(step: HTMLElement): number {\n const index = this.steps().findIndex(({nativeElement}) => nativeElement === step);\n\n return index < 0 ? NaN : index;\n }\n\n public isActive(index: number): boolean {\n return index === this.activeItemIndex();\n }\n\n public activate(index: number): void {\n if (this.activeItemIndex() === index) {\n return;\n }\n\n this.activeItemIndex.set(index);\n this.scrollIntoView(index);\n }\n\n protected onHorizontal(event: Event, step: number): void {\n if (this.orientation() !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n protected onVertical(event: Event, step: number): void {\n if (this.orientation() !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n private moveFocus(current: EventTarget, step: number): void {\n if (!tuiIsElement(current)) {\n return;\n }\n\n const stepElements = this.steps().map(({nativeElement}) => nativeElement);\n const index = stepElements.findIndex((element) => element === current);\n\n tuiMoveFocus(index, stepElements, step);\n }\n\n private scrollIntoView(index: number): void {\n const step = this.steps()[index]?.nativeElement;\n\n if (!step) {\n return;\n }\n\n const {clientHeight, clientWidth, offsetTop, offsetLeft} = this.el;\n const {\n offsetHeight,\n offsetWidth,\n offsetTop: stepOffsetTop,\n offsetLeft: stepOffsetLeft,\n } = step;\n const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;\n const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;\n\n this.el.scrollTo?.({left: Math.max(0, left), top: Math.max(0, top)});\n }\n}\n","import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiCell} from '@taiga-ui/core/components/cell';\nimport {tuiAppearance, TuiWithAppearance} from '@taiga-ui/core/directives/appearance';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TuiAvatar} from '@taiga-ui/kit/components/avatar';\nimport {EMPTY, filter} from 'rxjs';\n\nimport {TuiStepperComponent} from './stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n imports: [TuiAvatar],\n templateUrl: './step.template.html',\n styleUrl: './step.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiCell, TuiWithAppearance],\n host: {\n type: 'button',\n '[tabIndex]': 'isActive() ? 0 : -1',\n '[class._active]': 'isActive()',\n '[class._vertical]': 'stepper.orientation() === \"vertical\"',\n '(click)': 'activate()',\n },\n})\nexport class TuiStep {\n private readonly el = tuiInjectElement();\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly appearance = tuiAppearance(\n computed(() => (this.isActive() ? 'none' : 'action')),\n );\n\n protected readonly size = tuiDirectiveBinding(TuiCell, 'size', 'm');\n\n protected readonly stepper = inject(TuiStepperComponent);\n protected readonly $ = (\n inject(RouterLinkActive, {optional: true})?.isActiveChange.asObservable() ?? EMPTY\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => this.activate());\n\n public readonly stepState = input<'error' | 'normal' | 'pass'>('normal');\n public readonly icon = input('');\n\n protected readonly isActive = computed(\n () => this.stepper.activeItemIndex() === this.index,\n );\n\n protected avatarAppearance = computed(() => {\n if (this.isActive()) {\n return 'primary';\n }\n\n return this.stepState() === 'error' ? 'negative' : 'secondary';\n });\n\n protected readonly avatarContent = computed(() =>\n this.isActive() || (this.stepState() === 'normal' && !this.icon())\n ? `${this.index + 1}`\n : this.avatarIcon(),\n );\n\n protected readonly avatarIcon = computed(\n () =>\n this.icon() ||\n (this.stepState() === 'error' ? this.icons.error : this.icons.check),\n );\n\n protected get index(): number {\n return this.stepper.indexOf(this.el);\n }\n\n protected activate(): void {\n this.stepper.activate(this.index);\n }\n}\n","<div\n [appearance]=\"avatarAppearance()\"\n [tuiAvatar]=\"avatarContent()\"\n></div>\n<ng-content />\n","import {TuiStep} from './step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\nexport const TuiStepper = [TuiStepperComponent, TuiStep] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAmCa,mBAAmB,CAAA;AAhBhC,IAAA,WAAA,GAAA;QAiBqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CACpC,UAAU,CAAC,MAAM,OAAO,CAAC,EACzB,EAAC,IAAI,EAAE,UAAU,EAAC,CACrB;QAEkB,IAAC,CAAA,CAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC;aAC5D,IAAI,CAAC,kBAAkB,EAAE;AACzB,aAAA,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;AAEjD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAiB,YAAY,CAAC;AACjD,QAAA,IAAA,CAAA,eAAe,GAAG,KA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2
  import { computed, input, 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, 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_SWITCH_OPTIONS, tuiSwitchOptionsProvider] = tuiCreateOptions({
10
9
  showIcons: true,
@@ -16,15 +15,20 @@ const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] = tuiCreateOptions({
16
15
  class TuiSwitch extends TuiRadioComponent {
17
16
  constructor() {
18
17
  super(...arguments);
18
+ this.native = 'switch' in this.el;
19
19
  this.icon = tuiIconStart(computed(() => (this.showIcons() ? this.options.icon(this.size()) : '')));
20
20
  this.showIcons = input(this.options.showIcons);
21
21
  }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
23
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiSwitch, isStandalone: true, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: { showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "switch" } }, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)], usesInheritance: true, hostDirectives: [{ directive: i1.TuiIcons }], ngImport: i0, template: '', isInline: true, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1.125rem;transform:translate(-1rem);font-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem var(--tui-background-base);outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{position:absolute;block-size:100%;inline-size:1.5rem;transition-property:transform}[tuiSwitch]:before{font-size:1rem;inline-size:1.375rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;display:block;border-radius:100%;background:none;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem var(--tui-background-base);outline:.375rem solid var(--tui-background-neutral-2-pressed)}[tuiSwitch]:not([data-icon-start]):after{outline-offset:20rem}[tuiSwitch]:invalid:not([data-mode]),[tuiSwitch][data-mode~=invalid]{color:#fff}\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: TuiSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiSwitch, isStandalone: true, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: { showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "switch": "", "role": "switch" }, properties: { "class._native": "native" } }, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)], usesInheritance: true, hostDirectives: [{ directive: i1.TuiIcons }], ngImport: i0, template: '', isInline: true, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-block;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1rem;transform:translate(-1rem);font-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem var(--tui-background-base);outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{position:absolute;block-size:100%;inline-size:1.5rem;transition-property:transform}[tuiSwitch]:before{left:.125rem;font-size:1rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;display:block;border-radius:100%;background:none;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem var(--tui-background-base);outline:.375rem solid var(--tui-background-neutral-2-pressed)}[tuiSwitch]:not([data-icon-start]):after{outline-offset:20rem}[tuiSwitch]:invalid:not([data-mode]),[tuiSwitch][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSwitch, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSwitch, decorators: [{
26
26
  type: Component,
27
- args: [{ standalone: true, selector: 'input[type="checkbox"][tuiSwitch]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)], hostDirectives: [TuiIcons], host: { role: 'switch' }, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1.125rem;transform:translate(-1rem);font-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem var(--tui-background-base);outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{position:absolute;block-size:100%;inline-size:1.5rem;transition-property:transform}[tuiSwitch]:before{font-size:1rem;inline-size:1.375rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;display:block;border-radius:100%;background:none;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem var(--tui-background-base);outline:.375rem solid var(--tui-background-neutral-2-pressed)}[tuiSwitch]:not([data-icon-start]):after{outline-offset:20rem}[tuiSwitch]:invalid:not([data-mode]),[tuiSwitch][data-mode~=invalid]{color:#fff}\n"] }]
27
+ args: [{ selector: 'input[type="checkbox"][tuiSwitch]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)], hostDirectives: [TuiIcons], host: {
28
+ switch: '',
29
+ role: 'switch',
30
+ '[class._native]': 'native',
31
+ }, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-block;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1rem;transform:translate(-1rem);font-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem var(--tui-background-base);outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{position:absolute;block-size:100%;inline-size:1.5rem;transition-property:transform}[tuiSwitch]:before{left:.125rem;font-size:1rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;display:block;border-radius:100%;background:none;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem var(--tui-background-base);outline:.375rem solid var(--tui-background-neutral-2-pressed)}[tuiSwitch]:not([data-icon-start]):after{outline-offset:20rem}[tuiSwitch]:invalid:not([data-mode]),[tuiSwitch][data-mode~=invalid]{color:#fff}\n"] }]
28
32
  }] });
29
33
 
30
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-switch.mjs","sources":["../../../projects/kit/components/switch/switch.options.ts","../../../projects/kit/components/switch/switch.component.ts","../../../projects/kit/components/switch/taiga-ui-kit-components-switch.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 TuiSwitchOptions extends TuiRadioOptions {\n readonly showIcons: boolean;\n readonly icon: TuiStringHandler<TuiSizeS>;\n}\n\nexport const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] =\n tuiCreateOptions<TuiSwitchOptions>({\n showIcons: true,\n size: 'm',\n icon: () => '@tui.check',\n appearance: ({checked}) => (checked ? 'primary' : 'secondary'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcons, tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_RADIO_OPTIONS, TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\nimport {TUI_SWITCH_OPTIONS, type TuiSwitchOptions} from './switch.options';\n\n@Component({\n standalone: true,\n selector: 'input[type=\"checkbox\"][tuiSwitch]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/switch.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)],\n hostDirectives: [TuiIcons],\n host: {role: 'switch'},\n})\nexport class TuiSwitch extends TuiRadioComponent<TuiSwitchOptions> {\n protected readonly icon = tuiIconStart(\n computed(() => (this.showIcons() ? this.options.icon(this.size()) : '')),\n );\n\n public readonly showIcons = input(this.options.showIcons);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAUa,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,GACvD,gBAAgB,CAAmB;AAC/B,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,UAAU,EAAE,CAAC,EAAC,OAAO,EAAC,MAAM,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACjE,CAAA;;ACQC,MAAO,SAAU,SAAQ,iBAAmC,CAAA;AAXlE,IAAA,WAAA,GAAA;;AAYuB,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAClC,QAAQ,CAAC,OAAO,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AuB,CAAC,MAAM,aACpC,CAAC,UAAU,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,EAC9C,cAAA,EAAA,CAAC,QAAQ,CAAC,EACpB,IAAA,EAAA,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAA,MAAA,EAAA,CAAA,s2CAAA,CAAA,EAAA;;;ACtB1B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-switch.mjs","sources":["../../../projects/kit/components/switch/switch.options.ts","../../../projects/kit/components/switch/switch.component.ts","../../../projects/kit/components/switch/taiga-ui-kit-components-switch.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 TuiSwitchOptions extends TuiRadioOptions {\n readonly showIcons: boolean;\n readonly icon: TuiStringHandler<TuiSizeS>;\n}\n\nexport const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] =\n tuiCreateOptions<TuiSwitchOptions>({\n showIcons: true,\n size: 'm',\n icon: () => '@tui.check',\n appearance: ({checked}) => (checked ? 'primary' : 'secondary'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {TuiIcons, tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_RADIO_OPTIONS, TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\nimport {TUI_SWITCH_OPTIONS, type TuiSwitchOptions} from './switch.options';\n\n@Component({\n selector: 'input[type=\"checkbox\"][tuiSwitch]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/switch.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)],\n hostDirectives: [TuiIcons],\n host: {\n switch: '',\n role: 'switch',\n '[class._native]': 'native',\n },\n})\nexport class TuiSwitch extends TuiRadioComponent<TuiSwitchOptions> {\n protected readonly native = 'switch' in this.el;\n protected readonly icon = tuiIconStart(\n computed(() => (this.showIcons() ? this.options.icon(this.size()) : '')),\n );\n\n public readonly showIcons = input(this.options.showIcons);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,GACvD,gBAAgB,CAAmB;AAC/B,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,UAAU,EAAE,CAAC,EAAC,OAAO,EAAC,MAAM,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACjE,CAAA;;ACWC,MAAO,SAAU,SAAQ,iBAAmC,CAAA;AAdlE,IAAA,WAAA,GAAA;;AAeuB,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,EAAE;AAC5B,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAClC,QAAQ,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAC3E;QAEe,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5D;+GAPY,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qCAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,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