@taiga-ui/kit 4.52.0-canary.9fae831 → 4.52.0-canary.a1004d6

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 (487) 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-labeled.component.d.ts +3 -3
  9. package/components/avatar/avatar-outline.directive.d.ts +3 -3
  10. package/components/avatar/avatar-stack.component.d.ts +2 -2
  11. package/components/badge/badge.directive.d.ts +2 -2
  12. package/components/badge/badge.options.d.ts +1 -3
  13. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  14. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  15. package/components/badged-content/badged-content.directive.d.ts +2 -2
  16. package/components/block/block.directive.d.ts +4 -4
  17. package/components/block/block.options.d.ts +2 -4
  18. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  19. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  20. package/components/button-loading/button-loading.component.d.ts +5 -5
  21. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  22. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  23. package/components/calendar-range/day-range-period.d.ts +2 -1
  24. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  25. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  26. package/components/carousel/carousel.component.d.ts +15 -18
  27. package/components/carousel/carousel.directive.d.ts +5 -4
  28. package/components/chip/chip.directive.d.ts +2 -4
  29. package/components/chip/chip.options.d.ts +1 -3
  30. package/components/combo-box/combo-box.d.ts +5 -0
  31. package/components/combo-box/combo-box.directive.d.ts +7 -9
  32. package/components/combo-box/index.d.ts +1 -0
  33. package/components/comment/comment.directive.d.ts +2 -2
  34. package/components/compass/compass.component.d.ts +2 -2
  35. package/components/confirm/confirm.component.d.ts +5 -4
  36. package/components/confirm/confirm.service.d.ts +1 -1
  37. package/{directives → components}/copy/copy.component.d.ts +4 -5
  38. package/{directives → components}/copy/copy.directive.d.ts +3 -4
  39. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -2
  40. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  41. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  42. package/components/data-list-wrapper/index.d.ts +1 -1
  43. package/components/drawer/drawer.component.d.ts +3 -4
  44. package/components/files/file/file.component.d.ts +16 -29
  45. package/components/files/file/file.options.d.ts +1 -1
  46. package/components/files/files/files.component.d.ts +7 -10
  47. package/components/files/input-files/input-files.component.d.ts +2 -2
  48. package/components/files/input-files/input-files.content.d.ts +7 -8
  49. package/components/files/input-files/input-files.directive.d.ts +2 -2
  50. package/components/files/input-files/input-files.options.d.ts +1 -3
  51. package/components/filter/filter.component.d.ts +9 -12
  52. package/components/fullscreen/fullscreen.component.d.ts +11 -0
  53. package/components/fullscreen/index.d.ts +1 -0
  54. package/components/index.d.ts +3 -4
  55. package/components/input-chip/input-chip.component.d.ts +9 -8
  56. package/components/input-chip/input-chip.d.ts +5 -1
  57. package/components/input-chip/input-chip.directive.d.ts +7 -12
  58. package/components/input-color/index.d.ts +1 -0
  59. package/components/input-color/input-color.component.d.ts +8 -12
  60. package/components/input-color/input-color.d.ts +5 -0
  61. package/components/input-date/input-date.component.d.ts +2 -2
  62. package/components/input-date/input-date.d.ts +4 -1
  63. package/components/input-date/input-date.directive.d.ts +21 -22
  64. package/components/input-date/input-date.options.d.ts +3 -3
  65. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  66. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  67. package/components/input-date-range/input-date-range.d.ts +4 -1
  68. package/components/input-date-range/input-date-range.directive.d.ts +9 -10
  69. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  70. package/components/input-date-time/input-date-time.d.ts +4 -1
  71. package/components/input-date-time/input-date-time.directive.d.ts +14 -14
  72. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  73. package/components/input-inline/input-inline.component.d.ts +3 -2
  74. package/components/input-month/input-month.component.d.ts +3 -5
  75. package/components/input-month/input-month.d.ts +4 -1
  76. package/components/input-month/input-month.directive.d.ts +6 -5
  77. package/components/input-month-range/input-month-range.d.ts +4 -1
  78. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  79. package/components/input-number/input-number.d.ts +4 -1
  80. package/components/input-number/input-number.directive.d.ts +8 -14
  81. package/components/input-number/input-number.options.d.ts +2 -3
  82. package/components/input-number/quantum.directive.d.ts +1 -1
  83. package/components/input-number/step/input-number-step.component.d.ts +4 -4
  84. package/components/input-phone/index.d.ts +1 -0
  85. package/components/input-phone/input-phone.d.ts +5 -0
  86. package/components/input-phone/input-phone.directive.d.ts +12 -14
  87. package/components/input-phone-international/index.d.ts +1 -0
  88. package/components/input-phone-international/input-phone-international.component.d.ts +28 -36
  89. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  90. package/components/input-phone-international/input-phone-international.options.d.ts +2 -3
  91. package/components/input-pin/index.d.ts +1 -0
  92. package/components/input-pin/input-pin.component.d.ts +6 -7
  93. package/components/input-pin/input-pin.d.ts +5 -0
  94. package/components/input-range/index.d.ts +0 -1
  95. package/components/input-range/input-range.component.d.ts +29 -62
  96. package/components/input-slider/input-slider.d.ts +4 -1
  97. package/components/input-slider/input-slider.directive.d.ts +3 -5
  98. package/components/input-time/input-time.component.d.ts +1 -3
  99. package/components/input-time/input-time.d.ts +4 -1
  100. package/components/input-time/input-time.directive.d.ts +9 -11
  101. package/components/input-year/input-year.d.ts +4 -1
  102. package/components/input-year/input-year.directive.d.ts +8 -10
  103. package/components/input-year/input-year.options.d.ts +2 -2
  104. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  105. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  106. package/components/like/like.component.d.ts +2 -2
  107. package/components/like/like.options.d.ts +1 -1
  108. package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
  109. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  110. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  111. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +6 -8
  112. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  113. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  114. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  115. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  116. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  117. package/components/pager/pager.component.d.ts +12 -12
  118. package/components/pagination/index.d.ts +1 -0
  119. package/components/pagination/pagination.component.d.ts +25 -54
  120. package/components/pagination/pagination.options.d.ts +7 -0
  121. package/components/pin/pin.directive.d.ts +2 -2
  122. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  123. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  124. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  125. package/components/preview/index.d.ts +1 -0
  126. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  127. package/components/preview/preview.component.d.ts +6 -6
  128. package/components/preview/preview.d.ts +2 -1
  129. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  130. package/components/preview/zoom/preview-zoom.component.d.ts +11 -17
  131. package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
  132. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  133. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  134. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  135. package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
  136. package/components/progress/progress.options.d.ts +1 -3
  137. package/components/pulse/pulse.component.d.ts +2 -2
  138. package/components/push/push-alert.component.d.ts +4 -3
  139. package/components/push/push.component.d.ts +7 -8
  140. package/components/push/push.directive.d.ts +4 -6
  141. package/components/push/push.options.d.ts +5 -8
  142. package/components/push/push.service.d.ts +6 -2
  143. package/components/radio/radio.component.d.ts +1 -1
  144. package/components/radio-list/radio-list.component.d.ts +11 -9
  145. package/components/range/range-change.directive.d.ts +1 -2
  146. package/components/range/range.component.d.ts +16 -25
  147. package/components/rating/rating.component.d.ts +1 -1
  148. package/components/rating/rating.options.d.ts +1 -3
  149. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  150. package/components/segmented/segmented.component.d.ts +4 -6
  151. package/components/segmented/segmented.directive.d.ts +6 -7
  152. package/components/select/native-select/native-select.component.d.ts +7 -8
  153. package/components/select/select.d.ts +4 -1
  154. package/components/select/select.directive.d.ts +4 -3
  155. package/components/slider/helpers/key-steps.d.ts +1 -2
  156. package/components/slider/helpers/slider-key-steps.directive.d.ts +15 -23
  157. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  158. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  159. package/components/slider/slider.component.d.ts +4 -7
  160. package/components/slider/slider.options.d.ts +1 -6
  161. package/components/status/status.directive.d.ts +2 -2
  162. package/components/stepper/step.component.d.ts +14 -9
  163. package/components/stepper/stepper.component.d.ts +5 -12
  164. package/components/switch/switch.component.d.ts +1 -0
  165. package/components/tabs/tabs-horizontal.directive.d.ts +3 -4
  166. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  167. package/components/tabs/tabs-with-more.component.d.ts +13 -17
  168. package/components/tabs/tabs.directive.d.ts +5 -7
  169. package/components/tabs/tabs.options.d.ts +1 -6
  170. package/components/textarea/index.d.ts +2 -1
  171. package/components/textarea/textarea.component.d.ts +10 -11
  172. package/components/textarea/textarea.d.ts +6 -0
  173. package/components/textarea/textarea.directive.d.ts +13 -0
  174. package/components/tiles/tile.component.d.ts +7 -10
  175. package/components/tiles/tile.service.d.ts +1 -1
  176. package/components/tiles/tiles.component.d.ts +4 -7
  177. package/components/toast/index.d.ts +5 -0
  178. package/components/toast/toast.component.d.ts +18 -0
  179. package/components/toast/toast.d.ts +3 -0
  180. package/components/toast/toast.directive.d.ts +7 -0
  181. package/components/toast/toast.options.d.ts +10 -0
  182. package/components/toast/toast.service.d.ts +17 -0
  183. package/components/tree/components/tree/tree.component.d.ts +7 -7
  184. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  185. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  186. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  187. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  188. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  189. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  190. package/components/tree/misc/tree.constants.d.ts +0 -3
  191. package/components/tree/misc/tree.tokens.d.ts +1 -6
  192. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  193. package/directives/appearance-proxy/index.d.ts +1 -0
  194. package/directives/button-close/button-close.directive.d.ts +2 -1
  195. package/directives/button-select/button-select.directive.d.ts +4 -4
  196. package/directives/chevron/chevron.directive.d.ts +2 -3
  197. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  198. package/directives/fade/fade.directive.d.ts +6 -6
  199. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  200. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  201. package/directives/highlight/highlight.directive.d.ts +4 -4
  202. package/directives/index.d.ts +1 -2
  203. package/directives/password/password.directive.d.ts +1 -1
  204. package/directives/present/present.directive.d.ts +2 -4
  205. package/directives/sensitive/sensitive.directive.d.ts +2 -2
  206. package/directives/shimmer/shimmer.directive.d.ts +3 -3
  207. package/directives/skeleton/skeleton.directive.d.ts +3 -3
  208. package/directives/tooltip/tooltip.directive.d.ts +3 -3
  209. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  210. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  211. package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
  212. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  213. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +24 -40
  214. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  215. package/fesm2022/taiga-ui-kit-components-avatar.mjs +46 -71
  216. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
  218. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-components-badge.mjs +16 -27
  220. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
  222. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-block.mjs +20 -31
  224. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +19 -39
  226. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +19 -27
  228. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
  230. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +25 -26
  232. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-carousel.mjs +70 -123
  234. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
  236. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-chip.mjs +18 -34
  238. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +45 -50
  240. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-comment.mjs +13 -20
  242. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
  244. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-confirm.mjs +11 -14
  246. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-copy.mjs +106 -0
  248. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
  249. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
  250. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  252. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  253. package/fesm2022/taiga-ui-kit-components-files.mjs +117 -244
  254. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  255. package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -34
  256. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  257. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +44 -0
  258. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
  259. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -77
  260. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-components-input-color.mjs +27 -28
  262. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +36 -53
  264. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +37 -37
  266. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  267. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +42 -59
  268. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  269. package/fesm2022/taiga-ui-kit-components-input-date.mjs +58 -72
  270. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  271. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -13
  272. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  273. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +29 -27
  274. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  275. package/fesm2022/taiga-ui-kit-components-input-month.mjs +42 -50
  276. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  277. package/fesm2022/taiga-ui-kit-components-input-number.mjs +68 -91
  278. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +126 -159
  280. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +40 -46
  282. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +24 -22
  284. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-components-input-range.mjs +66 -89
  286. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  287. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +36 -45
  288. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  289. package/fesm2022/taiga-ui-kit-components-input-time.mjs +63 -70
  290. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-components-input-year.mjs +32 -39
  292. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  293. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -72
  294. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-components-like.mjs +6 -6
  296. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  297. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +38 -82
  298. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-components-message.mjs +9 -12
  300. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +43 -60
  302. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  303. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +38 -34
  304. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  305. package/fesm2022/taiga-ui-kit-components-pager.mjs +30 -44
  306. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  307. package/fesm2022/taiga-ui-kit-components-pagination.mjs +73 -148
  308. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  309. package/fesm2022/taiga-ui-kit-components-pin.mjs +15 -19
  310. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  311. package/fesm2022/taiga-ui-kit-components-preview.mjs +98 -158
  312. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-components-progress.mjs +93 -117
  314. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  316. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-components-push.mjs +54 -74
  318. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  319. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
  320. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
  322. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-components-range.mjs +42 -96
  324. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
  326. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  328. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  329. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  330. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-components-select.mjs +81 -62
  332. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-components-slider.mjs +96 -122
  334. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-components-status.mjs +12 -16
  336. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  337. package/fesm2022/taiga-ui-kit-components-stepper.mjs +61 -88
  338. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  340. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  341. package/fesm2022/taiga-ui-kit-components-tabs.mjs +79 -145
  342. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  343. package/fesm2022/taiga-ui-kit-components-textarea.mjs +62 -82
  344. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  345. package/fesm2022/taiga-ui-kit-components-tiles.mjs +38 -71
  346. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  347. package/fesm2022/taiga-ui-kit-components-toast.mjs +164 -0
  348. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
  349. package/fesm2022/taiga-ui-kit-components-tree.mjs +91 -126
  350. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  351. package/fesm2022/taiga-ui-kit-components.mjs +3 -4
  352. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  353. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  354. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  355. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +15 -7
  356. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  357. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +9 -12
  358. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  359. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -19
  360. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  361. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +16 -22
  362. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  363. package/fesm2022/taiga-ui-kit-directives-connected.mjs +9 -15
  364. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  365. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  366. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  367. package/fesm2022/taiga-ui-kit-directives-fade.mjs +28 -40
  368. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  369. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  370. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  371. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
  372. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  373. package/fesm2022/taiga-ui-kit-directives-password.mjs +12 -14
  374. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  375. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
  376. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  377. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +13 -18
  378. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  379. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +24 -34
  380. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  381. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +28 -38
  382. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  383. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +17 -22
  384. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  385. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +9 -12
  386. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  387. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
  388. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  389. package/fesm2022/taiga-ui-kit-directives.mjs +1 -2
  390. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  391. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  392. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  393. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  394. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  395. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -25
  396. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  397. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  398. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  399. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -5
  400. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  401. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  402. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  403. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  404. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  405. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  406. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  407. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  408. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  409. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  410. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  411. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -121
  412. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  413. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  414. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  415. package/package.json +41 -37
  416. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  417. package/pipes/auto-color/index.d.ts +1 -0
  418. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
  419. package/pipes/flag/flag.pipe.d.ts +14 -0
  420. package/pipes/flag/index.d.ts +1 -0
  421. package/pipes/index.d.ts +3 -0
  422. package/pipes/initials/index.d.ts +1 -0
  423. package/pipes/initials/initials.pipe.d.ts +7 -0
  424. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  425. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  426. package/styles/components/avatar.less +14 -14
  427. package/styles/components/badge.less +4 -3
  428. package/styles/components/block.less +4 -4
  429. package/styles/components/checkbox.less +1 -1
  430. package/styles/components/chip.less +15 -4
  431. package/styles/components/comment.less +1 -1
  432. package/styles/components/message.less +1 -1
  433. package/styles/components/pin.less +3 -4
  434. package/styles/components/radio.less +1 -1
  435. package/styles/components/switch.less +4 -3
  436. package/styles/components/toast.less +44 -0
  437. package/tokens/i18n.d.ts +26 -26
  438. package/tokens/index.d.ts +0 -7
  439. package/utils/index.d.ts +0 -2
  440. package/utils/maskito.binding.d.ts +1 -1
  441. package/components/accordion/accordion-item-content.directive.d.ts +0 -6
  442. package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
  443. package/components/accordion/accordion-item.component.d.ts +0 -25
  444. package/components/action-bar/action-bar.d.ts +0 -3
  445. package/components/action-bar/action-bar.directive.d.ts +0 -6
  446. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  447. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  448. package/components/elastic-container/index.d.ts +0 -2
  449. package/components/floating-container/floating-container.directive.d.ts +0 -7
  450. package/components/floating-container/index.d.ts +0 -1
  451. package/components/input-range/input-range.d.ts +0 -3
  452. package/components/pdf-viewer/index.d.ts +0 -4
  453. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  454. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  455. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  456. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  457. package/components/slides/index.d.ts +0 -1
  458. package/components/slides/slides.directive.d.ts +0 -11
  459. package/components/textarea/textarea-limit.directive.d.ts +0 -27
  460. package/directives/lazy-loading/index.d.ts +0 -2
  461. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  462. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  463. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  464. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  465. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -43
  466. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  467. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  468. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  469. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  470. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  471. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -57
  472. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  473. package/fesm2022/taiga-ui-kit-directives-copy.mjs +0 -119
  474. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +0 -1
  475. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  476. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  477. package/tokens/calendar-date-stream.d.ts +0 -10
  478. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  479. package/tokens/input-date-options.d.ts +0 -15
  480. package/tokens/items-handlers.d.ts +0 -26
  481. package/tokens/mobile-calendar.d.ts +0 -6
  482. package/tokens/month-formatter.d.ts +0 -5
  483. package/utils/phone.d.ts +0 -3
  484. package/utils/toggle-day.d.ts +0 -2
  485. /package/{directives → components}/copy/copy.d.ts +0 -0
  486. /package/{directives → components}/copy/copy.options.d.ts +0 -0
  487. /package/{directives → components}/copy/index.d.ts +0 -0
@@ -1,75 +1,82 @@
1
- import { TuiLabel } from '@taiga-ui/core/components/label';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, signal, computed, ElementRef, Input, ViewChild, ViewChildren, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { viewChildren, ElementRef, viewChild, inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
3
  import * as i1 from '@angular/forms';
5
4
  import { FormsModule } from '@angular/forms';
6
- import { TuiControl, TUI_IDENTITY_VALUE_TRANSFORMER, tuiAsControl } from '@taiga-ui/cdk/classes';
7
- import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
5
+ import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
6
+ import { CHAR_NO_BREAK_SPACE, CHAR_EN_DASH } from '@taiga-ui/cdk/constants';
8
7
  import { TUI_IS_MOBILE, tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
9
8
  import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
10
- import * as i3 from '@taiga-ui/core/components/textfield';
9
+ import { tuiIsString, tuiIsNumber } from '@taiga-ui/cdk/utils/miscellaneous';
10
+ import * as i4 from '@taiga-ui/core/components/textfield';
11
11
  import { TUI_TEXTFIELD_OPTIONS, TuiTextfield } from '@taiga-ui/core/components/textfield';
12
12
  import * as i2 from '@taiga-ui/kit/components/input-number';
13
- import { TuiQuantumValueTransformerBase, TuiInputNumberDirective, TuiInputNumber } from '@taiga-ui/kit/components/input-number';
13
+ import { TuiInputNumberDirective, TUI_INPUT_NUMBER_OPTIONS, TuiQuantumValueTransformerBase, TuiInputNumber } from '@taiga-ui/kit/components/input-number';
14
14
  import { TuiRange } from '@taiga-ui/kit/components/range';
15
15
  import { tuiSliderOptionsProvider } from '@taiga-ui/kit/components/slider';
16
16
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
17
+ import * as i3 from '@taiga-ui/core/components/label';
17
18
 
18
- class TuiInputRangeComponent extends TuiControl {
19
+ const transform = (x) => x ?? ['', ''];
20
+ class TuiInputRange extends TuiControl {
19
21
  constructor() {
20
22
  super(...arguments);
21
- this.inputNumberRefs = EMPTY_QUERY;
23
+ this.inputs = viewChildren(TuiInputNumberDirective, { read: ElementRef });
24
+ this.range = viewChild(TuiRange);
25
+ this.options = inject(TUI_INPUT_NUMBER_OPTIONS);
22
26
  this.isMobile = inject(TUI_IS_MOBILE);
23
- this.quantum = signal(0);
24
- this.quantumTransformer = computed((quantum = this.quantum()) => quantum
25
- ? new TuiQuantumValueTransformerBase(quantum)
26
- : TUI_IDENTITY_VALUE_TRANSFORMER);
27
+ this.quantumTransformer = computed(() => new TuiQuantumValueTransformerBase(this.quantum()));
27
28
  this.size = inject(TUI_TEXTFIELD_OPTIONS).size;
28
- this.textfieldValueStart = this.value()[0];
29
- this.textfieldValueEnd = this.value()[1];
30
- this.lastActiveSide = 'start';
31
- this.min = 0;
32
- this.max = 100;
33
- this.step = 1;
34
- this.segments = 1;
35
- this.keySteps = null;
36
- this.content = ['', ''];
37
- this.prefix = ['', ''];
38
- this.postfix = ['', ''];
39
- }
40
- // TODO(v5): use signal inputs
41
- set quantumSetter(x) {
42
- this.quantum.set(x);
29
+ this.start = this.value()[0];
30
+ this.end = this.value()[1];
31
+ this.side = 'start';
32
+ this.contentStart = computed(() => {
33
+ const [start, end] = this.content().map((x, i) => {
34
+ const value = this.value()[i];
35
+ return typeof x === 'function' ? x({ $implicit: value }) : x || value;
36
+ });
37
+ if (this.interactive() || !this.isPrimitive(start) || !this.isPrimitive(end)) {
38
+ return this.content()[0];
39
+ }
40
+ return `${start}${CHAR_NO_BREAK_SPACE}${CHAR_EN_DASH}${CHAR_NO_BREAK_SPACE}${end}`;
41
+ });
42
+ this.contentEnd = computed(() => this.contentStart() === this.content()[0] ? this.content()[1] : '');
43
+ this.min = input(0);
44
+ this.max = input(100);
45
+ this.step = input(1);
46
+ this.segments = input(1);
47
+ this.keySteps = input();
48
+ this.quantum = input(0);
49
+ this.prefix = input([this.options.prefix, this.options.prefix], {
50
+ transform,
51
+ });
52
+ this.postfix = input([this.options.postfix, this.options.postfix], {
53
+ transform,
54
+ });
55
+ this.content = input(['', '']);
43
56
  }
44
57
  writeValue(value) {
45
58
  super.writeValue(value);
46
59
  this.setTextfieldValues(this.value());
47
60
  }
48
- ngAfterViewInit() {
49
- if (this.range) {
50
- this.range.legacyMode = false; // TODO(v5): remove backward compatibility
51
- }
61
+ get contentStartHidden() {
62
+ return this.interactive() && tuiIsFocused(this.textfieldStart);
52
63
  }
53
- get hideStartContent() {
54
- return !this.content[0] || tuiIsFocused(this.textfieldStart);
55
- }
56
- get hideEndContent() {
57
- return !this.content[1] || tuiIsFocused(this.textfieldEnd);
64
+ get contentEndHidden() {
65
+ return (!this.content()[1] || (this.interactive() && tuiIsFocused(this.textfieldEnd)));
58
66
  }
59
67
  takeStep(event, coefficients) {
60
- if (!this.interactive() || !this.range) {
68
+ if (!this.interactive() || !this.range()) {
61
69
  return;
62
70
  }
63
71
  event.preventDefault();
64
72
  const [start, end] = this.value();
65
- const newValue = this.valueGuard(this.range.takeStep(coefficients));
73
+ const newValue = this.valueGuard(this.range().takeStep(coefficients));
66
74
  if (newValue[0] !== start || newValue[1] !== end) {
67
75
  this.onExternalValueUpdate(newValue);
68
76
  }
69
77
  }
70
78
  onInput([start, end]) {
71
- const [prevStart, prevEnd] = this.value();
72
- this.setValue([start ?? prevStart, end ?? prevEnd]);
79
+ this.setValue([start ?? this.value()[0], end ?? this.value()[1]]);
73
80
  }
74
81
  onExternalValueUpdate(value) {
75
82
  this.setValue(value);
@@ -85,22 +92,18 @@ class TuiInputRangeComponent extends TuiControl {
85
92
  this.activeTextfield?.focus();
86
93
  }
87
94
  }
88
- onActiveThumbChange(activeThumb) {
89
- // TODO(v5): remove backward compatibility
90
- this.lastActiveSide = activeThumb === 'left' ? 'start' : 'end';
91
- }
92
95
  setTextfieldValues([start, end]) {
93
- this.textfieldValueStart = start;
94
- this.textfieldValueEnd = end;
96
+ this.start = start;
97
+ this.end = end;
95
98
  }
96
99
  get textfieldStart() {
97
- return this.inputNumberRefs.first?.nativeElement || null;
100
+ return this.inputs()[0]?.nativeElement || null;
98
101
  }
99
102
  get textfieldEnd() {
100
- return this.inputNumberRefs.last?.nativeElement || null;
103
+ return this.inputs()[this.inputs().length - 1]?.nativeElement || null;
101
104
  }
102
105
  get activeTextfield() {
103
- return this.lastActiveSide === 'start' ? this.textfieldStart : this.textfieldEnd;
106
+ return this.side === 'start' ? this.textfieldStart : this.textfieldEnd;
104
107
  }
105
108
  setValue(value) {
106
109
  this.onChange(this.valueGuard(value));
@@ -110,58 +113,32 @@ class TuiInputRangeComponent extends TuiControl {
110
113
  const [start, end] = value.map((x) => this.quantumTransformer().toControlValue(x) ?? x);
111
114
  return [Math.min(start, prevEnd), Math.max(end, prevStart)];
112
115
  }
113
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputRangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
114
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputRangeComponent, isStandalone: true, selector: "tui-input-range", inputs: { min: "min", max: "max", step: "step", segments: "segments", keySteps: "keySteps", content: "content", prefix: ["prefix", "prefix", (x) => x ?? ['', '']], postfix: ["postfix", "postfix", (x) => x ?? ['', '']], quantumSetter: ["quantum", "quantumSetter"] }, host: { attributes: { "new": "" }, properties: { "attr.data-size": "size()" } }, providers: [
115
- tuiAsControl(TuiInputRangeComponent),
116
+ isPrimitive(x) {
117
+ return !x || tuiIsString(x) || tuiIsNumber(x);
118
+ }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputRange, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
120
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputRange, isStandalone: true, selector: "tui-input-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 }, segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: false, transformFunction: null }, keySteps: { classPropertyName: "keySteps", publicName: "keySteps", isSignal: true, isRequired: false, transformFunction: null }, quantum: { classPropertyName: "quantum", publicName: "quantum", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, postfix: { classPropertyName: "postfix", publicName: "postfix", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()", "style.--t-icon-lock": "contentEnd() ? \"none\" : null" } }, providers: [
121
+ tuiAsControl(TuiInputRange),
116
122
  tuiSliderOptionsProvider({ trackColor: 'transparent' }),
117
123
  tuiFallbackValueProvider([0, 0]),
118
- ], viewQueries: [{ propertyName: "range", first: true, predicate: TuiRange, descendants: true }, { propertyName: "inputNumberRefs", predicate: TuiInputNumberDirective, descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<tui-textfield [content]=\"hideStartContent ? '' : content[0]\">\n <ng-container ngProjectAs=\"label\">\n <ng-content select=\"label\" />\n </ng-container>\n\n <input\n tuiInputNumber\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"value()[1]\"\n [min]=\"min\"\n [postfix]=\"postfix[0]\"\n [prefix]=\"prefix[0]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"textfieldValueStart\"\n (blur)=\"textfieldValueStart = value()[0]\"\n (keydown.arrowDown)=\"takeStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"takeStep($event, [1, 0])\"\n (ngModelChange)=\"onInput([$event, null])\"\n />\n\n <input\n tuiInputNumber\n tuiTextfieldAppearance=\"none\"\n class=\"t-end\"\n [class._hidden]=\"!hideEndContent\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"max\"\n [min]=\"value()[0]\"\n [postfix]=\"postfix[1]\"\n [prefix]=\"prefix[1]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"textfieldValueEnd\"\n (blur)=\"textfieldValueEnd = value()[1]\"\n (keydown.arrowDown)=\"takeStep($event, [0, -1])\"\n (keydown.arrowUp)=\"takeStep($event, [0, 1])\"\n (ngModelChange)=\"onInput([null, $event])\"\n />\n\n <div\n class=\"t-content-end\"\n [class._hidden]=\"hideEndContent\"\n >\n <ng-container *polymorpheusOutlet=\"content[1] as text; context: {$implicit: value()[1]}\">\n {{ text }}\n </ng-container>\n </div>\n</tui-textfield>\n\n@if (interactive()) {\n <tui-range\n [focusable]=\"false\"\n [keySteps]=\"keySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()\"\n [segments]=\"segments\"\n [step]=\"step\"\n (activeThumbChange)=\"onActiveThumbChange($event)\"\n (mousedown.prevent)=\"focusToTextfield()\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n />\n}\n", styles: [":host{position:relative;display:block}.t-end{position:absolute;top:0;bottom:0;right:0;left:50%;display:flex;inline-size:50%;text-align:end;outline:none!important;border:none;padding-inline-end:var(--t-padding);color:var(--tui-text-primary);transition:none}.t-end:dir(rtl){right:unset;inset-inline-end:0}.t-content-end{color:var(--tui-text-primary)}tui-textfield:has(label:not(:empty)) .t-content-end{padding-block-start:calc(var(--t-height) / 3)}tui-textfield._with-label .t-content-end{padding-block-start:calc(var(--t-height) / 3)}._hidden{opacity:0}tui-range{position:absolute;top:100%;left:1rem;right:1rem;z-index:1;margin:calc(-1 * var(--tui-thickness)) 0 0}:host[data-size=m] tui-range{right:.75rem;left:.75rem}:host[data-size=s] tui-range{right:.625rem;left:.625rem}tui-textfield::ng-deep .t-clear{display:none!important}\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.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: "directive", type: i2.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "component", type: TuiRange, selector: "tui-range", inputs: ["min", "max", "step", "size", "segments", "keySteps", "focusable", "margin", "limit"] }, { kind: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
124
+ ], viewQueries: [{ propertyName: "inputs", predicate: TuiInputNumberDirective, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "range", first: true, predicate: TuiRange, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<tui-textfield [content]=\"contentStartHidden ? '' : contentStart()\">\n <label tuiLabel>\n <ng-content />\n </label>\n\n <input\n tuiInputNumber\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"value()[1]\"\n [min]=\"min()\"\n [postfix]=\"postfix()[0]\"\n [prefix]=\"prefix()[0]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"start\"\n (blur)=\"start = value()[0]\"\n (keydown.arrowDown)=\"takeStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"takeStep($event, [1, 0])\"\n (ngModelChange)=\"onInput([$event, null])\"\n />\n\n <input\n tuiInputNumber\n class=\"t-end\"\n [class._hidden]=\"!contentEndHidden || !this.interactive()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"max()\"\n [min]=\"value()[0]\"\n [postfix]=\"postfix()[1]\"\n [prefix]=\"prefix()[1]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"end\"\n (blur)=\"end = value()[1]\"\n (keydown.arrowDown)=\"takeStep($event, [0, -1])\"\n (keydown.arrowUp)=\"takeStep($event, [0, 1])\"\n (ngModelChange)=\"onInput([null, $event])\"\n />\n\n @if (!contentEndHidden && contentEnd()) {\n <div class=\"t-content-end\">\n <ng-container *polymorpheusOutlet=\"contentEnd() as text; context: {$implicit: value()[1]}\">\n {{ text }}\n </ng-container>\n </div>\n }\n\n @if (interactive()) {\n <tui-range\n [focusable]=\"false\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()\"\n [segments]=\"segments()\"\n [step]=\"step()\"\n (activeThumbChange)=\"side = $event\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n (pointerdown.prevent.stop)=\"focusToTextfield()\"\n />\n }\n</tui-textfield>\n", styles: [":host{position:relative;display:block}:host-context([tuiTable]){block-size:100%}.t-end{inset-inline:auto 0;inline-size:50%;text-align:end;padding-inline-start:0}.t-content-end{color:var(--tui-text-primary)}tui-textfield._with-label .t-content-end{padding-block-start:calc(var(--t-height) / 3)}._hidden._hidden{opacity:0}tui-range{position:absolute;z-index:1;inset:100% var(--t-padding) auto;margin:calc(-1 * var(--tui-thickness)) 0 0;pointer-events:auto}tui-textfield::ng-deep .t-clear{display:none!important}\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.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: "directive", type: i2.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "directive", type: i3.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "component", type: TuiRange, selector: "tui-range", inputs: ["min", "max", "step", "size", "segments", "keySteps", "focusable", "margin", "limit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
119
125
  }
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputRangeComponent, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputRange, decorators: [{
121
127
  type: Component,
122
128
  args: [{ selector: 'tui-input-range', imports: [FormsModule, PolymorpheusOutlet, TuiInputNumber, TuiRange, TuiTextfield], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
123
- tuiAsControl(TuiInputRangeComponent),
129
+ tuiAsControl(TuiInputRange),
124
130
  tuiSliderOptionsProvider({ trackColor: 'transparent' }),
125
131
  tuiFallbackValueProvider([0, 0]),
126
132
  ], host: {
127
- new: '', // TODO(v5): remove after deletion of legacy control
128
- // TODO: use css :host:has(tui-textfield[data-size]) after browser bump
129
133
  '[attr.data-size]': 'size()',
130
- }, template: "<tui-textfield [content]=\"hideStartContent ? '' : content[0]\">\n <ng-container ngProjectAs=\"label\">\n <ng-content select=\"label\" />\n </ng-container>\n\n <input\n tuiInputNumber\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"value()[1]\"\n [min]=\"min\"\n [postfix]=\"postfix[0]\"\n [prefix]=\"prefix[0]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"textfieldValueStart\"\n (blur)=\"textfieldValueStart = value()[0]\"\n (keydown.arrowDown)=\"takeStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"takeStep($event, [1, 0])\"\n (ngModelChange)=\"onInput([$event, null])\"\n />\n\n <input\n tuiInputNumber\n tuiTextfieldAppearance=\"none\"\n class=\"t-end\"\n [class._hidden]=\"!hideEndContent\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"max\"\n [min]=\"value()[0]\"\n [postfix]=\"postfix[1]\"\n [prefix]=\"prefix[1]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"textfieldValueEnd\"\n (blur)=\"textfieldValueEnd = value()[1]\"\n (keydown.arrowDown)=\"takeStep($event, [0, -1])\"\n (keydown.arrowUp)=\"takeStep($event, [0, 1])\"\n (ngModelChange)=\"onInput([null, $event])\"\n />\n\n <div\n class=\"t-content-end\"\n [class._hidden]=\"hideEndContent\"\n >\n <ng-container *polymorpheusOutlet=\"content[1] as text; context: {$implicit: value()[1]}\">\n {{ text }}\n </ng-container>\n </div>\n</tui-textfield>\n\n@if (interactive()) {\n <tui-range\n [focusable]=\"false\"\n [keySteps]=\"keySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()\"\n [segments]=\"segments\"\n [step]=\"step\"\n (activeThumbChange)=\"onActiveThumbChange($event)\"\n (mousedown.prevent)=\"focusToTextfield()\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n />\n}\n", styles: [":host{position:relative;display:block}.t-end{position:absolute;top:0;bottom:0;right:0;left:50%;display:flex;inline-size:50%;text-align:end;outline:none!important;border:none;padding-inline-end:var(--t-padding);color:var(--tui-text-primary);transition:none}.t-end:dir(rtl){right:unset;inset-inline-end:0}.t-content-end{color:var(--tui-text-primary)}tui-textfield:has(label:not(:empty)) .t-content-end{padding-block-start:calc(var(--t-height) / 3)}tui-textfield._with-label .t-content-end{padding-block-start:calc(var(--t-height) / 3)}._hidden{opacity:0}tui-range{position:absolute;top:100%;left:1rem;right:1rem;z-index:1;margin:calc(-1 * var(--tui-thickness)) 0 0}:host[data-size=m] tui-range{right:.75rem;left:.75rem}:host[data-size=s] tui-range{right:.625rem;left:.625rem}tui-textfield::ng-deep .t-clear{display:none!important}\n"] }]
131
- }], propDecorators: { inputNumberRefs: [{
132
- type: ViewChildren,
133
- args: [TuiInputNumberDirective, { read: ElementRef }]
134
- }], range: [{
135
- type: ViewChild,
136
- args: [TuiRange]
137
- }], min: [{
138
- type: Input
139
- }], max: [{
140
- type: Input
141
- }], step: [{
142
- type: Input
143
- }], segments: [{
144
- type: Input
145
- }], keySteps: [{
146
- type: Input
147
- }], content: [{
148
- type: Input
149
- }], prefix: [{
150
- type: Input,
151
- args: [{ transform: (x) => x ?? ['', ''] }]
152
- }], postfix: [{
153
- type: Input,
154
- args: [{ transform: (x) => x ?? ['', ''] }]
155
- }], quantumSetter: [{
156
- type: Input,
157
- args: ['quantum']
158
- }] } });
159
-
160
- const TuiInputRange = [TuiInputRangeComponent, TuiLabel];
134
+ // TODO: Delete this line and put `tui-input-range:has(.t-content-end) {--t-icon-lock: none}` to proprietary styles
135
+ '[style.--t-icon-lock]': 'contentEnd() ? "none" : null',
136
+ }, template: "<tui-textfield [content]=\"contentStartHidden ? '' : contentStart()\">\n <label tuiLabel>\n <ng-content />\n </label>\n\n <input\n tuiInputNumber\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"value()[1]\"\n [min]=\"min()\"\n [postfix]=\"postfix()[0]\"\n [prefix]=\"prefix()[0]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"start\"\n (blur)=\"start = value()[0]\"\n (keydown.arrowDown)=\"takeStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"takeStep($event, [1, 0])\"\n (ngModelChange)=\"onInput([$event, null])\"\n />\n\n <input\n tuiInputNumber\n class=\"t-end\"\n [class._hidden]=\"!contentEndHidden || !this.interactive()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"max()\"\n [min]=\"value()[0]\"\n [postfix]=\"postfix()[1]\"\n [prefix]=\"prefix()[1]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"end\"\n (blur)=\"end = value()[1]\"\n (keydown.arrowDown)=\"takeStep($event, [0, -1])\"\n (keydown.arrowUp)=\"takeStep($event, [0, 1])\"\n (ngModelChange)=\"onInput([null, $event])\"\n />\n\n @if (!contentEndHidden && contentEnd()) {\n <div class=\"t-content-end\">\n <ng-container *polymorpheusOutlet=\"contentEnd() as text; context: {$implicit: value()[1]}\">\n {{ text }}\n </ng-container>\n </div>\n }\n\n @if (interactive()) {\n <tui-range\n [focusable]=\"false\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()\"\n [segments]=\"segments()\"\n [step]=\"step()\"\n (activeThumbChange)=\"side = $event\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n (pointerdown.prevent.stop)=\"focusToTextfield()\"\n />\n }\n</tui-textfield>\n", styles: [":host{position:relative;display:block}:host-context([tuiTable]){block-size:100%}.t-end{inset-inline:auto 0;inline-size:50%;text-align:end;padding-inline-start:0}.t-content-end{color:var(--tui-text-primary)}tui-textfield._with-label .t-content-end{padding-block-start:calc(var(--t-height) / 3)}._hidden._hidden{opacity:0}tui-range{position:absolute;z-index:1;inset:100% var(--t-padding) auto;margin:calc(-1 * var(--tui-thickness)) 0 0;pointer-events:auto}tui-textfield::ng-deep .t-clear{display:none!important}\n"] }]
137
+ }] });
161
138
 
162
139
  /**
163
140
  * Generated bundle index. Do not edit.
164
141
  */
165
142
 
166
- export { TuiInputRange, TuiInputRangeComponent };
143
+ export { TuiInputRange };
167
144
  //# sourceMappingURL=taiga-ui-kit-components-input-range.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-range.mjs","sources":["../../../projects/kit/components/input-range/input-range.component.ts","../../../projects/kit/components/input-range/input-range.template.html","../../../projects/kit/components/input-range/input-range.ts","../../../projects/kit/components/input-range/taiga-ui-kit-components-input-range.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n Input,\n type QueryList,\n signal,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n tuiAsControl,\n TuiControl,\n} from '@taiga-ui/cdk/classes';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TUI_IS_MOBILE, tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TUI_TEXTFIELD_OPTIONS, TuiTextfield} from '@taiga-ui/core/components/textfield';\nimport {\n TuiInputNumber,\n TuiInputNumberDirective,\n TuiQuantumValueTransformerBase,\n} from '@taiga-ui/kit/components/input-number';\nimport {TuiRange} from '@taiga-ui/kit/components/range';\nimport {\n type TuiKeySteps,\n tuiSliderOptionsProvider,\n} from '@taiga-ui/kit/components/slider';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-input-range',\n imports: [FormsModule, PolymorpheusOutlet, TuiInputNumber, TuiRange, TuiTextfield],\n templateUrl: './input-range.template.html',\n styleUrls: ['./input-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsControl(TuiInputRangeComponent),\n tuiSliderOptionsProvider({trackColor: 'transparent'}),\n tuiFallbackValueProvider([0, 0]),\n ],\n host: {\n new: '', // TODO(v5): remove after deletion of legacy control\n // TODO: use css :host:has(tui-textfield[data-size]) after browser bump\n '[attr.data-size]': 'size()',\n },\n})\nexport class TuiInputRangeComponent\n extends TuiControl<readonly [number, number]>\n implements AfterViewInit\n{\n @ViewChildren(TuiInputNumberDirective, {read: ElementRef})\n private readonly inputNumberRefs: QueryList<ElementRef<HTMLInputElement>> =\n EMPTY_QUERY;\n\n @ViewChild(TuiRange)\n private readonly range?: TuiRange;\n\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly quantum = signal(0);\n private readonly quantumTransformer = computed((quantum = this.quantum()) =>\n quantum\n ? new TuiQuantumValueTransformerBase(quantum)\n : TUI_IDENTITY_VALUE_TRANSFORMER,\n );\n\n protected readonly size = inject(TUI_TEXTFIELD_OPTIONS).size;\n protected textfieldValueStart = this.value()[0];\n protected textfieldValueEnd = this.value()[1];\n protected lastActiveSide: 'end' | 'start' = 'start';\n\n @Input()\n public min = 0;\n\n @Input()\n public max = 100;\n\n @Input()\n public step = 1;\n\n @Input()\n public segments = 1;\n\n @Input()\n public keySteps: TuiKeySteps | null = null;\n\n @Input()\n public content: readonly [\n PolymorpheusContent<TuiContext<number>>,\n PolymorpheusContent<TuiContext<number>>,\n ] = ['', ''];\n\n @Input({transform: (x: readonly [string, string] | null) => x ?? ['', '']})\n public prefix: readonly [string, string] = ['', ''];\n\n @Input({transform: (x: readonly [string, string] | null) => x ?? ['', '']})\n public postfix: readonly [string, string] = ['', ''];\n\n // TODO(v5): use signal inputs\n @Input('quantum')\n public set quantumSetter(x: number) {\n this.quantum.set(x);\n }\n\n public override writeValue(value: [number, number]): void {\n super.writeValue(value);\n this.setTextfieldValues(this.value());\n }\n\n public ngAfterViewInit(): void {\n if (this.range) {\n this.range.legacyMode = false; // TODO(v5): remove backward compatibility\n }\n }\n\n protected get hideStartContent(): boolean {\n return !this.content[0] || tuiIsFocused(this.textfieldStart);\n }\n\n protected get hideEndContent(): boolean {\n return !this.content[1] || tuiIsFocused(this.textfieldEnd);\n }\n\n protected takeStep(\n event: Event | KeyboardEvent,\n coefficients: readonly [number, number],\n ): void {\n if (!this.interactive() || !this.range) {\n return;\n }\n\n event.preventDefault();\n\n const [start, end] = this.value();\n const newValue = this.valueGuard(this.range.takeStep(coefficients));\n\n if (newValue[0] !== start || newValue[1] !== end) {\n this.onExternalValueUpdate(newValue);\n }\n }\n\n protected onInput([start, end]: [number | null, number | null]): void {\n const [prevStart, prevEnd] = this.value();\n\n this.setValue([start ?? prevStart, end ?? prevEnd]);\n }\n\n protected onExternalValueUpdate(value: readonly [number, number]): void {\n this.setValue(value);\n this.setTextfieldValues(this.value());\n\n setTimeout((end = Number.MAX_SAFE_INTEGER) => {\n if (tuiIsFocused(this.activeTextfield)) {\n this.activeTextfield?.setSelectionRange(end, end);\n }\n });\n }\n\n protected focusToTextfield(): void {\n if (!this.isMobile) {\n this.activeTextfield?.focus();\n }\n }\n\n protected onActiveThumbChange(activeThumb: 'left' | 'right'): void {\n // TODO(v5): remove backward compatibility\n this.lastActiveSide = activeThumb === 'left' ? 'start' : 'end';\n }\n\n protected setTextfieldValues([start, end]: readonly [number, number]): void {\n this.textfieldValueStart = start;\n this.textfieldValueEnd = end;\n }\n\n private get textfieldStart(): HTMLInputElement | null {\n return this.inputNumberRefs.first?.nativeElement || null;\n }\n\n private get textfieldEnd(): HTMLInputElement | null {\n return this.inputNumberRefs.last?.nativeElement || null;\n }\n\n private get activeTextfield(): HTMLInputElement | null {\n return this.lastActiveSide === 'start' ? this.textfieldStart : this.textfieldEnd;\n }\n\n private setValue(value: readonly [number, number]): void {\n this.onChange(this.valueGuard(value));\n }\n\n private valueGuard(value: readonly [number, number]): readonly [number, number] {\n const [prevStart, prevEnd] = this.value();\n const [start, end] = value.map(\n (x) => this.quantumTransformer().toControlValue(x) ?? x,\n ) as unknown as readonly [number, number];\n\n return [Math.min(start, prevEnd), Math.max(end, prevStart)];\n }\n}\n","<tui-textfield [content]=\"hideStartContent ? '' : content[0]\">\n <ng-container ngProjectAs=\"label\">\n <ng-content select=\"label\" />\n </ng-container>\n\n <input\n tuiInputNumber\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"value()[1]\"\n [min]=\"min\"\n [postfix]=\"postfix[0]\"\n [prefix]=\"prefix[0]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"textfieldValueStart\"\n (blur)=\"textfieldValueStart = value()[0]\"\n (keydown.arrowDown)=\"takeStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"takeStep($event, [1, 0])\"\n (ngModelChange)=\"onInput([$event, null])\"\n />\n\n <input\n tuiInputNumber\n tuiTextfieldAppearance=\"none\"\n class=\"t-end\"\n [class._hidden]=\"!hideEndContent\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"max\"\n [min]=\"value()[0]\"\n [postfix]=\"postfix[1]\"\n [prefix]=\"prefix[1]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"textfieldValueEnd\"\n (blur)=\"textfieldValueEnd = value()[1]\"\n (keydown.arrowDown)=\"takeStep($event, [0, -1])\"\n (keydown.arrowUp)=\"takeStep($event, [0, 1])\"\n (ngModelChange)=\"onInput([null, $event])\"\n />\n\n <div\n class=\"t-content-end\"\n [class._hidden]=\"hideEndContent\"\n >\n <ng-container *polymorpheusOutlet=\"content[1] as text; context: {$implicit: value()[1]}\">\n {{ text }}\n </ng-container>\n </div>\n</tui-textfield>\n\n@if (interactive()) {\n <tui-range\n [focusable]=\"false\"\n [keySteps]=\"keySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value()\"\n [segments]=\"segments\"\n [step]=\"step\"\n (activeThumbChange)=\"onActiveThumbChange($event)\"\n (mousedown.prevent)=\"focusToTextfield()\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n />\n}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\n\nimport {TuiInputRangeComponent} from './input-range.component';\n\nexport const TuiInputRange = [TuiInputRangeComponent, TuiLabel] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqDM,MAAO,sBACT,SAAQ,UAAqC,CAAA;AAlBjD,IAAA,WAAA,GAAA;;QAsBqB,IAAe,CAAA,eAAA,GAC5B,WAAW;AAKE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;AACnB,QAAA,IAAA,CAAA,kBAAkB,GAAG,QAAQ,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,KACpE;AACI,cAAE,IAAI,8BAA8B,CAAC,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CAAC,EAAE,EAAE,EAAE,CAAC,EAAC;gBAInE,OAAO,EAAA,CAAA;sBADb,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAC,SAAS,EAAE,CAAC,CAAmC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC;gBAK/D,aAAa,EAAA,CAAA;sBADvB,KAAK;uBAAC,SAAS;;;MErGP,aAAa,GAAG,CAAC,sBAAsB,EAAE,QAAQ;;ACJ9D;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-range.mjs","sources":["../../../projects/kit/components/input-range/input-range.component.ts","../../../projects/kit/components/input-range/input-range.template.html","../../../projects/kit/components/input-range/taiga-ui-kit-components-input-range.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {CHAR_EN_DASH, CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {TUI_IS_MOBILE, tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiIsNumber, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_TEXTFIELD_OPTIONS, TuiTextfield} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_INPUT_NUMBER_OPTIONS,\n TuiInputNumber,\n TuiInputNumberDirective,\n TuiQuantumValueTransformerBase,\n} from '@taiga-ui/kit/components/input-number';\nimport {TuiRange} from '@taiga-ui/kit/components/range';\nimport {\n type TuiKeySteps,\n tuiSliderOptionsProvider,\n} from '@taiga-ui/kit/components/slider';\nimport {\n type PolymorpheusContent,\n PolymorpheusOutlet,\n type PolymorpheusPrimitive,\n} from '@taiga-ui/polymorpheus';\n\nconst transform = (x?: readonly [string, string] | null): readonly [string, string] =>\n x ?? ['', ''];\n\n@Component({\n selector: 'tui-input-range',\n imports: [FormsModule, PolymorpheusOutlet, TuiInputNumber, TuiRange, TuiTextfield],\n templateUrl: './input-range.template.html',\n styleUrl: './input-range.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsControl(TuiInputRange),\n tuiSliderOptionsProvider({trackColor: 'transparent'}),\n tuiFallbackValueProvider([0, 0]),\n ],\n host: {\n '[attr.data-size]': 'size()',\n // TODO: Delete this line and put `tui-input-range:has(.t-content-end) {--t-icon-lock: none}` to proprietary styles\n '[style.--t-icon-lock]': 'contentEnd() ? \"none\" : null',\n },\n})\nexport class TuiInputRange extends TuiControl<readonly [number, number]> {\n private readonly inputs = viewChildren(TuiInputNumberDirective, {read: ElementRef});\n private readonly range = viewChild(TuiRange);\n private readonly options = inject(TUI_INPUT_NUMBER_OPTIONS);\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly quantumTransformer = computed(\n () => new TuiQuantumValueTransformerBase(this.quantum()),\n );\n\n protected readonly size = inject(TUI_TEXTFIELD_OPTIONS).size;\n protected start = this.value()[0];\n protected end = this.value()[1];\n protected side: 'end' | 'start' = 'start';\n protected readonly contentStart = computed(() => {\n const [start, end] = this.content().map((x, i) => {\n const value = this.value()[i]!;\n\n return typeof x === 'function' ? x({$implicit: value}) : x || value;\n });\n\n if (this.interactive() || !this.isPrimitive(start) || !this.isPrimitive(end)) {\n return this.content()[0];\n }\n\n return `${start}${CHAR_NO_BREAK_SPACE}${CHAR_EN_DASH}${CHAR_NO_BREAK_SPACE}${end}`;\n });\n\n protected readonly contentEnd = computed(() =>\n this.contentStart() === this.content()[0] ? this.content()[1] : '',\n );\n\n public readonly min = input(0);\n public readonly max = input(100);\n public readonly step = input(1);\n public readonly segments = input(1);\n public readonly keySteps = input<TuiKeySteps>();\n public readonly quantum = input(0);\n public readonly prefix = input([this.options.prefix, this.options.prefix], {\n transform,\n });\n\n public readonly postfix = input([this.options.postfix, this.options.postfix], {\n transform,\n });\n\n public content = input<\n readonly [\n PolymorpheusContent<TuiContext<number>>,\n PolymorpheusContent<TuiContext<number>>,\n ]\n >(['', '']);\n\n public override writeValue(value: [number, number]): void {\n super.writeValue(value);\n this.setTextfieldValues(this.value());\n }\n\n protected get contentStartHidden(): boolean {\n return this.interactive() && tuiIsFocused(this.textfieldStart);\n }\n\n protected get contentEndHidden(): boolean {\n return (\n !this.content()[1] || (this.interactive() && tuiIsFocused(this.textfieldEnd))\n );\n }\n\n protected takeStep(\n event: Event | KeyboardEvent,\n coefficients: readonly [number, number],\n ): void {\n if (!this.interactive() || !this.range()) {\n return;\n }\n\n event.preventDefault();\n\n const [start, end] = this.value();\n const newValue = this.valueGuard(this.range()!.takeStep(coefficients));\n\n if (newValue[0] !== start || newValue[1] !== end) {\n this.onExternalValueUpdate(newValue);\n }\n }\n\n protected onInput([start, end]: [number | null, number | null]): void {\n this.setValue([start ?? this.value()[0], end ?? this.value()[1]]);\n }\n\n protected onExternalValueUpdate(value: readonly [number, number]): void {\n this.setValue(value);\n this.setTextfieldValues(this.value());\n\n setTimeout((end = Number.MAX_SAFE_INTEGER) => {\n if (tuiIsFocused(this.activeTextfield)) {\n this.activeTextfield?.setSelectionRange(end, end);\n }\n });\n }\n\n protected focusToTextfield(): void {\n if (!this.isMobile) {\n this.activeTextfield?.focus();\n }\n }\n\n protected setTextfieldValues([start, end]: readonly [number, number]): void {\n this.start = start;\n this.end = end;\n }\n\n private get textfieldStart(): HTMLInputElement | null {\n return this.inputs()[0]?.nativeElement || null;\n }\n\n private get textfieldEnd(): HTMLInputElement | null {\n return this.inputs()[this.inputs().length - 1]?.nativeElement || null;\n }\n\n private get activeTextfield(): HTMLInputElement | null {\n return this.side === 'start' ? this.textfieldStart : this.textfieldEnd;\n }\n\n private setValue(value: readonly [number, number]): void {\n this.onChange(this.valueGuard(value));\n }\n\n private valueGuard(value: readonly [number, number]): readonly [number, number] {\n const [prevStart, prevEnd] = this.value();\n const [start, end] = value.map(\n (x) => this.quantumTransformer().toControlValue(x) ?? x,\n ) as unknown as readonly [number, number];\n\n return [Math.min(start, prevEnd), Math.max(end, prevStart)];\n }\n\n private isPrimitive(x: PolymorpheusContent): x is PolymorpheusPrimitive {\n return !x || tuiIsString(x) || tuiIsNumber(x);\n }\n}\n","<tui-textfield [content]=\"contentStartHidden ? '' : contentStart()\">\n <label tuiLabel>\n <ng-content />\n </label>\n\n <input\n tuiInputNumber\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"value()[1]\"\n [min]=\"min()\"\n [postfix]=\"postfix()[0]\"\n [prefix]=\"prefix()[0]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"start\"\n (blur)=\"start = value()[0]\"\n (keydown.arrowDown)=\"takeStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"takeStep($event, [1, 0])\"\n (ngModelChange)=\"onInput([$event, null])\"\n />\n\n <input\n tuiInputNumber\n class=\"t-end\"\n [class._hidden]=\"!contentEndHidden || !this.interactive()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [max]=\"max()\"\n [min]=\"value()[0]\"\n [postfix]=\"postfix()[1]\"\n [prefix]=\"prefix()[1]\"\n [readOnly]=\"readOnly()\"\n [(ngModel)]=\"end\"\n (blur)=\"end = value()[1]\"\n (keydown.arrowDown)=\"takeStep($event, [0, -1])\"\n (keydown.arrowUp)=\"takeStep($event, [0, 1])\"\n (ngModelChange)=\"onInput([null, $event])\"\n />\n\n @if (!contentEndHidden && contentEnd()) {\n <div class=\"t-content-end\">\n <ng-container *polymorpheusOutlet=\"contentEnd() as text; context: {$implicit: value()[1]}\">\n {{ text }}\n </ng-container>\n </div>\n }\n\n @if (interactive()) {\n <tui-range\n [focusable]=\"false\"\n [keySteps]=\"keySteps()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [ngModel]=\"value()\"\n [segments]=\"segments()\"\n [step]=\"step()\"\n (activeThumbChange)=\"side = $event\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n (pointerdown.prevent.stop)=\"focusToTextfield()\"\n />\n }\n</tui-textfield>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,MAAM,SAAS,GAAG,CAAC,CAAoC,KACnD,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;AAmBX,MAAO,aAAc,SAAQ,UAAqC,CAAA;AAjBxE,IAAA,WAAA,GAAA;;QAkBqB,IAAM,CAAA,MAAA,GAAG,YAAY,CAAC,uBAAuB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;AAClE,QAAA,IAAA,CAAA,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC1C,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,kBAAkB,GAAG,QAAQ,CAC1C,MAAM,IAAI,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAC3D;AAEkB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI;QAClD,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACvB,IAAG,CAAA,GAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACrB,IAAI,CAAA,IAAA,GAAoB,OAAO;AACtB,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AAC5C,YAAA,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;gBAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC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AErDL;;AAEG;;;;"}
@@ -1,58 +1,62 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import { tuiInjectAuxiliary, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
3
+ import { TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
1
4
  import { TuiSliderComponent, TuiSliderKeyStepsBase, TuiSliderKeySteps } from '@taiga-ui/kit/components/slider';
2
5
  import * as i0 from '@angular/core';
3
- import { inject, computed, effect, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
4
- import { TuiValueTransformer, TUI_IDENTITY_VALUE_TRANSFORMER, TuiNonNullableValueTransformer } from '@taiga-ui/cdk/classes';
5
- import { TUI_ALLOW_SIGNAL_WRITES } from '@taiga-ui/cdk/constants';
6
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, computed, effect, Directive } from '@angular/core';
7
+ import { TuiValueTransformer, TuiNonNullableValueTransformer } from '@taiga-ui/cdk/classes';
6
8
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
7
- import { tuiInjectElement, tuiIsElement, tuiIsInput } from '@taiga-ui/cdk/utils/dom';
9
+ import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
8
10
  import { tuiClamp } from '@taiga-ui/cdk/utils/math';
9
11
  import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
10
- import { tuiInjectAuxiliary } from '@taiga-ui/core/components/textfield';
11
12
  import * as i1 from '@taiga-ui/kit/components/input-number';
12
13
  import { TuiInputNumberDirective, tuiInputNumberOptionsProvider, TuiWithQuantumValueTransformer } from '@taiga-ui/kit/components/input-number';
13
- import { fromEvent, filter } from 'rxjs';
14
+ import { fromEvent, tap, filter, switchMap } from 'rxjs';
14
15
 
16
+ class Styles {
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-input-slider" }, ngImport: i0, template: '', isInline: true, styles: ["tui-textfield [tuiInputSlider]~.t-content .t-clear{display:none!important}\n", "tui-textfield [tuiInputSlider]~[tuiSlider]:disabled{display:none}\n", "tui-textfield [tuiSlider]{--tui-slider-track-color: transparent !important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
19
+ }
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, decorators: [{
21
+ type: Component,
22
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-input-slider' }, styles: ["tui-textfield [tuiInputSlider]~.t-content .t-clear{display:none!important}\n", "tui-textfield [tuiInputSlider]~[tuiSlider]:disabled{display:none}\n", "tui-textfield [tuiSlider]{--tui-slider-track-color: transparent !important}\n"] }]
23
+ }] });
15
24
  class TuiInputSliderDirective {
16
25
  constructor() {
17
26
  this.isMobile = inject(TUI_IS_MOBILE);
18
- this.element = tuiInjectElement();
27
+ this.el = tuiInjectElement();
19
28
  this.slider = tuiInjectAuxiliary((x) => x instanceof TuiSliderComponent);
20
29
  this.controlTransformer = inject(TuiValueTransformer, { self: true });
21
- this.keyStepsTransformer = computed(() => this.slider()?.keySteps?.transformer() ?? TUI_IDENTITY_VALUE_TRANSFORMER);
30
+ this.nothing = tuiWithStyles(Styles);
22
31
  this.inputNumber = inject(TuiInputNumberDirective, { self: true });
23
32
  this.value = computed(() => this.controlTransformer.toControlValue(this.inputNumber.value()));
24
- this.nothing = tuiWithStyles(TuiInputSliderStyles);
25
33
  this.textfieldToSliderSync = effect(() => {
26
34
  const slider = this.slider();
27
35
  if (!slider) {
28
36
  return;
29
37
  }
30
- if (slider.keySteps?.transformer() &&
31
- Number.isFinite(slider.keySteps?.totalSteps)) {
32
- // TODO(v5): move all if-condition body inside `TuiSliderKeyStepsBase`
33
- slider.min = 0;
34
- slider.step = 1;
35
- slider.max = slider.keySteps?.totalSteps ?? 100;
36
- }
37
- else {
38
+ if (!slider.keySteps?.transformer()) {
38
39
  slider.min = this.inputNumber.min();
39
40
  slider.max = this.inputNumber.max();
41
+ slider.value = this.value();
42
+ }
43
+ else {
44
+ slider.keySteps?.setControlValue(this.value());
40
45
  }
41
- slider.value = this.keyStepsTransformer().fromControlValue(this.value());
42
46
  slider.el.disabled = !this.inputNumber.interactive();
43
- }, TUI_ALLOW_SIGNAL_WRITES);
44
- this.sliderInitEffect = effect((onCleanup) => {
47
+ });
48
+ this.sliderInit = effect((onCleanup) => {
45
49
  const slider = this.slider();
46
50
  if (!slider) {
47
51
  return;
48
52
  }
49
- slider.el.style.setProperty('--tui-slider-track-color', 'transparent');
53
+ slider.el.setAttribute('tabindex', '-1');
50
54
  if (slider.keySteps) {
51
- slider.keySteps.value = this.value;
55
+ slider.keySteps.controlValue = this.value;
52
56
  }
53
- const subscription = fromEvent(slider.el, 'input', (x) => x.target)
54
- .pipe(filter(tuiIsElement), filter(tuiIsInput))
55
- .subscribe((x) => this.onSliderInput(x.valueAsNumber));
57
+ const subscription = fromEvent(slider.el, 'input')
58
+ .pipe(tap(() => this.inputNumber.setValue(slider.keySteps?.getControlValue() ?? slider.el.valueAsNumber)), filter(() => !this.isMobile), switchMap(() => fromEvent(this.el.ownerDocument, 'pointerup', { once: true })))
59
+ .subscribe(() => this.el.focus());
56
60
  onCleanup(() => subscription.unsubscribe());
57
61
  });
58
62
  }
@@ -64,23 +68,16 @@ class TuiInputSliderDirective {
64
68
  this.inputNumber.setValue(newValue);
65
69
  }
66
70
  }
67
- onSliderInput(value) {
68
- this.inputNumber.setValue(this.keyStepsTransformer().toControlValue(value));
69
- if (!this.isMobile) {
70
- this.element.focus();
71
- }
72
- }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSliderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
74
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputSliderDirective, isStandalone: true, selector: "input[tuiInputSlider]", host: { listeners: { "blur": "inputNumber.setValue(value() ?? null)", "keydown.arrowUp": "onStep(1)", "keydown.arrowDown": "onStep(-1)" } }, providers: [
71
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputSliderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
72
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputSliderDirective, isStandalone: true, selector: "input[tuiInputSlider]", host: { listeners: { "blur": "inputNumber.setValue(value() ?? null)", "keydown.arrowUp": "onStep(1)", "keydown.arrowDown": "onStep(-1)" } }, providers: [
75
73
  tuiInputNumberOptionsProvider({
76
74
  valueTransformer: new TuiNonNullableValueTransformer(),
77
75
  }),
78
76
  ], hostDirectives: [{ directive: i1.TuiInputNumberDirective, inputs: ["min", "min", "max", "max", "prefix", "prefix", "postfix", "postfix", "invalid", "invalid", "readOnly", "readOnly"] }, { directive: i1.TuiWithQuantumValueTransformer }], ngImport: i0 }); }
79
77
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSliderDirective, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputSliderDirective, decorators: [{
81
79
  type: Directive,
82
80
  args: [{
83
- standalone: true,
84
81
  selector: 'input[tuiInputSlider]',
85
82
  providers: [
86
83
  tuiInputNumberOptionsProvider({
@@ -101,22 +98,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
101
98
  },
102
99
  }]
103
100
  }] });
104
- class TuiInputSliderStyles {
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSliderStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
106
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputSliderStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-input-slider" }, ngImport: i0, template: '', isInline: true, styles: ["tui-textfield [tuiInputSlider]~.t-content .t-clear{display:none!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
107
- }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputSliderStyles, decorators: [{
109
- type: Component,
110
- args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
111
- class: 'tui-input-slider',
112
- }, styles: ["tui-textfield [tuiInputSlider]~.t-content .t-clear{display:none!important}\n"] }]
113
- }] });
114
101
 
115
102
  const TuiInputSlider = [
116
103
  TuiSliderComponent,
117
104
  TuiSliderKeyStepsBase,
118
105
  TuiSliderKeySteps,
119
106
  TuiInputSliderDirective,
107
+ TuiLabel,
108
+ TuiTextfieldComponent,
109
+ TuiTextfieldOptionsDirective,
110
+ TuiDropdownContent,
120
111
  ];
121
112
 
122
113
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-slider.mjs","sources":["../../../projects/kit/components/input-slider/input-slider.directive.ts","../../../projects/kit/components/input-slider/input-slider.ts","../../../projects/kit/components/input-slider/taiga-ui-kit-components-input-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n effect,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n TuiNonNullableValueTransformer,\n TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement, tuiIsElement, tuiIsInput} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiInjectAuxiliary} from '@taiga-ui/core/components/textfield';\nimport {\n TuiInputNumberDirective,\n tuiInputNumberOptionsProvider,\n TuiWithQuantumValueTransformer,\n} from '@taiga-ui/kit/components/input-number';\nimport {TuiSliderComponent} from '@taiga-ui/kit/components/slider';\nimport {filter, fromEvent} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiInputSlider]',\n providers: [\n tuiInputNumberOptionsProvider({\n valueTransformer: new TuiNonNullableValueTransformer(),\n }),\n ],\n hostDirectives: [\n {\n directive: TuiInputNumberDirective,\n inputs: ['min', 'max', 'prefix', 'postfix', 'invalid', 'readOnly'],\n },\n TuiWithQuantumValueTransformer,\n ],\n host: {\n '(blur)': 'inputNumber.setValue(value() ?? null)',\n '(keydown.arrowUp)': 'onStep(1)',\n '(keydown.arrowDown)': 'onStep(-1)',\n },\n})\nexport class TuiInputSliderDirective {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly element = tuiInjectElement<HTMLInputElement>();\n private readonly slider = tuiInjectAuxiliary<TuiSliderComponent>(\n (x) => x instanceof TuiSliderComponent,\n );\n\n private readonly controlTransformer = inject<\n TuiValueTransformer<number | null, number>\n >(TuiValueTransformer, {self: true});\n\n private readonly keyStepsTransformer = computed(\n () => this.slider()?.keySteps?.transformer() ?? TUI_IDENTITY_VALUE_TRANSFORMER,\n );\n\n protected readonly inputNumber = inject(TuiInputNumberDirective, {self: true});\n protected readonly value = computed(() =>\n this.controlTransformer.toControlValue(this.inputNumber.value()),\n );\n\n protected readonly nothing = tuiWithStyles(TuiInputSliderStyles);\n\n protected readonly textfieldToSliderSync = effect(() => {\n const slider = this.slider();\n\n if (!slider) {\n return;\n }\n\n if (\n slider.keySteps?.transformer() &&\n Number.isFinite(slider.keySteps?.totalSteps)\n ) {\n // TODO(v5): move all if-condition body inside `TuiSliderKeyStepsBase`\n slider.min = 0;\n slider.step = 1;\n slider.max = slider.keySteps?.totalSteps ?? 100;\n } else {\n slider.min = this.inputNumber.min();\n slider.max = this.inputNumber.max();\n }\n\n slider.value = this.keyStepsTransformer().fromControlValue(this.value());\n slider.el.disabled = !this.inputNumber.interactive();\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly sliderInitEffect = effect((onCleanup) => {\n const slider = this.slider();\n\n if (!slider) {\n return;\n }\n\n slider.el.style.setProperty('--tui-slider-track-color', 'transparent');\n\n if (slider.keySteps) {\n slider.keySteps.value = this.value;\n }\n\n const subscription = fromEvent(slider.el, 'input', (x) => x.target)\n .pipe(filter(tuiIsElement), filter(tuiIsInput))\n .subscribe((x) => this.onSliderInput(x.valueAsNumber));\n\n onCleanup(() => subscription.unsubscribe());\n });\n\n protected onStep(coefficient: number): void {\n const slider = this.slider();\n\n if (slider && this.inputNumber.interactive()) {\n const newValue = tuiClamp(\n slider.keySteps?.takeStep(coefficient) ??\n slider.value + coefficient * slider.step,\n this.inputNumber.min(),\n this.inputNumber.max(),\n );\n\n this.inputNumber.setValue(newValue);\n }\n }\n\n private onSliderInput(value: number): void {\n this.inputNumber.setValue(this.keyStepsTransformer().toControlValue(value));\n\n if (!this.isMobile) {\n this.element.focus();\n }\n }\n}\n\n@Component({\n standalone: true,\n template: '',\n styles: [\n // TODO: tui-textfield:has([tuiInputSlider]) .t-clear\n 'tui-textfield [tuiInputSlider] ~ .t-content .t-clear {display: none !important}',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-input-slider',\n },\n})\nclass TuiInputSliderStyles {}\n","import {\n TuiSliderComponent,\n TuiSliderKeySteps,\n TuiSliderKeyStepsBase,\n} from '@taiga-ui/kit/components/slider';\n\nimport {TuiInputSliderDirective} from './input-slider.directive';\n\nexport const TuiInputSlider = [\n TuiSliderComponent,\n TuiSliderKeyStepsBase,\n TuiSliderKeySteps,\n TuiInputSliderDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAiDa,uBAAuB,CAAA;AArBpC,IAAA,WAAA,GAAA;AAsBqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;QAChC,IAAO,CAAA,OAAA,GAAG,gBAAgB,EAAoB;AAC9C,QAAA,IAAA,CAAA,MAAM,GAAG,kBAAkB,CACxC,CAAC,CAAC,KAAK,CAAC,YAAY,kBAAkB,CACzC;QAEgB,IAAkB,CAAA,kBAAA,GAAG,MAAM,CAE1C,mBAAmB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC;AAEnB,QAAA,IAAA,CAAA,mBAAmB,GAAG,QAAQ,CAC3C,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,8BAA8B,CACjF;QAEkB,IAAW,CAAA,WAAA,GAAG,MAAM,CAAC,uBAAuB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC;QAC3D,IAAK,CAAA,KAAA,GAAG,QAAQ,CAAC,MAChC,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CACnE;AAEkB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,oBAAoB,CAAC;AAE7C,QAAA,IAAA,CAAA,qBAAqB,GAAG,MAAM,CAAC,MAAK;AACnD,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;YAE5B,IAAI,CAAC,MAAM,EAAE;gBACT;;AAGJ,YAAA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CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,sHAXZ,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAWV,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbzB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,EAAE,EAAA,aAAA,EAKG,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,KAAK,EAAE,kBAAkB;AAC5B,qBAAA,EAAA,MAAA,EAAA,CAAA,8EAAA,CAAA,EAAA;;;AC9IQ,MAAA,cAAc,GAAG;IAC1B,kBAAkB;IAClB,qBAAqB;IACrB,iBAAiB;IACjB,uBAAuB;;;ACZ3B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-slider.mjs","sources":["../../../projects/kit/components/input-slider/input-slider.directive.ts","../../../projects/kit/components/input-slider/input-slider.ts","../../../projects/kit/components/input-slider/taiga-ui-kit-components-input-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n effect,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiNonNullableValueTransformer, TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiInjectAuxiliary} from '@taiga-ui/core/components/textfield';\nimport {\n TuiInputNumberDirective,\n tuiInputNumberOptionsProvider,\n TuiWithQuantumValueTransformer,\n} from '@taiga-ui/kit/components/input-number';\nimport {TuiSliderComponent} from '@taiga-ui/kit/components/slider';\nimport {filter, fromEvent, switchMap, tap} from 'rxjs';\n\n@Component({\n template: '',\n styles: [\n // TODO: tui-textfield:has([tuiInputSlider]) .t-clear\n 'tui-textfield [tuiInputSlider] ~ .t-content .t-clear {display: none !important}',\n // TODO: tui-textfield:has([tuiInputSlider]) [tuiSlider]:disabled\n 'tui-textfield [tuiInputSlider] ~ [tuiSlider]:disabled {display: none}',\n 'tui-textfield [tuiSlider] { --tui-slider-track-color: transparent !important; }',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-input-slider'},\n})\nclass Styles {}\n\n@Directive({\n selector: 'input[tuiInputSlider]',\n providers: [\n tuiInputNumberOptionsProvider({\n valueTransformer: new TuiNonNullableValueTransformer(),\n }),\n ],\n hostDirectives: [\n {\n directive: TuiInputNumberDirective,\n inputs: ['min', 'max', 'prefix', 'postfix', 'invalid', 'readOnly'],\n },\n TuiWithQuantumValueTransformer,\n ],\n host: {\n '(blur)': 'inputNumber.setValue(value() ?? null)',\n '(keydown.arrowUp)': 'onStep(1)',\n '(keydown.arrowDown)': 'onStep(-1)',\n },\n})\nexport class TuiInputSliderDirective {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly slider = tuiInjectAuxiliary<TuiSliderComponent>(\n (x) => x instanceof TuiSliderComponent,\n );\n\n private readonly controlTransformer = inject<\n TuiValueTransformer<number | null, number>\n >(TuiValueTransformer, {self: true});\n\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly inputNumber = inject(TuiInputNumberDirective, {self: true});\n protected readonly value = computed(() =>\n this.controlTransformer.toControlValue(this.inputNumber.value()),\n );\n\n protected readonly textfieldToSliderSync = effect(() => {\n const slider = this.slider();\n\n if (!slider) {\n return;\n }\n\n if (!slider.keySteps?.transformer()) {\n slider.min = this.inputNumber.min();\n slider.max = this.inputNumber.max();\n slider.value = this.value();\n } else {\n slider.keySteps?.setControlValue(this.value());\n }\n\n slider.el.disabled = !this.inputNumber.interactive();\n });\n\n protected readonly sliderInit = effect((onCleanup) => {\n const slider = this.slider();\n\n if (!slider) {\n return;\n }\n\n slider.el.setAttribute('tabindex', '-1');\n\n if (slider.keySteps) {\n slider.keySteps.controlValue = this.value;\n }\n\n const subscription = fromEvent(slider.el, 'input')\n .pipe(\n tap(() =>\n this.inputNumber.setValue(\n slider.keySteps?.getControlValue() ?? slider.el.valueAsNumber,\n ),\n ),\n filter(() => !this.isMobile),\n switchMap(() =>\n fromEvent(this.el.ownerDocument, 'pointerup', {once: true}),\n ),\n )\n .subscribe(() => this.el.focus());\n\n onCleanup(() => subscription.unsubscribe());\n });\n\n protected onStep(coefficient: number): void {\n const slider = this.slider();\n\n if (slider && this.inputNumber.interactive()) {\n const newValue = tuiClamp(\n slider.keySteps?.takeStep(coefficient) ??\n slider.value + coefficient * slider.step,\n this.inputNumber.min(),\n this.inputNumber.max(),\n );\n\n this.inputNumber.setValue(newValue);\n }\n }\n}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals/dropdown';\nimport {\n TuiSliderComponent,\n TuiSliderKeySteps,\n TuiSliderKeyStepsBase,\n} from '@taiga-ui/kit/components/slider';\n\nimport {TuiInputSliderDirective} from './input-slider.directive';\n\nexport const TuiInputSlider = [\n TuiSliderComponent,\n TuiSliderKeyStepsBase,\n TuiSliderKeySteps,\n TuiInputSliderDirective,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bund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