@taiga-ui/kit 4.52.0-canary.932d3ef → 4.52.0-canary.974ca4b

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 (358) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/accordion.component.d.ts +13 -0
  3. package/components/accordion/accordion.d.ts +4 -4
  4. package/components/accordion/accordion.directive.d.ts +11 -10
  5. package/components/accordion/index.d.ts +1 -3
  6. package/components/action-bar/action-bar.component.d.ts +5 -7
  7. package/components/action-bar/index.d.ts +0 -2
  8. package/components/avatar/avatar-outline.directive.d.ts +3 -3
  9. package/components/avatar/avatar.directive.d.ts +4 -3
  10. package/components/badge/badge.directive.d.ts +2 -2
  11. package/components/badge/badge.options.d.ts +1 -3
  12. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  13. package/components/block/block.directive.d.ts +4 -4
  14. package/components/block/block.options.d.ts +2 -4
  15. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  16. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  17. package/components/calendar-range/calendar-range.component.d.ts +1 -2
  18. package/components/checkbox/checkbox.component.d.ts +7 -18
  19. package/components/checkbox/checkbox.options.d.ts +5 -9
  20. package/components/chip/chip.directive.d.ts +2 -4
  21. package/components/chip/chip.options.d.ts +1 -3
  22. package/components/comment/comment.directive.d.ts +2 -2
  23. package/components/confirm/confirm.component.d.ts +3 -2
  24. package/components/confirm/confirm.service.d.ts +2 -1
  25. package/{directives → components}/copy/copy.component.d.ts +1 -1
  26. package/{directives → components}/copy/copy.directive.d.ts +2 -2
  27. package/{directives → components}/copy/copy.options.d.ts +1 -1
  28. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -0
  29. package/components/files/file/file.options.d.ts +1 -1
  30. package/components/files/files/files.component.d.ts +2 -2
  31. package/components/files/input-files/input-files.options.d.ts +1 -3
  32. package/components/floating-container/floating-container.directive.d.ts +2 -2
  33. package/components/fullscreen/fullscreen.component.d.ts +14 -0
  34. package/components/fullscreen/index.d.ts +1 -0
  35. package/components/index.d.ts +3 -2
  36. package/components/input-color/input-color.component.d.ts +2 -2
  37. package/components/input-number/input-number.directive.d.ts +5 -9
  38. package/components/input-number/quantum.directive.d.ts +1 -1
  39. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  40. package/components/input-phone-international/input-phone-international.component.d.ts +24 -30
  41. package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
  42. package/components/input-pin/input-pin.component.d.ts +1 -1
  43. package/components/input-range/input-range.component.d.ts +9 -12
  44. package/components/input-slider/input-slider.directive.d.ts +2 -4
  45. package/components/input-time/input-time.directive.d.ts +6 -8
  46. package/components/like/like.component.d.ts +4 -11
  47. package/components/like/like.options.d.ts +2 -3
  48. package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
  49. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  50. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  51. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +3 -3
  52. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  53. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  54. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  55. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  56. package/components/pager/pager.component.d.ts +1 -1
  57. package/components/pagination/index.d.ts +1 -0
  58. package/components/pagination/pagination.component.d.ts +3 -2
  59. package/components/pagination/pagination.options.d.ts +10 -0
  60. package/components/pin/pin.directive.d.ts +2 -2
  61. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  62. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  63. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  64. package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
  65. package/components/preview/preview.component.d.ts +1 -1
  66. package/components/preview/preview.d.ts +2 -1
  67. package/components/preview/zoom/preview-zoom.component.d.ts +1 -1
  68. package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
  69. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  70. package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
  71. package/components/progress/progress.options.d.ts +1 -3
  72. package/components/push/push-alert.component.d.ts +4 -3
  73. package/components/push/push.component.d.ts +2 -2
  74. package/components/push/push.directive.d.ts +4 -6
  75. package/components/push/push.options.d.ts +4 -8
  76. package/components/push/push.service.d.ts +6 -2
  77. package/components/radio/radio.component.d.ts +7 -8
  78. package/components/radio/radio.directive.d.ts +2 -2
  79. package/components/radio/radio.options.d.ts +2 -5
  80. package/components/range/range-change.directive.d.ts +1 -2
  81. package/components/range/range.component.d.ts +16 -24
  82. package/components/rating/rating.component.d.ts +5 -5
  83. package/components/rating/rating.options.d.ts +6 -6
  84. package/components/select/native-select/native-select.component.d.ts +4 -5
  85. package/components/slider/helpers/key-steps.d.ts +1 -2
  86. package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
  87. package/components/slider/slider.options.d.ts +1 -6
  88. package/components/slides/slides.directive.d.ts +4 -4
  89. package/components/status/status.directive.d.ts +2 -2
  90. package/components/switch/switch.component.d.ts +7 -19
  91. package/components/switch/switch.options.d.ts +4 -8
  92. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  93. package/components/tabs/tabs.options.d.ts +1 -6
  94. package/components/textarea/textarea-limit.directive.d.ts +4 -5
  95. package/components/toast/index.d.ts +5 -0
  96. package/components/toast/toast.component.d.ts +18 -0
  97. package/components/toast/toast.d.ts +3 -0
  98. package/components/toast/toast.directive.d.ts +7 -0
  99. package/components/toast/toast.options.d.ts +9 -0
  100. package/components/toast/toast.service.d.ts +17 -0
  101. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  102. package/components/tree/misc/tree.constants.d.ts +0 -3
  103. package/components/tree/misc/tree.tokens.d.ts +1 -6
  104. package/directives/button-close/button-close.directive.d.ts +2 -1
  105. package/directives/button-select/button-select.directive.d.ts +3 -3
  106. package/directives/chevron/chevron.directive.d.ts +2 -3
  107. package/directives/fade/fade.directive.d.ts +1 -0
  108. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  109. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  110. package/directives/index.d.ts +0 -1
  111. package/directives/sensitive/sensitive.directive.d.ts +2 -2
  112. package/directives/shimmer/shimmer.directive.d.ts +3 -3
  113. package/directives/skeleton/skeleton.directive.d.ts +3 -3
  114. package/directives/tooltip/tooltip.directive.d.ts +2 -2
  115. package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
  116. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  117. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +22 -38
  118. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  119. package/fesm2022/taiga-ui-kit-components-avatar.mjs +31 -43
  120. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +4 -9
  122. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-kit-components-badge.mjs +14 -25
  124. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +0 -1
  126. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-block.mjs +18 -29
  128. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +6 -12
  130. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +3 -3
  132. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +3 -6
  134. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +4 -5
  136. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-carousel.mjs +3 -9
  138. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +18 -75
  140. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-chip.mjs +16 -32
  142. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +5 -6
  144. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-comment.mjs +11 -18
  146. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  147. package/fesm2022/taiga-ui-kit-components-compass.mjs +3 -3
  148. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-components-confirm.mjs +8 -10
  150. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  151. package/fesm2022/{taiga-ui-kit-directives-copy.mjs → taiga-ui-kit-components-copy.mjs} +11 -13
  152. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
  153. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +14 -6
  154. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  155. package/fesm2022/taiga-ui-kit-components-drawer.mjs +2 -2
  156. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -1
  158. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-components-files.mjs +19 -26
  160. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-components-filter.mjs +1 -1
  162. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +11 -17
  164. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +63 -0
  166. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
  167. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +10 -7
  168. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-input-color.mjs +4 -6
  170. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +5 -10
  172. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  173. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +0 -1
  174. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  175. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +3 -5
  176. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  177. package/fesm2022/taiga-ui-kit-components-input-date.mjs +11 -19
  178. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  179. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +2 -3
  180. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +5 -7
  182. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-components-input-month.mjs +5 -7
  184. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-components-input-number.mjs +29 -52
  186. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  187. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +106 -133
  188. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  189. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +3 -5
  190. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  191. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +2 -2
  192. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  193. package/fesm2022/taiga-ui-kit-components-input-range.mjs +31 -27
  194. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  195. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +25 -39
  196. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-components-input-time.mjs +31 -37
  198. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-components-input-year.mjs +4 -6
  200. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  201. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +2 -4
  202. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  203. package/fesm2022/taiga-ui-kit-components-like.mjs +38 -31
  204. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  205. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +28 -72
  206. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-components-message.mjs +6 -9
  208. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +18 -19
  210. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  211. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +32 -28
  212. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  213. package/fesm2022/taiga-ui-kit-components-pager.mjs +3 -3
  214. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  215. package/fesm2022/taiga-ui-kit-components-pagination.mjs +22 -12
  216. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-components-pin.mjs +13 -17
  218. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-components-preview.mjs +37 -29
  220. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-components-progress.mjs +61 -66
  222. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-pulse.mjs +1 -1
  224. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-push.mjs +40 -47
  226. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +2 -2
  228. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-radio.mjs +31 -37
  230. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-range.mjs +36 -80
  232. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-rating.mjs +17 -26
  234. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +7 -3
  236. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-segmented.mjs +3 -4
  238. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-select.mjs +35 -40
  240. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-slider.mjs +61 -69
  242. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-slides.mjs +12 -20
  244. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-status.mjs +10 -14
  246. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-switch.mjs +18 -64
  249. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-tabs.mjs +18 -31
  251. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-textarea.mjs +7 -16
  253. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-tiles.mjs +2 -3
  255. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-toast.mjs +165 -0
  257. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
  258. package/fesm2022/taiga-ui-kit-components-tree.mjs +37 -42
  259. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components.mjs +3 -2
  261. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +13 -5
  263. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +6 -9
  265. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +14 -13
  267. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +11 -18
  269. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -13
  271. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +0 -1
  273. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-directives-fade.mjs +6 -9
  275. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +12 -25
  277. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +0 -1
  279. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -1
  281. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-directives-password.mjs +5 -9
  283. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-directives-present.mjs +0 -1
  285. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +11 -16
  287. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  288. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +22 -32
  289. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +25 -36
  291. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  292. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +13 -18
  293. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  294. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +2 -4
  295. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  296. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +0 -1
  297. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  298. package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
  299. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  300. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +0 -1
  301. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +0 -1
  303. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +0 -1
  305. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +2 -2
  307. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  308. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +0 -1
  309. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +0 -1
  311. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  312. package/fesm2022/taiga-ui-kit-pipes.mjs +0 -1
  313. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  314. package/fesm2022/taiga-ui-kit-tokens.mjs +6 -24
  315. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  316. package/package.json +41 -45
  317. package/pipes/index.d.ts +0 -1
  318. package/styles/components/avatar.less +188 -0
  319. package/styles/components/badge.less +1 -0
  320. package/styles/components/checkbox.less +14 -12
  321. package/styles/components/chip.less +12 -1
  322. package/styles/components/like.less +4 -9
  323. package/styles/components/pin.less +3 -7
  324. package/styles/components/radio.less +1 -1
  325. package/styles/components/switch.less +9 -9
  326. package/styles/components/toast.less +44 -0
  327. package/tokens/i18n.d.ts +25 -26
  328. package/tokens/index.d.ts +0 -1
  329. package/tokens/items-handlers.d.ts +1 -7
  330. package/tokens/preview-icons.d.ts +1 -3
  331. package/components/accordion/accordion-item-content.directive.d.ts +0 -6
  332. package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
  333. package/components/accordion/accordion-item.component.d.ts +0 -25
  334. package/components/action-bar/action-bar.d.ts +0 -3
  335. package/components/action-bar/action-bar.directive.d.ts +0 -6
  336. package/components/input-password/index.d.ts +0 -2
  337. package/components/input-password/input-password.component.d.ts +0 -16
  338. package/components/input-password/input-password.options.d.ts +0 -24
  339. package/components/pdf-viewer/index.d.ts +0 -4
  340. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  341. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  342. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  343. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  344. package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
  345. package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
  346. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  347. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  348. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  349. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  350. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +0 -1
  351. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +0 -147
  352. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +0 -1
  353. package/pipes/field-error/field-error-content-pipe.d.ts +0 -14
  354. package/pipes/field-error/field-error-pipe.d.ts +0 -29
  355. package/pipes/field-error/index.d.ts +0 -2
  356. package/tokens/validation-errors.d.ts +0 -5
  357. /package/{directives → components}/copy/copy.d.ts +0 -0
  358. /package/{directives → components}/copy/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-push.mjs","sources":["../../../projects/kit/components/push/push.component.ts","../../../projects/kit/components/push/push.template.html","../../../projects/kit/components/push/push.options.ts","../../../projects/kit/components/push/push-alert.component.ts","../../../projects/kit/components/push/push-alert.template.html","../../../projects/kit/components/push/push.service.ts","../../../projects/kit/components/push/push.directive.ts","../../../projects/kit/components/push/push.ts","../../../projects/kit/components/push/taiga-ui-kit-components-push.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiFormatDatePipe} from '@taiga-ui/core/pipes/format-date';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\n\n@Component({\n selector: 'tui-push',\n imports: [AsyncPipe, TuiButton, TuiFormatDatePipe],\n templateUrl: './push.template.html',\n styleUrls: ['./push.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiButtonOptionsProvider({size: 's', appearance: 'secondary'})],\n host: {\n '[style.--t-lines]': 'lines',\n },\n})\nexport class TuiPushComponent {\n protected readonly isString = tuiIsString;\n protected readonly closeWord$ = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n\n @Input()\n public heading = '';\n\n @Input()\n public type = '';\n\n @Input()\n public lines = 2;\n\n @Input()\n public timestamp: number | string = '';\n\n @Output()\n public readonly close = new EventEmitter<void>();\n}\n","<div class=\"t-image\">\n <ng-content select=\"img\" />\n</div>\n@if (close.observed) {\n <button\n appearance=\"\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close.emit()\"\n >\n {{ closeWord$ | async }}\n </button>\n}\n<div class=\"t-top\">\n <span class=\"t-icon\">\n <ng-content select=\"tui-svg,tui-icon\" />\n </span>\n {{ type }}\n @if (timestamp) {\n <span\n class=\"t-time\"\n [textContent]=\"isString(timestamp) ? timestamp : (timestamp | tuiFormatDate | async)\"\n ></span>\n }\n</div>\n<h3\n automation-id=\"tui-push__heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h3>\n<div class=\"t-content\">\n <ng-content />\n</div>\n<div class=\"t-actions\">\n <span class=\"t-button\">\n <ng-content select=\"[tuiButton]\" />\n </span>\n <span class=\"t-link\">\n <ng-content select=\"[tuiLink]\" />\n </span>\n</div>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport interface TuiPushOptions {\n readonly buttons: readonly string[];\n readonly heading: string;\n readonly icon: string;\n readonly iconColor: string;\n readonly image: string;\n readonly timestamp: number | string;\n readonly type: string;\n}\n\nexport const TUI_PUSH_DEFAULT_OPTIONS: TuiPushOptions = {\n heading: '',\n type: '',\n timestamp: '',\n image: '',\n icon: '',\n iconColor: '',\n buttons: [],\n};\n\n/**\n * Default parameters for Push component\n */\nexport const TUI_PUSH_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_PUSH_OPTIONS' : '', {\n factory: () => TUI_PUSH_DEFAULT_OPTIONS,\n});\n\nexport function tuiPushOptionsProvider(options: Partial<TuiPushOptions>): Provider {\n return tuiProvideOptions(TUI_PUSH_OPTIONS, options, TUI_PUSH_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiLink} from '@taiga-ui/core/components/link';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiPushComponent} from './push.component';\nimport {TuiPushDirective} from './push.directive';\nimport {type TuiPushOptions} from './push.options';\n\n@Component({\n imports: [PolymorpheusOutlet, TuiButton, TuiIcon, TuiLink, TuiPushComponent],\n templateUrl: './push-alert.template.html',\n styleUrls: ['./push-alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated],\n host: {\n role: 'alert',\n },\n})\nexport class TuiPushAlert {\n protected readonly context = injectContext<TuiPopover<TuiPushOptions, string>>();\n\n protected get isDirective(): boolean {\n return this.context.content instanceof TuiPushDirective;\n }\n}\n","<div class=\"t-wrapper\">\n @if (!isDirective) {\n <tui-push\n [heading]=\"context.heading\"\n [timestamp]=\"context.timestamp\"\n [type]=\"context.type\"\n (close)=\"context.$implicit.complete()\"\n >\n @if (context.image) {\n <img\n alt=\"\"\n [src]=\"context.image\"\n />\n }\n @if (context.icon) {\n <tui-icon\n [icon]=\"context.icon\"\n [style.color]=\"context.iconColor\"\n />\n }\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n @if (context.buttons.length > 1) {\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.next(context.buttons[0] || '')\"\n >\n {{ context.buttons[0] }}\n </button>\n }\n @if (context.buttons.length) {\n <button\n tuiLink\n type=\"button\"\n (click)=\"context.$implicit.next(context.buttons[context.buttons.length - 1] || '')\"\n >\n {{ context.buttons[context.buttons.length - 1] }}\n </button>\n }\n </tui-push>\n } @else {\n <ng-container *polymorpheusOutlet=\"context.content\" />\n }\n</div>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_ALERTS} from '@taiga-ui/core/components/alert';\n\nimport {TUI_PUSH_OPTIONS, type TuiPushOptions} from './push.options';\nimport {TuiPushAlert} from './push-alert.component';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiPushService(TUI_ALERTS, TuiPushAlert, inject(TUI_PUSH_OPTIONS)),\n})\nexport class TuiPushService extends TuiPopoverService<TuiPushOptions, string> {}\n","import {\n ChangeDetectorRef,\n Directive,\n forwardRef,\n inject,\n Input,\n TemplateRef,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\nimport {Subject} from 'rxjs';\n\nimport {TuiPushService} from './push.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiPush]',\n})\nexport class TuiPushDirective extends PolymorpheusTemplate {\n private readonly push: TuiPushService = inject(forwardRef(() => TuiPushService));\n private readonly show$ = new Subject<boolean>();\n\n constructor() {\n super(inject(TemplateRef), inject(ChangeDetectorRef));\n\n this.show$\n .pipe(\n tuiIfMap(() => this.push.open(this)),\n takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n @Input()\n public set tuiPush(show: boolean) {\n this.show$.next(show);\n }\n}\n","import {TuiPushComponent} from './push.component';\nimport {TuiPushDirective} from './push.directive';\nimport {TuiPushAlert} from './push-alert.component';\n\nexport const TuiPush = [TuiPushComponent, TuiPushAlert, TuiPushDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAyBa,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;QAYuB,IAAQ,CAAA,QAAA,GAAG,WAAW;AACtB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC;AACnC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAG5C,IAAO,CAAA,OAAA,GAAG,EAAE;QAGZ,IAAI,CAAA,IAAA,GAAG,EAAE;QAGT,IAAK,CAAA,KAAA,GAAG,CAAC;QAGT,IAAS,CAAA,SAAA,GAAoB,EAAE;AAGtB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,EAAQ;AACnD;+GAnBY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,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AAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AACnC,iBAAA;wDAiBc,OAAO,EAAA,CAAA;sBADjB;;;AC9BQ,MAAA,OAAO,GAAG,CAAC,gBAAgB,EAAE,YAAY,EAAE,gBAAgB;;ACJxE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-push.mjs","sources":["../../../projects/kit/components/push/push.component.ts","../../../projects/kit/components/push/push.template.html","../../../projects/kit/components/push/push.options.ts","../../../projects/kit/components/push/push-alert.component.ts","../../../projects/kit/components/push/push-alert.template.html","../../../projects/kit/components/push/push.service.ts","../../../projects/kit/components/push/push.directive.ts","../../../projects/kit/components/push/push.ts","../../../projects/kit/components/push/taiga-ui-kit-components-push.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiFormatDatePipe} from '@taiga-ui/core/pipes/format-date';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\n\n@Component({\n selector: 'tui-push',\n imports: [AsyncPipe, TuiButton, TuiFormatDatePipe],\n templateUrl: './push.template.html',\n styleUrl: './push.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiButtonOptionsProvider({size: 's', appearance: 'secondary'})],\n host: {\n '[style.--t-lines]': 'lines',\n },\n})\nexport class TuiPushComponent {\n protected readonly isString = tuiIsString;\n protected readonly closeWord = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n\n @Input()\n public heading = '';\n\n @Input()\n public type = '';\n\n @Input()\n public lines = 2;\n\n @Input()\n public timestamp: number | string = '';\n\n @Output()\n public readonly close = new EventEmitter<void>();\n}\n","<div class=\"t-image\">\n <ng-content select=\"img\" />\n</div>\n@if (close.observed) {\n <button\n appearance=\"\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close.emit()\"\n >\n {{ closeWord() }}\n </button>\n}\n<div class=\"t-top\">\n <span class=\"t-icon\">\n <ng-content select=\"tui-icon\" />\n </span>\n {{ type }}\n @if (timestamp) {\n <span\n class=\"t-time\"\n [textContent]=\"isString(timestamp) ? timestamp : (timestamp | tuiFormatDate | async)\"\n ></span>\n }\n</div>\n<h3\n automation-id=\"tui-push__heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h3>\n<div class=\"t-content\">\n <ng-content />\n</div>\n<div class=\"t-actions\">\n <span class=\"t-button\">\n <ng-content select=\"[tuiButton]\" />\n </span>\n <span class=\"t-link\">\n <ng-content select=\"[tuiLink]\" />\n </span>\n</div>\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiCreateToken} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiPositionOptions} from '@taiga-ui/core/directives/notification';\n\nexport interface TuiPushOptions extends TuiPositionOptions {\n readonly buttons: readonly string[];\n readonly heading: string;\n readonly icon: string;\n readonly iconColor: string;\n readonly image: string;\n readonly timestamp: number | string;\n readonly type: string;\n}\n\nexport const TUI_PUSH_CONCURRENCY = tuiCreateToken<number>(5);\nexport const [TUI_PUSH_OPTIONS, tuiPushOptionsProvider] =\n tuiCreateOptions<TuiPushOptions>({\n heading: '',\n type: '',\n timestamp: '',\n image: '',\n icon: '',\n iconColor: '',\n buttons: [],\n block: 'end',\n inline: 'end',\n });\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPortalContext, TuiPortalDirective} from '@taiga-ui/cdk/portals';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiLink} from '@taiga-ui/core/components/link';\nimport {TuiNotificationDirective} from '@taiga-ui/core/directives/notification';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiPushComponent} from './push.component';\nimport {type TuiPushOptions} from './push.options';\n\n@Component({\n selector: 'tui-push-alert',\n imports: [PolymorpheusOutlet, TuiButton, TuiIcon, TuiLink, TuiPushComponent],\n templateUrl: './push-alert.template.html',\n styleUrl: './push-alert.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiNotificationDirective],\n})\nexport class TuiPushAlert {\n protected readonly context =\n injectContext<TuiPortalContext<TuiPushOptions, string>>();\n\n protected get isDirective(): boolean {\n return this.context.content instanceof TuiPortalDirective;\n }\n}\n","<div class=\"t-wrapper\">\n @if (!isDirective) {\n <tui-push\n [heading]=\"context.heading\"\n [timestamp]=\"context.timestamp\"\n [type]=\"context.type\"\n (close)=\"context.$implicit.complete()\"\n >\n @if (context.image) {\n <img\n alt=\"\"\n [src]=\"context.image\"\n />\n }\n @if (context.icon) {\n <tui-icon\n [icon]=\"context.icon\"\n [style.color]=\"context.iconColor\"\n />\n }\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n @if (context.buttons.length > 1) {\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.next(context.buttons[0] || '')\"\n >\n {{ context.buttons[0] }}\n </button>\n }\n @if (context.buttons.length) {\n <button\n tuiLink\n type=\"button\"\n (click)=\"context.$implicit.next(context.buttons[context.buttons.length - 1] || '')\"\n >\n {{ context.buttons[context.buttons.length - 1] }}\n </button>\n }\n </tui-push>\n } @else {\n <ng-container *polymorpheusOutlet=\"context.content\" />\n }\n</div>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiNotificationService} from '@taiga-ui/core/directives/notification';\n\nimport {\n TUI_PUSH_CONCURRENCY,\n TUI_PUSH_OPTIONS,\n type TuiPushOptions,\n} from './push.options';\nimport {TuiPushAlert} from './push-alert.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiPushService extends TuiNotificationService<TuiPushOptions, string> {\n protected override readonly options = inject(TUI_PUSH_OPTIONS);\n protected override readonly component = TuiPushAlert;\n\n constructor() {\n super(inject(TUI_PUSH_CONCURRENCY));\n }\n}\n","import {DestroyRef, Directive, inject} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {TuiPushService} from './push.service';\n\n@Directive({\n selector: 'ng-template[tuiPush]',\n providers: [tuiAsPortal(TuiPushService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['open: tuiPush'],\n },\n ],\n})\nexport class TuiPushDirective {\n private readonly sub = inject(TuiPortalDirective).openChange.subscribe(() => {});\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.sub.unsubscribe());\n }\n}\n","import {TuiPushComponent} from './push.component';\nimport {TuiPushDirective} from './push.directive';\nimport {TuiPushAlert} from './push-alert.component';\n\nexport const TuiPush = [TuiPushComponent, TuiPushAlert, TuiPushDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;MAyBa,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;QAYuB,IAAQ,CAAA,QAAA,GAAG,WAAW;AACtB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AAClC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;Q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EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAQ/B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AACxC,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,kBAAkB;4BAC7B,MAAM,EAAE,CAAC,eAAe,CAAC;AAC5B,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACVY,MAAA,OAAO,GAAG,CAAC,gBAAgB,EAAE,YAAY,EAAE,gBAAgB;;ACJxE;;AAEG;;;;"}
@@ -38,14 +38,14 @@ class TuiRadioList extends TuiControl {
38
38
  : this.identityMatcher(this.value(), item);
39
39
  }
40
40
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRadioList, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
41
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRadioList, isStandalone: true, selector: "tui-radio-list", inputs: { items: "items", size: "size", identityMatcher: "identityMatcher", disabledItemHandler: "disabledItemHandler", itemContent: "itemContent" }, host: { listeners: { "focusout": "onFocusOut()" }, properties: { "attr.data-size": "size" } }, providers: [tuiAsControl(TuiRadioList)], viewQueries: [{ propertyName: "controls", predicate: NgControl, descendants: true }], usesInheritance: true, ngImport: i0, template: "@for (item of items; track item; let index = $index) {\n <label\n class=\"t-item\"\n [class.t-item_disabled]=\"disabled() || disabledItemHandler(item)\"\n >\n <input\n tuiRadio\n type=\"radio\"\n [disabled]=\"disabled() || disabledItemHandler(item)\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"name\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tuiValidator]=\"validator()\"\n [value]=\"item\"\n (ngModelChange)=\"onChange($event)\"\n />\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: {$implicit: item, active: itemIsActive(item)}\">\n {{ text }}\n </ng-container>\n </label>\n}\n", styles: ["tui-radio-list{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem 1.5rem;font:var(--tui-font-text-m)}tui-radio-list[data-size=s],tui-radio-list[data-size=s] [tuiTitle]{font:var(--tui-font-text-ui-s)}tui-radio-list[data-size=s] [tuiSubtitle],tui-radio-list[data-size=s] [tuiTitle] [tuiSubtitle]{font:var(--tui-font-text-xs)}tui-radio-list[data-size=s]>.t-item,tui-radio-list[data-size=s] [tuiTitle]>.t-item{gap:.5rem}tui-radio-list [tuiTitle]{font:var(--tui-font-text-m)}tui-radio-list [tuiSubtitle]{color:var(--tui-text-tertiary)}tui-radio-list>.t-item{display:flex;gap:.75rem}tui-radio-list>.t-item_disabled{opacity:var(--tui-disabled-opacity)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i2.TuiRadioComponent, selector: "input[type=\"radio\"][tuiRadio]", inputs: ["size"] }, { kind: "directive", type: i2.TuiRadioDirective, selector: "input[type=\"radio\"][tuiRadio][identityMatcher]", inputs: ["identityMatcher"] }, { kind: "directive", type: TuiValidator, selector: "[tuiValidator]", inputs: ["tuiValidator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRadioList, isStandalone: true, selector: "tui-radio-list", inputs: { items: "items", size: "size", identityMatcher: "identityMatcher", disabledItemHandler: "disabledItemHandler", itemContent: "itemContent" }, host: { listeners: { "focusout": "onFocusOut()" }, properties: { "attr.data-size": "size" } }, providers: [tuiAsControl(TuiRadioList)], viewQueries: [{ propertyName: "controls", predicate: NgControl, descendants: true }], usesInheritance: true, ngImport: i0, template: "@for (item of items; track item) {\n <label\n class=\"t-item\"\n [class.t-item_disabled]=\"disabled() || disabledItemHandler(item)\"\n >\n <input\n tuiRadio\n type=\"radio\"\n [disabled]=\"disabled() || disabledItemHandler(item)\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"name\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tuiValidator]=\"validator()\"\n [value]=\"item\"\n (ngModelChange)=\"onChange($event)\"\n />\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: {$implicit: item, active: itemIsActive(item)}\">\n {{ text }}\n </ng-container>\n </label>\n}\n", styles: ["tui-radio-list{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem 1.5rem;font:var(--tui-font-text-m)}tui-radio-list[data-size=s],tui-radio-list[data-size=s] [tuiTitle]{font:var(--tui-font-text-ui-s)}tui-radio-list[data-size=s] [tuiSubtitle],tui-radio-list[data-size=s] [tuiTitle] [tuiSubtitle]{font:var(--tui-font-text-xs)}tui-radio-list[data-size=s]>.t-item,tui-radio-list[data-size=s] [tuiTitle]>.t-item{gap:.5rem}tui-radio-list [tuiTitle]{font:var(--tui-font-text-m)}tui-radio-list [tuiSubtitle]{color:var(--tui-text-tertiary)}tui-radio-list>.t-item{display:flex;gap:.75rem}tui-radio-list>.t-item_disabled{opacity:var(--tui-disabled-opacity)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i2.TuiRadioComponent, selector: "input[type=\"radio\"][tuiRadio]", inputs: ["size"] }, { kind: "directive", type: i2.TuiRadioDirective, selector: "input[type=\"radio\"][tuiRadio][identityMatcher]", inputs: ["identityMatcher"] }, { kind: "directive", type: TuiValidator, selector: "[tuiValidator]", inputs: ["tuiValidator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
42
42
  }
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRadioList, decorators: [{
44
44
  type: Component,
45
45
  args: [{ selector: 'tui-radio-list', imports: [FormsModule, PolymorpheusOutlet, TuiRadio, TuiValidator], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsControl(TuiRadioList)], host: {
46
46
  '[attr.data-size]': 'size',
47
47
  '(focusout)': 'onFocusOut()',
48
- }, template: "@for (item of items; track item; let index = $index) {\n <label\n class=\"t-item\"\n [class.t-item_disabled]=\"disabled() || disabledItemHandler(item)\"\n >\n <input\n tuiRadio\n type=\"radio\"\n [disabled]=\"disabled() || disabledItemHandler(item)\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"name\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tuiValidator]=\"validator()\"\n [value]=\"item\"\n (ngModelChange)=\"onChange($event)\"\n />\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: {$implicit: item, active: itemIsActive(item)}\">\n {{ text }}\n </ng-container>\n </label>\n}\n", styles: ["tui-radio-list{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem 1.5rem;font:var(--tui-font-text-m)}tui-radio-list[data-size=s],tui-radio-list[data-size=s] [tuiTitle]{font:var(--tui-font-text-ui-s)}tui-radio-list[data-size=s] [tuiSubtitle],tui-radio-list[data-size=s] [tuiTitle] [tuiSubtitle]{font:var(--tui-font-text-xs)}tui-radio-list[data-size=s]>.t-item,tui-radio-list[data-size=s] [tuiTitle]>.t-item{gap:.5rem}tui-radio-list [tuiTitle]{font:var(--tui-font-text-m)}tui-radio-list [tuiSubtitle]{color:var(--tui-text-tertiary)}tui-radio-list>.t-item{display:flex;gap:.75rem}tui-radio-list>.t-item_disabled{opacity:var(--tui-disabled-opacity)}\n"] }]
48
+ }, template: "@for (item of items; track item) {\n <label\n class=\"t-item\"\n [class.t-item_disabled]=\"disabled() || disabledItemHandler(item)\"\n >\n <input\n tuiRadio\n type=\"radio\"\n [disabled]=\"disabled() || disabledItemHandler(item)\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"name\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tuiValidator]=\"validator()\"\n [value]=\"item\"\n (ngModelChange)=\"onChange($event)\"\n />\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: {$implicit: item, active: itemIsActive(item)}\">\n {{ text }}\n </ng-container>\n </label>\n}\n", styles: ["tui-radio-list{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem 1.5rem;font:var(--tui-font-text-m)}tui-radio-list[data-size=s],tui-radio-list[data-size=s] [tuiTitle]{font:var(--tui-font-text-ui-s)}tui-radio-list[data-size=s] [tuiSubtitle],tui-radio-list[data-size=s] [tuiTitle] [tuiSubtitle]{font:var(--tui-font-text-xs)}tui-radio-list[data-size=s]>.t-item,tui-radio-list[data-size=s] [tuiTitle]>.t-item{gap:.5rem}tui-radio-list [tuiTitle]{font:var(--tui-font-text-m)}tui-radio-list [tuiSubtitle]{color:var(--tui-text-tertiary)}tui-radio-list>.t-item{display:flex;gap:.75rem}tui-radio-list>.t-item_disabled{opacity:var(--tui-disabled-opacity)}\n"] }]
49
49
  }], propDecorators: { controls: [{
50
50
  type: ViewChildren,
51
51
  args: [NgControl]
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-radio-list.mjs","sources":["../../../projects/kit/components/radio-list/radio-list.component.ts","../../../projects/kit/components/radio-list/radio-list.template.html","../../../projects/kit/components/radio-list/taiga-ui-kit-components-radio-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Input,\n type QueryList,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport {FormsModule, NgControl, type ValidatorFn, Validators} from '@angular/forms';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {\n EMPTY_QUERY,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_FALSE_HANDLER,\n} from '@taiga-ui/cdk/constants';\nimport {TuiValidator} from '@taiga-ui/cdk/directives/validator';\nimport {TuiIdService} from '@taiga-ui/cdk/services';\nimport {type TuiBooleanHandler, type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\nimport {type TuiSizeS, type TuiValueContentContext} from '@taiga-ui/core/types';\nimport {TuiRadio} from '@taiga-ui/kit/components/radio';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst ERROR: ValidatorFn = () => ({error: 'Invalid'});\n\n@Component({\n selector: 'tui-radio-list',\n imports: [FormsModule, PolymorpheusOutlet, TuiRadio, TuiValidator],\n templateUrl: './radio-list.template.html',\n styleUrls: ['./radio-list.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsControl(TuiRadioList)],\n host: {\n '[attr.data-size]': 'size',\n '(focusout)': 'onFocusOut()',\n },\n})\nexport class TuiRadioList<T> extends TuiControl<T> {\n @ViewChildren(NgControl)\n private readonly controls: QueryList<NgControl> = EMPTY_QUERY;\n\n private readonly id = inject(TuiIdService).generate();\n\n protected validator = computed(() =>\n this.invalid() ? ERROR : Validators.nullValidator,\n );\n\n @Input()\n public items: readonly T[] = [];\n\n @Input()\n public size: TuiSizeS = 'm';\n\n @Input()\n public identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n public disabledItemHandler: TuiBooleanHandler<T> = TUI_FALSE_HANDLER;\n\n @Input()\n public itemContent: PolymorpheusContent<TuiValueContentContext<T>> = ({$implicit}) =>\n String($implicit);\n\n protected get name(): string {\n return `${this.control.name}-${this.id}`;\n }\n\n protected onFocusOut(): void {\n this.controls.forEach((control) => control.control?.markAsTouched());\n\n if (!this.touched()) {\n this.onTouched();\n }\n }\n\n protected itemIsActive(item: T): boolean {\n return this.value() === null\n ? item === null\n : this.identityMatcher(this.value(), item);\n }\n}\n","@for (item of items; track item; let index = $index) {\n <label\n class=\"t-item\"\n [class.t-item_disabled]=\"disabled() || disabledItemHandler(item)\"\n >\n <input\n tuiRadio\n type=\"radio\"\n [disabled]=\"disabled() || disabledItemHandler(item)\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"name\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tuiValidator]=\"validator()\"\n [value]=\"item\"\n (ngModelChange)=\"onChange($event)\"\n />\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: {$implicit: item, active: itemIsActive(item)}\">\n {{ text }}\n </ng-container>\n </label>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBA,MAAM,KAAK,GAAgB,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;AAe/C,MAAO,YAAgB,SAAQ,UAAa,CAAA;AAblD,IAAA,WAAA,GAAA;;QAeqB,IAAQ,CAAA,QAAA,GAAyB,WAAW;QAE5C,IAAE,CAAA,EAAA,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;QAE3C,IAAS,CAAA,SAAA,GAAG,QAAQ,CAAC,MAC3B,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,UAAU,CAAC,aAAa,CACpD;QAGM,IAAK,CAAA,KAAA,GAAiB,EAAE;QAGxB,IAAI,CAAA,IAAA,GAAa,GAAG;QAGpB,IAAe,CAAA,eAAA,GAA0B,4BAA4B;QAGrE,IAAmB,CAAA,mBAAA,GAAyB,iBAAiB;AAG7D,QAAA,IAAA,CAAA,WAAW,GAAmD,CAAC,EAAC,SAAS,EAAC,KAC7E,MAAM,CAAC,SAAS,CAAC;AAmBxB;AAjBG,IAAA,IAAc,IAAI,GAAA;QACd,OAAO,CAAA,EAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,EAAE,CAAA,CAAE;;IAGlC,UAAU,GAAA;AAChB,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC;AAEpE,QAAA,IAAI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AA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,8XAAY,YAAY,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAWxD,YAAY,EAAA,UAAA,EAAA,CAAA;kBAbxB,SAAS;+BACI,gBAAgB,EAAA,OAAA,EACjB,CAAC,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA,aAAA,EAGnD,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,aACpC,CAAC,YAAY,CAAc,YAAA,CAAA,CAAC,EACjC,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC1B,wBAAA,YAAY,EAAE,cAAc;AAC/B,qBAAA,EAAA,QAAA,EAAA,q0BAAA,EAAA,MAAA,EAAA,CAAA,2pBAAA,CAAA,EAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,YAAY;uBAAC,SAAS;gBAUhB,KAAK,EAAA,CAAA;sBADX;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIM,mBAAmB,EAAA,CAAA;sBADzB;gBAIM,WAAW,EAAA,CAAA;sBADjB;;;AE7DL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-radio-list.mjs","sources":["../../../projects/kit/components/radio-list/radio-list.component.ts","../../../projects/kit/components/radio-list/radio-list.template.html","../../../projects/kit/components/radio-list/taiga-ui-kit-components-radio-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Input,\n type QueryList,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport {FormsModule, NgControl, type ValidatorFn, Validators} from '@angular/forms';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {\n EMPTY_QUERY,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_FALSE_HANDLER,\n} from '@taiga-ui/cdk/constants';\nimport {TuiValidator} from '@taiga-ui/cdk/directives/validator';\nimport {TuiIdService} from '@taiga-ui/cdk/services';\nimport {type TuiBooleanHandler, type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\nimport {type TuiSizeS, type TuiValueContentContext} from '@taiga-ui/core/types';\nimport {TuiRadio} from '@taiga-ui/kit/components/radio';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst ERROR: ValidatorFn = () => ({error: 'Invalid'});\n\n@Component({\n selector: 'tui-radio-list',\n imports: [FormsModule, PolymorpheusOutlet, TuiRadio, TuiValidator],\n templateUrl: './radio-list.template.html',\n styleUrl: './radio-list.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsControl(TuiRadioList)],\n host: {\n '[attr.data-size]': 'size',\n '(focusout)': 'onFocusOut()',\n },\n})\nexport class TuiRadioList<T> extends TuiControl<T> {\n @ViewChildren(NgControl)\n private readonly controls: QueryList<NgControl> = EMPTY_QUERY;\n\n private readonly id = inject(TuiIdService).generate();\n\n protected validator = computed(() =>\n this.invalid() ? ERROR : Validators.nullValidator,\n );\n\n @Input()\n public items: readonly T[] = [];\n\n @Input()\n public size: TuiSizeS = 'm';\n\n @Input()\n public identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n public disabledItemHandler: TuiBooleanHandler<T> = TUI_FALSE_HANDLER;\n\n @Input()\n public itemContent: PolymorpheusContent<TuiValueContentContext<T>> = ({$implicit}) =>\n String($implicit);\n\n protected get name(): string {\n return `${this.control.name}-${this.id}`;\n }\n\n protected onFocusOut(): void {\n this.controls.forEach((control) => control.control?.markAsTouched());\n\n if (!this.touched()) {\n this.onTouched();\n }\n }\n\n protected itemIsActive(item: T): boolean {\n return this.value() === null\n ? item === null\n : this.identityMatcher(this.value(), item);\n }\n}\n","@for (item of items; track item) {\n <label\n class=\"t-item\"\n [class.t-item_disabled]=\"disabled() || disabledItemHandler(item)\"\n >\n <input\n tuiRadio\n type=\"radio\"\n [disabled]=\"disabled() || disabledItemHandler(item)\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"name\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tuiValidator]=\"validator()\"\n [value]=\"item\"\n (ngModelChange)=\"onChange($event)\"\n />\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: {$implicit: item, active: itemIsActive(item)}\">\n {{ text }}\n </ng-container>\n </label>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBA,MAAM,KAAK,GAAgB,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;AAe/C,MAAO,YAAgB,SAAQ,UAAa,CAAA;AAblD,IAAA,WAAA,GAAA;;QAeqB,IAAQ,CAAA,QAAA,GAAyB,WAAW;QAE5C,IAAE,CAAA,EAAA,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;QAE3C,IAAS,CAAA,SAAA,GAAG,QAAQ,CAAC,MAC3B,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,UAAU,CAAC,aAAa,CACpD;QAGM,IAAK,CAAA,KAAA,GAAiB,EAAE;QAGxB,IAAI,CAAA,IAAA,GAAa,GAAG;QAGpB,IAAe,CAAA,e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AC1B,wBAAA,YAAY,EAAE,cAAc;AAC/B,qBAAA,EAAA,QAAA,EAAA,izBAAA,EAAA,MAAA,EAAA,CAAA,2pBAAA,CAAA,EAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,YAAY;uBAAC,SAAS;gBAUhB,KAAK,EAAA,CAAA;sBADX;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIM,mBAAmB,EAAA,CAAA;sBADzB;gBAIM,WAAW,EAAA,CAAA;sBADjB;;;AE7DL;;AAEG;;;;"}
@@ -1,53 +1,52 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, DestroyRef, ChangeDetectorRef, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
2
+ import { inject, DestroyRef, input, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { NgControl, RadioControlValueAccessor } from '@angular/forms';
4
+ import { NgControl, NgModel, RadioControlValueAccessor } from '@angular/forms';
5
5
  import * as i2 from '@taiga-ui/cdk/directives/native-validator';
6
6
  import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
7
- import { tuiWatch } from '@taiga-ui/cdk/observables';
7
+ import { tuiControlValue } from '@taiga-ui/cdk/observables';
8
8
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
9
- import { tuiProvideOptions, tuiSetSignal, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
10
9
  import * as i1 from '@taiga-ui/core/directives/appearance';
11
- import { TuiAppearance } from '@taiga-ui/core/directives/appearance';
10
+ import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
11
+ import { distinctUntilChanged } from 'rxjs';
12
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
12
13
  import { TUI_DEFAULT_IDENTITY_MATCHER } from '@taiga-ui/cdk/constants';
13
14
 
14
- const TUI_RADIO_DEFAULT_OPTIONS = {
15
+ const [TUI_RADIO_OPTIONS, tuiRadioOptionsProvider] = tuiCreateOptions({
15
16
  size: 'm',
16
17
  appearance: ({ checked }) => (checked ? 'primary' : 'outline-grayscale'),
17
- };
18
- const TUI_RADIO_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_RADIO_OPTIONS' : '', {
19
- factory: () => TUI_RADIO_DEFAULT_OPTIONS,
20
18
  });
21
- function tuiRadioOptionsProvider(options) {
22
- return tuiProvideOptions(TUI_RADIO_OPTIONS, options, TUI_RADIO_DEFAULT_OPTIONS);
23
- }
24
19
 
25
20
  class TuiRadioComponent {
26
21
  constructor() {
27
- this.appearance = inject(TuiAppearance);
28
22
  this.destroyRef = inject(DestroyRef);
29
- this.cdr = inject(ChangeDetectorRef);
30
- this.options = inject(TUI_RADIO_OPTIONS);
31
23
  this.el = tuiInjectElement();
24
+ this.options = inject(TUI_RADIO_OPTIONS);
25
+ this.appearance = tuiAppearance(this.options.appearance(this.el));
32
26
  this.control = inject(NgControl, { self: true, optional: true });
33
- this.size = this.options.size;
27
+ this.size = input(this.options.size);
34
28
  }
35
29
  ngOnInit() {
36
- this.control?.valueChanges
37
- ?.pipe(tuiWatch(this.cdr), takeUntilDestroyed(this.destroyRef))
38
- .subscribe();
30
+ tuiControlValue(this.control)
31
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
32
+ .subscribe((value) => {
33
+ // https://github.com/angular/angular/issues/14988
34
+ const fix = this.control instanceof NgModel && value == null
35
+ ? this.control.model
36
+ : value;
37
+ this.el.indeterminate = fix == null && this.el.matches('[tuiCheckbox]');
38
+ this.ngDoCheck();
39
+ });
39
40
  }
40
41
  ngDoCheck() {
41
- tuiSetSignal(this.appearance.tuiAppearance, tuiIsString(this.options.appearance)
42
- ? this.options.appearance
43
- : this.options.appearance(this.el));
42
+ this.appearance.set(this.options.appearance(this.el));
44
43
  }
45
44
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiRadioComponent, isStandalone: true, selector: "input[type=\"radio\"][tuiRadio]", inputs: { size: "size" }, host: { properties: { "disabled": "!control || control.disabled", "attr.data-size": "size", "class._readonly": "!control" } }, hostDirectives: [{ directive: i1.TuiAppearance, inputs: ["tuiAppearanceState", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceFocus", "tuiAppearanceMode", "tuiAppearanceMode"] }, { directive: i2.TuiNativeValidator }], ngImport: i0, template: '', isInline: true, styles: ["[tuiRadio]{--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:disabled._readonly{opacity:1}[tuiRadio]:before{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:checked:before{transform:scale(.5)}[tuiRadio][data-size=s]{--t-size: 1rem}[tuiRadio]:invalid:not([data-mode]),[tuiRadio][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
45
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiRadioComponent, isStandalone: true, selector: "input[type=\"radio\"][tuiRadio]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "disabled": "!control || control.disabled", "attr.data-size": "size()", "class._readonly": "!control" } }, hostDirectives: [{ directive: i1.TuiAppearance, inputs: ["tuiAppearanceState", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceFocus", "tuiAppearanceMode", "tuiAppearanceMode"] }, { directive: i2.TuiNativeValidator }], ngImport: i0, template: '', isInline: true, styles: ["[tuiRadio]{--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:disabled._readonly._readonly{opacity:1}[tuiRadio]:before{position:absolute;inset:0;content:\"\";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:checked:before{transform:scale(.5)}[tuiRadio][data-size=s]{--t-size: 1rem}[tuiRadio]:invalid:not([data-mode]),[tuiRadio][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
47
46
  }
48
47
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRadioComponent, decorators: [{
49
48
  type: Component,
50
- args: [{ standalone: true, selector: 'input[type="radio"][tuiRadio]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
49
+ args: [{ selector: 'input[type="radio"][tuiRadio]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
51
50
  {
52
51
  directive: TuiAppearance,
53
52
  inputs: ['tuiAppearanceState', 'tuiAppearanceFocus', 'tuiAppearanceMode'],
@@ -55,20 +54,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
55
54
  TuiNativeValidator,
56
55
  ], host: {
57
56
  '[disabled]': '!control || control.disabled',
58
- '[attr.data-size]': 'size',
57
+ '[attr.data-size]': 'size()',
59
58
  '[class._readonly]': '!control',
60
- }, styles: ["[tuiRadio]{--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:disabled._readonly{opacity:1}[tuiRadio]:before{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:checked:before{transform:scale(.5)}[tuiRadio][data-size=s]{--t-size: 1rem}[tuiRadio]:invalid:not([data-mode]),[tuiRadio][data-mode~=invalid]{color:#fff}\n"] }]
61
- }], propDecorators: { size: [{
62
- type: Input
63
- }] } });
59
+ }, styles: ["[tuiRadio]{--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:disabled._readonly._readonly{opacity:1}[tuiRadio]:before{position:absolute;inset:0;content:\"\";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:checked:before{transform:scale(.5)}[tuiRadio][data-size=s]{--t-size: 1rem}[tuiRadio]:invalid:not([data-mode]),[tuiRadio][data-mode~=invalid]{color:#fff}\n"] }]
60
+ }] });
64
61
 
65
62
  class TuiRadioDirective {
66
63
  constructor() {
67
- this.identityMatcher = TUI_DEFAULT_IDENTITY_MATCHER;
64
+ this.identityMatcher = input(TUI_DEFAULT_IDENTITY_MATCHER);
68
65
  const accessor = inject(RadioControlValueAccessor);
69
66
  const writeValue = accessor.writeValue.bind(accessor);
70
67
  accessor.writeValue = (value) => {
71
- if (this.identityMatcher(value, accessor.value)) {
68
+ if (this.identityMatcher()(value, accessor.value)) {
72
69
  writeValue(accessor.value);
73
70
  }
74
71
  else {
@@ -77,17 +74,14 @@ class TuiRadioDirective {
77
74
  };
78
75
  }
79
76
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
80
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiRadioDirective, isStandalone: true, selector: "input[type=\"radio\"][tuiRadio][identityMatcher]", inputs: { identityMatcher: "identityMatcher" }, ngImport: i0 }); }
77
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiRadioDirective, isStandalone: true, selector: "input[type=\"radio\"][tuiRadio][identityMatcher]", inputs: { identityMatcher: { classPropertyName: "identityMatcher", publicName: "identityMatcher", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
81
78
  }
82
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRadioDirective, decorators: [{
83
80
  type: Directive,
84
81
  args: [{
85
- standalone: true,
86
82
  selector: 'input[type="radio"][tuiRadio][identityMatcher]',
87
83
  }]
88
- }], ctorParameters: () => [], propDecorators: { identityMatcher: [{
89
- type: Input
90
- }] } });
84
+ }], ctorParameters: () => [] });
91
85
 
92
86
  const TuiRadio = [TuiRadioComponent, TuiRadioDirective];
93
87
 
@@ -95,5 +89,5 @@ const TuiRadio = [TuiRadioComponent, TuiRadioDirective];
95
89
  * Generated bundle index. Do not edit.
96
90
  */
97
91
 
98
- export { TUI_RADIO_DEFAULT_OPTIONS, TUI_RADIO_OPTIONS, TuiRadio, TuiRadioComponent, TuiRadioDirective, tuiRadioOptionsProvider };
92
+ export { TUI_RADIO_OPTIONS, TuiRadio, TuiRadioComponent, TuiRadioDirective, tuiRadioOptionsProvider };
99
93
  //# sourceMappingURL=taiga-ui-kit-components-radio.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-radio.mjs","sources":["../../../projects/kit/components/radio/radio.options.ts","../../../projects/kit/components/radio/radio.component.ts","../../../projects/kit/components/radio/radio.directive.ts","../../../projects/kit/components/radio/radio.ts","../../../projects/kit/components/radio/taiga-ui-kit-components-radio.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiRadioOptions {\n readonly appearance: TuiStringHandler<HTMLInputElement> | string;\n readonly size: TuiSizeS;\n}\n\nexport const TUI_RADIO_DEFAULT_OPTIONS: TuiRadioOptions = {\n size: 'm',\n appearance: ({checked}) => (checked ? 'primary' : 'outline-grayscale'),\n};\n\nexport const TUI_RADIO_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_RADIO_OPTIONS' : '',\n {\n factory: () => TUI_RADIO_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiRadioOptionsProvider(options: Partial<TuiRadioOptions>): Provider {\n return tuiProvideOptions(TUI_RADIO_OPTIONS, options, TUI_RADIO_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n type DoCheck,\n inject,\n Input,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsString, tuiSetSignal} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\n\nimport {TUI_RADIO_OPTIONS} from './radio.options';\n\n@Component({\n standalone: true,\n selector: 'input[type=\"radio\"][tuiRadio]',\n template: '',\n styles: ['@import \"@taiga-ui/kit/styles/components/radio.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: ['tuiAppearanceState', 'tuiAppearanceFocus', 'tuiAppearanceMode'],\n },\n TuiNativeValidator,\n ],\n host: {\n '[disabled]': '!control || control.disabled',\n '[attr.data-size]': 'size',\n '[class._readonly]': '!control',\n },\n})\nexport class TuiRadioComponent implements DoCheck, OnInit {\n private readonly appearance = inject(TuiAppearance);\n private readonly destroyRef = inject(DestroyRef);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly options = inject(TUI_RADIO_OPTIONS);\n private readonly el = tuiInjectElement<HTMLInputElement>();\n\n protected readonly control = inject(NgControl, {self: true, optional: true});\n\n @Input()\n public size: TuiSizeS = this.options.size;\n\n public ngOnInit(): void {\n this.control?.valueChanges\n ?.pipe(tuiWatch(this.cdr), takeUntilDestroyed(this.destroyRef))\n .subscribe();\n }\n\n public ngDoCheck(): void {\n tuiSetSignal(\n this.appearance.tuiAppearance,\n tuiIsString(this.options.appearance)\n ? this.options.appearance\n : this.options.appearance(this.el),\n );\n }\n}\n","import {Directive, inject, Input} from '@angular/core';\nimport {RadioControlValueAccessor} from '@angular/forms';\nimport {TUI_DEFAULT_IDENTITY_MATCHER} from '@taiga-ui/cdk/constants';\nimport {type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n@Directive({\n standalone: true,\n selector: 'input[type=\"radio\"][tuiRadio][identityMatcher]',\n})\nexport class TuiRadioDirective<T> {\n @Input()\n public identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n constructor() {\n const accessor = inject(RadioControlValueAccessor);\n const writeValue = accessor.writeValue.bind(accessor);\n\n accessor.writeValue = (value: T) => {\n if (this.identityMatcher(value, accessor.value)) {\n writeValue(accessor.value);\n } else {\n writeValue(value);\n }\n };\n }\n}\n","import {TuiRadioComponent} from './radio.component';\nimport {TuiRadioDirective} from './radio.directive';\n\nexport const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AAA,EAAA,CAAA,srBAAA,CAAA,EAAA;8BAYM,IAAI,EAAA,CAAA;sBADV;;;MC1CQ,iBAAiB,CAAA;AAI1B,IAAA,WAAA,GAAA;QAFO,IAAe,CAAA,eAAA,GAA0B,4BAA4B;AAGxE,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,yBAAyB,CAAC;QAClD,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;AAErD,QAAA,QAAQ,CAAC,UAAU,GAAG,CAAC,KAAQ,KAAI;YAC/B,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC7C,gBAAA,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;;iBACvB;gBACH,UAAU,CAAC,KAAK,CAAC;;AAEzB,SAAC;;+GAdI,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kDAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gDAAgD;AAC7D,iBAAA;wDAGU,eAAe,EAAA,CAAA;sBADrB;;;MCPQ,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB;;ACH7D;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-radio.mjs","sources":["../../../projects/kit/components/radio/radio.options.ts","../../../projects/kit/components/radio/radio.component.ts","../../../projects/kit/components/radio/radio.directive.ts","../../../projects/kit/components/radio/radio.ts","../../../projects/kit/components/radio/taiga-ui-kit-components-radio.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';\n\nexport interface TuiRadioOptions {\n readonly appearance: TuiStringHandler<HTMLInputElement>;\n readonly size: TuiSizeS;\n}\n\nexport const [TUI_RADIO_OPTIONS, tuiRadioOptionsProvider] =\n tuiCreateOptions<TuiRadioOptions>({\n size: 'm',\n appearance: ({checked}) => (checked ? 'primary' : 'outline-grayscale'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n type DoCheck,\n inject,\n input,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiAppearance, tuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {distinctUntilChanged} from 'rxjs';\n\nimport {TUI_RADIO_OPTIONS, type TuiRadioOptions} from './radio.options';\n\n@Component({\n selector: 'input[type=\"radio\"][tuiRadio]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/radio.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: ['tuiAppearanceState', 'tuiAppearanceFocus', 'tuiAppearanceMode'],\n },\n TuiNativeValidator,\n ],\n host: {\n '[disabled]': '!control || control.disabled',\n '[attr.data-size]': 'size()',\n '[class._readonly]': '!control',\n },\n})\nexport class TuiRadioComponent<T extends TuiRadioOptions> implements DoCheck, OnInit {\n private readonly destroyRef = inject(DestroyRef);\n private readonly el = tuiInjectElement<HTMLInputElement>();\n\n protected readonly options = inject<T>(TUI_RADIO_OPTIONS);\n protected readonly appearance = tuiAppearance(this.options.appearance(this.el));\n protected readonly control = inject(NgControl, {self: true, optional: true});\n\n public readonly size = input(this.options.size);\n\n public ngOnInit(): void {\n tuiControlValue(this.control)\n .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n // https://github.com/angular/angular/issues/14988\n const fix =\n this.control instanceof NgModel && value == null\n ? this.control.model\n : value;\n\n this.el.indeterminate = fix == null && this.el.matches('[tuiCheckbox]');\n this.ngDoCheck();\n });\n }\n\n public ngDoCheck(): void {\n this.appearance.set(this.options.appearance(this.el));\n }\n}\n","import {Directive, inject, input} from '@angular/core';\nimport {RadioControlValueAccessor} from '@angular/forms';\nimport {TUI_DEFAULT_IDENTITY_MATCHER} from '@taiga-ui/cdk/constants';\nimport {type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n@Directive({\n selector: 'input[type=\"radio\"][tuiRadio][identityMatcher]',\n})\nexport class TuiRadioDirective<T> {\n public readonly identityMatcher = input<TuiIdentityMatcher<T>>(\n TUI_DEFAULT_IDENTITY_MATCHER,\n );\n\n constructor() {\n const accessor = inject(RadioControlValueAccessor);\n const writeValue = accessor.writeValue.bind(accessor);\n\n accessor.writeValue = (value: T) => {\n if (this.identityMatcher()(value, accessor.value)) {\n writeValue(accessor.value);\n } else {\n writeValue(value);\n }\n };\n }\n}\n","import {TuiRadioComponent} from './radio.component';\nimport {TuiRadioDirective} from './radio.directive';\n\nexport const TuiRadio = [TuiRadioComponent, TuiRadioDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MASa,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,GACrD,gBAAgB,CAAkB;AAC9B,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,UAAU,EAAE,CAAC,EAAC,OAAO,EAAC,MAAM,OAAO,GAAG,SAAS,GAAG,mBAAmB,CAAC;AACzE,CAAA;;MC0B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EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC/C,gBAAA,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;;iBACvB;gBACH,UAAU,CAAC,KAAK,CAAC;;AAEzB,SAAC;;+GAfI,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kDAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gDAAgD;AAC7D,iBAAA;;;MCJY,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB;;ACH7D;;AAEG;;;;"}
@@ -1,16 +1,15 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, EventEmitter, Output, Directive, signal, computed, ElementRef, ViewChildren, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { inject, output, Directive, input, viewChildren, ElementRef, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import * as i2 from '@angular/forms';
5
5
  import { FormsModule } from '@angular/forms';
6
6
  import { TuiControl } from '@taiga-ui/cdk/classes';
7
- import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
8
7
  import { tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
9
8
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
10
9
  import { tuiClamp, tuiRound, tuiQuantize } from '@taiga-ui/cdk/utils/math';
11
10
  import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
12
11
  import * as i3 from '@taiga-ui/kit/components/slider';
13
- import { TUI_FLOATING_PRECISION, TUI_SLIDER_OPTIONS, tuiPercentageToKeyStepValue, tuiKeyStepValueToPercentage, TuiSliderComponent, TuiSlider } from '@taiga-ui/kit/components/slider';
12
+ import { TUI_FLOATING_PRECISION, TUI_SLIDER_OPTIONS, TuiSliderComponent, tuiPercentageToKeyStepValue, tuiKeyStepValueToPercentage, TuiSlider } from '@taiga-ui/kit/components/slider';
14
13
  import { DOCUMENT } from '@angular/common';
15
14
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
16
15
  import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
@@ -21,8 +20,7 @@ class TuiRangeChange {
21
20
  this.doc = inject(DOCUMENT);
22
21
  this.el = tuiInjectElement();
23
22
  this.range = inject(TuiRange);
24
- // TODO(v5): use 'start' | 'end' instead
25
- this.activeThumbChange = new EventEmitter();
23
+ this.activeThumbChange = output();
26
24
  let activeThumb;
27
25
  tuiTypedFromEvent(this.el, 'pointerdown', {
28
26
  passive: true,
@@ -30,12 +28,10 @@ class TuiRangeChange {
30
28
  })
31
29
  .pipe(tap(({ clientX, target, pointerId }) => {
32
30
  activeThumb = this.detectActiveThumb(clientX, target);
33
- this.range.slidersRefs
34
- .get(activeThumb === 'start' ? 0 : 1)
35
- ?.nativeElement.setPointerCapture(pointerId);
36
- // TODO(v5): remove backward compatibility
37
- this.activeThumbChange.emit(activeThumb === 'start' ? 'left' : 'right');
38
- if (this.range.focusable) {
31
+ const slideElement = this.range.slidersRefs()[activeThumb === 'start' ? 0 : 1];
32
+ slideElement?.nativeElement.setPointerCapture(pointerId);
33
+ this.activeThumbChange.emit(activeThumb);
34
+ if (this.range.focusable()) {
39
35
  this.el.focus();
40
36
  }
41
37
  }), switchMap((event) => tuiTypedFromEvent(this.doc, 'pointermove').pipe(startWith(event))), map(({ clientX }) => this.getFractionFromEvents(clientX ?? 0)), takeUntil(tuiTypedFromEvent(this.doc, 'pointerup', { passive: true })), repeat(), takeUntilDestroyed())
@@ -51,7 +47,7 @@ class TuiRangeChange {
51
47
  return tuiRound(value / width, TUI_FLOATING_PRECISION);
52
48
  }
53
49
  detectActiveThumb(clientX, target) {
54
- const [startSliderRef, endSliderRef] = this.range.slidersRefs;
50
+ const [startSliderRef, endSliderRef] = this.range.slidersRefs();
55
51
  switch (target) {
56
52
  case endSliderRef?.nativeElement:
57
53
  return 'end';
@@ -75,42 +71,34 @@ class TuiRangeChange {
75
71
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiRangeChange, isStandalone: true, outputs: { activeThumbChange: "activeThumbChange" }, ngImport: i0 }); }
76
72
  }
77
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRangeChange, decorators: [{
78
- type: Directive,
79
- args: [{
80
- standalone: true,
81
- }]
82
- }], ctorParameters: () => [], propDecorators: { activeThumbChange: [{
83
- type: Output
84
- }] } });
74
+ type: Directive
75
+ }], ctorParameters: () => [] });
85
76
 
86
77
  class TuiRange extends TuiControl {
87
78
  constructor() {
88
79
  super(...arguments);
89
- // TODO: refactor to signal inputs after Angular update
90
- this.changes = signal(1);
91
80
  this.el = tuiInjectElement();
92
81
  this.options = inject(TUI_SLIDER_OPTIONS);
93
82
  this.lastActiveThumb = 'end';
94
- this.min = 0;
95
- this.max = 100;
96
- this.step = 1;
97
- this.size = this.options.size;
98
- this.segments = 1;
99
- this.keySteps = null;
100
- this.focusable = true;
101
- this.margin = 0;
102
- this.limit = Infinity;
103
- this.slidersRefs = EMPTY_QUERY;
83
+ this.min = input(0);
84
+ this.max = input(100);
85
+ this.step = input(1);
86
+ this.size = input(this.options.size);
87
+ this.segments = input(1);
88
+ this.keySteps = input(null);
89
+ this.focusable = input(true);
90
+ this.margin = input(0);
91
+ this.limit = input(Infinity);
92
+ this.slidersRefs = viewChildren(TuiSliderComponent, { read: ElementRef });
104
93
  this.start = computed(() => this.toPercent(this.value()[0]));
105
94
  this.end = computed(() => 100 - this.toPercent(this.value()[1]));
106
- /**
107
- * TODO(v5): standardize logic between `TuiSlider` & `TuiInputSlider` & `Range` & `InputRange`
108
- * For non-linear slider (with `[keySteps]` property) `step` means percentage
109
- */
110
- this.legacyMode = true;
111
- }
112
- ngOnChanges() {
113
- this.changes.update((x) => x + 1);
95
+ this.fractionStep = computed((step = this.step()) => {
96
+ return this.keySteps() ? step / 100 : step / (this.max() - this.min());
97
+ });
98
+ this.computedKeySteps = computed(() => {
99
+ return this.computePureKeySteps(this.keySteps(), this.min(), this.max());
100
+ });
101
+ this.segmentWidthRatio = computed(() => 1 / this.segments());
114
102
  }
115
103
  processValue(value, end) {
116
104
  if (end) {
@@ -124,29 +112,18 @@ class TuiRange extends TuiControl {
124
112
  takeStep(coefficients) {
125
113
  return this.value().map((value, i) => {
126
114
  const fraction = this.toPercent(value) / 100;
127
- const newFractionValue = fraction + coefficients[i] * this.fractionStep;
115
+ const newFractionValue = fraction + coefficients[i] * this.fractionStep();
128
116
  return this.toValue(newFractionValue);
129
117
  });
130
118
  }
131
119
  toValue(fraction) {
132
- return tuiPercentageToKeyStepValue(tuiClamp(tuiQuantize(fraction, this.fractionStep), 0, 1) * 100, this.computedKeySteps);
133
- }
134
- get fractionStep() {
135
- return this.legacyMode || !this.keySteps
136
- ? this.step / (this.max - this.min)
137
- : this.step / 100;
138
- }
139
- get computedKeySteps() {
140
- return this.computePureKeySteps(this.keySteps, this.min, this.max);
141
- }
142
- get segmentWidthRatio() {
143
- return 1 / this.segments;
120
+ return tuiPercentageToKeyStepValue(tuiClamp(tuiQuantize(fraction, this.fractionStep()), 0, 1) * 100, this.computedKeySteps());
144
121
  }
145
122
  get rtl() {
146
123
  return this.el.matches('[dir="rtl"] :scope');
147
124
  }
148
125
  changeByStep(coefficient, target) {
149
- const [startThumb, endThumb] = this.slidersRefs.map((x) => x?.nativeElement);
126
+ const [startThumb, endThumb] = this.slidersRefs().map((x) => x?.nativeElement);
150
127
  const isEndThumb = target === this.el ? this.lastActiveThumb === 'end' : target === endThumb;
151
128
  const activeThumbElement = isEndThumb ? endThumb : startThumb;
152
129
  const newValue = this.takeStep(isEndThumb ? [0, coefficient] : [coefficient, 0]);
@@ -154,7 +131,7 @@ class TuiRange extends TuiControl {
154
131
  activeThumbElement?.focus();
155
132
  }
156
133
  toPercent(value) {
157
- return (this.changes() && tuiKeyStepValueToPercentage(value, this.computedKeySteps));
134
+ return tuiKeyStepValueToPercentage(value, this.computedKeySteps());
158
135
  }
159
136
  computePureKeySteps(keySteps, min, max) {
160
137
  return (keySteps || [
@@ -179,10 +156,10 @@ class TuiRange extends TuiControl {
179
156
  this.onChange([this.value()[0], newValue]);
180
157
  }
181
158
  checkDistance(distance) {
182
- return tuiClamp(distance, this.margin, this.limit) === distance;
159
+ return tuiClamp(distance, this.margin(), this.limit()) === distance;
183
160
  }
184
161
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRange, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
185
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiRange, isStandalone: true, selector: "tui-range", inputs: { min: "min", max: "max", step: "step", size: "size", segments: "segments", keySteps: "keySteps", focusable: "focusable", margin: "margin", limit: "limit" }, host: { listeners: { "focusout": "onTouched()", "keydown.arrowUp.prevent": "changeByStep(1, $event.target)", "keydown.arrowDown.prevent": "changeByStep(-1, $event.target)", "keydown.arrowRight.prevent": "changeByStep(rtl ? -1 : 1, $event.target)", "keydown.arrowLeft.prevent": "changeByStep(rtl ? 1 : -1, $event.target)" }, properties: { "attr.data-size": "size", "attr.tabindex": "-1", "attr.aria-disabled": "disabled()", "style.--t-start.%": "start()", "style.--t-end.%": "end()", "style.background": "options.trackColor", "class._disabled": "disabled()" } }, providers: [tuiFallbackValueProvider([0, 0])], viewQueries: [{ propertyName: "slidersRefs", predicate: TuiSliderComponent, descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: TuiRangeChange, outputs: ["activeThumbChange", "activeThumbChange"] }], ngImport: i0, template: "<div\n class=\"t-track\"\n [style.--t-bg-size-ratio]=\"1 - segmentWidthRatio\"\n [style.--t-segment-width.%]=\"segmentWidthRatio * 100\"\n>\n <input\n automation-id=\"tui-range__left\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tabIndex]=\"focusable ? 0 : -1\"\n />\n <input\n automation-id=\"tui-range__right\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tabIndex]=\"focusable ? 0 : -1\"\n />\n</div>\n", styles: [":host{position:relative;display:block;block-size:var(--tui-thickness);border-radius:var(--tui-radius-m);cursor:pointer;outline:none;margin:calc((1rem - var(--tui-thickness)) / 2) 0;touch-action:pan-x;--tui-thickness: .125rem}:host:active{cursor:ew-resize}:host:after{content:\"\";position:absolute;top:50%;block-size:1rem;inline-size:100%;transform:translateY(-50%)}:host._disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host[data-size=s] .t-track{position:relative;margin:0 .25rem;block-size:100%}:host[data-size=s] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.25rem}:host[data-size=s] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.125rem;right:.375rem;inset-inline-start:.125rem;inset-inline-end:.375rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}:host[data-size=m] .t-track{position:relative;margin:0 .375rem;block-size:100%}:host[data-size=m] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.375rem}:host[data-size=m] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.25rem;right:.5rem;inset-inline-start:.25rem;inset-inline-end:.5rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}.t-thumb{pointer-events:none;position:absolute;top:50%;left:0;right:0;z-index:1;transform:translateY(-50%)}.t-thumb::-webkit-slider-thumb{pointer-events:auto}.t-thumb::-moz-range-thumb{pointer-events:auto}:host._disabled .t-thumb::-webkit-slider-thumb{pointer-events:none}:host._disabled .t-thumb::-moz-range-thumb{pointer-events:none}input[type=range].t-thumb::-webkit-slider-runnable-track{background:transparent}input[type=range].t-thumb::-moz-range-track{background:transparent}input[type=range].t-thumb::-moz-range-progress{background:transparent}.t-thumb:first-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * -50%)) translateX(calc(var(--tui-inline) * -1px))}.t-thumb:last-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * 50%)) translateX(calc(var(--tui-inline) * 1px))}:host._disabled .t-thumb{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.TuiSliderComponent, selector: "input[type=range][tuiSlider]", inputs: ["size", "segments"] }, { kind: "directive", type: i3.TuiSliderKeyStepsBase, selector: "input[tuiSlider][keySteps]", inputs: ["step", "keySteps"] }, { kind: "directive", type: i3.TuiSliderKeySteps, selector: "input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]", inputs: ["keySteps"] }, { kind: "directive", type: i3.TuiSliderReadonly, selector: "input[tuiSlider][readonly]", inputs: ["readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
162
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: TuiRange, isStandalone: true, selector: "tui-range", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: false, transformFunction: null }, keySteps: { classPropertyName: "keySteps", publicName: "keySteps", isSignal: true, isRequired: false, transformFunction: null }, focusable: { classPropertyName: "focusable", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusout": "onTouched()", "keydown.arrowUp.prevent": "changeByStep(1, $event.target)", "keydown.arrowDown.prevent": "changeByStep(-1, $event.target)", "keydown.arrowRight.prevent": "changeByStep(rtl ? -1 : 1, $event.target)", "keydown.arrowLeft.prevent": "changeByStep(rtl ? 1 : -1, $event.target)" }, properties: { "attr.data-size": "size()", "attr.tabindex": "-1", "attr.aria-disabled": "disabled()", "style.--t-start.%": "start()", "style.--t-end.%": "end()", "style.background": "options.trackColor", "class._disabled": "disabled()" } }, providers: [tuiFallbackValueProvider([0, 0])], viewQueries: [{ propertyName: "slidersRefs", predicate: TuiSliderComponent, descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: TuiRangeChange, outputs: ["activeThumbChange", "activeThumbChange"] }], ngImport: i0, template: "<div\n class=\"t-track\"\n [style.--t-bg-size-ratio]=\"1 - segmentWidthRatio()\"\n [style.--t-segment-width.%]=\"segmentWidthRatio() * 100\"\n>\n <input\n automation-id=\"tui-range__left\"\n readonly\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size()\"\n [step]=\"step()\"\n [tabIndex]=\"focusable() ? 0 : -1\"\n />\n <input\n automation-id=\"tui-range__right\"\n readonly\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size()\"\n [step]=\"step()\"\n [tabIndex]=\"focusable() ? 0 : -1\"\n />\n</div>\n", styles: [":host{position:relative;display:block;block-size:var(--tui-thickness);border-radius:var(--tui-radius-m);cursor:pointer;outline:none;margin:calc((1rem - var(--tui-thickness)) / 2) 0;touch-action:pan-x;--tui-thickness: .125rem}:host:active{cursor:ew-resize}:host:after{content:\"\";position:absolute;top:50%;block-size:1rem;inline-size:100%;transform:translateY(-50%)}:host._disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host[data-size=s] .t-track{position:relative;margin:0 .25rem;block-size:100%}:host[data-size=s] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.25rem}:host[data-size=s] .t-track:after{position:absolute;inset:0;content:\"\";left:.125rem;right:.375rem;inset-inline-start:.125rem;inset-inline-end:.375rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}:host[data-size=m] .t-track{position:relative;margin:0 .375rem;block-size:100%}:host[data-size=m] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.375rem}:host[data-size=m] .t-track:after{position:absolute;inset:0;content:\"\";left:.25rem;right:.5rem;inset-inline-start:.25rem;inset-inline-end:.5rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}.t-thumb{pointer-events:none;position:absolute;top:50%;left:0;right:0;z-index:1;transform:translateY(-50%)}.t-thumb::-webkit-slider-thumb{pointer-events:auto}.t-thumb::-moz-range-thumb{pointer-events:auto}:host._disabled .t-thumb::-webkit-slider-thumb{pointer-events:none}:host._disabled .t-thumb::-moz-range-thumb{pointer-events:none}input[type=range].t-thumb::-webkit-slider-runnable-track{background:transparent}input[type=range].t-thumb::-moz-range-track{background:transparent}input[type=range].t-thumb::-moz-range-progress{background:transparent}.t-thumb:first-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * -50%)) translateX(calc(var(--tui-inline) * -1px))}.t-thumb:last-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * 50%)) translateX(calc(var(--tui-inline) * 1px))}:host._disabled .t-thumb{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.TuiSliderComponent, selector: "input[type=range][tuiSlider]", inputs: ["size", "segments"] }, { kind: "directive", type: i3.TuiSliderKeyStepsBase, selector: "input[tuiSlider][keySteps]", inputs: ["step", "keySteps"] }, { kind: "directive", type: i3.TuiSliderKeySteps, selector: "input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]", inputs: ["keySteps"] }, { kind: "directive", type: i3.TuiSliderReadonly, selector: "input[tuiSlider][readonly]", inputs: ["readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
186
163
  }
187
164
  __decorate([
188
165
  tuiPure
@@ -195,7 +172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
195
172
  outputs: ['activeThumbChange'],
196
173
  },
197
174
  ], host: {
198
- '[attr.data-size]': 'size',
175
+ '[attr.data-size]': 'size()',
199
176
  '[attr.tabindex]': '-1',
200
177
  '[attr.aria-disabled]': 'disabled()',
201
178
  '[style.--t-start.%]': 'start()',
@@ -207,29 +184,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
207
184
  '(keydown.arrowDown.prevent)': 'changeByStep(-1, $event.target)',
208
185
  '(keydown.arrowRight.prevent)': 'changeByStep(rtl ? -1 : 1, $event.target)',
209
186
  '(keydown.arrowLeft.prevent)': 'changeByStep(rtl ? 1 : -1, $event.target)',
210
- }, template: "<div\n class=\"t-track\"\n [style.--t-bg-size-ratio]=\"1 - segmentWidthRatio\"\n [style.--t-segment-width.%]=\"segmentWidthRatio * 100\"\n>\n <input\n automation-id=\"tui-range__left\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tabIndex]=\"focusable ? 0 : -1\"\n />\n <input\n automation-id=\"tui-range__right\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size\"\n [tabIndex]=\"focusable ? 0 : -1\"\n />\n</div>\n", styles: [":host{position:relative;display:block;block-size:var(--tui-thickness);border-radius:var(--tui-radius-m);cursor:pointer;outline:none;margin:calc((1rem - var(--tui-thickness)) / 2) 0;touch-action:pan-x;--tui-thickness: .125rem}:host:active{cursor:ew-resize}:host:after{content:\"\";position:absolute;top:50%;block-size:1rem;inline-size:100%;transform:translateY(-50%)}:host._disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host[data-size=s] .t-track{position:relative;margin:0 .25rem;block-size:100%}:host[data-size=s] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.25rem}:host[data-size=s] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.125rem;right:.375rem;inset-inline-start:.125rem;inset-inline-end:.375rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}:host[data-size=m] .t-track{position:relative;margin:0 .375rem;block-size:100%}:host[data-size=m] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.375rem}:host[data-size=m] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.25rem;right:.5rem;inset-inline-start:.25rem;inset-inline-end:.5rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}.t-thumb{pointer-events:none;position:absolute;top:50%;left:0;right:0;z-index:1;transform:translateY(-50%)}.t-thumb::-webkit-slider-thumb{pointer-events:auto}.t-thumb::-moz-range-thumb{pointer-events:auto}:host._disabled .t-thumb::-webkit-slider-thumb{pointer-events:none}:host._disabled .t-thumb::-moz-range-thumb{pointer-events:none}input[type=range].t-thumb::-webkit-slider-runnable-track{background:transparent}input[type=range].t-thumb::-moz-range-track{background:transparent}input[type=range].t-thumb::-moz-range-progress{background:transparent}.t-thumb:first-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * -50%)) translateX(calc(var(--tui-inline) * -1px))}.t-thumb:last-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * 50%)) translateX(calc(var(--tui-inline) * 1px))}:host._disabled .t-thumb{opacity:1}\n"] }]
211
- }], propDecorators: { min: [{
212
- type: Input
213
- }], max: [{
214
- type: Input
215
- }], step: [{
216
- type: Input
217
- }], size: [{
218
- type: Input
219
- }], segments: [{
220
- type: Input
221
- }], keySteps: [{
222
- type: Input
223
- }], focusable: [{
224
- type: Input
225
- }], margin: [{
226
- type: Input
227
- }], limit: [{
228
- type: Input
229
- }], slidersRefs: [{
230
- type: ViewChildren,
231
- args: [TuiSliderComponent, { read: ElementRef }]
232
- }], computePureKeySteps: [] } });
187
+ }, template: "<div\n class=\"t-track\"\n [style.--t-bg-size-ratio]=\"1 - segmentWidthRatio()\"\n [style.--t-segment-width.%]=\"segmentWidthRatio() * 100\"\n>\n <input\n automation-id=\"tui-range__left\"\n readonly\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size()\"\n [step]=\"step()\"\n [tabIndex]=\"focusable() ? 0 : -1\"\n />\n <input\n automation-id=\"tui-range__right\"\n readonly\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"disabled()\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [size]=\"size()\"\n [step]=\"step()\"\n [tabIndex]=\"focusable() ? 0 : -1\"\n />\n</div>\n", styles: [":host{position:relative;display:block;block-size:var(--tui-thickness);border-radius:var(--tui-radius-m);cursor:pointer;outline:none;margin:calc((1rem - var(--tui-thickness)) / 2) 0;touch-action:pan-x;--tui-thickness: .125rem}:host:active{cursor:ew-resize}:host:after{content:\"\";position:absolute;top:50%;block-size:1rem;inline-size:100%;transform:translateY(-50%)}:host._disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host[data-size=s] .t-track{position:relative;margin:0 .25rem;block-size:100%}:host[data-size=s] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.25rem}:host[data-size=s] .t-track:after{position:absolute;inset:0;content:\"\";left:.125rem;right:.375rem;inset-inline-start:.125rem;inset-inline-end:.375rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}:host[data-size=m] .t-track{position:relative;margin:0 .375rem;block-size:100%}:host[data-size=m] .t-track:before{content:\"\";position:absolute;top:0;left:max(calc(var(--t-start) - 1px),1px);right:max(var(--t-end),1px);inset-inline-start:max(calc(var(--t-start) - 1px),1px);inset-inline-end:max(var(--t-end),1px);block-size:100%;background:var(--tui-background-accent-1);margin:0 -.375rem}:host[data-size=m] .t-track:after{position:absolute;inset:0;content:\"\";left:.25rem;right:.5rem;inset-inline-start:.25rem;inset-inline-end:.5rem;background-image:repeating-linear-gradient(to var(--tui-inline-end),var(--tui-text-tertiary) 0 .25rem,transparent 0 calc(var(--t-segment-width) / var(--t-bg-size-ratio)));background-position-x:var(--tui-inline-end);background-repeat:no-repeat;background-size:calc(100% * var(--t-bg-size-ratio))}.t-thumb{pointer-events:none;position:absolute;top:50%;left:0;right:0;z-index:1;transform:translateY(-50%)}.t-thumb::-webkit-slider-thumb{pointer-events:auto}.t-thumb::-moz-range-thumb{pointer-events:auto}:host._disabled .t-thumb::-webkit-slider-thumb{pointer-events:none}:host._disabled .t-thumb::-moz-range-thumb{pointer-events:none}input[type=range].t-thumb::-webkit-slider-runnable-track{background:transparent}input[type=range].t-thumb::-moz-range-track{background:transparent}input[type=range].t-thumb::-moz-range-progress{background:transparent}.t-thumb:first-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * -50%)) translateX(calc(var(--tui-inline) * -1px))}.t-thumb:last-of-type{--tui-slider-thumb-transform: translateX(calc(var(--tui-inline) * 50%)) translateX(calc(var(--tui-inline) * 1px))}:host._disabled .t-thumb{opacity:1}\n"] }]
188
+ }], propDecorators: { computePureKeySteps: [] } });
233
189
 
234
190
  /**
235
191
  * Generated bundle index. Do not edit.