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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  2. package/components/avatar/avatar-stack.component.d.ts +2 -2
  3. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  4. package/components/badged-content/badged-content.directive.d.ts +2 -3
  5. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  6. package/components/button-loading/button-loading.component.d.ts +5 -5
  7. package/components/calendar-month/calendar-month.component.d.ts +5 -5
  8. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  9. package/components/calendar-range/day-range-period.d.ts +2 -1
  10. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  11. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  12. package/components/carousel/carousel.component.d.ts +15 -18
  13. package/components/carousel/carousel.directive.d.ts +5 -4
  14. package/components/combo-box/combo-box.d.ts +1 -1
  15. package/components/combo-box/combo-box.directive.d.ts +3 -5
  16. package/components/compass/compass.component.d.ts +2 -2
  17. package/components/copy/copy.component.d.ts +2 -3
  18. package/components/drawer/drawer.component.d.ts +3 -4
  19. package/components/files/file/file.component.d.ts +16 -29
  20. package/components/files/files/files.component.d.ts +5 -8
  21. package/components/files/input-files/input-files.component.d.ts +2 -2
  22. package/components/files/input-files/input-files.content.d.ts +7 -8
  23. package/components/files/input-files/input-files.directive.d.ts +2 -2
  24. package/components/filter/filter.component.d.ts +9 -12
  25. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  26. package/components/index.d.ts +0 -3
  27. package/components/input-color/input-color.component.d.ts +5 -9
  28. package/components/input-color/input-color.d.ts +1 -1
  29. package/components/input-date/input-date.component.d.ts +2 -2
  30. package/components/input-date/input-date.d.ts +1 -1
  31. package/components/input-date/input-date.directive.d.ts +15 -14
  32. package/components/input-date/input-date.options.d.ts +3 -3
  33. package/components/input-date-multi/input-date-multi.d.ts +1 -1
  34. package/components/input-date-multi/input-date-multi.directive.d.ts +2 -2
  35. package/components/input-date-range/input-date-range.d.ts +1 -1
  36. package/components/input-date-range/input-date-range.directive.d.ts +7 -8
  37. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  38. package/components/input-date-time/input-date-time.d.ts +1 -1
  39. package/components/input-date-time/input-date-time.directive.d.ts +12 -12
  40. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  41. package/components/input-inline/input-inline.component.d.ts +3 -2
  42. package/components/input-month/input-month.component.d.ts +3 -5
  43. package/components/input-month/input-month.d.ts +1 -1
  44. package/components/input-month/input-month.directive.d.ts +1 -1
  45. package/components/input-month-range/input-month-range.d.ts +1 -1
  46. package/components/input-month-range/input-month-range.directive.d.ts +1 -1
  47. package/components/input-number/index.d.ts +3 -0
  48. package/components/input-number/input-number.d.ts +5 -3
  49. package/components/input-number/input-number.directive.d.ts +9 -22
  50. package/components/input-number/input-number.options.d.ts +4 -7
  51. package/components/input-number/number-mask.directive.d.ts +42 -0
  52. package/components/input-number/quantum.directive.d.ts +10 -8
  53. package/components/input-number/step/input-number-step.component.d.ts +10 -9
  54. package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
  55. package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
  56. package/components/input-phone/input-phone.d.ts +1 -1
  57. package/components/input-phone/input-phone.directive.d.ts +6 -8
  58. package/components/input-phone-international/input-phone-international.component.d.ts +8 -10
  59. package/components/input-phone-international/input-phone-international.d.ts +1 -1
  60. package/components/input-phone-international/input-phone-international.options.d.ts +1 -0
  61. package/components/input-pin/input-pin.component.d.ts +3 -4
  62. package/components/input-pin/input-pin.d.ts +1 -1
  63. package/components/input-range/index.d.ts +0 -1
  64. package/components/input-range/input-range.component.d.ts +22 -52
  65. package/components/input-slider/input-slider.d.ts +1 -1
  66. package/components/input-slider/input-slider.directive.d.ts +3 -2
  67. package/components/input-time/input-time.d.ts +1 -1
  68. package/components/input-time/input-time.directive.d.ts +1 -1
  69. package/components/input-year/input-year.d.ts +1 -1
  70. package/components/input-year/input-year.directive.d.ts +4 -6
  71. package/components/input-year/input-year.options.d.ts +2 -2
  72. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  73. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  74. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  75. package/components/pager/pager.component.d.ts +12 -12
  76. package/components/pagination/pagination.component.d.ts +1 -1
  77. package/components/preview/index.d.ts +1 -0
  78. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  79. package/components/preview/preview.component.d.ts +6 -6
  80. package/components/preview/zoom/preview-zoom.component.d.ts +10 -17
  81. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  82. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  83. package/components/pulse/pulse.component.d.ts +2 -2
  84. package/components/push/push.component.d.ts +6 -7
  85. package/components/radio-list/radio-list.component.d.ts +9 -9
  86. package/components/range/range.component.d.ts +3 -4
  87. package/components/select/select.d.ts +1 -1
  88. package/components/slider/helpers/slider-key-steps.directive.d.ts +10 -7
  89. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  90. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  91. package/components/slider/slider.component.d.ts +4 -7
  92. package/components/stepper/step.component.d.ts +9 -2
  93. package/components/stepper/stepper.component.d.ts +1 -3
  94. package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
  95. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  96. package/components/tabs/tabs-with-more.component.d.ts +12 -16
  97. package/components/tabs/tabs.directive.d.ts +5 -7
  98. package/components/textarea/textarea.component.d.ts +7 -8
  99. package/components/textarea/textarea.d.ts +1 -1
  100. package/components/tiles/tile-handle.directive.d.ts +2 -1
  101. package/components/tiles/tile.component.d.ts +7 -10
  102. package/components/tiles/tile.service.d.ts +1 -1
  103. package/components/tiles/tiles.component.d.ts +4 -7
  104. package/components/tree/components/tree/tree.component.d.ts +7 -7
  105. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  106. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  107. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  108. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  109. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  110. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  111. package/directives/appearance-proxy/index.d.ts +1 -0
  112. package/directives/fade/fade.directive.d.ts +5 -5
  113. package/directives/highlight/highlight.directive.d.ts +4 -4
  114. package/directives/index.d.ts +1 -1
  115. package/directives/present/present.directive.d.ts +2 -4
  116. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  117. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  118. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -8
  119. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  120. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  121. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  122. package/fesm2022/taiga-ui-kit-components-avatar.mjs +33 -47
  123. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  124. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +8 -10
  125. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-kit-components-badge.mjs +7 -7
  127. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -11
  128. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
  130. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +13 -27
  132. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  134. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +12 -24
  136. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +26 -35
  138. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-carousel.mjs +69 -116
  140. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +3 -3
  142. package/fesm2022/taiga-ui-kit-components-chip.mjs +7 -7
  143. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +8 -23
  144. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  146. package/fesm2022/taiga-ui-kit-components-compass.mjs +7 -9
  147. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  148. package/fesm2022/taiga-ui-kit-components-confirm.mjs +7 -7
  149. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  150. package/fesm2022/taiga-ui-kit-components-copy.mjs +11 -18
  151. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +6 -6
  153. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  155. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-files.mjs +108 -228
  157. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-kit-components-filter.mjs +20 -33
  159. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  161. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +7 -16
  163. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-kit-components-input-color.mjs +8 -20
  165. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  166. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +9 -7
  167. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  168. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +21 -30
  169. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  170. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +24 -47
  171. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  172. package/fesm2022/taiga-ui-kit-components-input-date.mjs +31 -42
  173. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  174. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -12
  175. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  176. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +12 -16
  177. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-input-month.mjs +25 -39
  179. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  180. package/fesm2022/taiga-ui-kit-components-input-number.mjs +252 -179
  181. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  182. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +31 -48
  183. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  184. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +13 -28
  185. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  186. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +11 -18
  187. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
  189. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +20 -15
  191. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-input-time.mjs +10 -11
  193. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-input-year.mjs +12 -27
  195. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -70
  197. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-like.mjs +3 -3
  199. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +9 -9
  200. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -7
  201. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +26 -31
  203. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +11 -11
  205. package/fesm2022/taiga-ui-kit-components-pager.mjs +29 -41
  206. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-components-pagination.mjs +14 -18
  208. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  210. package/fesm2022/taiga-ui-kit-components-preview.mjs +74 -143
  211. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-progress.mjs +44 -63
  213. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  215. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-push.mjs +20 -32
  217. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +21 -33
  219. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-radio.mjs +6 -6
  221. package/fesm2022/taiga-ui-kit-components-range.mjs +19 -29
  222. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-rating.mjs +3 -3
  224. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +3 -3
  225. package/fesm2022/taiga-ui-kit-components-segmented.mjs +7 -7
  226. package/fesm2022/taiga-ui-kit-components-select.mjs +10 -11
  227. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-slider.mjs +52 -74
  229. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  231. package/fesm2022/taiga-ui-kit-components-stepper.mjs +36 -29
  232. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-switch.mjs +4 -4
  234. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-tabs.mjs +83 -142
  236. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-textarea.mjs +25 -38
  238. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-tiles.mjs +52 -96
  240. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-toast.mjs +16 -16
  242. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-tree.mjs +61 -92
  244. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  246. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  248. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  249. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  250. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +3 -3
  252. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +7 -7
  253. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -7
  255. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +3 -3
  257. package/fesm2022/taiga-ui-kit-directives-fade.mjs +20 -30
  258. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  260. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -20
  261. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-directives-password.mjs +3 -3
  263. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -17
  264. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  266. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  267. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  268. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  269. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +6 -6
  270. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +7 -9
  271. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +9 -13
  273. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-directives.mjs +1 -1
  275. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +3 -3
  276. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  277. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +14 -15
  278. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +3 -4
  280. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +23 -26
  282. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +3 -3
  284. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  285. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  287. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  288. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -108
  289. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-utils.mjs +2 -8
  291. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  292. package/package.json +86 -98
  293. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +3 -0
  294. package/pipes/flag/flag.pipe.d.ts +1 -2
  295. package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -0
  296. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  297. package/styles/components/avatar.less +14 -14
  298. package/styles/components/badge.less +3 -3
  299. package/styles/components/block.less +4 -4
  300. package/styles/components/chip.less +3 -3
  301. package/styles/components/comment.less +1 -1
  302. package/styles/components/message.less +1 -1
  303. package/styles/components/pin.less +3 -3
  304. package/styles/components/switch.less +3 -2
  305. package/styles/components/toast.less +1 -1
  306. package/tokens/i18n.d.ts +1 -0
  307. package/tokens/index.d.ts +0 -7
  308. package/utils/index.d.ts +0 -1
  309. package/utils/maskito.binding.d.ts +1 -1
  310. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  311. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  312. package/components/elastic-container/index.d.ts +0 -2
  313. package/components/floating-container/floating-container.directive.d.ts +0 -7
  314. package/components/floating-container/index.d.ts +0 -1
  315. package/components/input-range/input-range.d.ts +0 -3
  316. package/components/slides/index.d.ts +0 -1
  317. package/components/slides/slides.directive.d.ts +0 -11
  318. package/directives/button-close/button-close.directive.d.ts +0 -6
  319. package/directives/button-close/index.d.ts +0 -1
  320. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -77
  321. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  322. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  323. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  324. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  325. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  326. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +0 -47
  327. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +0 -1
  328. package/tokens/calendar-date-stream.d.ts +0 -10
  329. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  330. package/tokens/input-date-options.d.ts +0 -15
  331. package/tokens/items-handlers.d.ts +0 -20
  332. package/tokens/mobile-calendar.d.ts +0 -6
  333. package/tokens/month-formatter.d.ts +0 -5
  334. package/utils/toggle-day.d.ts +0 -2
  335. /package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +0 -0
@@ -1,34 +1,37 @@
1
1
  import { TuiLabel } from '@taiga-ui/core/components/label';
2
2
  import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
3
- import { TuiDropdownContent } from '@taiga-ui/core/portals';
3
+ import { TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
4
4
  import * as i0 from '@angular/core';
5
- import { inject, computed, effect, input, untracked, Directive, signal, Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
- import * as i2 from '@maskito/angular';
7
- import { MaskitoDirective } from '@maskito/angular';
8
- import { maskitoTransform } from '@maskito/core';
9
- import { maskitoParseNumber, maskitoNumberOptionsGenerator, maskitoCaretGuard } from '@maskito/kit';
10
- import { TuiControl, tuiAsControl, tuiValueTransformerFrom, TuiValueTransformer } from '@taiga-ui/cdk/classes';
11
- import { CHAR_MINUS, CHAR_HYPHEN } from '@taiga-ui/cdk/constants';
5
+ import { inject, input, computed, effect, Directive, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
+ import { maskitoNumberOptionsGenerator, maskitoStringifyNumber, maskitoCaretGuard, maskitoParseNumber } from '@maskito/kit';
7
+ import { TuiValueTransformer, TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
12
8
  import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
13
9
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
14
- import { tuiIsSafeToRound, tuiRound, tuiClamp } from '@taiga-ui/cdk/utils/math';
15
- import * as i1 from '@taiga-ui/core/components/input';
10
+ import * as i1$1 from '@taiga-ui/core/components/input';
16
11
  import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
12
+ import * as i1 from '@maskito/angular';
13
+ import { MaskitoDirective } from '@maskito/angular';
14
+ import { maskitoTransform } from '@maskito/core';
17
15
  import { TUI_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
18
- import { tuiFormatNumber, tuiGetFractionPartPadded } from '@taiga-ui/core/utils/format';
19
16
  import { tuiMaskito } from '@taiga-ui/kit/utils';
17
+ import { CHAR_MINUS } from '@taiga-ui/cdk/constants';
20
18
  import { tuiCreateOptions, tuiProvide } from '@taiga-ui/cdk/utils/di';
19
+ import { tuiRound, tuiIsSafeToRound, tuiClamp } from '@taiga-ui/cdk/utils/math';
20
+ import { tuiGetFractionPartPadded } from '@taiga-ui/core/utils/format';
21
21
  import { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/components/slider';
22
+ import { identity, merge, fromEvent, Subject, switchMap, timer, expand, map, takeUntil } from 'rxjs';
22
23
  import { DOCUMENT } from '@angular/common';
23
24
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
24
25
  import { TuiButton } from '@taiga-ui/core/components/button';
25
- import { Subject, merge, fromEvent, switchMap, timer, expand, map, takeUntil } from 'rxjs';
26
+ import * as i1$2 from '@taiga-ui/kit/directives/appearance-proxy';
27
+ import { TuiAppearanceProxy } from '@taiga-ui/kit/directives/appearance-proxy';
26
28
 
27
29
  const TUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
28
30
  min: Number.MIN_SAFE_INTEGER,
29
31
  max: Number.MAX_SAFE_INTEGER,
30
32
  prefix: '',
31
33
  postfix: '',
34
+ minusSign: CHAR_MINUS,
32
35
  step: 0,
33
36
  icons: {
34
37
  increase: '@tui.plus',
@@ -38,121 +41,53 @@ const TUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
38
41
  };
39
42
  const [TUI_INPUT_NUMBER_OPTIONS, tuiInputNumberOptionsProvider] = tuiCreateOptions(TUI_INPUT_NUMBER_DEFAULT_OPTIONS);
40
43
 
41
- const DEFAULT_MAX_LENGTH = 18;
42
- class TuiInputNumberDirective extends TuiControl {
44
+ class TuiNumberMask {
43
45
  constructor() {
44
- super(...arguments);
45
46
  this.options = inject(TUI_INPUT_NUMBER_OPTIONS);
46
- this.input = inject(TuiInputDirective);
47
- this.isIOS = inject(TUI_IS_IOS);
48
47
  this.numberFormat = inject(TUI_NUMBER_FORMAT);
49
- this.formatted = computed(() => maskitoParseNumber(this.input.value(), this.numberFormat()));
50
- this.precision = computed((precision = this.numberFormat().precision) => Number.isNaN(precision) ? 2 : precision);
51
- this.unfinished = computed((value = this.formatted()) => value < 0 ? value > this.max() : value < this.min());
52
- this.element = tuiInjectElement();
53
- this.mask = tuiMaskito(computed(() => this.computeMask(this.maskParams)));
54
- this.inputMode = computed(() => {
55
- if (this.isIOS) {
56
- return this.min() < 0
57
- ? 'text' // iPhone does not have minus sign if inputMode is equal to 'numeric' / 'decimal'
58
- : 'decimal';
59
- }
60
- /**
61
- * Samsung Keyboard does not have minus sign for `inputmode=decimal`
62
- * @see https://github.com/taiga-family/taiga-ui/issues/11061#issuecomment-2939103792
63
- */
64
- return 'numeric';
48
+ this.input = inject(TuiInputDirective);
49
+ this.prefix = input(this.options.prefix);
50
+ this.postfix = input(this.options.postfix);
51
+ this.maximumFractionDigits = computed((precision = this.numberFormat().precision) => Number.isNaN(precision) ? 2 : precision);
52
+ this.min = input(this.options.min, {
53
+ transform: (x) => x ?? this.options.min,
65
54
  });
66
- this.defaultMaxLength = computed(() => {
67
- const { decimalSeparator, thousandSeparator } = this.numberFormat();
68
- const decimalPart = !!this.precision() && this.input.value().includes(decimalSeparator);
69
- const precision = decimalPart ? Math.min(this.precision() + 1, 20) : 0;
70
- const takeThousand = thousandSeparator.repeat(5).length;
71
- const affixes = this.prefix().length + this.postfix().length;
72
- return DEFAULT_MAX_LENGTH + precision + takeThousand + affixes;
55
+ this.max = input(this.options.max, {
56
+ transform: (x) => x ?? this.options.max,
73
57
  });
74
- this.onChangeEffect = effect(() => {
75
- const value = this.formatted();
76
- if (Number.isNaN(value) && !Number.isNaN(this.value())) {
77
- this.onChange(null);
78
- return;
79
- }
80
- if (this.unfinished() ||
81
- value < this.min() ||
82
- value > this.max() ||
83
- Object.is(this.value(), value)) {
84
- return;
85
- }
86
- this.onChange(value);
58
+ this.params = computed(() => {
59
+ const { decimalMode, ...numberFormat } = this.numberFormat();
60
+ const maximumFractionDigits = this.maximumFractionDigits();
61
+ return {
62
+ ...numberFormat,
63
+ ...this.options,
64
+ maximumFractionDigits,
65
+ min: this.min(),
66
+ max: this.max(),
67
+ prefix: this.prefix(),
68
+ postfix: this.postfix(),
69
+ minimumFractionDigits: decimalMode === 'always' ? maximumFractionDigits : 0,
70
+ };
87
71
  });
88
- this.maskInitialCalibrationEffect = effect(() => {
72
+ this.mask = tuiMaskito(computed(() => this.computeMask(this.params())));
73
+ this.maskInitialCalibration = effect(() => {
89
74
  const options = maskitoNumberOptionsGenerator({
90
- ...this.maskParams,
91
- min: Number.MIN_SAFE_INTEGER,
92
- max: Number.MAX_SAFE_INTEGER,
75
+ ...this.params(),
76
+ min: -Infinity,
77
+ max: Infinity,
93
78
  });
94
79
  this.input.value.update((x) => maskitoTransform(x, options));
95
80
  });
96
- this.min = computed(() => Math.min(this.minRaw(), this.maxRaw()));
97
- this.max = computed(() => Math.max(this.minRaw(), this.maxRaw()));
98
- this.prefix = input(this.options.prefix);
99
- this.postfix = input(this.options.postfix);
100
- this.minRaw = input(this.options.min, {
101
- alias: 'min',
102
- transform: (x) => this.transformer.fromControlValue(x ?? this.options.min),
103
- });
104
- this.maxRaw = input(this.options.max, {
105
- alias: 'max',
106
- transform: (x) => this.transformer.fromControlValue(x ?? this.options.max),
107
- });
108
- }
109
- writeValue(value) {
110
- const reset = this.control.pristine && this.control.untouched && !value;
111
- const changed = untracked(() => value !== this.value());
112
- if (changed || reset) {
113
- super.writeValue(value);
114
- untracked(() => this.setValue(this.value()));
115
- }
116
81
  }
117
- setValue(value) {
118
- this.input.value.set(this.formatNumber(value));
119
- }
120
- onFocus() {
121
- if (Number.isNaN(this.formatted()) && !this.readOnly()) {
122
- this.input.value.set(this.prefix() + this.postfix());
123
- }
124
- }
125
- get maskParams() {
126
- const { decimalMode, ...numberFormat } = this.numberFormat();
127
- const maximumFractionDigits = this.precision();
128
- return {
129
- ...numberFormat,
130
- maximumFractionDigits,
131
- min: this.min(),
132
- max: this.max(),
133
- prefix: this.prefix(),
134
- postfix: this.postfix(),
135
- minimumFractionDigits: decimalMode === 'always' ? maximumFractionDigits : 0,
136
- };
137
- }
138
- formatNumber(value) {
139
- if (value === null || Number.isNaN(value)) {
140
- return '';
141
- }
142
- return ((this.prefix() !== CHAR_MINUS ? this.prefix() : '') +
143
- tuiFormatNumber(value, {
144
- ...this.numberFormat(),
145
- /**
146
- * Number can satisfy interval [Number.MIN_SAFE_INTEGER; Number.MAX_SAFE_INTEGER]
147
- * but its rounding can violate it.
148
- * Before BigInt support there is no perfect solution – only trade off.
149
- * No rounding is better than lose precision and incorrect mutation of already valid value.
150
- */
151
- precision: tuiIsSafeToRound(value, this.precision())
152
- ? this.precision()
153
- : Infinity,
154
- }).replace(CHAR_HYPHEN, CHAR_MINUS) +
155
- this.postfix());
82
+ stringify(value) {
83
+ const params = this.params();
84
+ return maskitoStringifyNumber(value ?? null, {
85
+ ...params,
86
+ minimumFractionDigits: String(value).includes(params.decimalSeparator) &&
87
+ this.numberFormat().decimalMode !== 'not-zero'
88
+ ? params.maximumFractionDigits
89
+ : 0,
90
+ });
156
91
  }
157
92
  computeMask(params) {
158
93
  const { prefix = '', postfix = '' } = params;
@@ -168,28 +103,26 @@ class TuiInputNumberDirective extends TuiControl {
168
103
  ],
169
104
  };
170
105
  }
171
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputNumberDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
172
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.16", type: TuiInputNumberDirective, isStandalone: true, selector: "input[tuiInputNumber]", inputs: { prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, postfix: { classPropertyName: "postfix", publicName: "postfix", isSignal: true, isRequired: false, transformFunction: null }, minRaw: { classPropertyName: "minRaw", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, maxRaw: { classPropertyName: "maxRaw", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusout": "setValue(transformer.fromControlValue(control.value))", "focus": "onFocus()" }, properties: { "disabled": "disabled()", "attr.inputMode": "inputMode()", "attr.maxLength": "element.maxLength > 0 ? element.maxLength : defaultMaxLength()" } }, providers: [
173
- tuiAsControl(TuiInputNumberDirective),
174
- tuiValueTransformerFrom(TUI_INPUT_NUMBER_OPTIONS),
175
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNumberMask, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
107
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiNumberMask, isStandalone: true, inputs: { prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, postfix: { classPropertyName: "postfix", publicName: "postfix", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.MaskitoDirective }], ngImport: i0 }); }
176
108
  }
177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputNumberDirective, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNumberMask, decorators: [{
110
+ type: Directive,
111
+ args: [{ hostDirectives: [MaskitoDirective] }]
112
+ }] });
113
+ class TuiWithNumberMask {
114
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiWithNumberMask, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
115
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiWithNumberMask, isStandalone: true, hostDirectives: [{ directive: TuiNumberMask, inputs: ["min", "min", "max", "max", "prefix", "prefix", "postfix", "postfix"] }], ngImport: i0 }); }
116
+ }
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiWithNumberMask, decorators: [{
178
118
  type: Directive,
179
119
  args: [{
180
- selector: 'input[tuiInputNumber]',
181
- providers: [
182
- tuiAsControl(TuiInputNumberDirective),
183
- tuiValueTransformerFrom(TUI_INPUT_NUMBER_OPTIONS),
120
+ hostDirectives: [
121
+ {
122
+ directive: TuiNumberMask,
123
+ inputs: ['min', 'max', 'prefix', 'postfix'],
124
+ },
184
125
  ],
185
- hostDirectives: [TuiWithInput, MaskitoDirective],
186
- host: {
187
- '[disabled]': 'disabled()',
188
- '[attr.inputMode]': 'inputMode()',
189
- '[attr.maxLength]': 'element.maxLength > 0 ? element.maxLength : defaultMaxLength()',
190
- '(focusout)': 'setValue(transformer.fromControlValue(control.value))',
191
- '(focus)': 'onFocus()',
192
- },
193
126
  }]
194
127
  }] });
195
128
 
@@ -198,54 +131,164 @@ class TuiQuantumValueTransformerBase extends TuiValueTransformer {
198
131
  constructor(quantum = 0) {
199
132
  super();
200
133
  this.quantum = quantum;
201
- this.parent = null;
202
- }
203
- fromControlValue(controlValue) {
204
- return this.parent?.fromControlValue(controlValue) ?? controlValue;
134
+ this.fromControlValue = identity;
205
135
  }
206
- toControlValue(internalValue) {
207
- const value = this.parent?.toControlValue(internalValue) ?? internalValue;
136
+ toControlValue(value) {
208
137
  return value != null &&
209
138
  this.quantum > 0 &&
210
139
  tuiIsSafeToRound(value, tuiGetFractionPartPadded(this.quantum).length)
211
140
  ? tuiRound(Math.round(value / this.quantum) * this.quantum, TUI_FLOATING_PRECISION)
212
141
  : value;
213
142
  }
214
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiQuantumValueTransformerBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
215
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiQuantumValueTransformerBase, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
143
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiQuantumValueTransformerBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
144
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiQuantumValueTransformerBase, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
216
145
  }
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiQuantumValueTransformerBase, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiQuantumValueTransformerBase, decorators: [{
218
147
  type: Directive
219
148
  }], ctorParameters: () => [{ type: undefined }] });
220
149
  class TuiQuantumValueTransformer extends TuiQuantumValueTransformerBase {
221
150
  constructor() {
222
151
  super(0);
223
- this.parent = inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer;
224
152
  }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiQuantumValueTransformer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
226
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiQuantumValueTransformer, isStandalone: true, selector: "[tuiInputNumber][quantum]", inputs: { quantum: "quantum" }, providers: [tuiProvide(TuiValueTransformer, TuiQuantumValueTransformer)], usesInheritance: true, ngImport: i0 }); }
153
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiQuantumValueTransformer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
154
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiQuantumValueTransformer, isStandalone: true, selector: "[tuiInputNumber][quantum]:not([bigint])", inputs: { quantum: "quantum" }, usesInheritance: true, ngImport: i0 }); }
227
155
  }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiQuantumValueTransformer, decorators: [{
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiQuantumValueTransformer, decorators: [{
229
157
  type: Directive,
230
158
  args: [{
231
- selector: '[tuiInputNumber][quantum]',
159
+ selector: '[tuiInputNumber][quantum]:not([bigint])',
232
160
  inputs: ['quantum'],
233
- providers: [tuiProvide(TuiValueTransformer, TuiQuantumValueTransformer)],
234
161
  }]
235
162
  }], ctorParameters: () => [] });
236
- class TuiWithQuantumValueTransformer {
237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiWithQuantumValueTransformer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
238
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiWithQuantumValueTransformer, isStandalone: true, hostDirectives: [{ directive: TuiQuantumValueTransformer, inputs: ["quantum", "quantum"] }], ngImport: i0 }); }
163
+ class TuiBigIntQuantumValueTransformer extends TuiValueTransformer {
164
+ constructor() {
165
+ super(...arguments);
166
+ this.quantum = input(BigInt(0));
167
+ this.fromControlValue = identity;
168
+ }
169
+ toControlValue(value) {
170
+ if (!this.quantum() || !value) {
171
+ return value;
172
+ }
173
+ const floor = (value / this.quantum()) * this.quantum();
174
+ const remainder = value % this.quantum();
175
+ return (floor + (BigInt(2) * remainder >= this.quantum() ? this.quantum() : BigInt(0)));
176
+ }
177
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBigIntQuantumValueTransformer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
178
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiBigIntQuantumValueTransformer, isStandalone: true, selector: "[tuiInputNumber][bigint][quantum]", inputs: { quantum: { classPropertyName: "quantum", publicName: "quantum", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
239
179
  }
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiWithQuantumValueTransformer, decorators: [{
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBigIntQuantumValueTransformer, decorators: [{
181
+ type: Directive,
182
+ args: [{ selector: '[tuiInputNumber][bigint][quantum]' }]
183
+ }] });
184
+
185
+ class TuiNumberValueTransformer extends TuiValueTransformer {
186
+ constructor() {
187
+ super(...arguments);
188
+ this.mask = inject(TuiNumberMask);
189
+ this.quantumTransformer = inject(TuiQuantumValueTransformer, { optional: true }) ??
190
+ TUI_IDENTITY_VALUE_TRANSFORMER;
191
+ this.optionsTransformer = inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer ??
192
+ TUI_IDENTITY_VALUE_TRANSFORMER;
193
+ }
194
+ toControlValue(textfieldValue) {
195
+ const parsed = maskitoParseNumber(textfieldValue ?? '', this.mask.params());
196
+ return this.optionsTransformer.toControlValue(this.quantumTransformer.toControlValue(Number.isNaN(parsed) ? null : parsed));
197
+ }
198
+ fromControlValue(controlValue) {
199
+ return this.mask.stringify(this.optionsTransformer.fromControlValue(controlValue));
200
+ }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNumberValueTransformer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
202
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiNumberValueTransformer, isStandalone: true, providers: [tuiProvide(TuiValueTransformer, TuiNumberValueTransformer)], usesInheritance: true, ngImport: i0 }); }
203
+ }
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNumberValueTransformer, decorators: [{
241
205
  type: Directive,
242
206
  args: [{
243
- hostDirectives: [
244
- {
245
- directive: TuiQuantumValueTransformer,
246
- inputs: ['quantum'],
247
- },
248
- ],
207
+ providers: [tuiProvide(TuiValueTransformer, TuiNumberValueTransformer)],
208
+ }]
209
+ }] });
210
+
211
+ const DEFAULT_MAX_LENGTH = 18;
212
+ class TuiInputNumberDirective extends TuiControl {
213
+ constructor() {
214
+ super(...arguments);
215
+ this.mask = inject(TuiNumberMask);
216
+ this.input = inject(TuiInputDirective);
217
+ this.isIOS = inject(TUI_IS_IOS);
218
+ this.element = tuiInjectElement();
219
+ this.inputMode = computed(() => {
220
+ if (this.isIOS) {
221
+ return this.mask.min() < 0
222
+ ? 'text' // iPhone does not have minus sign if inputMode is equal to 'numeric' / 'decimal'
223
+ : 'decimal';
224
+ }
225
+ /**
226
+ * Samsung Keyboard does not have minus sign for `inputmode=decimal`
227
+ * @see https://github.com/taiga-family/taiga-ui/issues/11061#issuecomment-2939103792
228
+ */
229
+ return 'numeric';
230
+ });
231
+ this.defaultMaxLength = computed(() => {
232
+ const { decimalSeparator, thousandSeparator, maximumFractionDigits, prefix, postfix, min, max, } = this.mask.params();
233
+ if (!Number.isFinite(min) || !Number.isFinite(max)) {
234
+ return -1;
235
+ }
236
+ const decimalPart = !!maximumFractionDigits && this.input.value().includes(decimalSeparator);
237
+ const precision = decimalPart ? Math.min(maximumFractionDigits + 1, 20) : 0;
238
+ const takeThousand = thousandSeparator.repeat(5).length;
239
+ const affixes = prefix.length + postfix.length;
240
+ return DEFAULT_MAX_LENGTH + precision + takeThousand + affixes;
241
+ });
242
+ this.parsed = computed(() => this.parse(this.input.value()));
243
+ this.onChangeEffect = effect(() => {
244
+ const changed = !Object.is(this.input.value().replaceAll(/\D/g, ''), untracked(() => this.value()?.replaceAll(/\D/g, '')) ?? '');
245
+ const value = this.parsed();
246
+ const valid = Number.isNaN(value) || (value >= this.mask.min() && value <= this.mask.max());
247
+ if (changed && valid) {
248
+ this.onChange(this.input.value());
249
+ }
250
+ });
251
+ }
252
+ writeValue(value) {
253
+ const reset = this.control.pristine && this.control.untouched && !value;
254
+ const changed = untracked(() => value !== this.transformer.toControlValue(this.value()));
255
+ if (changed || reset) {
256
+ super.writeValue(value);
257
+ untracked(() => this.input.value.set(this.value()));
258
+ }
259
+ }
260
+ setValue(value) {
261
+ this.input.value.set(typeof value === 'string' ? value : this.mask.stringify(value));
262
+ }
263
+ onFocus() {
264
+ if (!this.input.value() && !this.readOnly()) {
265
+ this.input.value.set(this.mask.prefix() + this.mask.postfix());
266
+ }
267
+ }
268
+ parse(value) {
269
+ const params = this.mask.params();
270
+ const possibleTooBig = !Number.isFinite(this.mask.min()) || !Number.isFinite(this.mask.max());
271
+ return (maskitoParseNumber(value, {
272
+ ...params,
273
+ bigint: !value.includes(params.decimalSeparator) && possibleTooBig,
274
+ }) ?? NaN);
275
+ }
276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputNumberDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
277
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputNumberDirective, isStandalone: true, selector: "input[tuiInputNumber]", host: { listeners: { "focusout": "setValue(transformer.fromControlValue(control.value))", "focus": "onFocus()" }, properties: { "disabled": "disabled()", "attr.inputMode": "inputMode()", "attr.maxLength": "element.maxLength > 0 ? element.maxLength : defaultMaxLength()" } }, providers: [tuiAsControl(TuiInputNumberDirective)], usesInheritance: true, hostDirectives: [{ directive: i1$1.TuiWithInput }, { directive: TuiWithNumberMask }, { directive: TuiNumberValueTransformer }], ngImport: i0 }); }
278
+ }
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputNumberDirective, decorators: [{
280
+ type: Directive,
281
+ args: [{
282
+ selector: 'input[tuiInputNumber]',
283
+ providers: [tuiAsControl(TuiInputNumberDirective)],
284
+ hostDirectives: [TuiWithInput, TuiWithNumberMask, TuiNumberValueTransformer],
285
+ host: {
286
+ '[disabled]': 'disabled()',
287
+ '[attr.inputMode]': 'inputMode()',
288
+ '[attr.maxLength]': 'element.maxLength > 0 ? element.maxLength : defaultMaxLength()',
289
+ '(focusout)': 'setValue(transformer.fromControlValue(control.value))',
290
+ '(focus)': 'onFocus()',
291
+ },
249
292
  }]
250
293
  }] });
251
294
 
@@ -254,51 +297,81 @@ const DELAY_DECREMENT = 15;
254
297
  const MIN_DELAY = 100;
255
298
  class TuiInputNumberStep {
256
299
  constructor() {
300
+ this.doc = inject(DOCUMENT);
257
301
  this.el = tuiInjectElement();
302
+ this.stop$ = merge(fromEvent(this.doc, 'pointerup'), fromEvent(this.doc, 'pointerleave'), fromEvent(this.doc, 'pointercancel'));
258
303
  this.appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;
259
304
  this.options = inject(TUI_INPUT_NUMBER_OPTIONS);
305
+ this.mask = inject(TuiNumberMask, { self: true });
260
306
  this.input = inject(TuiInputNumberDirective, { self: true });
261
- this.step = signal(this.options.step);
262
- this.value = computed(() => this.input.value() ?? NaN);
263
307
  this.step$ = new Subject();
264
- this.doc = inject(DOCUMENT);
265
- this.stop$ = merge(fromEvent(this.doc, 'pointerup'), fromEvent(this.doc, 'pointerleave'), fromEvent(this.doc, 'pointercancel'));
266
308
  this.stepping = this.step$
267
309
  .pipe(switchMap((value) => timer(INITIAL_DELAY).pipe(expand((_, index) => timer(getDelay(index))), map(() => value), takeUntil(this.stop$))), takeUntilDestroyed())
268
310
  .subscribe((value) => this.onStep(value));
269
- }
270
- // TODO(v5): replace with signal input
271
- set stepSetter(x) {
272
- this.step.set(x);
311
+ this.step = input(this.options.step);
273
312
  }
274
313
  onStep(step) {
275
- const current = this.input.value() ?? 0;
276
- this.input.setValue(tuiClamp(current + step, this.input.min(), this.input.max()));
314
+ const value = this.input.parsed() || 0;
315
+ this.input.setValue(tuiClamp(
316
+ /**
317
+ * Without explicit conversion it throws
318
+ * TS2365: Operator + cannot be applied to types `number | bigint` and `number | bigint`
319
+ */
320
+ typeof value === 'bigint' ? value + BigInt(step) : value + Number(step), this.mask.min(), this.mask.max()));
277
321
  this.el.setSelectionRange(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
278
322
  }
279
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputNumberStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
280
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.16", type: TuiInputNumberStep, isStandalone: true, selector: "input[tuiInputNumber][step]", inputs: { stepSetter: ["step", "stepSetter"] }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "keydown.arrowDown.prevent": "onStep(-step())", "keydown.arrowUp.prevent": "onStep(step())" }, properties: { "class._with-buttons": "step()" } }, ngImport: i0, template: "<ng-container *tuiTextfieldContent>\n @if (step()) {\n <section class=\"t-input-number-buttons\">\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || value() >= input.max()\"\n [iconStart]=\"options.icons.increase\"\n (click.prevent)=\"onStep(step())\"\n (pointerdown.prevent)=\"step$.next(step())\"\n >\n +\n </button>\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || value() <= input.min()\"\n [iconStart]=\"options.icons.decrease\"\n (click.prevent)=\"onStep(-step())\"\n (pointerdown.prevent)=\"step$.next(-step())\"\n >\n -\n </button>\n </section>\n }\n</ng-container>\n", styles: [".t-input-number-buttons.t-input-number-buttons{position:absolute;right:0;display:flex;block-size:var(--t-height);flex-direction:column;gap:.125rem;border-radius:inherit}@supports (inset-inline-end: 0){.t-input-number-buttons.t-input-number-buttons{right:unset;inset-inline-end:0}}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons{flex-direction:row-reverse}.t-input-number-buttons.t-input-number-buttons>*{flex:1 1 0;border-radius:0}.t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit}.t-input-number-buttons.t-input-number-buttons>*:last-child{border-bottom-right-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-radius:0;border-top-left-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0;border-bottom-left-radius:inherit}tui-textfield[data-size=l] .t-input-number-buttons.t-input-number-buttons>*{inline-size:var(--tui-height-m)}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit;border-bottom-right-radius:inherit}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0}[tuiInputNumber]._with-buttons{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] [tuiInputNumber]._with-buttons{border-radius:inherit;border-top-left-radius:0;border-bottom-left-radius:0}tui-textfield[data-size=l]{--t-input-number-offset-end: calc(var(--tui-height-m) + .125rem)}tui-textfield[data-size=m]{--t-input-number-offset-end: calc(var(--tui-height-s) + .125rem)}tui-textfield[data-size=s]{--t-input-number-offset-end: calc(2 * var(--tui-height-s) + .25rem)}[tuiInputNumber]._with-buttons,[tuiInputNumber]._with-buttons~.t-template{inline-size:calc(100% - var(--t-input-number-offset-end));margin-inline-end:var(--t-input-number-offset-end)}[tuiInputNumber]._with-buttons~.t-content{margin-inline-end:var(--t-input-number-offset-end)}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
323
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputNumberStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
324
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputNumberStep, isStandalone: true, selector: "input[tuiInputNumber][step]", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "keydown.arrowDown.prevent": "onStep(-step())", "keydown.arrowUp.prevent": "onStep(step())" }, properties: { "class._with-buttons": "step()" } }, hostDirectives: [{ directive: i1$2.TuiAppearanceProxy }], ngImport: i0, template: "<ng-container *tuiTextfieldContent>\n @if (step()) {\n <section class=\"t-input-number-buttons\">\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || input.parsed() >= mask.max()\"\n [iconStart]=\"options.icons.increase\"\n (click.prevent)=\"onStep(step())\"\n (pointerdown.prevent)=\"step$.next(step())\"\n >\n +\n </button>\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || input.parsed() <= mask.min()\"\n [iconStart]=\"options.icons.decrease\"\n (click.prevent)=\"onStep(-step())\"\n (pointerdown.prevent)=\"step$.next(-step())\"\n >\n -\n </button>\n </section>\n }\n</ng-container>\n", styles: [".t-input-number-buttons.t-input-number-buttons{position:absolute;display:flex;inset-inline-end:0;block-size:var(--t-height);flex-direction:column;gap:.125rem;border-radius:inherit}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons{flex-direction:row-reverse}.t-input-number-buttons.t-input-number-buttons>*{flex:1 1 0;border-radius:0}.t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit}.t-input-number-buttons.t-input-number-buttons>*:last-child{border-bottom-right-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-radius:0;border-top-left-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0;border-bottom-left-radius:inherit}tui-textfield[data-size=l] .t-input-number-buttons.t-input-number-buttons>*{inline-size:var(--tui-height-m)}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit;border-bottom-right-radius:inherit}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0}[tuiInputNumber]._with-buttons{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] [tuiInputNumber]._with-buttons{border-radius:inherit;border-top-left-radius:0;border-bottom-left-radius:0}tui-textfield[data-size=l]{--t-input-number-offset-end: calc(var(--tui-height-m) + .125rem)}tui-textfield[data-size=m]{--t-input-number-offset-end: calc(var(--tui-height-s) + .125rem)}tui-textfield[data-size=s]{--t-input-number-offset-end: calc(2 * var(--tui-height-s) + .25rem)}[tuiInputNumber]._with-buttons,[tuiInputNumber]._with-buttons~.t-template{inline-size:calc(100% - var(--t-input-number-offset-end));margin-inline-end:var(--t-input-number-offset-end)}[tuiInputNumber]._with-buttons~.t-content{margin-inline-end:var(--t-input-number-offset-end)}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
281
325
  }
282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiInputNumberStep, decorators: [{
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputNumberStep, decorators: [{
283
327
  type: Component,
284
- args: [{ selector: 'input[tuiInputNumber][step]', imports: [TuiButton, TuiTextfieldContent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
328
+ args: [{ selector: 'input[tuiInputNumber][step]', imports: [TuiButton, TuiTextfieldContent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAppearanceProxy], host: {
285
329
  ngSkipHydration: 'true',
286
330
  '(keydown.arrowDown.prevent)': 'onStep(-step())',
287
331
  '(keydown.arrowUp.prevent)': 'onStep(step())',
288
332
  '[class._with-buttons]': 'step()',
289
- }, template: "<ng-container *tuiTextfieldContent>\n @if (step()) {\n <section class=\"t-input-number-buttons\">\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || value() >= input.max()\"\n [iconStart]=\"options.icons.increase\"\n (click.prevent)=\"onStep(step())\"\n (pointerdown.prevent)=\"step$.next(step())\"\n >\n +\n </button>\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || value() <= input.min()\"\n [iconStart]=\"options.icons.decrease\"\n (click.prevent)=\"onStep(-step())\"\n (pointerdown.prevent)=\"step$.next(-step())\"\n >\n -\n </button>\n </section>\n }\n</ng-container>\n", styles: [".t-input-number-buttons.t-input-number-buttons{position:absolute;right:0;display:flex;block-size:var(--t-height);flex-direction:column;gap:.125rem;border-radius:inherit}@supports (inset-inline-end: 0){.t-input-number-buttons.t-input-number-buttons{right:unset;inset-inline-end:0}}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons{flex-direction:row-reverse}.t-input-number-buttons.t-input-number-buttons>*{flex:1 1 0;border-radius:0}.t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit}.t-input-number-buttons.t-input-number-buttons>*:last-child{border-bottom-right-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-radius:0;border-top-left-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0;border-bottom-left-radius:inherit}tui-textfield[data-size=l] .t-input-number-buttons.t-input-number-buttons>*{inline-size:var(--tui-height-m)}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit;border-bottom-right-radius:inherit}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0}[tuiInputNumber]._with-buttons{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] [tuiInputNumber]._with-buttons{border-radius:inherit;border-top-left-radius:0;border-bottom-left-radius:0}tui-textfield[data-size=l]{--t-input-number-offset-end: calc(var(--tui-height-m) + .125rem)}tui-textfield[data-size=m]{--t-input-number-offset-end: calc(var(--tui-height-s) + .125rem)}tui-textfield[data-size=s]{--t-input-number-offset-end: calc(2 * var(--tui-height-s) + .25rem)}[tuiInputNumber]._with-buttons,[tuiInputNumber]._with-buttons~.t-template{inline-size:calc(100% - var(--t-input-number-offset-end));margin-inline-end:var(--t-input-number-offset-end)}[tuiInputNumber]._with-buttons~.t-content{margin-inline-end:var(--t-input-number-offset-end)}\n"] }]
290
- }], propDecorators: { stepSetter: [{
291
- type: Input,
292
- args: ['step']
293
- }] } });
333
+ }, template: "<ng-container *tuiTextfieldContent>\n @if (step()) {\n <section class=\"t-input-number-buttons\">\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || input.parsed() >= mask.max()\"\n [iconStart]=\"options.icons.increase\"\n (click.prevent)=\"onStep(step())\"\n (pointerdown.prevent)=\"step$.next(step())\"\n >\n +\n </button>\n <button\n size=\"s\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"appearance()\"\n [disabled]=\"!input.interactive() || input.parsed() <= mask.min()\"\n [iconStart]=\"options.icons.decrease\"\n (click.prevent)=\"onStep(-step())\"\n (pointerdown.prevent)=\"step$.next(-step())\"\n >\n -\n </button>\n </section>\n }\n</ng-container>\n", styles: [".t-input-number-buttons.t-input-number-buttons{position:absolute;display:flex;inset-inline-end:0;block-size:var(--t-height);flex-direction:column;gap:.125rem;border-radius:inherit}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons{flex-direction:row-reverse}.t-input-number-buttons.t-input-number-buttons>*{flex:1 1 0;border-radius:0}.t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit}.t-input-number-buttons.t-input-number-buttons>*:last-child{border-bottom-right-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-radius:0;border-top-left-radius:inherit}[dir=rtl] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0;border-bottom-left-radius:inherit}tui-textfield[data-size=l] .t-input-number-buttons.t-input-number-buttons>*{inline-size:var(--tui-height-m)}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:first-child{border-top-right-radius:inherit;border-bottom-right-radius:inherit}tui-textfield[data-size=s] .t-input-number-buttons.t-input-number-buttons>*:last-child{border-radius:0}[tuiInputNumber]._with-buttons{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] [tuiInputNumber]._with-buttons{border-radius:inherit;border-top-left-radius:0;border-bottom-left-radius:0}tui-textfield[data-size=l]{--t-input-number-offset-end: calc(var(--tui-height-m) + .125rem)}tui-textfield[data-size=m]{--t-input-number-offset-end: calc(var(--tui-height-s) + .125rem)}tui-textfield[data-size=s]{--t-input-number-offset-end: calc(2 * var(--tui-height-s) + .25rem)}[tuiInputNumber]._with-buttons,[tuiInputNumber]._with-buttons~.t-template{inline-size:calc(100% - var(--t-input-number-offset-end));margin-inline-end:var(--t-input-number-offset-end)}[tuiInputNumber]._with-buttons~.t-content{margin-inline-end:var(--t-input-number-offset-end)}\n"] }]
334
+ }] });
294
335
  function getDelay(index) {
295
336
  return Math.max(INITIAL_DELAY - index * DELAY_DECREMENT, MIN_DELAY);
296
337
  }
297
338
 
339
+ class TuiBigIntValueTransformer extends TuiValueTransformer {
340
+ constructor() {
341
+ super(...arguments);
342
+ this.quantumTransformer = inject(TuiBigIntQuantumValueTransformer, { optional: true }) ??
343
+ TUI_IDENTITY_VALUE_TRANSFORMER;
344
+ this.optionsTransformer = inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer ??
345
+ TUI_IDENTITY_VALUE_TRANSFORMER;
346
+ this.mask = inject(TuiNumberMask);
347
+ }
348
+ toControlValue(textfieldValue) {
349
+ return this.optionsTransformer.toControlValue(this.quantumTransformer.toControlValue(maskitoParseNumber(textfieldValue ?? '', {
350
+ ...this.mask.params(),
351
+ bigint: true,
352
+ })));
353
+ }
354
+ fromControlValue(controlValue) {
355
+ return this.mask.stringify(this.optionsTransformer.fromControlValue(controlValue));
356
+ }
357
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBigIntValueTransformer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
358
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiBigIntValueTransformer, isStandalone: true, selector: "[tuiInputNumber][bigint]", providers: [tuiProvide(TuiValueTransformer, TuiBigIntValueTransformer)], usesInheritance: true, ngImport: i0 }); }
359
+ }
360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBigIntValueTransformer, decorators: [{
361
+ type: Directive,
362
+ args: [{
363
+ selector: '[tuiInputNumber][bigint]',
364
+ providers: [tuiProvide(TuiValueTransformer, TuiBigIntValueTransformer)],
365
+ }]
366
+ }] });
367
+
298
368
  const TuiInputNumber = [
299
369
  TuiInputNumberDirective,
370
+ TuiNumberMask,
300
371
  TuiInputNumberStep,
372
+ TuiBigIntValueTransformer,
301
373
  TuiQuantumValueTransformer,
374
+ TuiBigIntQuantumValueTransformer,
302
375
  TuiLabel,
303
376
  TuiTextfieldComponent,
304
377
  TuiTextfieldOptionsDirective,
@@ -309,5 +382,5 @@ const TuiInputNumber = [
309
382
  * Generated bundle index. Do not edit.
310
383
  */
311
384
 
312
- export { TUI_INPUT_NUMBER_DEFAULT_OPTIONS, TUI_INPUT_NUMBER_OPTIONS, TuiInputNumber, TuiInputNumberDirective, TuiInputNumberStep, TuiQuantumValueTransformer, TuiQuantumValueTransformerBase, TuiWithQuantumValueTransformer, tuiInputNumberOptionsProvider };
385
+ export { TUI_INPUT_NUMBER_DEFAULT_OPTIONS, TUI_INPUT_NUMBER_OPTIONS, TuiBigIntQuantumValueTransformer, TuiBigIntValueTransformer, TuiInputNumber, TuiInputNumberDirective, TuiInputNumberStep, TuiNumberMask, TuiNumberValueTransformer, TuiQuantumValueTransformer, TuiQuantumValueTransformerBase, TuiWithNumberMask, tuiInputNumberOptionsProvider };
313
386
  //# sourceMappingURL=taiga-ui-kit-components-input-number.mjs.map