@taiga-ui/kit 4.52.0-canary.ec0802b → 4.52.0-canary.efbd0d4

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 (359) hide show
  1. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  2. package/components/avatar/avatar-stack.component.d.ts +2 -2
  3. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  4. package/components/badged-content/badged-content.directive.d.ts +2 -2
  5. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  6. package/components/button-loading/button-loading.component.d.ts +5 -5
  7. package/components/calendar-range/calendar-range.component.d.ts +0 -1
  8. package/components/calendar-range/day-range-period.d.ts +2 -1
  9. package/components/carousel/carousel.component.d.ts +15 -18
  10. package/components/carousel/carousel.directive.d.ts +5 -4
  11. package/components/combo-box/combo-box.d.ts +5 -0
  12. package/components/combo-box/combo-box.directive.d.ts +7 -9
  13. package/components/combo-box/index.d.ts +1 -0
  14. package/components/compass/compass.component.d.ts +2 -2
  15. package/components/confirm/confirm.component.d.ts +3 -2
  16. package/components/confirm/confirm.service.d.ts +1 -1
  17. package/components/copy/copy.component.d.ts +2 -3
  18. package/components/copy/copy.directive.d.ts +2 -4
  19. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
  20. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  21. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  22. package/components/data-list-wrapper/index.d.ts +1 -1
  23. package/components/drawer/drawer.component.d.ts +3 -4
  24. package/components/files/file/file.component.d.ts +16 -29
  25. package/components/files/files/files.component.d.ts +5 -8
  26. package/components/files/input-files/input-files.component.d.ts +2 -2
  27. package/components/files/input-files/input-files.content.d.ts +7 -8
  28. package/components/files/input-files/input-files.directive.d.ts +2 -2
  29. package/components/filter/filter.component.d.ts +9 -11
  30. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  31. package/components/index.d.ts +0 -3
  32. package/components/input-chip/input-chip.component.d.ts +9 -8
  33. package/components/input-chip/input-chip.d.ts +5 -1
  34. package/components/input-chip/input-chip.directive.d.ts +7 -12
  35. package/components/input-color/index.d.ts +1 -0
  36. package/components/input-color/input-color.component.d.ts +4 -4
  37. package/components/input-color/input-color.d.ts +5 -0
  38. package/components/input-date/input-date.d.ts +4 -1
  39. package/components/input-date/input-date.directive.d.ts +12 -14
  40. package/components/input-date/input-date.options.d.ts +3 -3
  41. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  42. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  43. package/components/input-date-range/input-date-range.d.ts +4 -1
  44. package/components/input-date-range/input-date-range.directive.d.ts +5 -8
  45. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  46. package/components/input-date-time/input-date-time.d.ts +4 -1
  47. package/components/input-date-time/input-date-time.directive.d.ts +6 -6
  48. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  49. package/components/input-month/input-month.d.ts +4 -1
  50. package/components/input-month/input-month.directive.d.ts +6 -5
  51. package/components/input-month-range/input-month-range.d.ts +4 -1
  52. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  53. package/components/input-number/input-number.d.ts +4 -1
  54. package/components/input-number/input-number.directive.d.ts +5 -7
  55. package/components/input-number/input-number.options.d.ts +2 -3
  56. package/components/input-number/step/input-number-step.component.d.ts +2 -1
  57. package/components/input-phone/index.d.ts +1 -0
  58. package/components/input-phone/input-phone.d.ts +5 -0
  59. package/components/input-phone/input-phone.directive.d.ts +7 -7
  60. package/components/input-phone-international/index.d.ts +1 -0
  61. package/components/input-phone-international/input-phone-international.component.d.ts +9 -8
  62. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  63. package/components/input-pin/index.d.ts +1 -0
  64. package/components/input-pin/input-pin.component.d.ts +3 -3
  65. package/components/input-pin/input-pin.d.ts +5 -0
  66. package/components/input-range/index.d.ts +0 -1
  67. package/components/input-range/input-range.component.d.ts +4 -3
  68. package/components/input-slider/input-slider.d.ts +4 -1
  69. package/components/input-slider/input-slider.directive.d.ts +1 -1
  70. package/components/input-time/input-time.component.d.ts +1 -3
  71. package/components/input-time/input-time.d.ts +4 -1
  72. package/components/input-time/input-time.directive.d.ts +4 -4
  73. package/components/input-year/input-year.d.ts +4 -1
  74. package/components/input-year/input-year.directive.d.ts +5 -5
  75. package/components/input-year/input-year.options.d.ts +2 -2
  76. package/components/like/like.options.d.ts +1 -1
  77. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  78. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
  79. package/components/notification-middle/notification-middle.service.d.ts +1 -1
  80. package/components/pagination/pagination.component.d.ts +22 -52
  81. package/components/pagination/pagination.options.d.ts +3 -6
  82. package/components/preview/dialog/preview-dialog.service.d.ts +1 -1
  83. package/components/preview/index.d.ts +1 -0
  84. package/components/preview/pagination/preview-pagination.component.d.ts +2 -1
  85. package/components/preview/preview.component.d.ts +1 -1
  86. package/components/preview/zoom/preview-zoom.component.d.ts +3 -1
  87. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  88. package/components/pulse/pulse.component.d.ts +2 -2
  89. package/components/push/push-alert.component.d.ts +1 -1
  90. package/components/push/push.options.d.ts +4 -3
  91. package/components/push/push.service.d.ts +1 -1
  92. package/components/radio/radio.component.d.ts +1 -1
  93. package/components/radio-list/radio-list.component.d.ts +5 -3
  94. package/components/rating/rating.component.d.ts +1 -1
  95. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  96. package/components/segmented/segmented.component.d.ts +4 -6
  97. package/components/segmented/segmented.directive.d.ts +6 -7
  98. package/components/select/native-select/native-select.component.d.ts +4 -4
  99. package/components/select/select.d.ts +4 -1
  100. package/components/select/select.directive.d.ts +4 -3
  101. package/components/switch/switch.component.d.ts +1 -0
  102. package/components/textarea/index.d.ts +2 -1
  103. package/components/textarea/textarea.component.d.ts +4 -4
  104. package/components/textarea/textarea.d.ts +6 -0
  105. package/components/textarea/textarea.directive.d.ts +13 -0
  106. package/components/toast/toast.component.d.ts +1 -1
  107. package/components/toast/toast.options.d.ts +4 -3
  108. package/components/toast/toast.service.d.ts +1 -1
  109. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  110. package/directives/appearance-proxy/index.d.ts +1 -0
  111. package/directives/button-select/button-select.directive.d.ts +1 -1
  112. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  113. package/directives/fade/fade.directive.d.ts +5 -6
  114. package/directives/highlight/highlight.directive.d.ts +4 -4
  115. package/directives/index.d.ts +1 -1
  116. package/directives/password/password.directive.d.ts +1 -1
  117. package/directives/present/present.directive.d.ts +2 -4
  118. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  119. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  120. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  121. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -8
  122. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  124. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-kit-components-avatar.mjs +33 -47
  126. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +8 -10
  128. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-badge.mjs +7 -7
  130. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -11
  131. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  132. package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
  133. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  134. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +16 -30
  135. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  136. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  137. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  138. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +5 -13
  139. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  140. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +23 -23
  141. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  142. package/fesm2022/taiga-ui-kit-components-carousel.mjs +63 -107
  143. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  144. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +4 -5
  145. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  146. package/fesm2022/taiga-ui-kit-components-chip.mjs +7 -7
  147. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -44
  148. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  150. package/fesm2022/taiga-ui-kit-components-compass.mjs +7 -9
  151. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-confirm.mjs +9 -10
  153. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -32
  155. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
  157. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  159. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-kit-components-files.mjs +110 -230
  161. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-kit-components-filter.mjs +20 -34
  163. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  165. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  166. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -75
  167. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  168. package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -13
  169. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  170. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +34 -46
  171. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  172. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +30 -35
  173. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  174. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +31 -27
  175. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  176. package/fesm2022/taiga-ui-kit-components-input-date.mjs +42 -38
  177. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +3 -3
  179. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +26 -22
  180. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-components-input-month.mjs +32 -22
  182. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-components-input-number.mjs +47 -40
  184. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +48 -36
  186. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  187. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +29 -18
  188. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  189. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +18 -9
  190. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  191. package/fesm2022/taiga-ui-kit-components-input-range.mjs +18 -16
  192. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  193. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +15 -10
  194. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  195. package/fesm2022/taiga-ui-kit-components-input-time.mjs +38 -39
  196. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-components-input-year.mjs +27 -18
  198. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +12 -12
  200. package/fesm2022/taiga-ui-kit-components-like.mjs +3 -3
  201. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +14 -14
  203. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -7
  205. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +29 -39
  207. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +12 -12
  209. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -8
  211. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-pagination.mjs +59 -140
  213. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  215. package/fesm2022/taiga-ui-kit-components-preview.mjs +48 -36
  216. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-components-progress.mjs +31 -35
  218. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  220. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-components-push.mjs +20 -21
  222. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
  224. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-radio.mjs +6 -6
  226. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-range.mjs +7 -7
  228. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-rating.mjs +4 -4
  230. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +4 -4
  232. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-segmented.mjs +31 -57
  234. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-select.mjs +50 -26
  236. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-slider.mjs +18 -18
  238. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  240. package/fesm2022/taiga-ui-kit-components-stepper.mjs +8 -8
  241. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  242. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-tabs.mjs +24 -22
  244. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-textarea.mjs +51 -50
  246. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-tiles.mjs +12 -12
  248. package/fesm2022/taiga-ui-kit-components-toast.mjs +23 -24
  249. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-tree.mjs +26 -25
  251. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  253. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  255. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  256. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -3
  257. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  258. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +6 -6
  260. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
  262. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -6
  264. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -52
  265. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  267. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  269. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -20
  270. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  271. package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -8
  272. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  273. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -17
  274. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  275. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  276. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  277. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  278. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +8 -8
  280. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -10
  282. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -14
  284. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-directives.mjs +1 -1
  286. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  287. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  288. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  289. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -24
  290. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  292. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  293. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -4
  294. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  296. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  297. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  298. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  300. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  302. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  303. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -108
  305. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  307. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  308. package/package.json +62 -62
  309. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  310. package/pipes/auto-color/index.d.ts +1 -0
  311. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
  312. package/pipes/flag/flag.pipe.d.ts +14 -0
  313. package/pipes/flag/index.d.ts +1 -0
  314. package/pipes/index.d.ts +3 -0
  315. package/pipes/initials/index.d.ts +1 -0
  316. package/pipes/initials/initials.pipe.d.ts +7 -0
  317. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  318. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  319. package/styles/components/avatar.less +14 -14
  320. package/styles/components/badge.less +3 -3
  321. package/styles/components/block.less +4 -4
  322. package/styles/components/chip.less +3 -3
  323. package/styles/components/comment.less +1 -1
  324. package/styles/components/message.less +1 -1
  325. package/styles/components/pin.less +3 -3
  326. package/styles/components/switch.less +2 -2
  327. package/styles/components/toast.less +1 -1
  328. package/tokens/i18n.d.ts +1 -0
  329. package/tokens/index.d.ts +0 -7
  330. package/utils/index.d.ts +0 -2
  331. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  332. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  333. package/components/elastic-container/index.d.ts +0 -2
  334. package/components/floating-container/floating-container.directive.d.ts +0 -7
  335. package/components/floating-container/index.d.ts +0 -1
  336. package/components/input-range/input-range.d.ts +0 -3
  337. package/components/slides/index.d.ts +0 -1
  338. package/components/slides/slides.directive.d.ts +0 -11
  339. package/components/textarea/textarea-limit.directive.d.ts +0 -26
  340. package/directives/lazy-loading/index.d.ts +0 -2
  341. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  342. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  343. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -77
  344. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  345. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  346. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  347. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  348. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  349. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -80
  350. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  351. package/tokens/calendar-date-stream.d.ts +0 -10
  352. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  353. package/tokens/input-date-options.d.ts +0 -15
  354. package/tokens/items-handlers.d.ts +0 -20
  355. package/tokens/mobile-calendar.d.ts +0 -6
  356. package/tokens/month-formatter.d.ts +0 -5
  357. package/utils/phone.d.ts +0 -3
  358. package/utils/toggle-day.d.ts +0 -2
  359. /package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +0 -0
@@ -1,22 +1,22 @@
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 { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
1
5
  import * as i0 from '@angular/core';
2
- import { inject, computed, input, untracked, 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, tuiTextfieldIcon, TuiTextfieldComponent, TuiWithNativePicker, tuiAsTextfieldAccessor, TuiWithTextfield, TuiTextfieldContent } from '@taiga-ui/core/components/textfield';
8
9
  import * as i2 from '@maskito/angular';
9
10
  import { MaskitoDirective } from '@maskito/angular';
10
11
  import { maskitoTimeOptionsGenerator, maskitoSelectionChangeHandler, maskitoCaretGuard, maskitoAddOnFocusPlugin, maskitoRemoveOnBlurPlugin } from '@maskito/kit';
11
12
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
12
- import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
13
+ import { tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
13
14
  import { tuiAsOptionContent } from '@taiga-ui/core/components/data-list';
14
- import { TuiDropdownDirective, tuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/directives/dropdown';
15
- 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';
16
17
  import { TuiSelectOption } from '@taiga-ui/kit/components/select';
17
18
  import { TUI_TIME_TEXTS } from '@taiga-ui/kit/tokens';
18
19
  import { tuiMaskito } from '@taiga-ui/kit/utils';
19
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
20
20
 
21
21
  const TUI_INPUT_TIME_DEFAULT_OPTIONS = {
22
22
  icon: () => '@tui.clock',
@@ -30,9 +30,9 @@ const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(T
30
30
  class TuiInputTimeDirective extends TuiControl {
31
31
  constructor() {
32
32
  super(...arguments);
33
- this.textfield = inject(TuiTextfieldDirective);
33
+ this.input = inject(TuiInputDirective);
34
34
  this.dropdown = inject(TuiDropdownDirective);
35
- this.open = tuiDropdownOpen();
35
+ this.open = inject(TuiDropdownOpen).open;
36
36
  this.options = inject(TUI_INPUT_TIME_OPTIONS);
37
37
  this.fillers = inject(TUI_TIME_TEXTS);
38
38
  this.icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);
@@ -41,23 +41,23 @@ class TuiInputTimeDirective extends TuiControl {
41
41
  this.mask = tuiMaskito(computed(() => this.computeMask({
42
42
  ...this.options,
43
43
  mode: this.timeMode(),
44
- step: this.interactive() && !this.dropdown._content() ? 1 : 0,
44
+ step: this.interactive() && !this.dropdown.content() ? 1 : 0,
45
45
  prefix: this.prefix(),
46
46
  postfix: this.postfix(),
47
47
  })));
48
48
  this.accept = input([]);
49
- this.native = !!inject(TuiWithNativePicker, { optional: true }) && inject(TUI_IS_MOBILE);
50
49
  this.timeMode = input(this.options.mode, { alias: 'mode' });
51
50
  this.prefix = input('');
52
51
  this.postfix = input('');
52
+ this.native = !!inject(TuiWithNativePicker, { optional: true }) && inject(TUI_IS_MOBILE);
53
53
  }
54
54
  setValue(value) {
55
55
  this.onChange(value);
56
56
  if (value) {
57
- this.textfield.value.set(this.stringify(value));
57
+ this.input.value.set(this.stringify(value));
58
58
  }
59
59
  else {
60
- this.textfield.setValue(value);
60
+ this.input.setValue(value);
61
61
  }
62
62
  if (!value && this.dropdownEnabled()) {
63
63
  this.open.set(true);
@@ -68,7 +68,7 @@ class TuiInputTimeDirective extends TuiControl {
68
68
  const changed = untracked(() => value !== this.value());
69
69
  if (changed || reset) {
70
70
  super.writeValue(value);
71
- untracked(() => this.textfield.value.set(this.stringify(this.value())));
71
+ untracked(() => this.input.value.set(this.stringify(this.value())));
72
72
  }
73
73
  }
74
74
  onInput(valueWithAffixes) {
@@ -82,7 +82,7 @@ class TuiInputTimeDirective extends TuiControl {
82
82
  this.control?.control?.updateValueAndValidity({ emitEvent: false });
83
83
  this.onChange(newValue);
84
84
  if (newValue && newValue !== time) {
85
- this.textfield.value.set(this.stringify(newValue));
85
+ this.input.value.set(this.stringify(newValue));
86
86
  }
87
87
  }
88
88
  toggle() {
@@ -100,7 +100,7 @@ class TuiInputTimeDirective extends TuiControl {
100
100
  this.control?.control?.updateValueAndValidity({ emitEvent: false });
101
101
  this.onChange(newValue);
102
102
  if (newValue) {
103
- this.textfield.value.set(this.stringify(newValue));
103
+ this.input.value.set(this.stringify(newValue));
104
104
  }
105
105
  }
106
106
  }
@@ -130,27 +130,25 @@ class TuiInputTimeDirective extends TuiControl {
130
130
  stringify(time) {
131
131
  return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();
132
132
  }
133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
134
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", 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: [
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
134
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", 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: [
135
135
  tuiAsControl(TuiInputTimeDirective),
136
136
  tuiAsTextfieldAccessor(TuiInputTimeDirective),
137
- tuiAsAuxiliary(TuiInputTimeDirective),
138
137
  tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),
139
138
  tuiAsOptionContent(TuiSelectOption),
140
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
139
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
141
140
  }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeDirective, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeDirective, decorators: [{
143
142
  type: Directive,
144
143
  args: [{
145
144
  selector: 'input[tuiInputTime]',
146
145
  providers: [
147
146
  tuiAsControl(TuiInputTimeDirective),
148
147
  tuiAsTextfieldAccessor(TuiInputTimeDirective),
149
- tuiAsAuxiliary(TuiInputTimeDirective),
150
148
  tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),
151
149
  tuiAsOptionContent(TuiSelectOption),
152
150
  ],
153
- hostDirectives: [TuiWithTextfield, MaskitoDirective],
151
+ hostDirectives: [TuiWithInput, MaskitoDirective],
154
152
  host: {
155
153
  inputmode: 'numeric',
156
154
  '[disabled]': 'disabled()',
@@ -163,7 +161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
163
161
 
164
162
  class TuiNativeTimePicker {
165
163
  constructor() {
166
- this.list = tuiInjectElement().getAttribute('list');
164
+ this.list = inject(new HostAttributeToken('list'), { optional: true });
167
165
  }
168
166
  getStep(timeMode) {
169
167
  switch (timeMode) {
@@ -183,39 +181,40 @@ class TuiNativeTimePicker {
183
181
  const timeString = time ? time.toString('HH:MM:SS.MSS') : '';
184
182
  return dateString + timeString;
185
183
  }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
187
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiNativeTimePicker, isStandalone: false, host: { properties: { "attr.list": "null" } }, ngImport: i0 }); }
184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNativeTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
185
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiNativeTimePicker, isStandalone: true, host: { properties: { "attr.list": "null" } }, ngImport: i0 }); }
188
186
  }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeTimePicker, decorators: [{
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNativeTimePicker, decorators: [{
190
188
  type: Directive,
191
- args: [{
192
- standalone: false,
193
- host: {
194
- '[attr.list]': 'null',
195
- },
196
- }]
189
+ args: [{ host: { '[attr.list]': 'null' } }]
197
190
  }] });
198
191
  class TuiInputTimeComponent extends TuiNativeTimePicker {
199
192
  constructor() {
200
193
  super(...arguments);
201
194
  this.control = inject(TuiControl);
202
195
  this.host = inject(TuiInputTimeDirective);
203
- this.textfield = inject(TuiTextfieldDirective);
204
196
  this.value = computed(() => this.toISOString(this.control.value()));
205
197
  this.step = computed(() => this.getStep(this.host.timeMode()));
206
198
  }
207
199
  setValue(value) {
208
200
  this.host.setValue(TuiTime.fromString(value));
209
201
  }
210
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
211
- 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 }); }
202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
203
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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 }); }
212
204
  }
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeComponent, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeComponent, decorators: [{
214
206
  type: Component,
215
207
  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"] }]
216
208
  }] });
217
209
 
218
- const TuiInputTime = [TuiInputTimeDirective, TuiInputTimeComponent];
210
+ const TuiInputTime = [
211
+ TuiInputTimeDirective,
212
+ TuiInputTimeComponent,
213
+ TuiLabel,
214
+ TuiTextfieldComponent,
215
+ TuiTextfieldOptionsDirective,
216
+ TuiDropdownContent,
217
+ ];
219
218
 
220
219
  /**
221
220
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-time.mjs","sources":["../../../projects/kit/components/input-time/input-time.options.ts","../../../projects/kit/components/input-time/input-time.directive.ts","../../../projects/kit/components/input-time/input-time.component.ts","../../../projects/kit/components/input-time/input-time.template.html","../../../projects/kit/components/input-time/input-time.ts","../../../projects/kit/components/input-time/taiga-ui-kit-components-input-time.ts"],"sourcesContent":["import {type MaskitoTimeParams} from '@maskito/kit';\nimport {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {type TuiTime} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiInputTimeOptions\n extends Required<\n Pick<MaskitoTimeParams, 'mode' | 'timeSegmentMaxValues' | 'timeSegmentMinValues'>\n > {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly valueTransformer: TuiValueTransformer<TuiTime | null, any> | null;\n}\n\nexport const TUI_INPUT_TIME_DEFAULT_OPTIONS: TuiInputTimeOptions = {\n icon: () => '@tui.clock',\n mode: 'HH:MM',\n timeSegmentMaxValues: {},\n timeSegmentMinValues: {},\n valueTransformer: null,\n};\n\nexport const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_TIME_DEFAULT_OPTIONS,\n);\n","import {computed, Directive, inject, input, untracked} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions} from '@maskito/core';\nimport {\n maskitoAddOnFocusPlugin,\n maskitoCaretGuard,\n maskitoRemoveOnBlurPlugin,\n maskitoSelectionChangeHandler,\n type MaskitoTimeMode,\n maskitoTimeOptionsGenerator,\n type MaskitoTimeParams,\n} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiTime} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n tuiTextfieldIcon,\n TuiWithNativePicker,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownDirective,\n tuiDropdownEnabled,\n tuiDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\nimport {TUI_TIME_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_TIME_OPTIONS} from './input-time.options';\n\n@Directive({\n selector: 'input[tuiInputTime]',\n providers: [\n tuiAsControl(TuiInputTimeDirective),\n tuiAsTextfieldAccessor(TuiInputTimeDirective),\n tuiAsAuxiliary(TuiInputTimeDirective),\n tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),\n tuiAsOptionContent(TuiSelectOption),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective],\n host: {\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n '(blur)': 'onBlur($event.target.value)',\n },\n})\nexport class TuiInputTimeDirective\n extends TuiControl<TuiTime | null>\n implements TuiTextfieldAccessor<TuiTime | null>\n{\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly dropdown = inject(TuiDropdownDirective);\n private readonly open = tuiDropdownOpen();\n private readonly options = inject(TUI_INPUT_TIME_OPTIONS);\n private readonly fillers = inject(TUI_TIME_TEXTS);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);\n protected readonly dropdownEnabled = tuiDropdownEnabled(\n computed(() => !this.native && this.interactive()),\n );\n\n protected readonly filler = tuiDirectiveBinding(\n TuiTextfieldComponent,\n 'filler',\n computed((filler = this.fillers()?.[this.timeMode()] ?? '') =>\n this.postfix() ? '' : this.prefix() + filler,\n ),\n {},\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n this.computeMask({\n ...this.options,\n mode: this.timeMode(),\n step: this.interactive() && !this.dropdown._content() ? 1 : 0,\n prefix: this.prefix(),\n postfix: this.postfix(),\n }),\n ),\n );\n\n public readonly accept = input<readonly TuiTime[]>([]);\n\n public readonly native =\n !!inject(TuiWithNativePicker, {optional: true}) && inject(TUI_IS_MOBILE);\n\n public readonly timeMode = input<MaskitoTimeMode>(this.options.mode, {alias: 'mode'});\n\n public readonly prefix = input('');\n\n public readonly postfix = input('');\n\n public setValue(value: TuiTime | null): void {\n this.onChange(value);\n\n if (value) {\n this.textfield.value.set(this.stringify(value));\n } else {\n this.textfield.setValue(value);\n }\n\n if (!value && this.dropdownEnabled()) {\n this.open.set(true);\n }\n }\n\n public override writeValue(value: TuiTime | null): void {\n const reset = this.control.pristine && this.control.untouched && !value;\n const changed = untracked(() => value !== this.value());\n\n if (changed || reset) {\n super.writeValue(value);\n untracked(() => this.textfield.value.set(this.stringify(this.value())));\n }\n }\n\n protected onInput(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n const time =\n value.length === this.timeMode().length ? TuiTime.fromString(value) : null;\n const newValue =\n this.accept().length && time\n ? this.findNearestTime(time, this.accept())\n : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue && newValue !== time) {\n this.textfield.value.set(this.stringify(newValue));\n }\n }\n\n protected toggle(): void {\n this.open.update((x) => !x);\n }\n\n protected onBlur(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n\n if (value && !this.value()) {\n const time = TuiTime.fromString(value);\n\n const newValue = this.accept().length\n ? this.findNearestTime(time, this.accept())\n : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue) {\n this.textfield.value.set(this.stringify(newValue));\n }\n }\n }\n\n private computeMask(params: Required<MaskitoTimeParams>): MaskitoOptions {\n const options = maskitoTimeOptionsGenerator(params);\n const {mode, prefix, postfix} = params;\n const inputModeSwitchPlugin = maskitoSelectionChangeHandler((element) => {\n element.inputMode =\n element.selectionStart! >= mode.indexOf(' AA') ? 'text' : 'numeric';\n });\n const caretGuardPlugin = maskitoCaretGuard((value) => [\n prefix.length,\n value.length - postfix.length,\n ]);\n\n return {\n ...options,\n plugins: options.plugins.concat(\n caretGuardPlugin,\n maskitoAddOnFocusPlugin(prefix + postfix),\n maskitoRemoveOnBlurPlugin(prefix + postfix),\n mode.includes('AA') ? inputModeSwitchPlugin : [],\n ),\n };\n }\n\n private findNearestTime(value: TuiTime, items: readonly TuiTime[]): TuiTime | null {\n // eslint-disable-next-line no-restricted-syntax\n return items.reduce((previous, current) =>\n Math.abs(current.valueOf() - value.valueOf()) <\n Math.abs(previous.valueOf() - value.valueOf())\n ? current\n : previous,\n );\n }\n\n private stringify(time: TuiTime | null): string {\n return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type MaskitoTimeMode} from '@maskito/kit';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {type TuiDay, TuiTime} from '@taiga-ui/cdk/date-time';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TuiTextfieldContent,\n TuiTextfieldDirective,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputTimeDirective} from './input-time.directive';\n\n@Directive({\n standalone: false,\n host: {\n '[attr.list]': 'null',\n },\n})\nexport abstract class TuiNativeTimePicker {\n protected readonly list = tuiInjectElement().getAttribute('list');\n\n protected getStep(timeMode: MaskitoTimeMode): number {\n switch (timeMode) {\n case 'HH:MM:SS':\n case 'HH:MM:SS AA':\n return 1;\n case 'HH:MM:SS.MSS':\n case 'HH:MM:SS.MSS AA':\n return 0.001;\n default:\n return 60;\n }\n }\n\n protected toISOString(\n value: TuiTime | readonly [TuiDay, TuiTime | null] | null,\n ): string {\n const [day, time] = Array.isArray(value) ? value : [null, value];\n const dateString = day ? day.toJSON() + (time ? 'T' : '') : '';\n const timeString = time ? time.toString('HH:MM:SS.MSS') : '';\n\n return dateString + timeString;\n }\n}\n\n@Component({\n selector: 'input[tuiInputTime][type=\"time\"]',\n imports: [TuiTextfieldContent],\n templateUrl: './input-time.template.html',\n styleUrl: './input-time.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithNativePicker],\n host: {ngSkipHydration: 'true'},\n})\nexport class TuiInputTimeComponent extends TuiNativeTimePicker {\n private readonly control: TuiControl<TuiTime | null> = inject(TuiControl);\n\n protected readonly host = inject(TuiInputTimeDirective);\n\n protected readonly textfield = inject(TuiTextfieldDirective);\n protected readonly value = computed(() => this.toISOString(this.control.value()));\n\n protected readonly step = computed(() => this.getStep(this.host.timeMode()));\n\n protected setValue(value: string): void {\n this.host.setValue(TuiTime.fromString(value));\n }\n}\n","@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","import {TuiInputTimeComponent} from './input-time.component';\nimport {TuiInputTimeDirective} from './input-time.directive';\n\nexport const TuiInputTime = [TuiInputTimeDirective, TuiInputTimeComponent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAea,MAAA,8BAA8B,GAAwB;AAC/D,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,gBAAgB,EAAE,IAAI;;AAGnB,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CACjF,8BAA8B;;ACgC5B,MAAO,qBACT,SAAQ,UAA0B,CAAA;AAnBtC,IAAA,WAAA,GAAA;;AAsBqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACvC,IAAI,CAAA,IAAA,GAAG,eAAe,EAAE;AACxB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAG,gBAAgB,CAAC,sBAAsB,CAAC;AAC/C,QAAA,IAAA,CAAA,eAAe,GAAG,kBAAkB,CACnD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MA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,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,mBAAmB,CAAC,QAC/B,EAAC,eAAe,EAAE,MAAM,EAAC,EAAA,QAAA,EAAA,mPAAA,EAAA,MAAA,EAAA,CAAA,wVAAA,CAAA,EAAA;;;ME1DtB,YAAY,GAAG,CAAC,qBAAqB,EAAE,qBAAqB;;ACHzE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-time.mjs","sources":["../../../projects/kit/components/input-time/input-time.options.ts","../../../projects/kit/components/input-time/input-time.directive.ts","../../../projects/kit/components/input-time/input-time.component.ts","../../../projects/kit/components/input-time/input-time.template.html","../../../projects/kit/components/input-time/input-time.ts","../../../projects/kit/components/input-time/taiga-ui-kit-components-input-time.ts"],"sourcesContent":["import {type MaskitoTimeParams} from '@maskito/kit';\nimport {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {type TuiTime} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiInputTimeOptions extends Required<\n Pick<MaskitoTimeParams, 'mode' | 'timeSegmentMaxValues' | 'timeSegmentMinValues'>\n> {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly valueTransformer: TuiValueTransformer<TuiTime | null, any> | null;\n}\n\nexport const TUI_INPUT_TIME_DEFAULT_OPTIONS: TuiInputTimeOptions = {\n icon: () => '@tui.clock',\n mode: 'HH:MM',\n timeSegmentMaxValues: {},\n timeSegmentMinValues: {},\n valueTransformer: null,\n};\n\nexport const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_TIME_DEFAULT_OPTIONS,\n);\n","import {computed, Directive, inject, input, untracked} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions} from '@maskito/core';\nimport {\n maskitoAddOnFocusPlugin,\n maskitoCaretGuard,\n maskitoRemoveOnBlurPlugin,\n maskitoSelectionChangeHandler,\n type MaskitoTimeMode,\n maskitoTimeOptionsGenerator,\n type MaskitoTimeParams,\n} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiTime} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n tuiTextfieldIcon,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownDirective,\n tuiDropdownEnabled,\n TuiDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\nimport {TUI_TIME_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_TIME_OPTIONS} from './input-time.options';\n\n@Directive({\n selector: 'input[tuiInputTime]',\n providers: [\n tuiAsControl(TuiInputTimeDirective),\n tuiAsTextfieldAccessor(TuiInputTimeDirective),\n tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),\n tuiAsOptionContent(TuiSelectOption),\n ],\n hostDirectives: [TuiWithInput, MaskitoDirective],\n host: {\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n '(blur)': 'onBlur($event.target.value)',\n },\n})\nexport class TuiInputTimeDirective\n extends TuiControl<TuiTime | null>\n implements TuiTextfieldAccessor<TuiTime | null>\n{\n private readonly input = inject(TuiInputDirective);\n private readonly dropdown = inject(TuiDropdownDirective);\n private readonly open = inject(TuiDropdownOpen).open;\n private readonly options = inject(TUI_INPUT_TIME_OPTIONS);\n private readonly fillers = inject(TUI_TIME_TEXTS);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);\n protected readonly dropdownEnabled = tuiDropdownEnabled(\n computed(() => !this.native && this.interactive()),\n );\n\n protected readonly filler = tuiDirectiveBinding(\n TuiTextfieldComponent,\n 'filler',\n computed((filler = this.fillers()?.[this.timeMode()] ?? '') =>\n this.postfix() ? '' : this.prefix() + filler,\n ),\n {},\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n this.computeMask({\n ...this.options,\n mode: this.timeMode(),\n step: this.interactive() && !this.dropdown.content() ? 1 : 0,\n prefix: this.prefix(),\n postfix: this.postfix(),\n }),\n ),\n );\n\n public readonly accept = input<readonly TuiTime[]>([]);\n public readonly timeMode = input<MaskitoTimeMode>(this.options.mode, {alias: 'mode'});\n public readonly prefix = input('');\n public readonly postfix = input('');\n public readonly native =\n !!inject(TuiWithNativePicker, {optional: true}) && inject(TUI_IS_MOBILE);\n\n public setValue(value: TuiTime | null): void {\n this.onChange(value);\n\n if (value) {\n this.input.value.set(this.stringify(value));\n } else {\n this.input.setValue(value);\n }\n\n if (!value && this.dropdownEnabled()) {\n this.open.set(true);\n }\n }\n\n public override writeValue(value: TuiTime | null): void {\n const reset = this.control.pristine && this.control.untouched && !value;\n const changed = untracked(() => value !== this.value());\n\n if (changed || reset) {\n super.writeValue(value);\n untracked(() => this.input.value.set(this.stringify(this.value())));\n }\n }\n\n protected onInput(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n const time =\n value.length === this.timeMode().length ? TuiTime.fromString(value) : null;\n const newValue =\n this.accept().length && time\n ? this.findNearestTime(time, this.accept())\n : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue && newValue !== time) {\n this.input.value.set(this.stringify(newValue));\n }\n }\n\n protected toggle(): void {\n this.open.update((x) => !x);\n }\n\n protected onBlur(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n\n if (value && !this.value()) {\n const time = TuiTime.fromString(value);\n\n const newValue = this.accept().length\n ? this.findNearestTime(time, this.accept())\n : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue) {\n this.input.value.set(this.stringify(newValue));\n }\n }\n }\n\n private computeMask(params: Required<MaskitoTimeParams>): MaskitoOptions {\n const options = maskitoTimeOptionsGenerator(params);\n const {mode, prefix, postfix} = params;\n const inputModeSwitchPlugin = maskitoSelectionChangeHandler((element) => {\n element.inputMode =\n element.selectionStart! >= mode.indexOf(' AA') ? 'text' : 'numeric';\n });\n const caretGuardPlugin = maskitoCaretGuard((value) => [\n prefix.length,\n value.length - postfix.length,\n ]);\n\n return {\n ...options,\n plugins: options.plugins.concat(\n caretGuardPlugin,\n maskitoAddOnFocusPlugin(prefix + postfix),\n maskitoRemoveOnBlurPlugin(prefix + postfix),\n mode.includes('AA') ? inputModeSwitchPlugin : [],\n ),\n };\n }\n\n private findNearestTime(value: TuiTime, items: readonly TuiTime[]): TuiTime | null {\n // eslint-disable-next-line no-restricted-syntax\n return items.reduce((previous, current) =>\n Math.abs(current.valueOf() - value.valueOf()) <\n Math.abs(previous.valueOf() - value.valueOf())\n ? current\n : previous,\n );\n }\n\n private stringify(time: TuiTime | null): string {\n return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n HostAttributeToken,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type MaskitoTimeMode} from '@maskito/kit';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {type TuiDay, TuiTime} from '@taiga-ui/cdk/date-time';\nimport {\n TuiTextfieldContent,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputTimeDirective} from './input-time.directive';\n\n@Directive({host: {'[attr.list]': 'null'}})\nexport abstract class TuiNativeTimePicker {\n protected readonly list = inject(new HostAttributeToken('list'), {optional: true});\n\n protected getStep(timeMode: MaskitoTimeMode): number {\n switch (timeMode) {\n case 'HH:MM:SS':\n case 'HH:MM:SS AA':\n return 1;\n case 'HH:MM:SS.MSS':\n case 'HH:MM:SS.MSS AA':\n return 0.001;\n default:\n return 60;\n }\n }\n\n protected toISOString(\n value: TuiTime | readonly [TuiDay, TuiTime | null] | null,\n ): string {\n const [day, time] = Array.isArray(value) ? value : [null, value];\n const dateString = day ? day.toJSON() + (time ? 'T' : '') : '';\n const timeString = time ? time.toString('HH:MM:SS.MSS') : '';\n\n return dateString + timeString;\n }\n}\n\n@Component({\n selector: 'input[tuiInputTime][type=\"time\"]',\n imports: [TuiTextfieldContent],\n templateUrl: './input-time.template.html',\n styleUrl: './input-time.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithNativePicker],\n host: {ngSkipHydration: 'true'},\n})\nexport class TuiInputTimeComponent extends TuiNativeTimePicker {\n private readonly control: TuiControl<TuiTime | null> = inject(TuiControl);\n\n protected readonly host = inject(TuiInputTimeDirective);\n protected readonly value = computed(() => this.toISOString(this.control.value()));\n protected readonly step = computed(() => this.getStep(this.host.timeMode()));\n\n protected setValue(value: string): void {\n this.host.setValue(TuiTime.fromString(value));\n }\n}\n","@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","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';\n\nimport {TuiInputTimeComponent} from './input-time.component';\nimport {TuiInputTimeDirective} from './input-time.directive';\n\nexport const TuiInputTime = [\n TuiInputTimeDirective,\n TuiInputTimeComponent,\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":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;AAca,MAAA,8BAA8B,GAAwB;AAC/D,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,gBAAgB,EAAE,IAAI;;AAGnB,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CACjF,8BAA8B;;AC8B5B,MAAO,qBACT,SAAQ,UAA0B,CAAA;AAlBtC,IAAA,WAAA,GAAA;;AAqBqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACjC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACvC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI;AACnC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAG,gBAAgB,CAAC,sBAAsB,CAAC;AAC/C,QAAA,IAAA,CAAA,eAAe,GAAG,kBAAkB,CACnD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CACrD;QAEkB,IAAM,CAAA,MAAA,GAAG,mBAAmB,CAC3C,qBAAqB,EACrB,QAAQ,EACR,QAAQ,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC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;;;;"}
@@ -1,43 +1,45 @@
1
1
  import { TuiCalendarYear } from '@taiga-ui/core/components/calendar';
2
+ import { TuiLabel } from '@taiga-ui/core/components/label';
3
+ import { tuiTextfieldIcon, tuiInjectAuxiliary, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
4
+ import * as i3 from '@taiga-ui/core/portals/dropdown';
5
+ import { TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto, TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
2
6
  import * as i0 from '@angular/core';
3
7
  import { InjectionToken, inject, computed, signal, effect, Input, Directive } from '@angular/core';
4
8
  import * as i2 from '@maskito/angular';
5
9
  import { MaskitoDirective } from '@maskito/angular';
6
10
  import { maskitoNumberOptionsGenerator } from '@maskito/kit';
7
11
  import { TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
8
- import * as i1 from '@taiga-ui/core/components/textfield';
9
- import { TuiTextfieldDirective, tuiInjectAuxiliary, tuiTextfieldIcon, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
10
- import * as i3 from '@taiga-ui/core/directives/dropdown';
11
- import { tuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto } from '@taiga-ui/core/directives/dropdown';
12
+ import * as i1 from '@taiga-ui/core/components/input';
13
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
12
14
  import { tuiMaskito } from '@taiga-ui/kit/utils';
13
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
14
- import { TUI_INPUT_DATE_OPTIONS_NEW, TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW } from '@taiga-ui/kit/components/input-date';
15
+ import { tuiProvideOptions } from '@taiga-ui/cdk/utils/di';
16
+ import { TUI_INPUT_DATE_OPTIONS, TUI_INPUT_DATE_DEFAULT_OPTIONS } from '@taiga-ui/kit/components/input-date';
15
17
 
16
18
  const TUI_INPUT_YEAR_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_YEAR_OPTIONS' : '', {
17
19
  factory: () => ({
18
- ...inject(TUI_INPUT_DATE_OPTIONS_NEW),
20
+ ...inject(TUI_INPUT_DATE_OPTIONS),
19
21
  valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,
20
22
  }),
21
23
  });
22
- const tuiInputInputYearOptionsProvider = (options) => tuiProvideOptions(TUI_INPUT_YEAR_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW);
24
+ const tuiInputInputYearOptionsProvider = (options) => tuiProvideOptions(TUI_INPUT_YEAR_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS);
23
25
 
24
26
  class TuiInputYearDirective extends TuiControl {
25
27
  constructor() {
26
28
  super(...arguments);
27
29
  this.options = inject(TUI_INPUT_YEAR_OPTIONS);
28
- this.textfield = inject(TuiTextfieldDirective);
29
- this.open = tuiDropdownOpen();
30
+ this.input = inject(TuiInputDirective);
31
+ this.open = inject(TuiDropdownOpen).open;
30
32
  this.initialItem = computed(() => this.value() ?? this.calendar()?.initialItem() ?? null);
31
- this.calendar = tuiInjectAuxiliary((x) => x instanceof TuiCalendarYear);
32
33
  this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
33
34
  this.icon = tuiTextfieldIcon(TUI_INPUT_YEAR_OPTIONS);
34
35
  this.min = signal(this.options.min.year);
35
36
  this.max = signal(this.options.max.year);
37
+ this.calendar = tuiInjectAuxiliary((x) => x instanceof TuiCalendarYear);
36
38
  /**
37
39
  * TODO: move to [value]="value()" after update to Angular 17+
38
40
  * something wrong with change detection on host binding
39
41
  */
40
- this.valueEffect = effect(() => this.textfield.value.set(this.value()?.toString() ?? ''));
42
+ this.valueEffect = effect(() => this.input.value.set(this.value()?.toString() ?? ''));
41
43
  this.mask = tuiMaskito(computed(() => maskitoNumberOptionsGenerator({
42
44
  min: this.min(),
43
45
  max: this.max(),
@@ -77,13 +79,13 @@ class TuiInputYearDirective extends TuiControl {
77
79
  const value = Number(raw);
78
80
  this.onChange(!raw || Number.isNaN(value) ? null : value);
79
81
  }
80
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputYearDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
81
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputYearDirective, isStandalone: true, selector: "input[tuiInputYear]", inputs: { minSetter: ["min", "minSetter"], maxSetter: ["max", "maxSetter"] }, host: { attributes: { "maxlength": "4", "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
82
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputYearDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
83
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputYearDirective, isStandalone: true, selector: "input[tuiInputYear]", inputs: { minSetter: ["min", "minSetter"], maxSetter: ["max", "maxSetter"] }, host: { attributes: { "maxlength": "4", "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
82
84
  tuiAsControl(TuiInputYearDirective),
83
85
  tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),
84
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.MaskitoDirective }, { directive: i3.TuiDropdownAuto }], ngImport: i0 }); }
86
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }, { directive: i3.TuiDropdownAuto }], ngImport: i0 }); }
85
87
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputYearDirective, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputYearDirective, decorators: [{
87
89
  type: Directive,
88
90
  args: [{
89
91
  selector: 'input[tuiInputYear]',
@@ -91,7 +93,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
91
93
  tuiAsControl(TuiInputYearDirective),
92
94
  tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),
93
95
  ],
94
- hostDirectives: [TuiWithTextfield, MaskitoDirective, TuiDropdownAuto],
96
+ hostDirectives: [TuiWithInput, MaskitoDirective, TuiDropdownAuto],
95
97
  host: {
96
98
  maxlength: '4',
97
99
  inputmode: 'numeric',
@@ -108,7 +110,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
108
110
  args: ['max']
109
111
  }] } });
110
112
 
111
- const TuiInputYear = [TuiInputYearDirective, TuiCalendarYear];
113
+ const TuiInputYear = [
114
+ TuiInputYearDirective,
115
+ TuiCalendarYear,
116
+ TuiLabel,
117
+ TuiTextfieldComponent,
118
+ TuiTextfieldOptionsDirective,
119
+ TuiDropdownContent,
120
+ ];
112
121
 
113
122
  /**
114
123
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-year.mjs","sources":["../../../projects/kit/components/input-year/input-year.options.ts","../../../projects/kit/components/input-year/input-year.directive.ts","../../../projects/kit/components/input-year/input-year.ts","../../../projects/kit/components/input-year/taiga-ui-kit-components-input-year.ts"],"sourcesContent":["import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW,\n TUI_INPUT_DATE_OPTIONS_NEW,\n type TuiInputDateOptionsNew,\n} from '@taiga-ui/kit/components/input-date';\n\nexport interface TuiInputYearOptions\n extends Omit<TuiInputDateOptionsNew, 'valueTransformer'> {\n readonly valueTransformer: TuiValueTransformer<number | null, any>;\n}\n\nexport const TUI_INPUT_YEAR_OPTIONS = new InjectionToken<TuiInputYearOptions>(\n ngDevMode ? 'TUI_INPUT_YEAR_OPTIONS' : '',\n {\n factory: () => ({\n ...inject(TUI_INPUT_DATE_OPTIONS_NEW),\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n }),\n },\n);\n\nexport const tuiInputInputYearOptionsProvider = (\n options: Partial<TuiInputYearOptions>,\n): FactoryProvider =>\n tuiProvideOptions(\n TUI_INPUT_YEAR_OPTIONS,\n options,\n TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW,\n );\n","import {computed, Directive, effect, inject, Input, signal} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {maskitoNumberOptionsGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\nimport {\n tuiInjectAuxiliary,\n TuiTextfieldDirective,\n tuiTextfieldIcon,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n tuiDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_YEAR_OPTIONS} from './input-year.options';\n\n@Directive({\n selector: 'input[tuiInputYear]',\n providers: [\n tuiAsControl(TuiInputYearDirective),\n tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective, TuiDropdownAuto],\n host: {\n maxlength: '4',\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputYearDirective extends TuiControl<number | null> {\n private readonly options = inject(TUI_INPUT_YEAR_OPTIONS);\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly open = tuiDropdownOpen();\n\n private readonly initialItem = computed(\n () => this.value() ?? this.calendar()?.initialItem() ?? null,\n );\n\n protected readonly calendar = tuiInjectAuxiliary<TuiCalendarYear>(\n (x) => x instanceof TuiCalendarYear,\n );\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_YEAR_OPTIONS);\n protected readonly min = signal(this.options.min.year);\n protected readonly max = signal(this.options.max.year);\n\n /**\n * TODO: move to [value]=\"value()\" after update to Angular 17+\n * something wrong with change detection on host binding\n */\n protected readonly valueEffect = effect(() =>\n this.textfield.value.set(this.value()?.toString() ?? ''),\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n maskitoNumberOptionsGenerator({\n min: this.min(),\n max: this.max(),\n thousandSeparator: '',\n }),\n ),\n );\n\n protected readonly calendarInEffect = effect(() => {\n const calendar = this.calendar();\n\n if (calendar) {\n calendar.initialItemSetter = this.initialItem();\n calendar.value.set(this.value());\n calendar.min.set(this.min());\n calendar.max.set(this.max());\n }\n });\n\n protected readonly calendarOutEffect = effect((onCleanup) => {\n const subscription = this.calendar()?.yearClick.subscribe((year) => {\n this.onChange(year);\n this.open.set(false);\n });\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n // TODO(v5): use signal inputs\n @Input('min')\n public set minSetter(x: number) {\n this.min.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('max')\n public set maxSetter(x: number) {\n this.max.set(x);\n }\n\n protected toggle(): void {\n if (this.interactive()) {\n this.open.update((x) => !x);\n }\n }\n\n protected onInput(raw: string): void {\n const value = Number(raw);\n\n this.onChange(!raw || Number.isNaN(value) ? null : value);\n }\n}\n","import {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\n\nimport {TuiInputYearDirective} from './input-year.directive';\n\nexport const TuiInputYear = [TuiInputYearDirective, TuiCalendarYear] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBa,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE,EACzC;AACI,IAAA,OAAO,EAAE,OAAO;QACZ,GAAG,MAAM,CAAC,0BAA0B,CAAC;AACrC,QAAA,gBAAgB,EAAE,8BAA8B;KACnD,CAAC;AACL,CAAA;AAGQ,MAAA,gCAAgC,GAAG,CAC5C,OAAqC,KAErC,iBAAiB,CACb,sBAAsB,EACtB,OAAO,EACP,kCAAkC;;ACEpC,MAAO,qBAAsB,SAAQ,UAAyB,CAAA;AAfpE,IAAA,WAAA,GAAA;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACxC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;QACzC,IAAI,CAAA,IAAA,GAAG,eAAe,EAAE;QAExB,IAAW,CAAA,WAAA,GAAG,QAAQ,CACnC,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,IAAI,CAC/D;AAEkB,QAAA,IAAA,CAAA,QAAQ,GAAG,kBAAkB,CAC5C,CAAC,CAAC,KAAK,CAAC,YAAY,eAAe,CACtC;AAEkB,QAAA,IAAA,CAAA,eAAe,GAAG,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC;AACtD,QAAA,IAAA,CAAA,IAAI,GAAG,gBAAgB,CAAC,sBAAsB,CAAC;QAC/C,IAAG,CAAA,GAAA,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;QACnC,IAAG,CAAA,GAAA,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;AAEtD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,CAAC,qBAAqB,CAAC;YACnC,uBAAuB,CAAC,sBAAsB,CAAC;AAClD,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,eAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAUQ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAfjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,SAAS,EAAE;AACP,wBAAA,YAAY,CAAuB,qBAAA,CAAA;wBACnC,uBAAuB,CAAC,sBAAsB,CAAC;AAClD,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,CAAC;AACrE,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,GAAG;AACd,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,SAAS,EAAE,UAAU;AACrB,wBAAA,SAAS,EAAE,8BAA8B;AAC5C,qBAAA;AACJ,iBAAA;8BA2Dc,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK;gBAOD,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK;;;MC9FH,YAAY,GAAG,CAAC,qBAAqB,EAAE,eAAe;;ACJnE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-year.mjs","sources":["../../../projects/kit/components/input-year/input-year.options.ts","../../../projects/kit/components/input-year/input-year.directive.ts","../../../projects/kit/components/input-year/input-year.ts","../../../projects/kit/components/input-year/taiga-ui-kit-components-input-year.ts"],"sourcesContent":["import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/di';\nimport {\n TUI_INPUT_DATE_DEFAULT_OPTIONS,\n TUI_INPUT_DATE_OPTIONS,\n type TuiInputDateOptions,\n} from '@taiga-ui/kit/components/input-date';\n\nexport interface TuiInputYearOptions extends Omit<\n TuiInputDateOptions,\n 'valueTransformer'\n> {\n readonly valueTransformer: TuiValueTransformer<number | null, any>;\n}\n\nexport const TUI_INPUT_YEAR_OPTIONS = new InjectionToken<TuiInputYearOptions>(\n ngDevMode ? 'TUI_INPUT_YEAR_OPTIONS' : '',\n {\n factory: () => ({\n ...inject(TUI_INPUT_DATE_OPTIONS),\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n }),\n },\n);\n\nexport const tuiInputInputYearOptionsProvider = (\n options: Partial<TuiInputYearOptions>,\n): FactoryProvider =>\n tuiProvideOptions(TUI_INPUT_YEAR_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS);\n","import {computed, Directive, effect, inject, Input, signal} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {maskitoNumberOptionsGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {tuiInjectAuxiliary, tuiTextfieldIcon} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n TuiDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_YEAR_OPTIONS} from './input-year.options';\n\n@Directive({\n selector: 'input[tuiInputYear]',\n providers: [\n tuiAsControl(TuiInputYearDirective),\n tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),\n ],\n hostDirectives: [TuiWithInput, MaskitoDirective, TuiDropdownAuto],\n host: {\n maxlength: '4',\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputYearDirective extends TuiControl<number | null> {\n private readonly options = inject(TUI_INPUT_YEAR_OPTIONS);\n private readonly input = inject(TuiInputDirective);\n private readonly open = inject(TuiDropdownOpen).open;\n private readonly initialItem = computed(\n () => this.value() ?? this.calendar()?.initialItem() ?? null,\n );\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_YEAR_OPTIONS);\n protected readonly min = signal(this.options.min.year);\n protected readonly max = signal(this.options.max.year);\n protected readonly calendar = tuiInjectAuxiliary<TuiCalendarYear>(\n (x) => x instanceof TuiCalendarYear,\n );\n\n /**\n * TODO: move to [value]=\"value()\" after update to Angular 17+\n * something wrong with change detection on host binding\n */\n protected readonly valueEffect = effect(() =>\n this.input.value.set(this.value()?.toString() ?? ''),\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n maskitoNumberOptionsGenerator({\n min: this.min(),\n max: this.max(),\n thousandSeparator: '',\n }),\n ),\n );\n\n protected readonly calendarInEffect = effect(() => {\n const calendar = this.calendar();\n\n if (calendar) {\n calendar.initialItemSetter = this.initialItem();\n calendar.value.set(this.value());\n calendar.min.set(this.min());\n calendar.max.set(this.max());\n }\n });\n\n protected readonly calendarOutEffect = effect((onCleanup) => {\n const subscription = this.calendar()?.yearClick.subscribe((year) => {\n this.onChange(year);\n this.open.set(false);\n });\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n // TODO(v5): use signal inputs\n @Input('min')\n public set minSetter(x: number) {\n this.min.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('max')\n public set maxSetter(x: number) {\n this.max.set(x);\n }\n\n protected toggle(): void {\n if (this.interactive()) {\n this.open.update((x) => !x);\n }\n }\n\n protected onInput(raw: string): void {\n const value = Number(raw);\n\n this.onChange(!raw || Number.isNaN(value) ? null : value);\n }\n}\n","import {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\nimport {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';\n\nimport {TuiInputYearDirective} from './input-year.directive';\n\nexport const TuiInputYear = [\n TuiInputYearDirective,\n TuiCalendarYear,\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":";;;;;;;;;;;;;;;;;AAmBa,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE,EACzC;AACI,IAAA,OAAO,EAAE,OAAO;QACZ,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACjC,QAAA,gBAAgB,EAAE,8BAA8B;KACnD,CAAC;AACL,CAAA;AAGQ,MAAA,gCAAgC,GAAG,CAC5C,OAAqC,KAErC,iBAAiB,CAAC,sBAAsB,EAAE,OAAO,EAAE,8BAA8B;;ACD/E,MAAO,qBAAsB,SAAQ,UAAyB,CAAA;AAfpE,IAAA,WAAA,GAAA;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACxC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACjC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI;QACnC,IAAW,CAAA,WAAA,GAAG,QAAQ,CACnC,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,IAAI,CAC/D;AAEkB,QAAA,IAAA,CAAA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A,CAAA;sBADnB,KAAK;uBAAC,KAAK;gBAOD,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK;;;AClFH,MAAA,YAAY,GAAG;IACxB,qBAAqB;IACrB,eAAe;IACf,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;;;AChBtB;;AAEG;;;;"}
@@ -30,10 +30,10 @@ class TuiItemsWithMoreDirective {
30
30
  maxWidth() {
31
31
  return Math.max(...Array.from(this.el.children, ({ clientWidth }) => clientWidth));
32
32
  }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
34
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiItemsWithMoreDirective, isStandalone: true, inputs: { itemsLimit: "itemsLimit", required: "required", linesLimit: "linesLimit", side: "side" }, host: { properties: { "class._multiline": "linesLimit > 1", "style.--t-min-width.px": "maxWidth()" } }, usesOnChanges: true, ngImport: i0 }); }
33
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
34
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiItemsWithMoreDirective, isStandalone: true, inputs: { itemsLimit: "itemsLimit", required: "required", linesLimit: "linesLimit", side: "side" }, host: { properties: { "class._multiline": "linesLimit > 1", "style.--t-min-width.px": "maxWidth()" } }, usesOnChanges: true, ngImport: i0 }); }
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreDirective, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreDirective, decorators: [{
37
37
  type: Directive,
38
38
  args: [{
39
39
  host: {
@@ -119,10 +119,10 @@ class TuiItemsWithMoreService extends Observable {
119
119
  const index = firstItemLastRow + this.getOverflowIndex(lastRow);
120
120
  return Math.min(itemsLimit - 1, index);
121
121
  }
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
123
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreService }); }
122
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
123
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreService }); }
124
124
  }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreService, decorators: [{
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreService, decorators: [{
126
126
  type: Injectable
127
127
  }], ctorParameters: () => [] });
128
128
 
@@ -130,10 +130,10 @@ class TuiMore {
130
130
  static ngTemplateContextGuard(_dir, _ctx) {
131
131
  return true;
132
132
  }
133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMore, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
134
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiMore, isStandalone: true, selector: "[tuiMore]", ngImport: i0 }); }
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMore, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
134
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiMore, isStandalone: true, selector: "[tuiMore]", ngImport: i0 }); }
135
135
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMore, decorators: [{
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiMore, decorators: [{
137
137
  type: Directive,
138
138
  args: [{
139
139
  selector: '[tuiMore]',
@@ -159,8 +159,8 @@ class TuiItemsWithMoreComponent {
159
159
  return ((index > this.lastIndex() && index !== required && computedSide === 'end') ||
160
160
  (index < this.lastIndex() && index !== required && computedSide === 'start'));
161
161
  }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
163
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiItemsWithMoreComponent, isStandalone: true, selector: "tui-items-with-more", outputs: { lastIndexChange: "lastIndexChange" }, providers: [
162
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
163
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiItemsWithMoreComponent, isStandalone: true, selector: "tui-items-with-more", outputs: { lastIndexChange: "lastIndexChange" }, providers: [
164
164
  MutationObserverService,
165
165
  ResizeObserverService,
166
166
  TuiItemsWithMoreService,
@@ -174,7 +174,7 @@ class TuiItemsWithMoreComponent {
174
174
  },
175
175
  ], queries: [{ propertyName: "more", first: true, predicate: TuiMore, descendants: true, read: TemplateRef }, { propertyName: "items", predicate: TuiItem, descendants: true, read: TemplateRef }], hostDirectives: [{ directive: TuiItemsWithMoreDirective, inputs: ["itemsLimit", "itemsLimit", "required", "required", "side", "side", "linesLimit", "linesLimit"] }], ngImport: i0, template: "@if (items.changes | async) {}\n@if (directive.side === 'start') {\n <ng-container [ngTemplateOutlet]=\"template\" />\n}\n@for (item of items; track item) {\n <div\n class=\"t-item\"\n [class.t-item_hidden]=\"isHidden($index)\"\n >\n <ng-container *ngTemplateOutlet=\"item\" />\n </div>\n}\n@if (directive.side === 'end') {\n <ng-container [ngTemplateOutlet]=\"template\" />\n}\n<ng-template #template>\n @if (!isMoreHidden) {\n <span class=\"t-item t-item_more\">\n <ng-container\n [ngTemplateOutlet]=\"more || null\"\n [ngTemplateOutletContext]=\"{$implicit: lastIndex()}\"\n />\n </span>\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;min-inline-size:0;flex:1;align-items:center;white-space:nowrap;gap:0!important}:host._multiline{flex-wrap:wrap}.t-item{flex:0 0 auto;max-inline-size:100%}.t-item_hidden{position:absolute;bottom:0;visibility:hidden}:host._multiline .t-item_more:not(:empty){min-inline-size:var(--t-min-width, 0)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
176
176
  }
177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiItemsWithMoreComponent, decorators: [{
177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiItemsWithMoreComponent, decorators: [{
178
178
  type: Component,
179
179
  args: [{ selector: 'tui-items-with-more', imports: [AsyncPipe, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
180
180
  MutationObserverService,
@@ -21,8 +21,8 @@ class TuiLike {
21
21
  this.color = input('', { alias: 'tuiLike' });
22
22
  this.size = input(inject(TUI_LIKE_OPTIONS).size);
23
23
  }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLike, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiLike, isStandalone: true, selector: "input[tuiLike][type=checkbox]", inputs: { color: { classPropertyName: "color", publicName: "tuiLike", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiLike": "" }, properties: { "attr.data-size": "size()", "attr.data-mode": "\"\"", "style.--t-icon-color": "color()" } }, providers: [
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLike, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiLike, isStandalone: true, selector: "input[tuiLike][type=checkbox]", inputs: { color: { classPropertyName: "color", publicName: "tuiLike", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiLike": "" }, properties: { "attr.data-size": "size()", "attr.data-mode": "\"\"", "style.--t-icon-color": "color()" } }, providers: [
26
26
  tuiAppearanceOptionsProvider(TUI_LIKE_OPTIONS),
27
27
  {
28
28
  provide: TUI_ICON_START,
@@ -34,7 +34,7 @@ class TuiLike {
34
34
  },
35
35
  ], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiIcons, inputs: ["iconStart", "uncheckedIcon", "iconEnd", "checkedIcon"] }], ngImport: i0, template: '', isInline: true, styles: ["[tuiLike]{inline-size:1em;block-size:1em;font-size:var(--tui-height-m);border-radius:100%;cursor:pointer;margin:0;flex-shrink:0}[tuiLike]:before,[tuiLike]:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;font-size:1.25rem;transition-property:transform,opacity}[tuiLike]:after{opacity:0;color:var(--t-icon-color, inherit);transform:scale(0)}[tuiLike]:checked:before{opacity:0}[tuiLike]:checked:after{opacity:1;transform:scale(1);transition-timing-function:cubic-bezier(.2,.6,.5,1.8),ease-in-out}[tuiLike][data-size=s]{font-size:var(--tui-height-s)}[tuiLike][data-size=s]:before,[tuiLike][data-size=s]:after{font-size:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLike, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLike, decorators: [{
38
38
  type: Component,
39
39
  args: [{ selector: 'input[tuiLike][type=checkbox]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
40
40
  tuiAppearanceOptionsProvider(TUI_LIKE_OPTIONS),
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-like.mjs","sources":["../../../projects/kit/components/like/like.options.ts","../../../projects/kit/components/like/like.component.ts","../../../projects/kit/components/like/taiga-ui-kit-components-like.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiAppearanceOptions} from '@taiga-ui/core/directives';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiLikeOptions extends TuiAppearanceOptions {\n readonly size: TuiSizeS;\n readonly icons: Readonly<{\n checked: string;\n unchecked: string;\n }>;\n}\n\nexport const [TUI_LIKE_OPTIONS, tuiLikeOptionsProvider] =\n tuiCreateOptions<TuiLikeOptions>({\n size: 'm',\n appearance: 'secondary',\n icons: {\n unchecked: '@tui.heart',\n checked: '@tui.heart-filled',\n },\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiIcons} from '@taiga-ui/core/directives/icons';\nimport {TUI_ICON_END, TUI_ICON_START} from '@taiga-ui/core/tokens';\n\nimport {TUI_LIKE_OPTIONS} from './like.options';\n\n@Component({\n selector: 'input[tuiLike][type=checkbox]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/like.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAppearanceOptionsProvider(TUI_LIKE_OPTIONS),\n {\n provide: TUI_ICON_START,\n useFactory: () => inject(TUI_LIKE_OPTIONS).icons.unchecked,\n },\n {\n provide: TUI_ICON_END,\n useFactory: () => inject(TUI_LIKE_OPTIONS).icons.checked,\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiIcons,\n inputs: ['iconStart: uncheckedIcon', 'iconEnd: checkedIcon'],\n },\n ],\n host: {\n tuiLike: '',\n '[attr.data-size]': 'size()',\n '[attr.data-mode]': '\"\"',\n '[style.--t-icon-color]': 'color()',\n },\n})\nexport class TuiLike {\n public readonly color = input('', {alias: 'tuiLike'});\n public readonly size = input(inject(TUI_LIKE_OPTIONS).size);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAYa,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB;AAC7B,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,UAAU,EAAE,WAAW;AACvB,IAAA,KAAK,EAAE;AACH,QAAA,SAAS,EAAE,YAAY;AACvB,QAAA,OAAO,EAAE,mBAAmB;AAC/B,KAAA;AACJ,CAAA;;MC2BQ,OAAO,CA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BAAkB,EAAE,QAAQ;AAC5B,wBAAA,kBAAkB,EAAE,IAAI;AACxB,wBAAA,wBAAwB,EAAE,SAAS;AACtC,qBAAA,EAAA,MAAA,EAAA,CAAA,soBAAA,CAAA,EAAA;;;AC7CL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-like.mjs","sources":["../../../projects/kit/components/like/like.options.ts","../../../projects/kit/components/like/like.component.ts","../../../projects/kit/components/like/taiga-ui-kit-components-like.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiLikeOptions extends TuiAppearanceOptions {\n readonly size: TuiSizeS;\n readonly icons: Readonly<{\n checked: string;\n unchecked: string;\n }>;\n}\n\nexport const [TUI_LIKE_OPTIONS, tuiLikeOptionsProvider] =\n tuiCreateOptions<TuiLikeOptions>({\n size: 'm',\n appearance: 'secondary',\n icons: {\n unchecked: '@tui.heart',\n checked: '@tui.heart-filled',\n },\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiIcons} from '@taiga-ui/core/directives/icons';\nimport {TUI_ICON_END, TUI_ICON_START} from '@taiga-ui/core/tokens';\n\nimport {TUI_LIKE_OPTIONS} from './like.options';\n\n@Component({\n selector: 'input[tuiLike][type=checkbox]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/like.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAppearanceOptionsProvider(TUI_LIKE_OPTIONS),\n {\n provide: TUI_ICON_START,\n useFactory: () => inject(TUI_LIKE_OPTIONS).icons.unchecked,\n },\n {\n provide: TUI_ICON_END,\n useFactory: () => inject(TUI_LIKE_OPTIONS).icons.checked,\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiIcons,\n inputs: ['iconStart: uncheckedIcon', 'iconEnd: checkedIcon'],\n },\n ],\n host: {\n tuiLike: '',\n '[attr.data-size]': 'size()',\n '[attr.data-mode]': '\"\"',\n '[style.--t-icon-color]': 'color()',\n },\n})\nexport class TuiLike {\n public readonly color = input('', {alias: 'tuiLike'});\n public readonly size = input(inject(TUI_LIKE_OPTIONS).size);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAYa,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB;AAC7B,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,UAAU,EAAE,WAAW;AACvB,IAAA,KAAK,EAAE;AACH,QAAA,SAAS,EAAE,YAAY;AACvB,QAAA,OAAO,EAAE,mBAAmB;AAC/B,KAAA;AACJ,CAAA;;MC2BQ,OAAO,CAAA;AA/BpB,IAAA,WAAA,GAAA;QAgCoB,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC,EAAE,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;QACrC,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC;AAC9D;+GAHY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,EAzBL,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,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