@taiga-ui/kit 4.52.0-canary.e444d19 → 4.52.0-canary.e53e79e

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 (447) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/accordion.component.d.ts +13 -0
  3. package/components/accordion/accordion.d.ts +4 -4
  4. package/components/accordion/accordion.directive.d.ts +11 -10
  5. package/components/accordion/index.d.ts +1 -3
  6. package/components/action-bar/action-bar.component.d.ts +5 -7
  7. package/components/action-bar/index.d.ts +0 -2
  8. package/components/avatar/avatar-outline.directive.d.ts +3 -3
  9. package/components/avatar/avatar.directive.d.ts +15 -0
  10. package/components/avatar/avatar.options.d.ts +1 -4
  11. package/components/avatar/index.d.ts +1 -1
  12. package/components/badge/badge.directive.d.ts +2 -2
  13. package/components/badge/badge.options.d.ts +1 -3
  14. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  15. package/components/block/block.directive.d.ts +4 -4
  16. package/components/block/block.options.d.ts +2 -4
  17. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  18. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  19. package/components/calendar-month/calendar-month.options.d.ts +1 -1
  20. package/components/calendar-range/calendar-range.component.d.ts +1 -2
  21. package/components/checkbox/checkbox.component.d.ts +7 -18
  22. package/components/checkbox/checkbox.options.d.ts +5 -9
  23. package/components/chip/chip.directive.d.ts +2 -4
  24. package/components/chip/chip.options.d.ts +1 -3
  25. package/components/combo-box/combo-box.d.ts +5 -0
  26. package/components/combo-box/combo-box.directive.d.ts +5 -5
  27. package/components/combo-box/index.d.ts +1 -0
  28. package/components/comment/comment.directive.d.ts +2 -2
  29. package/components/confirm/confirm.component.d.ts +5 -3
  30. package/components/confirm/confirm.service.d.ts +3 -2
  31. package/{directives → components}/copy/copy.component.d.ts +2 -2
  32. package/{directives → components}/copy/copy.directive.d.ts +4 -6
  33. package/{directives → components}/copy/copy.options.d.ts +2 -2
  34. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -2
  35. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  36. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  37. package/components/data-list-wrapper/index.d.ts +1 -1
  38. package/components/elastic-container/elastic-container.component.d.ts +1 -1
  39. package/components/files/file/file.options.d.ts +2 -2
  40. package/components/files/files/files.component.d.ts +2 -2
  41. package/components/files/input-files/input-files.options.d.ts +1 -3
  42. package/components/floating-container/floating-container.directive.d.ts +3 -2
  43. package/components/fullscreen/fullscreen.component.d.ts +14 -0
  44. package/components/fullscreen/index.d.ts +1 -0
  45. package/components/index.d.ts +3 -2
  46. package/components/input-chip/input-chip.component.d.ts +9 -8
  47. package/components/input-chip/input-chip.d.ts +5 -1
  48. package/components/input-chip/input-chip.directive.d.ts +7 -12
  49. package/components/input-chip/input-chip.options.d.ts +1 -1
  50. package/components/input-color/index.d.ts +1 -0
  51. package/components/input-color/input-color.component.d.ts +6 -6
  52. package/components/input-color/input-color.d.ts +5 -0
  53. package/components/input-color/input-color.options.d.ts +1 -1
  54. package/components/input-date/input-date.d.ts +4 -1
  55. package/components/input-date/input-date.directive.d.ts +10 -12
  56. package/components/input-date/input-date.options.d.ts +1 -1
  57. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  58. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  59. package/components/input-date-range/input-date-range.d.ts +4 -1
  60. package/components/input-date-range/input-date-range.directive.d.ts +5 -8
  61. package/components/input-date-time/input-date-time.d.ts +4 -1
  62. package/components/input-date-time/input-date-time.directive.d.ts +6 -6
  63. package/components/input-month/input-month.d.ts +4 -1
  64. package/components/input-month/input-month.directive.d.ts +5 -4
  65. package/components/input-month-range/input-month-range.d.ts +4 -1
  66. package/components/input-month-range/input-month-range.directive.d.ts +5 -4
  67. package/components/input-number/input-number.d.ts +4 -1
  68. package/components/input-number/input-number.directive.d.ts +7 -11
  69. package/components/input-number/input-number.options.d.ts +1 -1
  70. package/components/input-number/quantum.directive.d.ts +1 -1
  71. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  72. package/components/input-phone/index.d.ts +1 -0
  73. package/components/input-phone/input-phone.d.ts +5 -0
  74. package/components/input-phone/input-phone.directive.d.ts +7 -7
  75. package/components/input-phone/input-phone.options.d.ts +1 -1
  76. package/components/input-phone-international/index.d.ts +1 -0
  77. package/components/input-phone-international/input-phone-international.component.d.ts +26 -32
  78. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  79. package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
  80. package/components/input-pin/index.d.ts +1 -0
  81. package/components/input-pin/input-pin.component.d.ts +4 -4
  82. package/components/input-pin/input-pin.d.ts +5 -0
  83. package/components/input-range/input-range.component.d.ts +9 -12
  84. package/components/input-slider/input-slider.d.ts +4 -1
  85. package/components/input-slider/input-slider.directive.d.ts +3 -5
  86. package/components/input-time/input-time.component.d.ts +1 -3
  87. package/components/input-time/input-time.d.ts +4 -1
  88. package/components/input-time/input-time.directive.d.ts +8 -10
  89. package/components/input-time/input-time.options.d.ts +1 -1
  90. package/components/input-year/input-year.d.ts +4 -1
  91. package/components/input-year/input-year.directive.d.ts +5 -5
  92. package/components/like/like.component.d.ts +4 -11
  93. package/components/like/like.options.d.ts +4 -5
  94. package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
  95. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  96. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  97. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +6 -8
  98. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  99. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  100. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  101. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  102. package/components/pager/pager.component.d.ts +1 -1
  103. package/components/pagination/index.d.ts +1 -0
  104. package/components/pagination/pagination.component.d.ts +25 -54
  105. package/components/pagination/pagination.options.d.ts +7 -0
  106. package/components/pin/pin.directive.d.ts +2 -2
  107. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  108. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  109. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  110. package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
  111. package/components/preview/preview.component.d.ts +1 -1
  112. package/components/preview/preview.d.ts +2 -1
  113. package/components/preview/zoom/preview-zoom.component.d.ts +2 -1
  114. package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
  115. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  116. package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
  117. package/components/progress/progress.options.d.ts +1 -3
  118. package/components/push/push-alert.component.d.ts +4 -3
  119. package/components/push/push.component.d.ts +2 -2
  120. package/components/push/push.directive.d.ts +4 -6
  121. package/components/push/push.options.d.ts +5 -8
  122. package/components/push/push.service.d.ts +6 -2
  123. package/components/radio/radio.component.d.ts +8 -9
  124. package/components/radio/radio.directive.d.ts +2 -2
  125. package/components/radio/radio.options.d.ts +2 -5
  126. package/components/radio-list/radio-list.component.d.ts +5 -3
  127. package/components/range/range-change.directive.d.ts +1 -2
  128. package/components/range/range.component.d.ts +16 -24
  129. package/components/rating/rating.component.d.ts +5 -5
  130. package/components/rating/rating.options.d.ts +6 -6
  131. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  132. package/components/segmented/segmented.component.d.ts +5 -9
  133. package/components/segmented/segmented.directive.d.ts +6 -7
  134. package/components/select/native-select/native-select.component.d.ts +7 -8
  135. package/components/select/select.d.ts +4 -1
  136. package/components/select/select.directive.d.ts +4 -3
  137. package/components/slider/helpers/key-steps.d.ts +1 -2
  138. package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
  139. package/components/slider/slider.options.d.ts +1 -6
  140. package/components/slides/slides.directive.d.ts +4 -4
  141. package/components/status/status.directive.d.ts +2 -2
  142. package/components/stepper/step.component.d.ts +6 -8
  143. package/components/stepper/stepper.component.d.ts +6 -11
  144. package/components/switch/switch.component.d.ts +8 -19
  145. package/components/switch/switch.options.d.ts +4 -8
  146. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  147. package/components/tabs/tabs.options.d.ts +1 -6
  148. package/components/textarea/index.d.ts +2 -1
  149. package/components/textarea/textarea.component.d.ts +4 -4
  150. package/components/textarea/textarea.d.ts +6 -0
  151. package/components/textarea/textarea.directive.d.ts +13 -0
  152. package/components/textarea/textarea.options.d.ts +1 -1
  153. package/components/toast/index.d.ts +5 -0
  154. package/components/toast/toast.component.d.ts +18 -0
  155. package/components/toast/toast.d.ts +3 -0
  156. package/components/toast/toast.directive.d.ts +7 -0
  157. package/components/toast/toast.options.d.ts +10 -0
  158. package/components/toast/toast.service.d.ts +17 -0
  159. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  160. package/components/tree/misc/tree.constants.d.ts +0 -3
  161. package/components/tree/misc/tree.tokens.d.ts +1 -6
  162. package/directives/button-close/button-close.directive.d.ts +2 -1
  163. package/directives/button-select/button-select.directive.d.ts +4 -4
  164. package/directives/chevron/chevron.directive.d.ts +2 -3
  165. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  166. package/directives/fade/fade.directive.d.ts +2 -2
  167. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  168. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  169. package/directives/highlight/highlight.directive.d.ts +1 -3
  170. package/directives/index.d.ts +0 -2
  171. package/directives/password/password.directive.d.ts +1 -1
  172. package/directives/password/password.options.d.ts +1 -1
  173. package/directives/sensitive/sensitive.directive.d.ts +2 -2
  174. package/directives/shimmer/shimmer.directive.d.ts +3 -3
  175. package/directives/skeleton/skeleton.directive.d.ts +3 -3
  176. package/directives/tooltip/tooltip.directive.d.ts +3 -3
  177. package/directives/tooltip/tooltip.options.d.ts +1 -4
  178. package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
  179. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  180. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +24 -40
  181. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  182. package/fesm2022/taiga-ui-kit-components-avatar.mjs +62 -80
  183. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  184. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +7 -12
  185. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  186. package/fesm2022/taiga-ui-kit-components-badge.mjs +16 -27
  187. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -7
  189. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-block.mjs +20 -31
  191. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +12 -18
  193. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +6 -6
  195. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
  197. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -8
  199. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -23
  201. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +18 -76
  203. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-chip.mjs +25 -34
  205. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +42 -32
  207. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-comment.mjs +13 -20
  209. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-compass.mjs +5 -5
  211. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-confirm.mjs +14 -17
  213. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-copy.mjs +113 -0
  215. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
  216. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
  217. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-drawer.mjs +5 -5
  219. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +8 -12
  221. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-files.mjs +43 -50
  223. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-filter.mjs +5 -5
  225. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +16 -19
  227. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +63 -0
  229. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
  230. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +79 -79
  231. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-input-color.mjs +28 -19
  233. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +35 -52
  235. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +27 -32
  237. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +32 -29
  239. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-input-date.mjs +45 -48
  241. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +4 -5
  243. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  244. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +25 -19
  245. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  246. package/fesm2022/taiga-ui-kit-components-input-month.mjs +28 -22
  247. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-input-number.mjs +60 -77
  249. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +122 -138
  251. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +32 -23
  253. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +20 -11
  255. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-input-range.mjs +33 -29
  257. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  258. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +36 -45
  259. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components-input-time.mjs +65 -71
  261. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-components-input-year.mjs +27 -19
  263. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +14 -16
  265. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-components-like.mjs +40 -33
  267. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +38 -82
  269. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-message.mjs +9 -12
  271. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +37 -48
  273. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -33
  275. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components-pager.mjs +7 -9
  277. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-components-pagination.mjs +69 -140
  279. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-components-pin.mjs +15 -19
  281. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-components-preview.mjs +59 -50
  283. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-components-progress.mjs +76 -81
  285. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-components-pulse.mjs +4 -4
  287. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  288. package/fesm2022/taiga-ui-kit-components-push.mjs +49 -57
  289. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
  291. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  292. package/fesm2022/taiga-ui-kit-components-radio.mjs +35 -41
  293. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  294. package/fesm2022/taiga-ui-kit-components-range.mjs +41 -85
  295. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  296. package/fesm2022/taiga-ui-kit-components-rating.mjs +19 -28
  297. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  298. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  299. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  300. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  301. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-components-select.mjs +82 -62
  303. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-components-slider.mjs +74 -82
  305. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-components-slides.mjs +16 -24
  307. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
  308. package/fesm2022/taiga-ui-kit-components-status.mjs +12 -16
  309. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-components-stepper.mjs +45 -79
  311. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  312. package/fesm2022/taiga-ui-kit-components-switch.mjs +22 -64
  313. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  314. package/fesm2022/taiga-ui-kit-components-tabs.mjs +36 -47
  315. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  316. package/fesm2022/taiga-ui-kit-components-textarea.mjs +54 -62
  317. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  318. package/fesm2022/taiga-ui-kit-components-tiles.mjs +14 -15
  319. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  320. package/fesm2022/taiga-ui-kit-components-toast.mjs +164 -0
  321. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
  322. package/fesm2022/taiga-ui-kit-components-tree.mjs +59 -63
  323. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  324. package/fesm2022/taiga-ui-kit-components.mjs +3 -2
  325. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  326. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +15 -7
  327. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  328. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +9 -12
  329. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  330. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -19
  331. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  332. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +16 -22
  333. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  334. package/fesm2022/taiga-ui-kit-directives-connected.mjs +9 -15
  335. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  336. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  337. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  338. package/fesm2022/taiga-ui-kit-directives-fade.mjs +15 -17
  339. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  340. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  341. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  342. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +3 -4
  343. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  344. package/fesm2022/taiga-ui-kit-directives-password.mjs +14 -16
  345. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  346. package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -4
  347. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  348. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +13 -18
  349. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  350. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +24 -34
  351. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  352. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +28 -38
  353. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  354. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +17 -22
  355. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  356. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +6 -8
  357. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  358. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +4 -5
  359. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  360. package/fesm2022/taiga-ui-kit-directives.mjs +0 -2
  361. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  362. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  363. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  364. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  365. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  366. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -25
  367. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  368. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +31 -0
  369. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  370. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -5
  371. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  372. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  373. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  374. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +5 -5
  375. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  376. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  377. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  378. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  379. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  380. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -1
  381. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  382. package/fesm2022/taiga-ui-kit-tokens.mjs +7 -25
  383. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  384. package/fesm2022/taiga-ui-kit-utils.mjs +2 -8
  385. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  386. package/package.json +53 -49
  387. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  388. package/pipes/auto-color/index.d.ts +1 -0
  389. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
  390. package/pipes/flag/flag.pipe.d.ts +14 -0
  391. package/pipes/flag/index.d.ts +1 -0
  392. package/pipes/index.d.ts +3 -1
  393. package/pipes/initials/index.d.ts +1 -0
  394. package/pipes/initials/initials.pipe.d.ts +7 -0
  395. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  396. package/styles/components/avatar.less +188 -0
  397. package/styles/components/badge.less +1 -0
  398. package/styles/components/checkbox.less +14 -12
  399. package/styles/components/chip.less +12 -3
  400. package/styles/components/like.less +4 -9
  401. package/styles/components/pin.less +3 -7
  402. package/styles/components/radio.less +1 -1
  403. package/styles/components/switch.less +9 -9
  404. package/styles/components/toast.less +44 -0
  405. package/tokens/i18n.d.ts +25 -26
  406. package/tokens/index.d.ts +0 -1
  407. package/tokens/input-date-options.d.ts +1 -1
  408. package/tokens/items-handlers.d.ts +1 -7
  409. package/tokens/preview-icons.d.ts +1 -3
  410. package/utils/index.d.ts +0 -1
  411. package/components/accordion/accordion-item-content.directive.d.ts +0 -6
  412. package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
  413. package/components/accordion/accordion-item.component.d.ts +0 -25
  414. package/components/action-bar/action-bar.d.ts +0 -3
  415. package/components/action-bar/action-bar.directive.d.ts +0 -6
  416. package/components/avatar/avatar.component.d.ts +0 -15
  417. package/components/input-password/index.d.ts +0 -2
  418. package/components/input-password/input-password.component.d.ts +0 -16
  419. package/components/input-password/input-password.options.d.ts +0 -24
  420. package/components/pdf-viewer/index.d.ts +0 -4
  421. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  422. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  423. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  424. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  425. package/components/textarea/textarea-limit.directive.d.ts +0 -27
  426. package/directives/lazy-loading/index.d.ts +0 -2
  427. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  428. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  429. package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
  430. package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
  431. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  432. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  433. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  434. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  435. package/fesm2022/taiga-ui-kit-directives-copy.mjs +0 -121
  436. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +0 -1
  437. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  438. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  439. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +0 -147
  440. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +0 -1
  441. package/pipes/field-error/field-error-content-pipe.d.ts +0 -14
  442. package/pipes/field-error/field-error-pipe.d.ts +0 -29
  443. package/pipes/field-error/index.d.ts +0 -2
  444. package/tokens/validation-errors.d.ts +0 -5
  445. package/utils/phone.d.ts +0 -3
  446. /package/{directives → components}/copy/copy.d.ts +0 -0
  447. /package/{directives → components}/copy/index.d.ts +0 -0
@@ -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 {tuiIsNativeFocused} 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] || tuiIsNativeFocused(this.textfieldStart);\n }\n\n protected get hideEndContent(): boolean {\n return !this.content[1] || tuiIsNativeFocused(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 (tuiIsNativeFocused(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,OAAO;cAC1C,8BAA8B,CACvC;AAEkB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI;QAClD,IAAmB,CAAA,mBAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACrC,IAAiB,CAAA,iBAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACnC,IAAc,CAAA,cAAA,GAAoB,OAAO;QAG5C,IAAG,CAAA,GAAA,GAAG,CAAC;QAGP,IAAG,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"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 ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n Input,\n input,\n type QueryList,\n signal,\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, 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 {tuiIsNumber, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\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 {\n type PolymorpheusContent,\n PolymorpheusOutlet,\n type PolymorpheusPrimitive,\n} 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 styleUrl: './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 // 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 TuiInputRangeComponent extends TuiControl<readonly [number, number]> {\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(\n () => new TuiQuantumValueTransformerBase(this.quantum()),\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 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 @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({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 public content = input<\n readonly [\n PolymorpheusContent<TuiContext<number>>,\n PolymorpheusContent<TuiContext<number>>,\n ]\n >(['', '']);\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 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 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 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 private isPrimitive(x: PolymorpheusContent): x is PolymorpheusPrimitive {\n return !x || tuiIsString(x) || tuiIsNumber(x);\n }\n}\n","<tui-textfield [content]=\"contentStartHidden ? '' : contentStart()\">\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]=\"!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)]=\"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 @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</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)=\"lastActiveSide = $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":";;;;;;;;;;;;;;;;;;AAwDM,MAAO,sBAAuB,SAAQ,UAAqC,CAAA;AAnBjF,IAAA,WAAA,GAAA;;QAqBqB,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,CAC1C,MAAM,IAAI,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAC3D;AAEkB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI;QAClD,IAAmB,CAAA,mBAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACrC,IAAiB,CAAA,iBAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACnC,IAAc,CAAA,cAAA,GAAoB,OAAO;AAChC,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,CAAC,CAAE;gBAE9B,OAAO,OAAO,CAAC,KAAK,UAAU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,CAAC,CAAmC,KAAK,CAAC,IAAI,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;gBAY/D,aAAa,EAAA,CAAA;sBADvB,KAAK;uBAAC,SAAS;;;MErHP,aAAa,GAAG,CAAC,sBAAsB,EAAE,QAAQ;;ACJ9D;;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';
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.16", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.16", 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.16", 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.16", ngImport: i0, type: TuiInputSliderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
72
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", 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.16", 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,CAA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SAAS,EAAE,SAAS,EAAE,UAAU,CAAC;AACrE,yBAAA;wBACD,8BAA8B;AACjC,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,QAAQ,EAAE,uCAAuC;AACjD,wBAAA,mBAAmB,EAAE,WAAW;AAChC,wBAAA,qBAAqB,EAAE,YAAY;AACtC,qBAAA;AACJ,iBAAA;;AA2FD,MAaM,oBAAoB,CAAA;+GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,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';\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 bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuBA,MAaM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,sHAZE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8EAAA,EAAA,qEAAA,EAAA,+EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAYV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAbX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAQG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,kBAAkB,EAAC,EAAA,MAAA,EAAA,CAAA,8EAAA,EAAA,qEAAA,EAAA,+EAAA,CAAA,EAAA;;MAwBxB,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;AAqBqB,QAAA,IA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BAAA,SAAS,EAAE,uBAAuB;AAClC,4BAAA,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC;AACrE,yBAAA;wBACD,8BAA8B;AACjC,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,QAAQ,EAAE,uCAAuC;AACjD,wBAAA,mBAAmB,EAAE,WAAW;AAChC,wBAAA,qBAAqB,EAAE,YAAY;AACtC,qBAAA;AACJ,iBAAA;;;AC3CY,MAAA,cAAc,GAAG;IAC1B,kBAAkB;IAClB,qBAAqB;IACrB,iBAAiB;IACjB,uBAAuB;IACvB,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;;;ACtBtB;;AAEG;;;;"}
@@ -1,23 +1,23 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import * as i1$1 from '@taiga-ui/core/components/textfield';
3
+ import { tuiTextfieldIcon, TuiTextfieldComponent, TuiWithNativePicker, tuiAsTextfieldAccessor, TuiTextfieldContent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
4
+ import { TuiDropdownContent } from '@taiga-ui/core/portals';
1
5
  import * as i0 from '@angular/core';
2
- import { inject, signal, computed, untracked, Input, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
+ import { inject, computed, input, untracked, Directive, HostAttributeToken, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
7
  import { TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
4
8
  import { TuiTime } from '@taiga-ui/cdk/date-time';
5
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
6
- import * as i1 from '@taiga-ui/core/components/textfield';
7
- import { TuiTextfieldDirective, tuiTextfieldIconBinding, TuiTextfieldComponent, TuiWithNativePicker, tuiAsTextfieldAccessor, TuiWithTextfield, TuiTextfieldContent } from '@taiga-ui/core/components/textfield';
8
- import { toSignal } from '@angular/core/rxjs-interop';
9
9
  import * as i2 from '@maskito/angular';
10
10
  import { MaskitoDirective } from '@maskito/angular';
11
11
  import { maskitoTimeOptionsGenerator, maskitoSelectionChangeHandler, maskitoCaretGuard, maskitoAddOnFocusPlugin, maskitoRemoveOnBlurPlugin } from '@maskito/kit';
12
12
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
13
- import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
13
+ import { tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
14
14
  import { tuiAsOptionContent } from '@taiga-ui/core/components/data-list';
15
- import { TuiDropdownDirective, tuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/directives/dropdown';
16
- import { tuiAsAuxiliary } from '@taiga-ui/core/tokens';
15
+ import * as i1 from '@taiga-ui/core/components/input';
16
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
17
+ import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/portals/dropdown';
17
18
  import { TuiSelectOption } from '@taiga-ui/kit/components/select';
18
19
  import { TUI_TIME_TEXTS } from '@taiga-ui/kit/tokens';
19
20
  import { tuiMaskito } from '@taiga-ui/kit/utils';
20
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
21
21
 
22
22
  const TUI_INPUT_TIME_DEFAULT_OPTIONS = {
23
23
  icon: () => '@tui.clock',
@@ -31,46 +31,34 @@ const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(T
31
31
  class TuiInputTimeDirective extends TuiControl {
32
32
  constructor() {
33
33
  super(...arguments);
34
- this.textfield = inject(TuiTextfieldDirective);
34
+ this.input = inject(TuiInputDirective);
35
35
  this.dropdown = inject(TuiDropdownDirective);
36
- this.open = tuiDropdownOpen();
36
+ this.open = inject(TuiDropdownOpen).open;
37
37
  this.options = inject(TUI_INPUT_TIME_OPTIONS);
38
- this.fillers = toSignal(inject(TUI_TIME_TEXTS));
39
- this.prefix = signal('');
40
- this.postfix = signal('');
41
- this.icon = tuiTextfieldIconBinding(TUI_INPUT_TIME_OPTIONS);
38
+ this.fillers = inject(TUI_TIME_TEXTS);
39
+ this.icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);
42
40
  this.dropdownEnabled = tuiDropdownEnabled(computed(() => !this.native && this.interactive()));
43
- this.filler = tuiDirectiveBinding(TuiTextfieldComponent, 'fillerSetter', computed((filler = this.fillers()?.[this.timeMode()] ?? '') => this.postfix() ? '' : this.prefix() + filler), {});
41
+ this.filler = tuiDirectiveBinding(TuiTextfieldComponent, 'filler', computed((filler = this.fillers()?.[this.timeMode()] ?? '') => this.postfix() ? '' : this.prefix() + filler), {});
44
42
  this.mask = tuiMaskito(computed(() => this.computeMask({
45
43
  ...this.options,
46
44
  mode: this.timeMode(),
47
- step: this.interactive() && !this.dropdown._content() ? 1 : 0,
45
+ step: this.interactive() && !this.dropdown.content() ? 1 : 0,
48
46
  prefix: this.prefix(),
49
47
  postfix: this.postfix(),
50
48
  })));
51
- this.accept = [];
49
+ this.accept = input([]);
50
+ this.timeMode = input(this.options.mode, { alias: 'mode' });
51
+ this.prefix = input('');
52
+ this.postfix = input('');
52
53
  this.native = !!inject(TuiWithNativePicker, { optional: true }) && inject(TUI_IS_MOBILE);
53
- this.timeMode = signal(this.options.mode);
54
- }
55
- // TODO(v5): use signal inputs
56
- set modeSetter(x) {
57
- this.timeMode.set(x);
58
- }
59
- // TODO(v5): use signal inputs
60
- set prefixSetter(x) {
61
- this.prefix.set(x);
62
- }
63
- // TODO(v5): use signal inputs
64
- set postfixSetter(x) {
65
- this.postfix.set(x);
66
54
  }
67
55
  setValue(value) {
68
56
  this.onChange(value);
69
57
  if (value) {
70
- this.textfield.value.set(this.stringify(value));
58
+ this.input.value.set(this.stringify(value));
71
59
  }
72
60
  else {
73
- this.textfield.setValue(value);
61
+ this.input.setValue(value);
74
62
  }
75
63
  if (!value && this.dropdownEnabled()) {
76
64
  this.open.set(true);
@@ -81,7 +69,7 @@ class TuiInputTimeDirective extends TuiControl {
81
69
  const changed = untracked(() => value !== this.value());
82
70
  if (changed || reset) {
83
71
  super.writeValue(value);
84
- untracked(() => this.textfield.value.set(this.stringify(this.value())));
72
+ untracked(() => this.input.value.set(this.stringify(this.value())));
85
73
  }
86
74
  }
87
75
  onInput(valueWithAffixes) {
@@ -89,16 +77,34 @@ class TuiInputTimeDirective extends TuiControl {
89
77
  .replace(this.prefix(), '')
90
78
  .replace(this.postfix(), '');
91
79
  const time = value.length === this.timeMode().length ? TuiTime.fromString(value) : null;
92
- const newValue = this.accept.length && time ? this.findNearestTime(time, this.accept) : time;
80
+ const newValue = this.accept().length && time
81
+ ? this.findNearestTime(time, this.accept())
82
+ : time;
93
83
  this.control?.control?.updateValueAndValidity({ emitEvent: false });
94
84
  this.onChange(newValue);
95
85
  if (newValue && newValue !== time) {
96
- this.textfield.value.set(this.stringify(newValue));
86
+ this.input.value.set(this.stringify(newValue));
97
87
  }
98
88
  }
99
89
  toggle() {
100
90
  this.open.update((x) => !x);
101
91
  }
92
+ onBlur(valueWithAffixes) {
93
+ const value = valueWithAffixes
94
+ .replace(this.prefix(), '')
95
+ .replace(this.postfix(), '');
96
+ if (value && !this.value()) {
97
+ const time = TuiTime.fromString(value);
98
+ const newValue = this.accept().length
99
+ ? this.findNearestTime(time, this.accept())
100
+ : time;
101
+ this.control?.control?.updateValueAndValidity({ emitEvent: false });
102
+ this.onChange(newValue);
103
+ if (newValue) {
104
+ this.input.value.set(this.stringify(newValue));
105
+ }
106
+ }
107
+ }
102
108
  computeMask(params) {
103
109
  const options = maskitoTimeOptionsGenerator(params);
104
110
  const { mode, prefix, postfix } = params;
@@ -125,51 +131,38 @@ class TuiInputTimeDirective extends TuiControl {
125
131
  stringify(time) {
126
132
  return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();
127
133
  }
128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
129
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputTimeDirective, isStandalone: true, selector: "input[tuiInputTime]", inputs: { accept: "accept", modeSetter: ["mode", "modeSetter"], prefixSetter: ["prefix", "prefixSetter"], postfixSetter: ["postfix", "postfixSetter"] }, host: { attributes: { "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
135
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.16", type: TuiInputTimeDirective, isStandalone: true, selector: "input[tuiInputTime]", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, timeMode: { classPropertyName: "timeMode", publicName: "mode", 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 } }, host: { attributes: { "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)", "blur": "onBlur($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
130
136
  tuiAsControl(TuiInputTimeDirective),
131
137
  tuiAsTextfieldAccessor(TuiInputTimeDirective),
132
- tuiAsAuxiliary(TuiInputTimeDirective),
133
138
  tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),
134
139
  tuiAsOptionContent(TuiSelectOption),
135
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
140
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
136
141
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeDirective, decorators: [{
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputTimeDirective, decorators: [{
138
143
  type: Directive,
139
144
  args: [{
140
- standalone: true,
141
145
  selector: 'input[tuiInputTime]',
142
146
  providers: [
143
147
  tuiAsControl(TuiInputTimeDirective),
144
148
  tuiAsTextfieldAccessor(TuiInputTimeDirective),
145
- tuiAsAuxiliary(TuiInputTimeDirective),
146
149
  tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),
147
150
  tuiAsOptionContent(TuiSelectOption),
148
151
  ],
149
- hostDirectives: [TuiWithTextfield, MaskitoDirective],
152
+ hostDirectives: [TuiWithInput, MaskitoDirective],
150
153
  host: {
151
154
  inputmode: 'numeric',
152
155
  '[disabled]': 'disabled()',
153
156
  '(click)': 'toggle()',
154
157
  '(input)': 'onInput($event.target.value)',
158
+ '(blur)': 'onBlur($event.target.value)',
155
159
  },
156
160
  }]
157
- }], propDecorators: { accept: [{
158
- type: Input
159
- }], modeSetter: [{
160
- type: Input,
161
- args: ['mode']
162
- }], prefixSetter: [{
163
- type: Input,
164
- args: ['prefix']
165
- }], postfixSetter: [{
166
- type: Input,
167
- args: ['postfix']
168
- }] } });
161
+ }] });
169
162
 
170
163
  class TuiNativeTimePicker {
171
164
  constructor() {
172
- this.list = tuiInjectElement().getAttribute('list');
165
+ this.list = inject(new HostAttributeToken('list'), { optional: true });
173
166
  }
174
167
  getStep(timeMode) {
175
168
  switch (timeMode) {
@@ -189,39 +182,40 @@ class TuiNativeTimePicker {
189
182
  const timeString = time ? time.toString('HH:MM:SS.MSS') : '';
190
183
  return dateString + timeString;
191
184
  }
192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
193
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiNativeTimePicker, isStandalone: false, host: { properties: { "attr.list": "null" } }, ngImport: i0 }); }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiNativeTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
186
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiNativeTimePicker, isStandalone: true, host: { properties: { "attr.list": "null" } }, ngImport: i0 }); }
194
187
  }
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeTimePicker, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiNativeTimePicker, decorators: [{
196
189
  type: Directive,
197
- args: [{
198
- standalone: false,
199
- host: {
200
- '[attr.list]': 'null',
201
- },
202
- }]
190
+ args: [{ host: { '[attr.list]': 'null' } }]
203
191
  }] });
204
192
  class TuiInputTimeComponent extends TuiNativeTimePicker {
205
193
  constructor() {
206
194
  super(...arguments);
207
195
  this.control = inject(TuiControl);
208
196
  this.host = inject(TuiInputTimeDirective);
209
- this.textfield = inject(TuiTextfieldDirective);
210
197
  this.value = computed(() => this.toISOString(this.control.value()));
211
198
  this.step = computed(() => this.getStep(this.host.timeMode()));
212
199
  }
213
200
  setValue(value) {
214
201
  this.host.setValue(TuiTime.fromString(value));
215
202
  }
216
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
217
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputTimeComponent, isStandalone: true, selector: "input[tuiInputTime][type=\"time\"]", host: { attributes: { "ngSkipHydration": "true" } }, usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithNativePicker }], ngImport: i0, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputTime]~.t-content input[type=time]{position:absolute;right:0;left:auto;inline-size:calc(var(--t-right) + var(--t-padding));opacity:0;margin:0;padding:0}tui-textfield input[tuiInputTime]~.t-content input[type=time]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
203
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
204
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.16", type: TuiInputTimeComponent, isStandalone: true, selector: "input[tuiInputTime][type=\"time\"]", host: { attributes: { "ngSkipHydration": "true" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.TuiWithNativePicker }], ngImport: i0, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputTime]~.t-content input[type=time]{position:absolute;right:0;left:auto;inline-size:calc(var(--t-right) + var(--t-padding));opacity:0;margin:0;padding:0}tui-textfield input[tuiInputTime]~.t-content input[type=time]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
218
205
  }
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeComponent, decorators: [{
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputTimeComponent, decorators: [{
220
207
  type: Component,
221
208
  args: [{ selector: 'input[tuiInputTime][type="time"]', imports: [TuiTextfieldContent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiWithNativePicker], host: { ngSkipHydration: 'true' }, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputTime]~.t-content input[type=time]{position:absolute;right:0;left:auto;inline-size:calc(var(--t-right) + var(--t-padding));opacity:0;margin:0;padding:0}tui-textfield input[tuiInputTime]~.t-content input[type=time]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"] }]
222
209
  }] });
223
210
 
224
- const TuiInputTime = [TuiInputTimeDirective, TuiInputTimeComponent];
211
+ const TuiInputTime = [
212
+ TuiInputTimeDirective,
213
+ TuiInputTimeComponent,
214
+ TuiLabel,
215
+ TuiTextfieldComponent,
216
+ TuiTextfieldOptionsDirective,
217
+ TuiDropdownContent,
218
+ ];
225
219
 
226
220
  /**
227
221
  * Generated bundle index. Do not edit.