@taiga-ui/kit 4.52.0-canary.bf9131e → 4.52.0-canary.c8448e0

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 (443) hide show
  1. package/README.md +1 -1
  2. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  3. package/components/avatar/avatar-stack.component.d.ts +2 -2
  4. package/components/badge/badge.options.d.ts +1 -3
  5. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  6. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  7. package/components/badged-content/badged-content.directive.d.ts +2 -3
  8. package/components/block/block.options.d.ts +1 -3
  9. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  10. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  11. package/components/button-loading/button-loading.component.d.ts +5 -5
  12. package/components/calendar-month/calendar-month.component.d.ts +5 -5
  13. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  14. package/components/calendar-range/day-range-period.d.ts +2 -1
  15. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  16. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  17. package/components/carousel/carousel.component.d.ts +15 -18
  18. package/components/carousel/carousel.directive.d.ts +5 -4
  19. package/components/chip/chip.options.d.ts +1 -3
  20. package/components/combo-box/combo-box.d.ts +5 -0
  21. package/components/combo-box/combo-box.directive.d.ts +7 -9
  22. package/components/combo-box/index.d.ts +1 -0
  23. package/components/compass/compass.component.d.ts +2 -2
  24. package/components/confirm/confirm.component.d.ts +4 -3
  25. package/components/confirm/confirm.service.d.ts +1 -1
  26. package/components/copy/copy.component.d.ts +3 -4
  27. package/components/copy/copy.directive.d.ts +2 -4
  28. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
  29. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  30. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  31. package/components/data-list-wrapper/index.d.ts +1 -1
  32. package/components/drawer/drawer.component.d.ts +3 -4
  33. package/components/files/file/file.component.d.ts +16 -29
  34. package/components/files/file/file.options.d.ts +1 -1
  35. package/components/files/files/files.component.d.ts +5 -8
  36. package/components/files/input-files/input-files.component.d.ts +2 -2
  37. package/components/files/input-files/input-files.content.d.ts +7 -8
  38. package/components/files/input-files/input-files.directive.d.ts +2 -2
  39. package/components/files/input-files/input-files.options.d.ts +1 -3
  40. package/components/filter/filter.component.d.ts +9 -12
  41. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  42. package/components/index.d.ts +0 -3
  43. package/components/input-chip/input-chip.component.d.ts +9 -8
  44. package/components/input-chip/input-chip.d.ts +5 -1
  45. package/components/input-chip/input-chip.directive.d.ts +7 -12
  46. package/components/input-color/index.d.ts +1 -0
  47. package/components/input-color/input-color.component.d.ts +9 -13
  48. package/components/input-color/input-color.d.ts +5 -0
  49. package/components/input-date/input-date.component.d.ts +2 -2
  50. package/components/input-date/input-date.d.ts +4 -1
  51. package/components/input-date/input-date.directive.d.ts +21 -22
  52. package/components/input-date/input-date.options.d.ts +3 -3
  53. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  54. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  55. package/components/input-date-range/input-date-range.d.ts +4 -1
  56. package/components/input-date-range/input-date-range.directive.d.ts +9 -10
  57. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  58. package/components/input-date-time/input-date-time.d.ts +4 -1
  59. package/components/input-date-time/input-date-time.directive.d.ts +14 -14
  60. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  61. package/components/input-inline/input-inline.component.d.ts +3 -2
  62. package/components/input-month/input-month.component.d.ts +3 -5
  63. package/components/input-month/input-month.d.ts +4 -1
  64. package/components/input-month/input-month.directive.d.ts +6 -5
  65. package/components/input-month-range/input-month-range.d.ts +4 -1
  66. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  67. package/components/input-number/index.d.ts +3 -0
  68. package/components/input-number/input-number.d.ts +7 -2
  69. package/components/input-number/input-number.directive.d.ts +11 -28
  70. package/components/input-number/input-number.options.d.ts +4 -7
  71. package/components/input-number/number-mask.directive.d.ts +42 -0
  72. package/components/input-number/quantum.directive.d.ts +10 -8
  73. package/components/input-number/step/input-number-step.component.d.ts +10 -9
  74. package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
  75. package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
  76. package/components/input-phone/index.d.ts +1 -0
  77. package/components/input-phone/input-phone.d.ts +5 -0
  78. package/components/input-phone/input-phone.directive.d.ts +12 -14
  79. package/components/input-phone-international/index.d.ts +1 -0
  80. package/components/input-phone-international/input-phone-international.component.d.ts +14 -16
  81. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  82. package/components/input-phone-international/input-phone-international.options.d.ts +2 -3
  83. package/components/input-pin/index.d.ts +1 -0
  84. package/components/input-pin/input-pin.component.d.ts +5 -6
  85. package/components/input-pin/input-pin.d.ts +5 -0
  86. package/components/input-range/index.d.ts +0 -1
  87. package/components/input-range/input-range.component.d.ts +23 -53
  88. package/components/input-slider/input-slider.d.ts +4 -1
  89. package/components/input-slider/input-slider.directive.d.ts +4 -3
  90. package/components/input-time/input-time.component.d.ts +1 -3
  91. package/components/input-time/input-time.d.ts +4 -1
  92. package/components/input-time/input-time.directive.d.ts +5 -5
  93. package/components/input-year/input-year.d.ts +4 -1
  94. package/components/input-year/input-year.directive.d.ts +8 -10
  95. package/components/input-year/input-year.options.d.ts +2 -2
  96. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  97. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  98. package/components/like/like.options.d.ts +1 -1
  99. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  100. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  101. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
  102. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  103. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  104. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  105. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  106. package/components/pager/pager.component.d.ts +12 -12
  107. package/components/pagination/index.d.ts +1 -0
  108. package/components/pagination/pagination.component.d.ts +24 -54
  109. package/components/pagination/pagination.options.d.ts +7 -0
  110. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  111. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  112. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  113. package/components/preview/index.d.ts +1 -0
  114. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  115. package/components/preview/preview.component.d.ts +6 -6
  116. package/components/preview/preview.d.ts +2 -1
  117. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  118. package/components/preview/zoom/preview-zoom.component.d.ts +11 -17
  119. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  120. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  121. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  122. package/components/progress/progress.options.d.ts +1 -3
  123. package/components/pulse/pulse.component.d.ts +2 -2
  124. package/components/push/push-alert.component.d.ts +2 -2
  125. package/components/push/push.component.d.ts +6 -7
  126. package/components/push/push.options.d.ts +4 -3
  127. package/components/push/push.service.d.ts +2 -2
  128. package/components/radio/radio.component.d.ts +1 -1
  129. package/components/radio-list/radio-list.component.d.ts +11 -9
  130. package/components/range/range.component.d.ts +3 -4
  131. package/components/rating/rating.component.d.ts +1 -1
  132. package/components/rating/rating.options.d.ts +1 -3
  133. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  134. package/components/segmented/segmented.component.d.ts +4 -6
  135. package/components/segmented/segmented.directive.d.ts +6 -7
  136. package/components/select/native-select/native-select.component.d.ts +7 -8
  137. package/components/select/select.d.ts +4 -1
  138. package/components/select/select.directive.d.ts +4 -3
  139. package/components/slider/helpers/slider-key-steps.directive.d.ts +10 -7
  140. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  141. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  142. package/components/slider/slider.component.d.ts +4 -7
  143. package/components/slider/slider.options.d.ts +1 -6
  144. package/components/stepper/step.component.d.ts +14 -9
  145. package/components/stepper/stepper.component.d.ts +5 -12
  146. package/components/switch/switch.component.d.ts +1 -0
  147. package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
  148. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  149. package/components/tabs/tabs-with-more.component.d.ts +12 -16
  150. package/components/tabs/tabs.directive.d.ts +5 -7
  151. package/components/tabs/tabs.options.d.ts +1 -6
  152. package/components/textarea/index.d.ts +2 -1
  153. package/components/textarea/textarea.component.d.ts +10 -11
  154. package/components/textarea/textarea.d.ts +6 -0
  155. package/components/textarea/textarea.directive.d.ts +13 -0
  156. package/components/tiles/tile-handle.directive.d.ts +2 -1
  157. package/components/tiles/tile.component.d.ts +7 -10
  158. package/components/tiles/tile.service.d.ts +1 -1
  159. package/components/tiles/tiles.component.d.ts +4 -7
  160. package/components/toast/toast.component.d.ts +4 -4
  161. package/components/toast/toast.options.d.ts +4 -3
  162. package/components/toast/toast.service.d.ts +2 -2
  163. package/components/tree/components/tree/tree.component.d.ts +7 -7
  164. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  165. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +7 -0
  166. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  167. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  168. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  169. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  170. package/components/tree/misc/tree.constants.d.ts +0 -3
  171. package/components/tree/misc/tree.tokens.d.ts +1 -6
  172. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  173. package/directives/appearance-proxy/index.d.ts +1 -0
  174. package/directives/button-select/button-select.directive.d.ts +3 -2
  175. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  176. package/directives/fade/fade.directive.d.ts +5 -6
  177. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  178. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  179. package/directives/highlight/highlight.directive.d.ts +4 -4
  180. package/directives/index.d.ts +1 -2
  181. package/directives/password/password.directive.d.ts +1 -1
  182. package/directives/present/present.directive.d.ts +2 -4
  183. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  184. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  185. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  186. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -9
  187. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  189. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-avatar.mjs +35 -49
  191. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
  193. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
  195. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
  197. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-block.mjs +11 -15
  199. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +18 -37
  201. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  203. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +13 -35
  205. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +26 -35
  207. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-carousel.mjs +70 -123
  209. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
  211. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
  213. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -45
  215. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  217. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
  219. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-confirm.mjs +10 -12
  221. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -33
  223. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
  225. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-drawer.mjs +11 -32
  227. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-files.mjs +112 -240
  229. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -34
  231. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  233. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -77
  235. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-input-color.mjs +31 -32
  237. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +35 -51
  239. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +37 -37
  241. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +41 -57
  243. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  244. package/fesm2022/taiga-ui-kit-components-input-date.mjs +55 -68
  245. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  246. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -13
  247. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +26 -23
  249. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-input-month.mjs +39 -46
  251. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-input-number.mjs +266 -211
  253. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +64 -74
  255. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +38 -43
  257. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  258. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +24 -22
  259. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
  261. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +27 -17
  263. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-components-input-time.mjs +39 -41
  265. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-components-input-year.mjs +31 -37
  267. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -72
  269. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
  271. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +18 -23
  273. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -8
  275. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +38 -53
  277. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -26
  279. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-components-pager.mjs +30 -44
  281. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-components-pagination.mjs +75 -149
  283. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  285. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-components-preview.mjs +97 -157
  287. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  288. package/fesm2022/taiga-ui-kit-components-progress.mjs +81 -92
  289. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  291. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  292. package/fesm2022/taiga-ui-kit-components-push.mjs +27 -40
  293. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  294. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
  295. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  296. package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
  297. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  298. package/fesm2022/taiga-ui-kit-components-range.mjs +20 -33
  299. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  300. package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
  301. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  303. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  305. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-components-select.mjs +57 -45
  307. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  308. package/fesm2022/taiga-ui-kit-components-slider.mjs +56 -88
  309. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  311. package/fesm2022/taiga-ui-kit-components-stepper.mjs +61 -88
  312. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  314. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-components-tabs.mjs +90 -157
  316. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-components-textarea.mjs +60 -73
  318. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  319. package/fesm2022/taiga-ui-kit-components-tiles.mjs +54 -99
  320. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-components-toast.mjs +27 -28
  322. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-components-tree.mjs +90 -125
  324. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  326. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  328. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  329. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  330. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -12
  332. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
  334. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -8
  336. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  337. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  338. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  340. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  341. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  342. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  343. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
  344. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  345. package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -9
  346. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  347. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
  348. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  349. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  350. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  351. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  352. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  353. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +9 -9
  354. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  355. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -11
  356. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  357. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
  358. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  359. package/fesm2022/taiga-ui-kit-directives.mjs +1 -2
  360. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  361. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  362. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  363. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  364. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  365. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +22 -36
  366. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  367. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  368. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  369. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +23 -27
  370. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  371. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  372. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  373. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -9
  374. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  375. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  376. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  377. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  378. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  379. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  380. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  381. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -123
  382. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  383. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  384. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  385. package/package.json +75 -80
  386. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  387. package/pipes/auto-color/index.d.ts +1 -0
  388. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +5 -2
  389. package/pipes/flag/flag.pipe.d.ts +13 -0
  390. package/pipes/flag/index.d.ts +1 -0
  391. package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -0
  392. package/pipes/index.d.ts +3 -0
  393. package/pipes/initials/index.d.ts +1 -0
  394. package/pipes/initials/initials.pipe.d.ts +7 -0
  395. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  396. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  397. package/styles/components/avatar.less +14 -14
  398. package/styles/components/badge.less +3 -3
  399. package/styles/components/block.less +4 -4
  400. package/styles/components/chip.less +4 -4
  401. package/styles/components/comment.less +15 -17
  402. package/styles/components/message.less +1 -1
  403. package/styles/components/pin.less +3 -3
  404. package/styles/components/switch.less +3 -2
  405. package/styles/components/toast.less +1 -1
  406. package/tokens/i18n.d.ts +1 -0
  407. package/tokens/index.d.ts +0 -7
  408. package/utils/index.d.ts +0 -2
  409. package/utils/maskito.binding.d.ts +1 -1
  410. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  411. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  412. package/components/elastic-container/index.d.ts +0 -2
  413. package/components/floating-container/floating-container.directive.d.ts +0 -7
  414. package/components/floating-container/index.d.ts +0 -1
  415. package/components/input-range/input-range.d.ts +0 -3
  416. package/components/slides/index.d.ts +0 -1
  417. package/components/slides/slides.directive.d.ts +0 -11
  418. package/components/textarea/textarea-limit.directive.d.ts +0 -26
  419. package/directives/button-close/button-close.directive.d.ts +0 -5
  420. package/directives/button-close/index.d.ts +0 -1
  421. package/directives/lazy-loading/index.d.ts +0 -2
  422. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  423. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  424. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  425. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  426. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  427. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  428. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  429. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  430. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  431. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  432. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +0 -39
  433. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +0 -1
  434. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  435. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  436. package/tokens/calendar-date-stream.d.ts +0 -10
  437. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  438. package/tokens/input-date-options.d.ts +0 -15
  439. package/tokens/items-handlers.d.ts +0 -26
  440. package/tokens/mobile-calendar.d.ts +0 -6
  441. package/tokens/month-formatter.d.ts +0 -5
  442. package/utils/phone.d.ts +0 -3
  443. package/utils/toggle-day.d.ts +0 -2
@@ -1,32 +1,37 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
3
+ import { TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
1
4
  import * as i0 from '@angular/core';
2
- import { inject, signal, computed, effect, untracked, Input, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import * as i2 from '@maskito/angular';
5
- import { MaskitoDirective } from '@maskito/angular';
6
- import { maskitoTransform } from '@maskito/core';
7
- import { maskitoParseNumber, maskitoNumberOptionsGenerator, maskitoCaretGuard } from '@maskito/kit';
8
- import { TuiControl, tuiAsControl, tuiValueTransformerFrom, TuiValueTransformer } from '@taiga-ui/cdk/classes';
9
- 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';
10
8
  import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
11
9
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
12
- import { tuiIsSafeToRound, tuiRound, tuiClamp } from '@taiga-ui/cdk/utils/math';
13
- import * as i1 from '@taiga-ui/core/components/textfield';
14
- import { TuiTextfieldDirective, TuiWithTextfield, TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent } from '@taiga-ui/core/components/textfield';
15
- import { TUI_NUMBER_FORMAT, TUI_DEFAULT_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
16
- import { tuiFormatNumber, tuiGetFractionPartPadded } from '@taiga-ui/core/utils/format';
10
+ import * as i1$1 from '@taiga-ui/core/components/input';
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';
15
+ import { TUI_NUMBER_FORMAT } from '@taiga-ui/core/tokens';
17
16
  import { tuiMaskito } from '@taiga-ui/kit/utils';
18
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
19
- import { tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
17
+ import { CHAR_MINUS } from '@taiga-ui/cdk/constants';
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';
20
21
  import { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/components/slider';
22
+ import { identity, merge, fromEvent, Subject, switchMap, timer, expand, map, takeUntil } from 'rxjs';
21
23
  import { DOCUMENT } from '@angular/common';
24
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
22
25
  import { TuiButton } from '@taiga-ui/core/components/button';
23
- 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';
24
28
 
25
29
  const TUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
26
30
  min: Number.MIN_SAFE_INTEGER,
27
31
  max: Number.MAX_SAFE_INTEGER,
28
32
  prefix: '',
29
33
  postfix: '',
34
+ minusSign: CHAR_MINUS,
30
35
  step: 0,
31
36
  icons: {
32
37
  increase: '@tui.plus',
@@ -36,130 +41,53 @@ const TUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
36
41
  };
37
42
  const [TUI_INPUT_NUMBER_OPTIONS, tuiInputNumberOptionsProvider] = tuiCreateOptions(TUI_INPUT_NUMBER_DEFAULT_OPTIONS);
38
43
 
39
- const DEFAULT_MAX_LENGTH = 18;
40
- class TuiInputNumberDirective extends TuiControl {
44
+ class TuiNumberMask {
41
45
  constructor() {
42
- super(...arguments);
43
46
  this.options = inject(TUI_INPUT_NUMBER_OPTIONS);
44
- this.textfield = inject(TuiTextfieldDirective);
45
- this.isIOS = inject(TUI_IS_IOS);
46
- this.minRaw = signal(this.options.min);
47
- this.maxRaw = signal(this.options.max);
48
- this.numberFormat = toSignal(inject(TUI_NUMBER_FORMAT), {
49
- initialValue: TUI_DEFAULT_NUMBER_FORMAT,
50
- });
51
- this.formatted = computed(() => maskitoParseNumber(this.textfield.value(), this.numberFormat()));
52
- this.precision = computed((precision = this.numberFormat().precision) => Number.isNaN(precision) ? 2 : precision);
53
- this.unfinished = computed((value = this.formatted()) => value < 0 ? value > this.max() : value < this.min());
54
- this.element = tuiInjectElement();
55
- this.mask = tuiMaskito(computed(() => this.computeMask(this.maskParams)));
56
- this.inputMode = computed(() => {
57
- if (this.isIOS) {
58
- return this.min() < 0
59
- ? 'text' // iPhone does not have minus sign if inputMode is equal to 'numeric' / 'decimal'
60
- : 'decimal';
61
- }
62
- /**
63
- * Samsung Keyboard does not have minus sign for `inputmode=decimal`
64
- * @see https://github.com/taiga-family/taiga-ui/issues/11061#issuecomment-2939103792
65
- */
66
- return 'numeric';
47
+ this.numberFormat = inject(TUI_NUMBER_FORMAT);
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,
67
54
  });
68
- this.defaultMaxLength = computed(() => {
69
- const { decimalSeparator, thousandSeparator } = this.numberFormat();
70
- const decimalPart = !!this.precision() && this.textfield.value().includes(decimalSeparator);
71
- const precision = decimalPart ? Math.min(this.precision() + 1, 20) : 0;
72
- const takeThousand = thousandSeparator.repeat(5).length;
73
- return DEFAULT_MAX_LENGTH + precision + takeThousand;
55
+ this.max = input(this.options.max, {
56
+ transform: (x) => x ?? this.options.max,
74
57
  });
75
- this.onChangeEffect = effect(() => {
76
- const value = this.formatted();
77
- if (Number.isNaN(value) && !Number.isNaN(this.value())) {
78
- this.onChange(null);
79
- return;
80
- }
81
- if (this.unfinished() ||
82
- value < this.min() ||
83
- value > this.max() ||
84
- Object.is(this.value(), value)) {
85
- return;
86
- }
87
- 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
+ };
88
71
  });
89
- this.maskInitialCalibrationEffect = effect(() => {
72
+ this.mask = tuiMaskito(computed(() => this.computeMask(this.params())));
73
+ this.maskInitialCalibration = effect(() => {
90
74
  const options = maskitoNumberOptionsGenerator({
91
- ...this.maskParams,
92
- min: Number.MIN_SAFE_INTEGER,
93
- max: Number.MAX_SAFE_INTEGER,
75
+ ...this.params(),
76
+ min: -Infinity,
77
+ max: Infinity,
94
78
  });
95
- this.textfield.value.update((x) => maskitoTransform(x, options));
79
+ this.input.value.update((x) => maskitoTransform(x, options));
96
80
  });
97
- this.min = computed(() => Math.min(this.minRaw(), this.maxRaw()));
98
- this.max = computed(() => Math.max(this.minRaw(), this.maxRaw()));
99
- this.prefix = signal(this.options.prefix);
100
- this.postfix = signal(this.options.postfix);
101
- }
102
- set minSetter(x) {
103
- this.minRaw.set(this.transformer.fromControlValue(x ?? this.options.min));
104
- }
105
- set maxSetter(x) {
106
- this.maxRaw.set(this.transformer.fromControlValue(x ?? this.options.max));
107
- }
108
- // TODO(v5): replace with signal input
109
- set prefixSetter(x) {
110
- this.prefix.set(x);
111
- }
112
- // TODO(v5): replace with signal input
113
- set postfixSetter(x) {
114
- this.postfix.set(x);
115
81
  }
116
- writeValue(value) {
117
- const reset = this.control.pristine && this.control.untouched && !value;
118
- const changed = untracked(() => value !== this.value());
119
- if (changed || reset) {
120
- super.writeValue(value);
121
- untracked(() => this.setValue(this.value()));
122
- }
123
- }
124
- setValue(value) {
125
- this.textfield.value.set(this.formatNumber(value));
126
- }
127
- onFocus() {
128
- if (Number.isNaN(this.formatted()) && !this.readOnly()) {
129
- this.textfield.value.set(this.prefix() + this.postfix());
130
- }
131
- }
132
- get maskParams() {
133
- const { decimalMode, ...numberFormat } = this.numberFormat();
134
- const maximumFractionDigits = this.precision();
135
- return {
136
- ...numberFormat,
137
- maximumFractionDigits,
138
- min: this.min(),
139
- max: this.max(),
140
- prefix: this.prefix(),
141
- postfix: this.postfix(),
142
- minimumFractionDigits: decimalMode === 'always' ? maximumFractionDigits : 0,
143
- };
144
- }
145
- formatNumber(value) {
146
- if (value === null || Number.isNaN(value)) {
147
- return '';
148
- }
149
- return ((this.prefix() !== CHAR_MINUS ? this.prefix() : '') +
150
- tuiFormatNumber(value, {
151
- ...this.numberFormat(),
152
- /**
153
- * Number can satisfy interval [Number.MIN_SAFE_INTEGER; Number.MAX_SAFE_INTEGER]
154
- * but its rounding can violate it.
155
- * Before BigInt support there is no perfect solution – only trade off.
156
- * No rounding is better than lose precision and incorrect mutation of already valid value.
157
- */
158
- precision: tuiIsSafeToRound(value, this.precision())
159
- ? this.precision()
160
- : Infinity,
161
- }).replace(CHAR_HYPHEN, CHAR_MINUS) +
162
- 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
+ });
163
91
  }
164
92
  computeMask(params) {
165
93
  const { prefix = '', postfix = '' } = params;
@@ -175,99 +103,192 @@ class TuiInputNumberDirective extends TuiControl {
175
103
  ],
176
104
  };
177
105
  }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputNumberDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
179
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputNumberDirective, isStandalone: true, selector: "input[tuiInputNumber]", inputs: { minSetter: ["min", "minSetter"], maxSetter: ["max", "maxSetter"], prefixSetter: ["prefix", "prefixSetter"], postfixSetter: ["postfix", "postfixSetter"] }, 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: [
180
- tuiAsControl(TuiInputNumberDirective),
181
- tuiValueTransformerFrom(TUI_INPUT_NUMBER_OPTIONS),
182
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { 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 }); }
108
+ }
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 }); }
183
116
  }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputNumberDirective, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiWithNumberMask, decorators: [{
185
118
  type: Directive,
186
119
  args: [{
187
- standalone: true,
188
- selector: 'input[tuiInputNumber]',
189
- providers: [
190
- tuiAsControl(TuiInputNumberDirective),
191
- tuiValueTransformerFrom(TUI_INPUT_NUMBER_OPTIONS),
120
+ hostDirectives: [
121
+ {
122
+ directive: TuiNumberMask,
123
+ inputs: ['min', 'max', 'prefix', 'postfix'],
124
+ },
192
125
  ],
193
- hostDirectives: [TuiWithTextfield, MaskitoDirective],
194
- host: {
195
- '[disabled]': 'disabled()',
196
- '[attr.inputMode]': 'inputMode()',
197
- '[attr.maxLength]': 'element.maxLength > 0 ? element.maxLength : defaultMaxLength()',
198
- '(focusout)': 'setValue(transformer.fromControlValue(control.value))',
199
- '(focus)': 'onFocus()',
200
- },
201
126
  }]
202
- }], propDecorators: { minSetter: [{
203
- type: Input,
204
- args: ['min']
205
- }], maxSetter: [{
206
- type: Input,
207
- args: ['max']
208
- }], prefixSetter: [{
209
- type: Input,
210
- args: ['prefix']
211
- }], postfixSetter: [{
212
- type: Input,
213
- args: ['postfix']
214
- }] } });
127
+ }] });
215
128
 
216
129
  class TuiQuantumValueTransformerBase extends TuiValueTransformer {
217
- // eslint-disable-next-line @typescript-eslint/parameter-properties
130
+ // eslint-disable-next-line @typescript-eslint/parameter-properties,@angular-eslint/prefer-inject
218
131
  constructor(quantum = 0) {
219
132
  super();
220
133
  this.quantum = quantum;
221
- this.parent = null;
222
- }
223
- fromControlValue(controlValue) {
224
- return this.parent?.fromControlValue(controlValue) ?? controlValue;
134
+ this.fromControlValue = identity;
225
135
  }
226
- toControlValue(internalValue) {
227
- const value = this.parent?.toControlValue(internalValue) ?? internalValue;
136
+ toControlValue(value) {
228
137
  return value != null &&
229
138
  this.quantum > 0 &&
230
139
  tuiIsSafeToRound(value, tuiGetFractionPartPadded(this.quantum).length)
231
140
  ? tuiRound(Math.round(value / this.quantum) * this.quantum, TUI_FLOATING_PRECISION)
232
141
  : value;
233
142
  }
234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiQuantumValueTransformerBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
235
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", 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 }); }
236
145
  }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiQuantumValueTransformerBase, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiQuantumValueTransformerBase, decorators: [{
238
147
  type: Directive
239
148
  }], ctorParameters: () => [{ type: undefined }] });
240
149
  class TuiQuantumValueTransformer extends TuiQuantumValueTransformerBase {
241
150
  constructor() {
242
151
  super(0);
243
- this.parent = inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer;
244
152
  }
245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiQuantumValueTransformer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
246
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", 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 }); }
247
155
  }
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiQuantumValueTransformer, decorators: [{
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiQuantumValueTransformer, decorators: [{
249
157
  type: Directive,
250
158
  args: [{
251
- standalone: true,
252
- selector: '[tuiInputNumber][quantum]',
159
+ selector: '[tuiInputNumber][quantum]:not([bigint])',
253
160
  inputs: ['quantum'],
254
- providers: [tuiProvide(TuiValueTransformer, TuiQuantumValueTransformer)],
255
161
  }]
256
162
  }], ctorParameters: () => [] });
257
- class TuiWithQuantumValueTransformer {
258
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithQuantumValueTransformer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
259
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", 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 }); }
179
+ }
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 }); }
260
203
  }
261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithQuantumValueTransformer, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNumberValueTransformer, decorators: [{
262
205
  type: Directive,
263
206
  args: [{
264
- standalone: true,
265
- hostDirectives: [
266
- {
267
- directive: TuiQuantumValueTransformer,
268
- inputs: ['quantum'],
269
- },
270
- ],
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
+ },
271
292
  }]
272
293
  }] });
273
294
 
@@ -276,56 +297,90 @@ const DELAY_DECREMENT = 15;
276
297
  const MIN_DELAY = 100;
277
298
  class TuiInputNumberStep {
278
299
  constructor() {
300
+ this.doc = inject(DOCUMENT);
279
301
  this.el = tuiInjectElement();
302
+ this.stop$ = merge(fromEvent(this.doc, 'pointerup'), fromEvent(this.doc, 'pointerleave'), fromEvent(this.doc, 'pointercancel'));
280
303
  this.appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;
281
304
  this.options = inject(TUI_INPUT_NUMBER_OPTIONS);
305
+ this.mask = inject(TuiNumberMask, { self: true });
282
306
  this.input = inject(TuiInputNumberDirective, { self: true });
283
- this.step = signal(this.options.step);
284
- this.value = computed(() => this.input.value() ?? NaN);
285
307
  this.step$ = new Subject();
286
- this.doc = inject(DOCUMENT);
287
- this.stop$ = merge(fromEvent(this.doc, 'pointerup'), fromEvent(this.doc, 'pointerleave'), fromEvent(this.doc, 'pointercancel'));
288
308
  this.stepping = this.step$
289
309
  .pipe(switchMap((value) => timer(INITIAL_DELAY).pipe(expand((_, index) => timer(getDelay(index))), map(() => value), takeUntil(this.stop$))), takeUntilDestroyed())
290
310
  .subscribe((value) => this.onStep(value));
291
- }
292
- // TODO(v5): replace with signal input
293
- set stepSetter(x) {
294
- this.step.set(x);
311
+ this.step = input(this.options.step);
295
312
  }
296
313
  onStep(step) {
297
- const current = this.input.value() ?? 0;
298
- 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()));
299
321
  this.el.setSelectionRange(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
300
322
  }
301
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputNumberStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
302
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", 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 }); }
303
325
  }
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputNumberStep, decorators: [{
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputNumberStep, decorators: [{
305
327
  type: Component,
306
- 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: {
307
329
  ngSkipHydration: 'true',
308
330
  '(keydown.arrowDown.prevent)': 'onStep(-step())',
309
331
  '(keydown.arrowUp.prevent)': 'onStep(step())',
310
332
  '[class._with-buttons]': 'step()',
311
- }, 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"] }]
312
- }], propDecorators: { stepSetter: [{
313
- type: Input,
314
- args: ['step']
315
- }] } });
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
+ }] });
316
335
  function getDelay(index) {
317
336
  return Math.max(INITIAL_DELAY - index * DELAY_DECREMENT, MIN_DELAY);
318
337
  }
319
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
+
320
368
  const TuiInputNumber = [
321
369
  TuiInputNumberDirective,
370
+ TuiNumberMask,
322
371
  TuiInputNumberStep,
372
+ TuiBigIntValueTransformer,
323
373
  TuiQuantumValueTransformer,
374
+ TuiBigIntQuantumValueTransformer,
375
+ TuiLabel,
376
+ TuiTextfieldComponent,
377
+ TuiTextfieldOptionsDirective,
378
+ TuiDropdownContent,
324
379
  ];
325
380
 
326
381
  /**
327
382
  * Generated bundle index. Do not edit.
328
383
  */
329
384
 
330
- 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 };
331
386
  //# sourceMappingURL=taiga-ui-kit-components-input-number.mjs.map