@taiga-ui/kit 4.52.0-canary.abf3e8c → 4.52.0-canary.ae38a1e

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 (335) hide show
  1. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  2. package/components/avatar/avatar-stack.component.d.ts +2 -2
  3. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  4. package/components/badged-content/badged-content.directive.d.ts +2 -3
  5. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  6. package/components/button-loading/button-loading.component.d.ts +5 -5
  7. package/components/calendar-month/calendar-month.component.d.ts +5 -5
  8. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  9. package/components/calendar-range/day-range-period.d.ts +2 -1
  10. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  11. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  12. package/components/carousel/carousel.component.d.ts +15 -18
  13. package/components/carousel/carousel.directive.d.ts +5 -4
  14. package/components/combo-box/combo-box.d.ts +1 -1
  15. package/components/combo-box/combo-box.directive.d.ts +3 -5
  16. package/components/compass/compass.component.d.ts +2 -2
  17. package/components/copy/copy.component.d.ts +2 -3
  18. package/components/drawer/drawer.component.d.ts +3 -4
  19. package/components/files/file/file.component.d.ts +16 -29
  20. package/components/files/files/files.component.d.ts +5 -8
  21. package/components/files/input-files/input-files.component.d.ts +2 -2
  22. package/components/files/input-files/input-files.content.d.ts +7 -8
  23. package/components/files/input-files/input-files.directive.d.ts +2 -2
  24. package/components/filter/filter.component.d.ts +9 -12
  25. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  26. package/components/index.d.ts +0 -3
  27. package/components/input-color/input-color.component.d.ts +5 -9
  28. package/components/input-color/input-color.d.ts +1 -1
  29. package/components/input-date/input-date.component.d.ts +2 -2
  30. package/components/input-date/input-date.d.ts +1 -1
  31. package/components/input-date/input-date.directive.d.ts +15 -14
  32. package/components/input-date/input-date.options.d.ts +3 -3
  33. package/components/input-date-multi/input-date-multi.d.ts +1 -1
  34. package/components/input-date-multi/input-date-multi.directive.d.ts +2 -2
  35. package/components/input-date-range/input-date-range.d.ts +1 -1
  36. package/components/input-date-range/input-date-range.directive.d.ts +7 -8
  37. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  38. package/components/input-date-time/input-date-time.d.ts +1 -1
  39. package/components/input-date-time/input-date-time.directive.d.ts +12 -12
  40. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  41. package/components/input-inline/input-inline.component.d.ts +3 -2
  42. package/components/input-month/input-month.component.d.ts +3 -5
  43. package/components/input-month/input-month.d.ts +1 -1
  44. package/components/input-month/input-month.directive.d.ts +1 -1
  45. package/components/input-month-range/input-month-range.d.ts +1 -1
  46. package/components/input-month-range/input-month-range.directive.d.ts +1 -1
  47. package/components/input-number/index.d.ts +3 -0
  48. package/components/input-number/input-number.d.ts +5 -3
  49. package/components/input-number/input-number.directive.d.ts +9 -22
  50. package/components/input-number/input-number.options.d.ts +4 -7
  51. package/components/input-number/number-mask.directive.d.ts +42 -0
  52. package/components/input-number/quantum.directive.d.ts +10 -8
  53. package/components/input-number/step/input-number-step.component.d.ts +10 -9
  54. package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
  55. package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
  56. package/components/input-phone/input-phone.d.ts +1 -1
  57. package/components/input-phone/input-phone.directive.d.ts +6 -8
  58. package/components/input-phone-international/input-phone-international.component.d.ts +8 -10
  59. package/components/input-phone-international/input-phone-international.d.ts +1 -1
  60. package/components/input-phone-international/input-phone-international.options.d.ts +1 -0
  61. package/components/input-pin/input-pin.component.d.ts +3 -4
  62. package/components/input-pin/input-pin.d.ts +1 -1
  63. package/components/input-range/index.d.ts +0 -1
  64. package/components/input-range/input-range.component.d.ts +22 -52
  65. package/components/input-slider/input-slider.d.ts +1 -1
  66. package/components/input-slider/input-slider.directive.d.ts +3 -2
  67. package/components/input-time/input-time.d.ts +1 -1
  68. package/components/input-time/input-time.directive.d.ts +1 -1
  69. package/components/input-year/input-year.d.ts +1 -1
  70. package/components/input-year/input-year.directive.d.ts +4 -6
  71. package/components/input-year/input-year.options.d.ts +2 -2
  72. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  73. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  74. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  75. package/components/pager/pager.component.d.ts +12 -12
  76. package/components/pagination/pagination.component.d.ts +1 -1
  77. package/components/preview/index.d.ts +1 -0
  78. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  79. package/components/preview/preview.component.d.ts +6 -6
  80. package/components/preview/zoom/preview-zoom.component.d.ts +10 -17
  81. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  82. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  83. package/components/pulse/pulse.component.d.ts +2 -2
  84. package/components/push/push.component.d.ts +6 -7
  85. package/components/radio-list/radio-list.component.d.ts +9 -9
  86. package/components/range/range.component.d.ts +3 -4
  87. package/components/select/select.d.ts +1 -1
  88. package/components/slider/helpers/slider-key-steps.directive.d.ts +10 -7
  89. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  90. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  91. package/components/slider/slider.component.d.ts +4 -7
  92. package/components/stepper/step.component.d.ts +9 -2
  93. package/components/stepper/stepper.component.d.ts +1 -3
  94. package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
  95. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  96. package/components/tabs/tabs-with-more.component.d.ts +12 -16
  97. package/components/tabs/tabs.directive.d.ts +5 -7
  98. package/components/textarea/textarea.component.d.ts +7 -8
  99. package/components/textarea/textarea.d.ts +1 -1
  100. package/components/tiles/tile-handle.directive.d.ts +2 -1
  101. package/components/tiles/tile.component.d.ts +7 -10
  102. package/components/tiles/tile.service.d.ts +1 -1
  103. package/components/tiles/tiles.component.d.ts +4 -7
  104. package/components/tree/components/tree/tree.component.d.ts +7 -7
  105. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  106. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  107. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  108. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  109. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  110. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  111. package/directives/appearance-proxy/index.d.ts +1 -0
  112. package/directives/fade/fade.directive.d.ts +5 -5
  113. package/directives/highlight/highlight.directive.d.ts +4 -4
  114. package/directives/index.d.ts +1 -1
  115. package/directives/present/present.directive.d.ts +2 -4
  116. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  117. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  118. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -8
  119. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  120. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  121. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  122. package/fesm2022/taiga-ui-kit-components-avatar.mjs +33 -47
  123. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  124. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +8 -10
  125. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-kit-components-badge.mjs +7 -7
  127. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -11
  128. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
  130. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +13 -27
  132. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  134. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +12 -24
  136. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +26 -35
  138. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-carousel.mjs +69 -116
  140. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +3 -3
  142. package/fesm2022/taiga-ui-kit-components-chip.mjs +7 -7
  143. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +8 -23
  144. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  146. package/fesm2022/taiga-ui-kit-components-compass.mjs +7 -9
  147. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  148. package/fesm2022/taiga-ui-kit-components-confirm.mjs +7 -7
  149. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  150. package/fesm2022/taiga-ui-kit-components-copy.mjs +11 -18
  151. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +6 -6
  153. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  155. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-files.mjs +108 -228
  157. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-kit-components-filter.mjs +20 -33
  159. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  161. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +7 -16
  163. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-kit-components-input-color.mjs +8 -20
  165. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  166. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +9 -7
  167. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  168. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +21 -30
  169. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  170. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +24 -47
  171. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  172. package/fesm2022/taiga-ui-kit-components-input-date.mjs +31 -42
  173. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  174. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -12
  175. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  176. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +12 -16
  177. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-input-month.mjs +25 -39
  179. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  180. package/fesm2022/taiga-ui-kit-components-input-number.mjs +252 -179
  181. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  182. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +31 -48
  183. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  184. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +13 -28
  185. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  186. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +11 -18
  187. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
  189. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +20 -15
  191. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-input-time.mjs +10 -11
  193. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-input-year.mjs +12 -27
  195. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -70
  197. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-like.mjs +3 -3
  199. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +9 -9
  200. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -7
  201. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +26 -31
  203. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +11 -11
  205. package/fesm2022/taiga-ui-kit-components-pager.mjs +29 -41
  206. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-components-pagination.mjs +14 -18
  208. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  210. package/fesm2022/taiga-ui-kit-components-preview.mjs +74 -143
  211. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-progress.mjs +44 -63
  213. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  215. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-push.mjs +20 -32
  217. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +21 -33
  219. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-radio.mjs +6 -6
  221. package/fesm2022/taiga-ui-kit-components-range.mjs +19 -29
  222. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-rating.mjs +3 -3
  224. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +3 -3
  225. package/fesm2022/taiga-ui-kit-components-segmented.mjs +7 -7
  226. package/fesm2022/taiga-ui-kit-components-select.mjs +10 -11
  227. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-slider.mjs +52 -74
  229. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  231. package/fesm2022/taiga-ui-kit-components-stepper.mjs +36 -29
  232. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-switch.mjs +4 -4
  234. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-tabs.mjs +83 -142
  236. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-textarea.mjs +25 -38
  238. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-tiles.mjs +52 -96
  240. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-toast.mjs +16 -16
  242. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-tree.mjs +61 -92
  244. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  246. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  248. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  249. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  250. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +3 -3
  252. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +7 -7
  253. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -7
  255. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +3 -3
  257. package/fesm2022/taiga-ui-kit-directives-fade.mjs +20 -30
  258. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  260. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -20
  261. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-directives-password.mjs +3 -3
  263. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -17
  264. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  266. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  267. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  268. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  269. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +6 -6
  270. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +7 -9
  271. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +9 -13
  273. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-directives.mjs +1 -1
  275. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +3 -3
  276. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  277. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +14 -15
  278. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +3 -4
  280. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +23 -26
  282. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +3 -3
  284. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  285. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  287. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  288. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -108
  289. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-utils.mjs +2 -8
  291. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  292. package/package.json +86 -98
  293. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +3 -0
  294. package/pipes/flag/flag.pipe.d.ts +1 -2
  295. package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -0
  296. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  297. package/styles/components/avatar.less +14 -14
  298. package/styles/components/badge.less +3 -3
  299. package/styles/components/block.less +4 -4
  300. package/styles/components/chip.less +3 -3
  301. package/styles/components/comment.less +1 -1
  302. package/styles/components/message.less +1 -1
  303. package/styles/components/pin.less +3 -3
  304. package/styles/components/switch.less +3 -2
  305. package/styles/components/toast.less +1 -1
  306. package/tokens/i18n.d.ts +1 -0
  307. package/tokens/index.d.ts +0 -7
  308. package/utils/index.d.ts +0 -1
  309. package/utils/maskito.binding.d.ts +1 -1
  310. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  311. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  312. package/components/elastic-container/index.d.ts +0 -2
  313. package/components/floating-container/floating-container.directive.d.ts +0 -7
  314. package/components/floating-container/index.d.ts +0 -1
  315. package/components/input-range/input-range.d.ts +0 -3
  316. package/components/slides/index.d.ts +0 -1
  317. package/components/slides/slides.directive.d.ts +0 -11
  318. package/directives/button-close/button-close.directive.d.ts +0 -6
  319. package/directives/button-close/index.d.ts +0 -1
  320. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -77
  321. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  322. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  323. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  324. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  325. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  326. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +0 -47
  327. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +0 -1
  328. package/tokens/calendar-date-stream.d.ts +0 -10
  329. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  330. package/tokens/input-date-options.d.ts +0 -15
  331. package/tokens/items-handlers.d.ts +0 -20
  332. package/tokens/mobile-calendar.d.ts +0 -6
  333. package/tokens/month-formatter.d.ts +0 -5
  334. package/utils/toggle-day.d.ts +0 -2
  335. /package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +0 -0
@@ -1,23 +1,23 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, contentChildren, forwardRef, ElementRef, input, model, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
2
+ import { contentChildren, forwardRef, ElementRef, inject, input, model, ChangeDetectionStrategy, Component, computed } from '@angular/core';
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 * 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';
7
11
  import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
8
- import { delay, EMPTY, filter } from 'rxjs';
9
- import { AsyncPipe } from '@angular/common';
12
+ import { TuiAvatar } from '@taiga-ui/kit/components/avatar';
13
+ import { EMPTY, filter } from 'rxjs';
10
14
  import { ResizeObserverService } from '@ng-web-apis/resize-observer';
11
15
  import { tuiMoveFocus } from '@taiga-ui/cdk/utils/focus';
12
16
 
13
17
  class TuiStepperComponent {
14
18
  constructor() {
15
- this.cdr = inject(ChangeDetectorRef);
16
19
  this.el = tuiInjectElement();
17
20
  this.steps = contentChildren(forwardRef(() => TuiStep), { read: ElementRef });
18
- // Delay is required to trigger change detection after steps are rendered,
19
- // so they can update their "active" status
20
- this.changes$ = toObservable(this.steps).pipe(delay(0));
21
21
  this.$ = inject(ResizeObserverService, { self: true })
22
22
  .pipe(takeUntilDestroyed())
23
23
  .subscribe(() => this.scrollIntoView(this.activeItemIndex()));
@@ -39,7 +39,6 @@ class TuiStepperComponent {
39
39
  return;
40
40
  }
41
41
  this.activeItemIndex.set(index);
42
- this.cdr.markForCheck();
43
42
  this.scrollIntoView(index);
44
43
  }
45
44
  onHorizontal(event, step) {
@@ -75,16 +74,14 @@ class TuiStepperComponent {
75
74
  const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;
76
75
  this.el.scrollTo?.({ left: Math.max(0, left), top: Math.max(0, top) });
77
76
  }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
79
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.16", 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: `
80
- @if (changes$ | async) {}
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: `
81
79
  <ng-content />
82
- `, 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-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 }); }
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 }); }
83
81
  }
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiStepperComponent, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, decorators: [{
85
83
  type: Component,
86
- args: [{ selector: 'tui-stepper, nav[tuiStepper]', imports: [AsyncPipe], template: `
87
- @if (changes$ | async) {}
84
+ args: [{ selector: 'tui-stepper, nav[tuiStepper]', template: `
88
85
  <ng-content />
89
86
  `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService], host: {
90
87
  '[attr.data-orientation]': 'orientation()',
@@ -92,22 +89,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImpo
92
89
  '(keydown.arrowLeft)': 'onHorizontal($event, -1)',
93
90
  '(keydown.arrowDown)': 'onVertical($event, 1)',
94
91
  '(keydown.arrowUp)': 'onVertical($event, -1)',
95
- }, 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"] }]
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"] }]
96
93
  }] });
97
94
 
98
95
  class TuiStep {
99
96
  constructor() {
100
97
  this.el = tuiInjectElement();
101
98
  this.icons = inject(TUI_COMMON_ICONS);
99
+ this.appearance = tuiAppearance(computed(() => (this.isActive() ? 'none' : 'action')));
100
+ this.size = tuiDirectiveBinding(TuiCell, 'size', 'm');
102
101
  this.stepper = inject(TuiStepperComponent);
103
102
  this.$ = (inject(RouterLinkActive, { optional: true })?.isActiveChange.asObservable() ?? EMPTY)
104
103
  .pipe(filter(Boolean), takeUntilDestroyed())
105
104
  .subscribe(() => this.activate());
106
105
  this.stepState = input('normal');
107
106
  this.icon = input('');
108
- }
109
- get isActive() {
110
- return this.stepper.isActive(this.index);
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));
111
119
  }
112
120
  get index() {
113
121
  return this.stepper.indexOf(this.el);
@@ -115,19 +123,18 @@ class TuiStep {
115
123
  activate() {
116
124
  this.stepper.activate(this.index);
117
125
  }
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
119
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.16", 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: { "attr.data-state": "stepState()", "class._vertical": "stepper.orientation() === \"vertical\"", "class._active": "isActive", "tabIndex": "isActive ? 0 : -1" } }, 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 }); }
120
128
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiStep, decorators: [{
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, decorators: [{
122
130
  type: Component,
123
- 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: {
124
132
  type: 'button',
125
- '[attr.data-state]': 'stepState()',
133
+ '[tabIndex]': 'isActive() ? 0 : -1',
134
+ '[class._active]': 'isActive()',
126
135
  '[class._vertical]': 'stepper.orientation() === "vertical"',
127
- '[class._active]': 'isActive',
128
- '[tabIndex]': 'isActive ? 0 : -1',
129
136
  '(click)': 'activate()',
130
- }, 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"] }]
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"] }]
131
138
  }] });
132
139
 
133
140
  const TuiStepper = [TuiStepperComponent, TuiStep];
@@ -1 +1 @@
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 {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n type OnChanges,\n} from '@angular/core';\nimport {takeUntilDestroyed, toObservable} 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';\nimport {delay} from 'rxjs';\n\nimport {TuiStep} from './step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n imports: [AsyncPipe],\n template: `\n @if (changes$ | async) {}\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 cdr = inject(ChangeDetectorRef);\n private readonly el = tuiInjectElement();\n private readonly steps = contentChildren(\n forwardRef(() => TuiStep),\n {read: ElementRef},\n );\n\n // Delay is required to trigger change detection after steps are rendered,\n // so they can update their \"active\" status\n protected readonly changes$ = toObservable(this.steps).pipe(delay(0));\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.cdr.markForCheck();\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, 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]': 'stepper.orientation() === \"vertical\"',\n '[class._active]': 'isActive',\n '[tabIndex]': 'isActive ? 0 : -1',\n '(click)': 'activate()',\n },\n})\nexport class TuiStep {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\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 get isActive(): boolean {\n return this.stepper.isActive(this.index);\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":";;;;;;;;;;;;MAwCa,mBAAmB,CAAA;AAlBhC,IAAA,WAAA,GAAA;AAmBqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAC/B,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;;;AAIkB,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClD,IAAC,CAAA,CAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC;aAC5D,IAAI,CAAC,kBAAkB,EAAE;AACzB,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AA;kBAhBnB,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,aAAa;AAClC,wBAAA,mBAAmB,EAAE,sCAAsC;AAC3D,wBAAA,iBAAiB,EAAE,UAAU;AAC7B,wBAAA,YAAY,EAAE,mBAAmB;AACjC,wBAAA,SAAS,EAAE,YAAY;AAC1B,qBAAA,EAAA,QAAA,EAAA,qVAAA,EAAA,MAAA,EAAA,CAAA,wuEAAA,CAAA,EAAA;;;MErBQ,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,KAAK,CAAC,CAAC,CAAC;AAyE7C;IAvEU,WAAW,GAAA;QACd,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;;AAGxC,IAAA,OA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AAA,YAAA,EAAA,iBAAA,EAAA,wCAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,OAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC7BpB,+GAKA,EAAA,MAAA,EAAA,CAAA,gZAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDWc,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAaV,OAAO,EAAA,UAAA,EAAA,CAAA;kBAhBnB,SAAS;AAEF,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yFAAyF,EACpF,OAAA,EAAA,CAAC,SAAS,CAAC,mBAGH,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,OAAO,EAAE,iBAAiB,CAAC,EACtC,IAAA,EAAA;AACF,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,YAAY,EAAE,qBAAqB;AACnC,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,mBAAmB,EAAE,sCAAsC;AAC3D,wBAAA,SAAS,EAAE,YAAY;AAC1B,qBAAA,EAAA,QAAA,EAAA,+GAAA,EAAA,MAAA,EAAA,CAAA,gZAAA,CAAA,EAAA;;;MExBQ,UAAU,GAAG,CAAC,mBAAmB,EAAE,OAAO;;ACHvD;;AAEG;;;;"}
@@ -19,16 +19,16 @@ class TuiSwitch extends TuiRadioComponent {
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.16", ngImport: i0, type: TuiSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
23
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.16", 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;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.16", 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
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
28
  switch: '',
29
29
  role: 'switch',
30
30
  '[class._native]': 'native',
31
- }, 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"] }]
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"] }]
32
32
  }] });
33
33
 
34
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/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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CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAJpD,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,s2CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAYH,SAAS,EAAA,UAAA,EAAA,CAAA;kBAdrB,SAAS;+BACI,mCAAmC,EAAA,QAAA,EACnC,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,UAAU,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,EAC9C,cAAA,EAAA,CAAC,QAAQ,CAAC,EACpB,IAAA,EAAA;AACF,wBAAA,MAAM,EAAE,EAAE;AACV,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,iBAAiB,EAAE,QAAQ;AAC9B,qBAAA,EAAA,MAAA,EAAA,CAAA,s2CAAA,CAAA,EAAA;;;ACzBL;;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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