@taiga-ui/kit 4.52.0-canary.932d3ef → 4.52.0-canary.9c7b1f0

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 (511) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/accordion.component.d.ts +13 -0
  3. package/components/accordion/accordion.d.ts +4 -4
  4. package/components/accordion/accordion.directive.d.ts +11 -10
  5. package/components/accordion/index.d.ts +1 -3
  6. package/components/action-bar/action-bar.component.d.ts +5 -7
  7. package/components/action-bar/index.d.ts +0 -2
  8. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  9. package/components/avatar/avatar-outline.directive.d.ts +3 -3
  10. package/components/avatar/avatar-stack.component.d.ts +2 -2
  11. package/components/avatar/avatar.directive.d.ts +4 -3
  12. package/components/badge/badge.directive.d.ts +2 -2
  13. package/components/badge/badge.options.d.ts +1 -3
  14. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  15. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  16. package/components/badged-content/badged-content.directive.d.ts +2 -3
  17. package/components/block/block.directive.d.ts +4 -4
  18. package/components/block/block.options.d.ts +2 -4
  19. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  20. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  21. package/components/button-loading/button-loading.component.d.ts +5 -5
  22. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  23. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  24. package/components/calendar-range/day-range-period.d.ts +2 -1
  25. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  26. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  27. package/components/carousel/carousel.component.d.ts +15 -18
  28. package/components/carousel/carousel.directive.d.ts +5 -4
  29. package/components/checkbox/checkbox.component.d.ts +7 -18
  30. package/components/checkbox/checkbox.options.d.ts +5 -9
  31. package/components/chip/chip.directive.d.ts +2 -4
  32. package/components/chip/chip.options.d.ts +1 -3
  33. package/components/combo-box/combo-box.d.ts +5 -0
  34. package/components/combo-box/combo-box.directive.d.ts +7 -9
  35. package/components/combo-box/index.d.ts +1 -0
  36. package/components/comment/comment.directive.d.ts +2 -2
  37. package/components/compass/compass.component.d.ts +2 -2
  38. package/components/confirm/confirm.component.d.ts +5 -3
  39. package/components/confirm/confirm.service.d.ts +3 -2
  40. package/{directives → components}/copy/copy.component.d.ts +4 -5
  41. package/{directives → components}/copy/copy.directive.d.ts +4 -6
  42. package/{directives → components}/copy/copy.options.d.ts +1 -1
  43. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -2
  44. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  45. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  46. package/components/data-list-wrapper/index.d.ts +1 -1
  47. package/components/drawer/drawer.component.d.ts +3 -4
  48. package/components/files/file/file.component.d.ts +16 -29
  49. package/components/files/file/file.options.d.ts +1 -1
  50. package/components/files/files/files.component.d.ts +7 -10
  51. package/components/files/input-files/input-files.component.d.ts +2 -2
  52. package/components/files/input-files/input-files.content.d.ts +7 -8
  53. package/components/files/input-files/input-files.directive.d.ts +2 -2
  54. package/components/files/input-files/input-files.options.d.ts +1 -3
  55. package/components/filter/filter.component.d.ts +9 -12
  56. package/components/fullscreen/fullscreen.component.d.ts +11 -0
  57. package/components/fullscreen/index.d.ts +1 -0
  58. package/components/index.d.ts +3 -5
  59. package/components/input-chip/input-chip.component.d.ts +9 -8
  60. package/components/input-chip/input-chip.d.ts +5 -1
  61. package/components/input-chip/input-chip.directive.d.ts +7 -12
  62. package/components/input-color/index.d.ts +1 -0
  63. package/components/input-color/input-color.component.d.ts +10 -14
  64. package/components/input-color/input-color.d.ts +5 -0
  65. package/components/input-date/input-date.component.d.ts +2 -2
  66. package/components/input-date/input-date.d.ts +4 -1
  67. package/components/input-date/input-date.directive.d.ts +21 -22
  68. package/components/input-date/input-date.options.d.ts +3 -3
  69. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  70. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  71. package/components/input-date-range/input-date-range.d.ts +4 -1
  72. package/components/input-date-range/input-date-range.directive.d.ts +9 -10
  73. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  74. package/components/input-date-time/input-date-time.d.ts +4 -1
  75. package/components/input-date-time/input-date-time.directive.d.ts +14 -14
  76. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  77. package/components/input-inline/input-inline.component.d.ts +3 -2
  78. package/components/input-month/input-month.component.d.ts +3 -5
  79. package/components/input-month/input-month.d.ts +4 -1
  80. package/components/input-month/input-month.directive.d.ts +6 -5
  81. package/components/input-month-range/input-month-range.d.ts +4 -1
  82. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  83. package/components/input-number/index.d.ts +3 -0
  84. package/components/input-number/input-number.d.ts +7 -2
  85. package/components/input-number/input-number.directive.d.ts +11 -28
  86. package/components/input-number/input-number.options.d.ts +4 -7
  87. package/components/input-number/number-mask.directive.d.ts +42 -0
  88. package/components/input-number/quantum.directive.d.ts +10 -8
  89. package/components/input-number/step/input-number-step.component.d.ts +11 -10
  90. package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
  91. package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
  92. package/components/input-phone/index.d.ts +1 -0
  93. package/components/input-phone/input-phone.d.ts +5 -0
  94. package/components/input-phone/input-phone.directive.d.ts +12 -14
  95. package/components/input-phone-international/index.d.ts +1 -0
  96. package/components/input-phone-international/input-phone-international.component.d.ts +28 -36
  97. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  98. package/components/input-phone-international/input-phone-international.options.d.ts +2 -3
  99. package/components/input-pin/index.d.ts +1 -0
  100. package/components/input-pin/input-pin.component.d.ts +6 -7
  101. package/components/input-pin/input-pin.d.ts +5 -0
  102. package/components/input-range/index.d.ts +0 -1
  103. package/components/input-range/input-range.component.d.ts +29 -62
  104. package/components/input-slider/input-slider.d.ts +4 -1
  105. package/components/input-slider/input-slider.directive.d.ts +6 -7
  106. package/components/input-time/input-time.component.d.ts +1 -3
  107. package/components/input-time/input-time.d.ts +4 -1
  108. package/components/input-time/input-time.directive.d.ts +9 -11
  109. package/components/input-year/input-year.d.ts +4 -1
  110. package/components/input-year/input-year.directive.d.ts +8 -10
  111. package/components/input-year/input-year.options.d.ts +2 -2
  112. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  113. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  114. package/components/like/like.component.d.ts +4 -11
  115. package/components/like/like.options.d.ts +3 -4
  116. package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
  117. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  118. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  119. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +6 -8
  120. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  121. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  122. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  123. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  124. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  125. package/components/pager/pager.component.d.ts +13 -13
  126. package/components/pagination/index.d.ts +1 -0
  127. package/components/pagination/pagination.component.d.ts +25 -54
  128. package/components/pagination/pagination.options.d.ts +7 -0
  129. package/components/pin/pin.directive.d.ts +2 -2
  130. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  131. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  132. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  133. package/components/preview/index.d.ts +1 -0
  134. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  135. package/components/preview/preview.component.d.ts +6 -6
  136. package/components/preview/preview.d.ts +2 -1
  137. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  138. package/components/preview/zoom/preview-zoom.component.d.ts +11 -17
  139. package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
  140. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  141. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  142. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  143. package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
  144. package/components/progress/progress.options.d.ts +1 -3
  145. package/components/pulse/pulse.component.d.ts +2 -2
  146. package/components/push/push-alert.component.d.ts +4 -3
  147. package/components/push/push.component.d.ts +7 -8
  148. package/components/push/push.directive.d.ts +4 -6
  149. package/components/push/push.options.d.ts +5 -8
  150. package/components/push/push.service.d.ts +6 -2
  151. package/components/radio/radio.component.d.ts +8 -9
  152. package/components/radio/radio.directive.d.ts +2 -2
  153. package/components/radio/radio.options.d.ts +2 -5
  154. package/components/radio-list/radio-list.component.d.ts +11 -9
  155. package/components/range/range-change.directive.d.ts +1 -2
  156. package/components/range/range.component.d.ts +16 -25
  157. package/components/rating/rating.component.d.ts +5 -5
  158. package/components/rating/rating.options.d.ts +6 -6
  159. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  160. package/components/segmented/segmented.component.d.ts +4 -6
  161. package/components/segmented/segmented.directive.d.ts +6 -7
  162. package/components/select/native-select/native-select.component.d.ts +7 -8
  163. package/components/select/select.d.ts +4 -1
  164. package/components/select/select.directive.d.ts +4 -3
  165. package/components/slider/helpers/key-steps.d.ts +1 -2
  166. package/components/slider/helpers/slider-key-steps.directive.d.ts +15 -23
  167. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  168. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  169. package/components/slider/slider.component.d.ts +4 -7
  170. package/components/slider/slider.options.d.ts +1 -6
  171. package/components/status/status.directive.d.ts +2 -2
  172. package/components/stepper/step.component.d.ts +14 -9
  173. package/components/stepper/stepper.component.d.ts +5 -12
  174. package/components/switch/switch.component.d.ts +8 -19
  175. package/components/switch/switch.options.d.ts +4 -8
  176. package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
  177. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  178. package/components/tabs/tabs-with-more.component.d.ts +13 -17
  179. package/components/tabs/tabs.directive.d.ts +5 -7
  180. package/components/tabs/tabs.options.d.ts +1 -6
  181. package/components/textarea/index.d.ts +2 -1
  182. package/components/textarea/textarea.component.d.ts +10 -11
  183. package/components/textarea/textarea.d.ts +6 -0
  184. package/components/textarea/textarea.directive.d.ts +13 -0
  185. package/components/tiles/tile.component.d.ts +7 -10
  186. package/components/tiles/tile.service.d.ts +1 -1
  187. package/components/tiles/tiles.component.d.ts +4 -7
  188. package/components/toast/index.d.ts +5 -0
  189. package/components/toast/toast.component.d.ts +18 -0
  190. package/components/toast/toast.d.ts +3 -0
  191. package/components/toast/toast.directive.d.ts +7 -0
  192. package/components/toast/toast.options.d.ts +10 -0
  193. package/components/toast/toast.service.d.ts +17 -0
  194. package/components/tree/components/tree/tree.component.d.ts +7 -7
  195. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  196. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  197. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  198. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  199. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  200. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  201. package/components/tree/misc/tree.constants.d.ts +0 -3
  202. package/components/tree/misc/tree.tokens.d.ts +1 -6
  203. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  204. package/directives/appearance-proxy/index.d.ts +1 -0
  205. package/directives/button-select/button-select.directive.d.ts +4 -4
  206. package/directives/chevron/chevron.directive.d.ts +2 -3
  207. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  208. package/directives/fade/fade.directive.d.ts +6 -6
  209. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  210. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  211. package/directives/highlight/highlight.directive.d.ts +4 -4
  212. package/directives/index.d.ts +1 -3
  213. package/directives/password/password.directive.d.ts +1 -1
  214. package/directives/present/present.directive.d.ts +2 -4
  215. package/directives/sensitive/sensitive.directive.d.ts +2 -2
  216. package/directives/shimmer/shimmer.directive.d.ts +3 -3
  217. package/directives/skeleton/skeleton.directive.d.ts +3 -3
  218. package/directives/tooltip/tooltip.directive.d.ts +3 -3
  219. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  220. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  221. package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
  222. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +24 -40
  224. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-avatar.mjs +54 -80
  226. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
  228. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-badge.mjs +16 -27
  230. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
  232. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-block.mjs +20 -31
  234. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +19 -39
  236. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +19 -27
  238. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
  240. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +25 -26
  242. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-carousel.mjs +70 -123
  244. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +18 -76
  246. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-chip.mjs +18 -34
  248. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  249. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +45 -50
  250. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-components-comment.mjs +13 -20
  252. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  253. package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
  254. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  255. package/fesm2022/taiga-ui-kit-components-confirm.mjs +14 -17
  256. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  257. package/fesm2022/taiga-ui-kit-components-copy.mjs +106 -0
  258. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
  259. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
  260. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  262. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-components-files.mjs +118 -245
  264. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -34
  266. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  267. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +44 -0
  268. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
  269. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +72 -81
  270. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  271. package/fesm2022/taiga-ui-kit-components-input-color.mjs +30 -33
  272. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  273. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +36 -53
  274. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  275. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +37 -37
  276. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  277. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +42 -59
  278. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-components-input-date.mjs +58 -72
  280. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -13
  282. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +30 -28
  284. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-components-input-month.mjs +43 -51
  286. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  287. package/fesm2022/taiga-ui-kit-components-input-number.mjs +270 -214
  288. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  289. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +126 -159
  290. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +40 -46
  292. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  293. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +26 -24
  294. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-components-input-range.mjs +68 -91
  296. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  297. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +46 -50
  298. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-components-input-time.mjs +64 -71
  300. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-components-input-year.mjs +33 -40
  302. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  303. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -72
  304. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  305. package/fesm2022/taiga-ui-kit-components-like.mjs +40 -33
  306. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  307. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +38 -82
  308. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  309. package/fesm2022/taiga-ui-kit-components-message.mjs +9 -12
  310. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  311. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +44 -60
  312. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +38 -34
  314. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-components-pager.mjs +31 -45
  316. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-components-pagination.mjs +75 -150
  318. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  319. package/fesm2022/taiga-ui-kit-components-pin.mjs +15 -19
  320. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-components-preview.mjs +98 -158
  322. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-components-progress.mjs +93 -117
  324. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  326. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-components-push.mjs +54 -74
  328. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  329. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
  330. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-components-radio.mjs +35 -41
  332. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-components-range.mjs +42 -96
  334. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-components-rating.mjs +19 -28
  336. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  337. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  338. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  340. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  341. package/fesm2022/taiga-ui-kit-components-select.mjs +81 -62
  342. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  343. package/fesm2022/taiga-ui-kit-components-slider.mjs +96 -122
  344. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  345. package/fesm2022/taiga-ui-kit-components-status.mjs +12 -16
  346. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  347. package/fesm2022/taiga-ui-kit-components-stepper.mjs +61 -88
  348. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  349. package/fesm2022/taiga-ui-kit-components-switch.mjs +22 -64
  350. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  351. package/fesm2022/taiga-ui-kit-components-tabs.mjs +96 -166
  352. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  353. package/fesm2022/taiga-ui-kit-components-textarea.mjs +62 -82
  354. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  355. package/fesm2022/taiga-ui-kit-components-tiles.mjs +38 -71
  356. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  357. package/fesm2022/taiga-ui-kit-components-toast.mjs +164 -0
  358. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
  359. package/fesm2022/taiga-ui-kit-components-tree.mjs +92 -127
  360. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  361. package/fesm2022/taiga-ui-kit-components.mjs +3 -5
  362. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  363. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  364. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  365. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +9 -12
  366. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  367. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -19
  368. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  369. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +16 -22
  370. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  371. package/fesm2022/taiga-ui-kit-directives-connected.mjs +9 -15
  372. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  373. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  374. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  375. package/fesm2022/taiga-ui-kit-directives-fade.mjs +28 -40
  376. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  377. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  378. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  379. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
  380. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  381. package/fesm2022/taiga-ui-kit-directives-password.mjs +14 -16
  382. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  383. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
  384. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  385. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +13 -18
  386. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  387. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +24 -34
  388. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  389. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +28 -38
  390. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  391. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +17 -22
  392. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  393. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +10 -14
  394. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  395. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
  396. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  397. package/fesm2022/taiga-ui-kit-directives.mjs +1 -3
  398. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  399. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  400. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  401. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  402. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  403. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +22 -36
  404. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  405. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  406. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  407. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +23 -27
  408. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  409. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  410. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  411. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  412. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  413. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  414. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  415. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  416. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  417. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -1
  418. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  419. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -126
  420. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  421. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  422. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  423. package/package.json +49 -57
  424. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  425. package/pipes/auto-color/index.d.ts +1 -0
  426. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +5 -2
  427. package/pipes/flag/flag.pipe.d.ts +13 -0
  428. package/pipes/flag/index.d.ts +1 -0
  429. package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -0
  430. package/pipes/index.d.ts +3 -1
  431. package/pipes/initials/index.d.ts +1 -0
  432. package/pipes/initials/initials.pipe.d.ts +7 -0
  433. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  434. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  435. package/styles/components/avatar.less +188 -0
  436. package/styles/components/badge.less +4 -3
  437. package/styles/components/block.less +4 -4
  438. package/styles/components/checkbox.less +14 -12
  439. package/styles/components/chip.less +15 -4
  440. package/styles/components/comment.less +1 -1
  441. package/styles/components/like.less +4 -9
  442. package/styles/components/message.less +1 -1
  443. package/styles/components/pin.less +6 -10
  444. package/styles/components/radio.less +1 -1
  445. package/styles/components/switch.less +12 -11
  446. package/styles/components/toast.less +44 -0
  447. package/tokens/i18n.d.ts +26 -26
  448. package/tokens/index.d.ts +0 -8
  449. package/utils/index.d.ts +0 -2
  450. package/utils/maskito.binding.d.ts +1 -1
  451. package/components/accordion/accordion-item-content.directive.d.ts +0 -6
  452. package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
  453. package/components/accordion/accordion-item.component.d.ts +0 -25
  454. package/components/action-bar/action-bar.d.ts +0 -3
  455. package/components/action-bar/action-bar.directive.d.ts +0 -6
  456. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  457. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  458. package/components/elastic-container/index.d.ts +0 -2
  459. package/components/floating-container/floating-container.directive.d.ts +0 -7
  460. package/components/floating-container/index.d.ts +0 -1
  461. package/components/input-password/index.d.ts +0 -2
  462. package/components/input-password/input-password.component.d.ts +0 -16
  463. package/components/input-password/input-password.options.d.ts +0 -24
  464. package/components/input-range/input-range.d.ts +0 -3
  465. package/components/pdf-viewer/index.d.ts +0 -4
  466. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  467. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  468. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  469. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  470. package/components/slides/index.d.ts +0 -1
  471. package/components/slides/slides.directive.d.ts +0 -11
  472. package/components/textarea/textarea-limit.directive.d.ts +0 -27
  473. package/directives/button-close/button-close.directive.d.ts +0 -5
  474. package/directives/button-close/index.d.ts +0 -1
  475. package/directives/lazy-loading/index.d.ts +0 -2
  476. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  477. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  478. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  479. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  480. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -43
  481. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  482. package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
  483. package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
  484. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  485. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  486. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  487. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  488. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -57
  489. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  490. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +0 -39
  491. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +0 -1
  492. package/fesm2022/taiga-ui-kit-directives-copy.mjs +0 -121
  493. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +0 -1
  494. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  495. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  496. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +0 -147
  497. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +0 -1
  498. package/pipes/field-error/field-error-content-pipe.d.ts +0 -14
  499. package/pipes/field-error/field-error-pipe.d.ts +0 -29
  500. package/pipes/field-error/index.d.ts +0 -2
  501. package/tokens/calendar-date-stream.d.ts +0 -10
  502. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  503. package/tokens/input-date-options.d.ts +0 -15
  504. package/tokens/items-handlers.d.ts +0 -26
  505. package/tokens/mobile-calendar.d.ts +0 -6
  506. package/tokens/month-formatter.d.ts +0 -5
  507. package/tokens/validation-errors.d.ts +0 -5
  508. package/utils/phone.d.ts +0 -3
  509. package/utils/toggle-day.d.ts +0 -2
  510. /package/{directives → components}/copy/copy.d.ts +0 -0
  511. /package/{directives → components}/copy/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-number.mjs","sources":["../../../projects/kit/components/input-number/input-number.options.ts","../../../projects/kit/components/input-number/input-number.directive.ts","../../../projects/kit/components/input-number/quantum.directive.ts","../../../projects/kit/components/input-number/step/input-number-step.component.ts","../../../projects/kit/components/input-number/step/input-number-step.template.html","../../../projects/kit/components/input-number/input-number.ts","../../../projects/kit/components/input-number/taiga-ui-kit-components-input-number.ts"],"sourcesContent":["import {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiInputNumberOptions {\n readonly max: number;\n readonly min: number;\n readonly prefix: string;\n readonly postfix: string;\n readonly step: number;\n readonly icons: Readonly<{\n decrease: string;\n increase: string;\n }>;\n readonly valueTransformer: TuiValueTransformer<number | null, any> | null;\n}\n\nexport const TUI_INPUT_NUMBER_DEFAULT_OPTIONS: TuiInputNumberOptions = {\n min: Number.MIN_SAFE_INTEGER,\n max: Number.MAX_SAFE_INTEGER,\n prefix: '',\n postfix: '',\n step: 0,\n icons: {\n increase: '@tui.plus',\n decrease: '@tui.minus',\n },\n valueTransformer: null,\n};\n\nexport const [TUI_INPUT_NUMBER_OPTIONS, tuiInputNumberOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_NUMBER_DEFAULT_OPTIONS,\n);\n","import {\n computed,\n Directive,\n effect,\n inject,\n Input,\n signal,\n untracked,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions, maskitoTransform} from '@maskito/core';\nimport {\n maskitoCaretGuard,\n maskitoNumberOptionsGenerator,\n type MaskitoNumberParams,\n maskitoParseNumber,\n} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {CHAR_HYPHEN, CHAR_MINUS, TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsSafeToRound} from '@taiga-ui/cdk/utils/math';\nimport {\n TuiTextfieldDirective,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {TUI_DEFAULT_NUMBER_FORMAT, TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {tuiFormatNumber} from '@taiga-ui/core/utils/format';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_NUMBER_OPTIONS} from './input-number.options';\n\nconst DEFAULT_MAX_LENGTH = 18;\n\n@Directive({\n standalone: true,\n selector: 'input[tuiInputNumber]',\n providers: [\n tuiAsControl(TuiInputNumberDirective),\n tuiValueTransformerFrom(TUI_INPUT_NUMBER_OPTIONS),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective],\n host: {\n '[disabled]': 'disabled()',\n '[attr.inputMode]': 'inputMode()',\n '[attr.maxLength]':\n 'element.maxLength > 0 ? element.maxLength : defaultMaxLength()',\n '(focusout)': 'setValue(transformer.fromControlValue(control.value))',\n '(focus)': 'onFocus()',\n },\n})\nexport class TuiInputNumberDirective extends TuiControl<number | null> {\n private readonly options = inject(TUI_INPUT_NUMBER_OPTIONS);\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly minRaw = signal(this.options.min);\n private readonly maxRaw = signal(this.options.max);\n private readonly numberFormat = toSignal(inject(TUI_NUMBER_FORMAT), {\n initialValue: TUI_DEFAULT_NUMBER_FORMAT,\n });\n\n private readonly formatted = computed(() =>\n maskitoParseNumber(this.textfield.value(), this.numberFormat()),\n );\n\n private readonly precision = computed((precision = this.numberFormat().precision) =>\n Number.isNaN(precision) ? 2 : precision,\n );\n\n private readonly unfinished = computed((value = this.formatted()) =>\n value < 0 ? value > this.max() : value < this.min(),\n );\n\n protected readonly element = tuiInjectElement<HTMLInputElement>();\n protected readonly mask = tuiMaskito(\n computed(() => this.computeMask(this.maskParams)),\n );\n\n protected readonly inputMode = computed(() => {\n if (this.isIOS) {\n return this.min() < 0\n ? 'text' // iPhone does not have minus sign if inputMode equals to 'numeric' / 'decimal'\n : 'decimal';\n }\n\n /**\n * Samsung Keyboard does not minus sign for `inputmode=decimal`\n * @see https://github.com/taiga-family/taiga-ui/issues/11061#issuecomment-2939103792\n */\n return 'numeric';\n });\n\n protected readonly defaultMaxLength = computed(() => {\n const {decimalSeparator, thousandSeparator} = this.numberFormat();\n const decimalPart =\n !!this.precision() && this.textfield.value().includes(decimalSeparator);\n const precision = decimalPart ? Math.min(this.precision() + 1, 20) : 0;\n const takeThousand = thousandSeparator.repeat(5).length;\n\n return DEFAULT_MAX_LENGTH + precision + takeThousand;\n });\n\n protected readonly onChangeEffect = effect(() => {\n const value = this.formatted();\n\n if (Number.isNaN(value) && !Number.isNaN(this.value())) {\n this.onChange(null);\n\n return;\n }\n\n if (\n this.unfinished() ||\n value < this.min() ||\n value > this.max() ||\n Object.is(this.value(), value)\n ) {\n return;\n }\n\n this.onChange(value);\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected maskInitialCalibrationEffect = effect(() => {\n const options = maskitoNumberOptionsGenerator({\n ...this.maskParams,\n min: Number.MIN_SAFE_INTEGER,\n max: Number.MAX_SAFE_INTEGER,\n });\n\n this.textfield.value.update((x) => maskitoTransform(x, options));\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n public readonly min = computed(() => Math.min(this.minRaw(), this.maxRaw()));\n public readonly max = computed(() => Math.max(this.minRaw(), this.maxRaw()));\n public readonly prefix = signal(this.options.prefix);\n public readonly postfix = signal(this.options.postfix);\n\n @Input('min')\n public set minSetter(x: number | null) {\n this.minRaw.set(this.transformer.fromControlValue(x ?? this.options.min));\n }\n\n @Input('max')\n public set maxSetter(x: number | null) {\n this.maxRaw.set(this.transformer.fromControlValue(x ?? this.options.max));\n }\n\n // TODO(v5): replace with signal input\n @Input('prefix')\n public set prefixSetter(x: string) {\n this.prefix.set(x);\n }\n\n // TODO(v5): replace with signal input\n @Input('postfix')\n public set postfixSetter(x: string) {\n this.postfix.set(x);\n }\n\n public override writeValue(value: number | null): void {\n const reset = this.control.pristine && this.control.untouched && !value;\n const changed = untracked(() => value !== this.value());\n\n if (changed || reset) {\n super.writeValue(value);\n untracked(() => this.setValue(this.value()));\n }\n }\n\n public setValue(value: number | null): void {\n this.textfield.value.set(this.formatNumber(value));\n }\n\n protected onFocus(): void {\n if (Number.isNaN(this.formatted()) && !this.readOnly()) {\n this.textfield.value.set(this.prefix() + this.postfix());\n }\n }\n\n private get maskParams(): MaskitoNumberParams {\n const {decimalMode, ...numberFormat} = this.numberFormat();\n const maximumFractionDigits = this.precision();\n\n return {\n ...numberFormat,\n maximumFractionDigits,\n min: this.min(),\n max: this.max(),\n prefix: this.prefix(),\n postfix: this.postfix(),\n minimumFractionDigits: decimalMode === 'always' ? maximumFractionDigits : 0,\n };\n }\n\n private formatNumber(value: number | null): string {\n if (value === null || Number.isNaN(value)) {\n return '';\n }\n\n return (\n (this.prefix() !== CHAR_MINUS ? this.prefix() : '') +\n tuiFormatNumber(value, {\n ...this.numberFormat(),\n /**\n * Number can satisfy interval [Number.MIN_SAFE_INTEGER; Number.MAX_SAFE_INTEGER]\n * but its rounding can violate it.\n * Before BigInt support there is no perfect solution – only trade off.\n * No rounding is better than lose precision and incorrect mutation of already valid value.\n */\n precision: tuiIsSafeToRound(value, this.precision())\n ? this.precision()\n : Infinity,\n }).replace(CHAR_HYPHEN, CHAR_MINUS) +\n this.postfix()\n );\n }\n\n private computeMask(params: MaskitoNumberParams): MaskitoOptions {\n const {prefix = '', postfix = ''} = params;\n const {plugins, ...options} = maskitoNumberOptionsGenerator(params);\n\n return {\n ...options,\n plugins: [\n ...plugins,\n maskitoCaretGuard((value) => [\n prefix.length,\n value.length - postfix.length,\n ]),\n ],\n };\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {tuiIsSafeToRound, tuiRound} from '@taiga-ui/cdk/utils/math';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiGetFractionPartPadded} from '@taiga-ui/core/utils/format';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/components/slider';\n\nimport {TUI_INPUT_NUMBER_OPTIONS} from './input-number.options';\n\n@Directive()\nexport class TuiQuantumValueTransformerBase extends TuiValueTransformer<\n number | null,\n number | null\n> {\n protected parent: TuiValueTransformer<number | null, any> | null = null;\n\n // eslint-disable-next-line @typescript-eslint/parameter-properties\n constructor(public quantum = 1) {\n super();\n }\n\n public override fromControlValue(controlValue: number | null): number | null {\n return this.parent?.fromControlValue(controlValue) ?? controlValue;\n }\n\n public toControlValue(internalValue: number | null): number | null {\n const value = this.parent?.toControlValue(internalValue) ?? internalValue;\n\n return value != null &&\n tuiIsSafeToRound(value, tuiGetFractionPartPadded(this.quantum).length)\n ? tuiRound(\n Math.round(value / this.quantum) * this.quantum,\n TUI_FLOATING_PRECISION,\n )\n : value;\n }\n}\n\n@Directive({\n standalone: true,\n selector: '[tuiInputNumber][quantum], [tuiInputSlider][quantum]',\n inputs: ['quantum'],\n providers: [tuiProvide(TuiValueTransformer, TuiQuantumValueTransformer)],\n})\nexport class TuiQuantumValueTransformer extends TuiQuantumValueTransformerBase {\n protected override parent = inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer;\n\n constructor() {\n super(1);\n }\n}\n\n@Directive({\n standalone: true,\n hostDirectives: [\n {\n directive: TuiQuantumValueTransformer,\n inputs: ['quantum'],\n },\n ],\n})\nexport class TuiWithQuantumValueTransformer {}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldContent,\n} from '@taiga-ui/core/components/textfield';\nimport {expand, fromEvent, map, merge, Subject, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {TuiInputNumberDirective} from '../input-number.directive';\nimport {\n TUI_INPUT_NUMBER_OPTIONS,\n type TuiInputNumberOptions,\n} from '../input-number.options';\n\nconst INITIAL_DELAY = 300;\nconst DELAY_DECREMENT = 15;\nconst MIN_DELAY = 100;\n\n@Component({\n selector: 'input[tuiInputNumber][step]',\n imports: [TuiButton, TuiTextfieldContent],\n templateUrl: './input-number-step.template.html',\n styleUrls: ['./input-number-step.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n ngSkipHydration: 'true',\n '(keydown.arrowDown.prevent)': 'onStep(-step())',\n '(keydown.arrowUp.prevent)': 'onStep(step())',\n '[class._with-buttons]': 'step()',\n },\n})\nexport class TuiInputNumberStep {\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;\n protected readonly options = inject<TuiInputNumberOptions>(TUI_INPUT_NUMBER_OPTIONS);\n protected readonly input = inject(TuiInputNumberDirective, {self: true});\n protected readonly step = signal(this.options.step);\n protected readonly value = computed(() => this.input.value() ?? NaN);\n protected readonly step$ = new Subject<number>();\n protected readonly doc = inject(DOCUMENT);\n\n protected readonly stop$ = merge(\n fromEvent(this.doc, 'pointerup'),\n fromEvent(this.doc, 'pointerleave'),\n fromEvent(this.doc, 'pointercancel'),\n );\n\n protected readonly stepping = this.step$\n .pipe(\n switchMap((value) =>\n timer(INITIAL_DELAY).pipe(\n expand((_, index) => timer(getDelay(index))),\n map(() => value),\n takeUntil(this.stop$),\n ),\n ),\n takeUntilDestroyed(),\n )\n .subscribe((value) => this.onStep(value));\n\n // TODO(v5): replace with signal input\n @Input('step')\n public set stepSetter(x: number) {\n this.step.set(x);\n }\n\n protected onStep(step: number): void {\n const current = this.input.value() ?? 0;\n\n this.input.setValue(tuiClamp(current + step, this.input.min(), this.input.max()));\n this.el.setSelectionRange(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\n }\n}\n\nfunction getDelay(index: number): number {\n return Math.max(INITIAL_DELAY - index * DELAY_DECREMENT, MIN_DELAY);\n}\n","<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","import {TuiInputNumberDirective} from './input-number.directive';\nimport {TuiQuantumValueTransformer} from './quantum.directive';\nimport {TuiInputNumberStep} from './step/input-number-step.component';\n\nexport const TuiInputNumber = [\n TuiInputNumberDirective,\n TuiInputNumberStep,\n TuiQuantumValueTransformer,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgBa,MAAA,gCAAgC,GAA0B;IACnE,GAAG,EAAE,MAAM,CAAC,gBAAgB;IAC5B,GAAG,EAAE,MAAM,CAAC,gBAAgB;AAC5B,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE;AACH,QAAA,QAAQ,EAAE,WAAW;AACrB,QAAA,QAAQ,EAAE,YAAY;AACzB,KAAA;AACD,IAAA,gBAAgB,EAAE,IAAI;;AAGnB,MAAM,CAAC,wBAAwB,EAAE,6BAA6B,CAAC,GAAG,gBAAgB,CACrF,gCAAgC;;ACGpC,MAAM,kBAAkB,GAAG,EAAE;AAmBvB,MAAO,uBAAwB,SAAQ,UAAyB,CAAA;AAjBtE,IAAA,WAAA,GAAA;;AAkBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC1C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAC1B,IAAM,CAAA,MAAA,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;QACjC,IAAM,CAAA,MAAA,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AACjC,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE;AAChE,YAAA,YAAY,EAAE,yBAAyB;AAC1C,SAAA,CAAC;QAEe,IAAS,CAAA,SAAA,GAAG,QAAQ,CAAC,MAClC,kBAAkB,CAAC,IAAI,CAAC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,EAAA,CAAA,09DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,SAAS,oIAAE,mBAAmB,EAAA,QAAA,EAAA,kCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAY/B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,6BAA6B,EAC9B,OAAA,EAAA,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAA,aAAA,EAG1B,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,6BAA6B,EAAE,iBAAiB;AAChD,wBAAA,2BAA2B,EAAE,gBAAgB;AAC7C,wBAAA,uBAAuB,EAAE,QAAQ;AACpC,qBAAA,EAAA,QAAA,EAAA,2sCAAA,EAAA,MAAA,EAAA,CAAA,09DAAA,CAAA,EAAA;8BAiCU,UAAU,EAAA,CAAA;sBADpB,KAAK;uBAAC,MAAM;;AAajB,SAAS,QAAQ,CAAC,KAAa,EAAA;AAC3B,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,KAAK,GAAG,eAAe,EAAE,SAAS,CAAC;AACvE;;AErFa,MAAA,cAAc,GAAG;IAC1B,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;;;ACP9B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-number.mjs","sources":["../../../projects/kit/components/input-number/input-number.options.ts","../../../projects/kit/components/input-number/number-mask.directive.ts","../../../projects/kit/components/input-number/quantum.directive.ts","../../../projects/kit/components/input-number/transformers/number.value-transformer.ts","../../../projects/kit/components/input-number/input-number.directive.ts","../../../projects/kit/components/input-number/step/input-number-step.component.ts","../../../projects/kit/components/input-number/step/input-number-step.template.html","../../../projects/kit/components/input-number/transformers/bigint.value-transformer.ts","../../../projects/kit/components/input-number/input-number.ts","../../../projects/kit/components/input-number/taiga-ui-kit-components-input-number.ts"],"sourcesContent":["import {type MaskitoNumberParams} from '@maskito/kit';\nimport {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {CHAR_MINUS} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiInputNumberOptions extends Pick<\n Required<MaskitoNumberParams>,\n 'max' | 'min' | 'minusSign' | 'postfix' | 'prefix'\n> {\n readonly step: bigint | number;\n readonly icons: Readonly<{\n decrease: string;\n increase: string;\n }>;\n readonly valueTransformer:\n | TuiValueTransformer<bigint | null, any>\n | TuiValueTransformer<number | null, any>\n | null;\n}\n\nexport const TUI_INPUT_NUMBER_DEFAULT_OPTIONS: TuiInputNumberOptions = {\n min: Number.MIN_SAFE_INTEGER,\n max: Number.MAX_SAFE_INTEGER,\n prefix: '',\n postfix: '',\n minusSign: CHAR_MINUS,\n step: 0,\n icons: {\n increase: '@tui.plus',\n decrease: '@tui.minus',\n },\n valueTransformer: null,\n};\n\nexport const [TUI_INPUT_NUMBER_OPTIONS, tuiInputNumberOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_NUMBER_DEFAULT_OPTIONS,\n);\n","import {computed, Directive, effect, inject, input} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions, maskitoTransform} from '@maskito/core';\nimport {\n maskitoCaretGuard,\n maskitoNumberOptionsGenerator,\n type MaskitoNumberParams,\n maskitoStringifyNumber,\n} from '@maskito/kit';\nimport {TuiInputDirective} from '@taiga-ui/core/components/input';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {\n TUI_INPUT_NUMBER_OPTIONS,\n type TuiInputNumberOptions,\n} from './input-number.options';\n\n@Directive({hostDirectives: [MaskitoDirective]})\nexport class TuiNumberMask {\n private readonly options = inject(TUI_INPUT_NUMBER_OPTIONS);\n private readonly numberFormat = inject(TUI_NUMBER_FORMAT);\n private readonly input = inject(TuiInputDirective);\n\n public readonly prefix = input(this.options.prefix);\n public readonly postfix = input(this.options.postfix);\n public readonly maximumFractionDigits = computed(\n (precision = this.numberFormat().precision) =>\n Number.isNaN(precision) ? 2 : precision,\n );\n\n public readonly min = input<\n TuiInputNumberOptions['min'],\n TuiInputNumberOptions['min'] | null\n >(this.options.min, {\n transform: (x) => x ?? this.options.min,\n });\n\n public readonly max = input<\n TuiInputNumberOptions['max'],\n TuiInputNumberOptions['max'] | null\n >(this.options.max, {\n transform: (x) => x ?? this.options.max,\n });\n\n public readonly params = computed(() => {\n const {decimalMode, ...numberFormat} = this.numberFormat();\n const maximumFractionDigits = this.maximumFractionDigits();\n\n return {\n ...numberFormat,\n ...this.options,\n maximumFractionDigits,\n min: this.min(),\n max: this.max(),\n prefix: this.prefix(),\n postfix: this.postfix(),\n minimumFractionDigits: decimalMode === 'always' ? maximumFractionDigits : 0,\n } as const satisfies MaskitoNumberParams;\n });\n\n protected readonly mask = tuiMaskito(computed(() => this.computeMask(this.params())));\n\n protected maskInitialCalibration = effect(() => {\n const options = maskitoNumberOptionsGenerator({\n ...this.params(),\n min: -Infinity,\n max: Infinity,\n });\n\n this.input.value.update((x) => maskitoTransform(x, options));\n });\n\n public stringify(value: bigint | number | null | undefined): string {\n const params = this.params();\n\n return maskitoStringifyNumber(value ?? null, {\n ...params,\n minimumFractionDigits:\n String(value).includes(params.decimalSeparator) &&\n this.numberFormat().decimalMode !== 'not-zero'\n ? params.maximumFractionDigits\n : 0,\n });\n }\n\n private computeMask(params: MaskitoNumberParams): MaskitoOptions {\n const {prefix = '', postfix = ''} = params;\n const {plugins, ...options} = maskitoNumberOptionsGenerator(params);\n\n return {\n ...options,\n plugins: [\n ...plugins,\n maskitoCaretGuard((value) => [\n prefix.length,\n value.length - postfix.length,\n ]),\n ],\n };\n }\n}\n\n@Directive({\n hostDirectives: [\n {\n directive: TuiNumberMask,\n inputs: ['min', 'max', 'prefix', 'postfix'],\n },\n ],\n})\nexport class TuiWithNumberMask {}\n","import {Directive, input} from '@angular/core';\nimport {TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {tuiIsSafeToRound, tuiRound} from '@taiga-ui/cdk/utils/math';\nimport {tuiGetFractionPartPadded} from '@taiga-ui/core/utils/format';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/components/slider';\nimport {identity} from 'rxjs';\n\n@Directive()\nexport class TuiQuantumValueTransformerBase extends TuiValueTransformer<\n number | null,\n number | null\n> {\n public override fromControlValue = identity;\n\n // eslint-disable-next-line @typescript-eslint/parameter-properties,@angular-eslint/prefer-inject\n constructor(public quantum = 0) {\n super();\n }\n\n public toControlValue(value: number | null): number | null {\n return value != null &&\n this.quantum > 0 &&\n tuiIsSafeToRound(value, tuiGetFractionPartPadded(this.quantum).length)\n ? tuiRound(\n Math.round(value / this.quantum) * this.quantum,\n TUI_FLOATING_PRECISION,\n )\n : value;\n }\n}\n\n@Directive({\n selector: '[tuiInputNumber][quantum]:not([bigint])',\n inputs: ['quantum'],\n})\nexport class TuiQuantumValueTransformer extends TuiQuantumValueTransformerBase {\n constructor() {\n super(0);\n }\n}\n\n@Directive({selector: '[tuiInputNumber][bigint][quantum]'})\nexport class TuiBigIntQuantumValueTransformer extends TuiValueTransformer<\n bigint | null,\n bigint | null\n> {\n public readonly quantum = input<bigint>(BigInt(0));\n public override fromControlValue = identity;\n\n public toControlValue(value: bigint | null): bigint | null {\n if (!this.quantum() || !value) {\n return value;\n }\n\n const floor = (value / this.quantum()) * this.quantum();\n const remainder = value % this.quantum();\n\n return (\n floor + (BigInt(2) * remainder >= this.quantum() ? this.quantum() : BigInt(0))\n );\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {maskitoParseNumber} from '@maskito/kit';\nimport {TUI_IDENTITY_VALUE_TRANSFORMER, TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nimport {TUI_INPUT_NUMBER_OPTIONS} from '../input-number.options';\nimport {TuiNumberMask} from '../number-mask.directive';\nimport {TuiQuantumValueTransformer} from '../quantum.directive';\n\n@Directive({\n providers: [tuiProvide(TuiValueTransformer, TuiNumberValueTransformer)],\n})\nexport class TuiNumberValueTransformer extends TuiValueTransformer<\n string,\n number | null\n> {\n private readonly mask = inject(TuiNumberMask);\n private readonly quantumTransformer: TuiValueTransformer<\n number | null,\n number | null\n > =\n inject(TuiQuantumValueTransformer, {optional: true}) ??\n TUI_IDENTITY_VALUE_TRANSFORMER;\n\n private readonly optionsTransformer: TuiValueTransformer<number | null, any> =\n inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer ??\n TUI_IDENTITY_VALUE_TRANSFORMER;\n\n public toControlValue(textfieldValue: string | null): number | null {\n const parsed = maskitoParseNumber(textfieldValue ?? '', this.mask.params());\n\n return this.optionsTransformer.toControlValue(\n this.quantumTransformer.toControlValue(Number.isNaN(parsed) ? null : parsed),\n );\n }\n\n public fromControlValue(controlValue: number | null): string {\n return this.mask.stringify(\n this.optionsTransformer.fromControlValue(controlValue),\n );\n }\n}\n","import {computed, Directive, effect, inject, untracked} from '@angular/core';\nimport {maskitoParseNumber} from '@maskito/kit';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\n\nimport {TuiNumberMask, TuiWithNumberMask} from './number-mask.directive';\nimport {TuiNumberValueTransformer} from './transformers/number.value-transformer';\n\nconst DEFAULT_MAX_LENGTH = 18;\n\n@Directive({\n selector: 'input[tuiInputNumber]',\n providers: [tuiAsControl(TuiInputNumberDirective)],\n hostDirectives: [TuiWithInput, TuiWithNumberMask, TuiNumberValueTransformer],\n host: {\n '[disabled]': 'disabled()',\n '[attr.inputMode]': 'inputMode()',\n '[attr.maxLength]':\n 'element.maxLength > 0 ? element.maxLength : defaultMaxLength()',\n '(focusout)': 'setValue(transformer.fromControlValue(control.value))',\n '(focus)': 'onFocus()',\n },\n})\nexport class TuiInputNumberDirective extends TuiControl<string> {\n private readonly mask = inject(TuiNumberMask);\n private readonly input = inject(TuiInputDirective);\n private readonly isIOS = inject(TUI_IS_IOS);\n\n protected readonly element = tuiInjectElement<HTMLInputElement>();\n\n protected readonly inputMode = computed(() => {\n if (this.isIOS) {\n return this.mask.min() < 0\n ? 'text' // iPhone does not have minus sign if inputMode is equal to 'numeric' / 'decimal'\n : 'decimal';\n }\n\n /**\n * Samsung Keyboard does not have minus sign for `inputmode=decimal`\n * @see https://github.com/taiga-family/taiga-ui/issues/11061#issuecomment-2939103792\n */\n return 'numeric';\n });\n\n protected readonly defaultMaxLength = computed(() => {\n const {\n decimalSeparator,\n thousandSeparator,\n maximumFractionDigits,\n prefix,\n postfix,\n min,\n max,\n } = this.mask.params();\n\n if (!Number.isFinite(min) || !Number.isFinite(max)) {\n return -1;\n }\n\n const decimalPart =\n !!maximumFractionDigits && this.input.value().includes(decimalSeparator);\n const precision = decimalPart ? Math.min(maximumFractionDigits + 1, 20) : 0;\n const takeThousand = thousandSeparator.repeat(5).length;\n const affixes = prefix.length + postfix.length;\n\n return DEFAULT_MAX_LENGTH + precision + takeThousand + affixes;\n });\n\n public readonly parsed = computed(() => this.parse(this.input.value()));\n\n protected readonly onChangeEffect = effect(() => {\n const changed = !Object.is(\n this.input.value().replaceAll(/\\D/g, ''),\n untracked(() => this.value()?.replaceAll(/\\D/g, '')) ?? '',\n );\n const value = this.parsed();\n const valid =\n Number.isNaN(value) || (value >= this.mask.min() && value <= this.mask.max());\n\n if (changed && valid) {\n this.onChange(this.input.value());\n }\n });\n\n public override writeValue(value: any): void {\n const reset = this.control.pristine && this.control.untouched && !value;\n const changed = untracked(\n () => value !== this.transformer.toControlValue(this.value()),\n );\n\n if (changed || reset) {\n super.writeValue(value);\n untracked(() => this.input.value.set(this.value()));\n }\n }\n\n public setValue(value: bigint | number | string | null): void {\n this.input.value.set(\n typeof value === 'string' ? value : this.mask.stringify(value),\n );\n }\n\n protected onFocus(): void {\n if (!this.input.value() && !this.readOnly()) {\n this.input.value.set(this.mask.prefix() + this.mask.postfix());\n }\n }\n\n private parse(value: string): bigint | number {\n const params = this.mask.params();\n const possibleTooBig =\n !Number.isFinite(this.mask.min()) || !Number.isFinite(this.mask.max());\n\n return (\n maskitoParseNumber(value, {\n ...params,\n bigint: !value.includes(params.decimalSeparator) && possibleTooBig,\n }) ?? NaN\n );\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldContent,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiAppearanceProxy} from '@taiga-ui/kit/directives/appearance-proxy';\nimport {expand, fromEvent, map, merge, Subject, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {TuiInputNumberDirective} from '../input-number.directive';\nimport {\n TUI_INPUT_NUMBER_OPTIONS,\n type TuiInputNumberOptions,\n} from '../input-number.options';\nimport {TuiNumberMask} from '../number-mask.directive';\n\nconst INITIAL_DELAY = 300;\nconst DELAY_DECREMENT = 15;\nconst MIN_DELAY = 100;\n\n@Component({\n selector: 'input[tuiInputNumber][step]',\n imports: [TuiButton, TuiTextfieldContent],\n templateUrl: './input-number-step.template.html',\n styleUrl: './input-number-step.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAppearanceProxy],\n host: {\n ngSkipHydration: 'true',\n '(keydown.arrowDown.prevent)': 'onStep(-step())',\n '(keydown.arrowUp.prevent)': 'onStep(step())',\n '[class._with-buttons]': 'step()',\n },\n})\nexport class TuiInputNumberStep {\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly stop$ = merge(\n fromEvent(this.doc, 'pointerup'),\n fromEvent(this.doc, 'pointerleave'),\n fromEvent(this.doc, 'pointercancel'),\n );\n\n protected readonly appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;\n protected readonly options = inject<TuiInputNumberOptions>(TUI_INPUT_NUMBER_OPTIONS);\n protected readonly mask = inject(TuiNumberMask, {self: true});\n protected readonly input = inject(TuiInputNumberDirective, {self: true});\n protected readonly step$ = new Subject<bigint | number>();\n\n protected readonly stepping = this.step$\n .pipe(\n switchMap((value) =>\n timer(INITIAL_DELAY).pipe(\n expand((_, index) => timer(getDelay(index))),\n map(() => value),\n takeUntil(this.stop$),\n ),\n ),\n takeUntilDestroyed(),\n )\n .subscribe((value) => this.onStep(value));\n\n public readonly step = input(this.options.step);\n\n protected onStep(step: bigint | number): void {\n const value = this.input.parsed() || 0;\n\n this.input.setValue(\n tuiClamp<bigint | number>(\n /**\n * Without explicit conversion it throws\n * TS2365: Operator + cannot be applied to types `number | bigint` and `number | bigint`\n */\n typeof value === 'bigint' ? value + BigInt(step) : value + Number(step),\n this.mask.min(),\n this.mask.max(),\n ),\n );\n this.el.setSelectionRange(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\n }\n}\n\nfunction getDelay(index: number): number {\n return Math.max(INITIAL_DELAY - index * DELAY_DECREMENT, MIN_DELAY);\n}\n","<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","import {Directive, inject} from '@angular/core';\nimport {maskitoParseNumber} from '@maskito/kit';\nimport {TUI_IDENTITY_VALUE_TRANSFORMER, TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nimport {TUI_INPUT_NUMBER_OPTIONS} from '../input-number.options';\nimport {TuiNumberMask} from '../number-mask.directive';\nimport {TuiBigIntQuantumValueTransformer} from '../quantum.directive';\n\n@Directive({\n selector: '[tuiInputNumber][bigint]',\n providers: [tuiProvide(TuiValueTransformer, TuiBigIntValueTransformer)],\n})\nexport class TuiBigIntValueTransformer extends TuiValueTransformer<\n string,\n bigint | null\n> {\n private readonly quantumTransformer: TuiValueTransformer<\n bigint | null,\n bigint | null\n > =\n inject(TuiBigIntQuantumValueTransformer, {optional: true}) ??\n TUI_IDENTITY_VALUE_TRANSFORMER;\n\n private readonly optionsTransformer: TuiValueTransformer<bigint | null, any> =\n inject(TUI_INPUT_NUMBER_OPTIONS).valueTransformer ??\n TUI_IDENTITY_VALUE_TRANSFORMER;\n\n private readonly mask = inject(TuiNumberMask);\n\n public toControlValue(textfieldValue: string | null): bigint | null {\n return this.optionsTransformer.toControlValue(\n this.quantumTransformer.toControlValue(\n maskitoParseNumber(textfieldValue ?? '', {\n ...this.mask.params(),\n bigint: true,\n }),\n ),\n );\n }\n\n public fromControlValue(controlValue: bigint | null): string {\n return this.mask.stringify(\n this.optionsTransformer.fromControlValue(controlValue),\n );\n }\n}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiInputNumberDirective} from './input-number.directive';\nimport {TuiNumberMask} from './number-mask.directive';\nimport {\n TuiBigIntQuantumValueTransformer,\n TuiQuantumValueTransformer,\n} from './quantum.directive';\nimport {TuiInputNumberStep} from './step/input-number-step.component';\nimport {TuiBigIntValueTransformer} from './transformers/bigint.value-transformer';\n\nexport const TuiInputNumber = [\n TuiInputNumberDirective,\n TuiNumberMask,\n TuiInputNumberStep,\n TuiBigIntValueTransformer,\n TuiQuantumValueTransformer,\n TuiBigIntQuantumValueTransformer,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.TuiWithNumberMask","i3.TuiNumberValueTransformer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBa,MAAA,gCAAgC,GAA0B;IACnE,GAAG,EAAE,MAAM,CAAC,gBAAgB;IAC5B,GAAG,EAAE,MAAM,CAAC,gBAAgB;AAC5B,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,SAAS,EAAE,UAAU;AACrB,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE;AACH,QAAA,QAAQ,EAAE,WAAW;AACrB,QAAA,QAAQ,EAAE,YAAY;AACzB,KAAA;AACD,IAAA,gBAAgB,EAAE,IAAI;;AAGnB,MAAM,CAAC,wBAAwB,EAAE,6BAA6B,CAAC,GAAG,gBAAgB,CACrF,gCAAgC;;MChBvB,aAAa,CAAA;AAD1B,IAAA,WAAA,GAA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,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,SAAA,EAFvB,CAAC,UAAU,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAE9D,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,SAAS,EAAE,CAAC,UAAU,CAAC,mBAAmB,4BAA4B,CAAC;AAC1E,iBAAA;;;ACIY,MAAA,cAAc,GAAG;IAC1B,uBAAuB;IACvB,aAAa;IACb,kBAAkB;IAClB,yBAAyB;IACzB,0BAA0B;IAC1B,gCAAgC;IAChC,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;;;AC1BtB;;AAEG;;;;"}
@@ -1,39 +1,45 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import * as i6 from '@taiga-ui/core/components/textfield';
3
+ import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
4
+ import * as i7 from '@taiga-ui/core/portals/dropdown';
5
+ import { TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
6
+ import { NgTemplateOutlet } from '@angular/common';
1
7
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, signal, computed, untracked, ElementRef, TemplateRef, forwardRef, ViewChild, Input, Output, ViewChildren, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { toSignal, toObservable } from '@angular/core/rxjs-interop';
4
- import * as i3 from '@angular/forms';
8
+ import { viewChildren, ElementRef, inject, effect, signal, computed, input, model, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
9
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
+ import * as i4 from '@angular/forms';
5
11
  import { FormsModule } from '@angular/forms';
12
+ import * as i1 from '@maskito/angular';
6
13
  import { MaskitoDirective } from '@maskito/angular';
7
- import { maskitoTransform, maskitoInitialCalibrationPlugin } from '@maskito/core';
8
- import { maskitoRemoveOnBlurPlugin } from '@maskito/kit';
9
- import { maskitoGetCountryFromNumber, maskitoPhoneOptionsGenerator } from '@maskito/phone';
14
+ import { maskitoTransform, MASKITO_DEFAULT_OPTIONS, maskitoInitialCalibrationPlugin } from '@maskito/core';
15
+ import { maskitoPhoneOptionsGenerator, maskitoGetCountryFromNumber } from '@maskito/phone';
10
16
  import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
11
17
  import { TUI_DEFAULT_MATCHER, CHAR_PLUS } from '@taiga-ui/cdk/constants';
18
+ import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
12
19
  import { TuiAutoFocus, tuiAutoFocusOptionsProvider } from '@taiga-ui/cdk/directives/auto-focus';
13
20
  import { TUI_IS_IOS, tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
14
- import { tuiIsInputEvent } from '@taiga-ui/cdk/utils/dom';
15
- import { tuiProvideOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
16
- import * as i4 from '@taiga-ui/core/components/data-list';
21
+ import { tuiInjectElement, tuiValue, tuiIsInputEvent } from '@taiga-ui/cdk/utils/dom';
22
+ import { TuiButton } from '@taiga-ui/core/components/button';
23
+ import * as i5 from '@taiga-ui/core/components/data-list';
17
24
  import { TuiOption, TuiDataList } from '@taiga-ui/core/components/data-list';
18
- import * as i6 from '@taiga-ui/core/components/textfield';
19
- import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldDropdownDirective, tuiTextfieldOptionsProvider, TuiTextfield } from '@taiga-ui/core/components/textfield';
20
- import * as i2 from '@taiga-ui/core/directives/dropdown';
21
- import { tuiDropdown, tuiDropdownOpen, TuiDropdownOpen, tuiDropdownOptionsProvider, TuiDropdownDirective, TuiWithDropdownOpen } from '@taiga-ui/core/directives/dropdown';
22
- import * as i1 from '@taiga-ui/core/directives/group';
23
- import { TuiGroup } from '@taiga-ui/core/directives/group';
24
- import { TuiFlagPipe } from '@taiga-ui/core/pipes/flag';
25
+ import * as i2 from '@taiga-ui/core/components/input';
26
+ import { TuiWithInput, TuiInput } from '@taiga-ui/core/components/input';
27
+ import { TuiTitle } from '@taiga-ui/core/components/title';
25
28
  import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
26
- import { tuiIsEditingKey } from '@taiga-ui/core/utils/miscellaneous';
27
- import { TuiChevron } from '@taiga-ui/kit/directives';
28
- import { TUI_COUNTRIES, TUI_INTERNATIONAL_SEARCH } from '@taiga-ui/kit/tokens';
29
- import { tuiGetCallingCode } from '@taiga-ui/kit/utils';
29
+ import * as i3 from '@taiga-ui/kit/directives/appearance-proxy';
30
+ import { TuiAppearanceProxy } from '@taiga-ui/kit/directives/appearance-proxy';
31
+ import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
32
+ import { TuiFlagPipe } from '@taiga-ui/kit/pipes/flag';
33
+ import { TUI_INTERNATIONAL_SEARCH, TUI_COUNTRIES } from '@taiga-ui/kit/tokens';
34
+ import { tuiMaskito } from '@taiga-ui/kit/utils';
30
35
  import { validatePhoneNumberLength } from 'libphonenumber-js';
31
36
  import { getCountryCallingCode } from 'libphonenumber-js/core';
32
- import { of, from, skip } from 'rxjs';
33
- import * as i5 from '@taiga-ui/core/components/label';
37
+ import { of, from, filter } from 'rxjs';
38
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
34
39
 
35
40
  const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS = {
36
41
  countries: [],
42
+ countrySearch: false,
37
43
  countryIsoCode: 'RU',
38
44
  metadata: of({ countries: {}, country_calling_codes: {} }),
39
45
  separator: '-',
@@ -41,188 +47,149 @@ const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS = {
41
47
  /**
42
48
  * Default parameters for input phone international component
43
49
  */
44
- const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS' : '', {
45
- factory: () => TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,
46
- });
47
- function tuiInputPhoneInternationalOptionsProvider(options) {
48
- return tuiProvideOptions(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, options, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS);
49
- }
50
+ const [TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, tuiInputPhoneInternationalOptionsProvider,] = tuiCreateOptions(TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS);
50
51
 
51
52
  const NOT_FORM_CONTROL_SYMBOLS = /[^+\d]/g;
52
- /** @deprecated use version from experimental package instead */
53
- class TuiInputPhoneInternational extends TuiControl {
53
+ class TuiInputPhoneInternationalComponent extends TuiControl {
54
54
  constructor() {
55
55
  super(...arguments);
56
- this.isIos = inject(TUI_IS_IOS);
57
- this.dropdown = tuiDropdown(null);
56
+ this.list = viewChildren(TuiOption, { read: ElementRef });
57
+ this.el = tuiInjectElement();
58
+ this.ios = inject(TUI_IS_IOS);
59
+ this.icons = inject(TUI_COMMON_ICONS);
58
60
  this.options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);
59
- this.size = inject(TUI_TEXTFIELD_OPTIONS).size;
60
- this.open = tuiDropdownOpen();
61
- this.names = toSignal(inject(TUI_COUNTRIES));
61
+ this.label = inject(TUI_INTERNATIONAL_SEARCH);
62
62
  this.metadata = toSignal(from(this.options.metadata));
63
- this.countries = signal(this.options.countries);
64
- this.countryIsoCode = signal(this.options.countryIsoCode);
65
- this.icons = inject(TUI_COMMON_ICONS);
66
- this.label = toSignal(inject(TUI_INTERNATIONAL_SEARCH));
63
+ this.names = inject(TUI_COUNTRIES);
64
+ this.open = inject(TuiDropdownOpen).open;
65
+ this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
66
+ this.change = effect(() => this.onChange(this.unmask(this.masked())));
67
67
  this.search = signal('');
68
- this.separator = signal(this.options.separator);
68
+ this.size = inject(TUI_TEXTFIELD_OPTIONS).size;
69
+ this.masked = tuiValue(this.el);
70
+ this.mask = tuiMaskito(computed(() => this.computeMask(this.countryIsoCode(), this.metadata())));
69
71
  this.filtered = computed(() => this.countries()
70
72
  .map((iso) => ({
71
73
  iso,
72
74
  name: this.names()?.[iso] || '',
73
- code: tuiGetCallingCode(iso, this.metadata()),
75
+ code: getCallingCode(iso, this.metadata()),
74
76
  }))
75
77
  .filter(({ name, code }) => TUI_DEFAULT_MATCHER(name + code, this.search())));
76
- this.mask = computed(() => this.computeMask(this.countryIsoCode(), this.metadata(), this.separator()));
77
- this.$ = tuiDirectiveBinding(TuiDropdownOpen, 'tuiDropdownEnabled', this.interactive);
78
- this.textfieldValue = '';
79
- this.countrySearch = false;
80
- this.countryIsoCodeChange = toObservable(this.countryIsoCode).pipe(skip(1));
81
- }
82
- set countriesValue(value) {
83
- this.countries.set(value);
84
- }
85
- set isoCode(code) {
86
- this.countryIsoCode.set(code);
78
+ this.$ = inject(TuiActiveZone)
79
+ .tuiActiveZoneChange.pipe(filter(() => !this.readOnly()), takeUntilDestroyed())
80
+ .subscribe((active) => {
81
+ const prefix = `${getCallingCode(this.countryIsoCode(), this.metadata())} `;
82
+ this.search.set('');
83
+ this.masked.update((value) => {
84
+ const fallback = active ? value || prefix : value;
85
+ return value === prefix ? '' : fallback;
86
+ });
87
+ });
88
+ this.countrySearch = input(this.options.countrySearch);
89
+ this.countryIsoCode = model(this.options.countryIsoCode);
90
+ this.countries = input(this.options.countries);
87
91
  }
88
- focusFirstItem() {
89
- this.listOptions?.get(0)?.nativeElement.focus();
92
+ writeValue(unmasked) {
93
+ const code = this.getCountryCode(unmasked ?? '');
94
+ if (code) {
95
+ this.countryIsoCode.set(code);
96
+ }
97
+ super.writeValue(unmasked);
98
+ this.masked.set(maskitoTransform(this.value() ?? '', this.mask() || MASKITO_DEFAULT_OPTIONS));
90
99
  }
91
100
  onPaste(event) {
92
- const phonesMetadata = this.metadata();
93
- if (!tuiIsInputEvent(event) ||
94
- !phonesMetadata ||
101
+ const data = tuiIsInputEvent(event) && event.data;
102
+ if (!data ||
95
103
  (!event.inputType.includes('Drop') && !event.inputType.includes('Paste'))) {
96
104
  return;
97
105
  }
98
- const newValue = event.data || '';
99
- const prefixedValue = newValue.startsWith(CHAR_PLUS)
100
- ? newValue
101
- : CHAR_PLUS + newValue;
102
- if (validatePhoneNumberLength(prefixedValue) === 'TOO_SHORT') {
103
- return;
104
- }
105
- const countryIsoCode = maskitoGetCountryFromNumber(prefixedValue, phonesMetadata);
106
- if (countryIsoCode) {
107
- this.countryIsoCode.set(countryIsoCode);
106
+ const code = this.getCountryCode(data);
107
+ if (code) {
108
+ this.countryIsoCode.set(code);
108
109
  }
109
110
  }
110
- onItemClick(isoCode) {
111
+ onItemClick(code) {
112
+ this.el.focus();
111
113
  this.open.set(false);
112
- this.countryIsoCode.set(isoCode);
113
- this.input?.nativeElement.focus();
114
- }
115
- writeValue(unmaskedValue) {
116
- super.writeValue(unmaskedValue);
117
- const mask = untracked(() => this.mask());
118
- const value = untracked(() => this.value());
119
- this.textfieldValue = mask
120
- ? maskitoTransform(value, mask)
121
- : // it will be calibrated later when mask is ready (by maskitoInitialCalibrationPlugin)
122
- value;
123
- this.cdr.detectChanges();
124
- }
125
- set template(template) {
126
- this.dropdown.set(template);
127
- }
128
- onFocus() {
129
- const phoneMetadata = this.metadata();
130
- if (!this.textfieldValue && phoneMetadata) {
131
- this.textfieldValue = `${CHAR_PLUS + getCountryCallingCode(this.countryIsoCode(), phoneMetadata)} `;
132
- }
133
- }
134
- onValueChange(maskedValue) {
135
- const unmaskedValue = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');
136
- const phonesMetadata = this.metadata();
137
- const countryCallingCode = phonesMetadata
138
- ? CHAR_PLUS + getCountryCallingCode(this.countryIsoCode(), phonesMetadata)
139
- : '';
140
- this.onChange(unmaskedValue === countryCallingCode ? '' : unmaskedValue);
141
- }
142
- onKeyDown({ key }) {
143
- if (tuiIsEditingKey(key)) {
144
- this.filter?.nativeElement.focus({ preventScroll: true });
145
- }
114
+ this.countryIsoCode.set(code);
115
+ this.search.set('');
116
+ this.masked.set(maskitoTransform(this.value() || getCallingCode(code, this.metadata()), this.mask() || MASKITO_DEFAULT_OPTIONS));
146
117
  }
147
- computeMask(countryIsoCode, metadata, separator) {
118
+ computeMask(countryIsoCode, metadata) {
148
119
  if (!metadata) {
149
- return null;
120
+ return MASKITO_DEFAULT_OPTIONS;
150
121
  }
151
- const { plugins, ...restOptions } = maskitoPhoneOptionsGenerator({
122
+ const { plugins, ...options } = maskitoPhoneOptionsGenerator({
152
123
  countryIsoCode,
153
124
  metadata,
154
- separator,
125
+ separator: this.options.separator,
155
126
  });
156
127
  return {
157
- ...restOptions,
158
- plugins: [
159
- ...plugins,
160
- maskitoRemoveOnBlurPlugin(`${CHAR_PLUS}${getCountryCallingCode(countryIsoCode, metadata)} `),
161
- maskitoInitialCalibrationPlugin(),
162
- ],
128
+ ...options,
129
+ plugins: [...plugins, maskitoInitialCalibrationPlugin()],
163
130
  };
164
131
  }
165
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhoneInternational, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
166
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputPhoneInternational, isStandalone: true, selector: "tui-input-phone-international", inputs: { countrySearch: "countrySearch", countriesValue: ["countries", "countriesValue"], isoCode: ["countryIsoCode", "isoCode"] }, outputs: { countryIsoCodeChange: "countryIsoCodeChange" }, host: { properties: { "attr.data-size": "size()" } }, providers: [
167
- tuiAsControl(TuiInputPhoneInternational),
132
+ unmask(maskedValue) {
133
+ const value = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');
134
+ const code = getCallingCode(this.countryIsoCode(), this.metadata());
135
+ return value === code ? '' : value;
136
+ }
137
+ getCountryCode(value) {
138
+ const metadata = this.metadata();
139
+ const phone = value.startsWith(CHAR_PLUS) ? value : CHAR_PLUS + value;
140
+ return metadata && validatePhoneNumberLength(phone) !== 'TOO_SHORT'
141
+ ? (maskitoGetCountryFromNumber(phone, metadata) ?? null)
142
+ : null;
143
+ }
144
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneInternationalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
145
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputPhoneInternationalComponent, isStandalone: true, selector: "input[tuiInputPhoneInternational]", inputs: { countrySearch: { classPropertyName: "countrySearch", publicName: "countrySearch", isSignal: true, isRequired: false, transformFunction: null }, countryIsoCode: { classPropertyName: "countryIsoCode", publicName: "countryIsoCode", isSignal: true, isRequired: false, transformFunction: null }, countries: { classPropertyName: "countries", publicName: "countries", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { countryIsoCode: "countryIsoCodeChange" }, host: { attributes: { "type": "tel", "ngSkipHydration": "true" }, listeners: { "input": "masked.set($event.target.value)", "click": "open.set(false)", "beforeinput.capture": "onPaste($event)" }, properties: { "attr.inputmode": "!ios && open() ? \"none\" : null", "disabled": "disabled()" } }, providers: [
146
+ tuiAsControl(TuiInputPhoneInternationalComponent),
168
147
  tuiFallbackValueProvider(''),
169
148
  tuiAutoFocusOptionsProvider({ preventScroll: true }),
170
- tuiTextfieldOptionsProvider({ cleaner: signal(false) }),
171
- tuiDropdownOptionsProvider({
172
- limitWidth: 'fixed',
173
- align: 'right',
174
- }),
175
- ], viewQueries: [{ propertyName: "input", first: true, predicate: MaskitoDirective, descendants: true, read: ElementRef }, { propertyName: "filter", first: true, predicate: TuiAutoFocus, descendants: true, read: ElementRef }, { propertyName: "template", first: true, predicate: i0.forwardRef(() => TuiTextfieldDropdownDirective), descendants: true, read: TemplateRef }, { propertyName: "listOptions", predicate: TuiOption, descendants: true, read: ElementRef }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiGroup }, { directive: i2.TuiDropdownDirective }, { directive: i2.TuiWithDropdownOpen }], ngImport: i0, template: "<tui-textfield\n class=\"t-select\"\n [content]=\"flag\"\n [tuiChevron]=\"open()\"\n>\n <select\n aria-label=\"Country\"\n ngModel=\"\"\n tuiTextfield\n [attr.data-mode]=\"mode()\"\n [disabled]=\"disabled()\"\n [focused]=\"open()\"\n [ngModelOptions]=\"{standalone: true}\"\n ></select>\n\n <ng-template #flag>\n <img\n class=\"t-flag\"\n [alt]=\"names()?.[countryIsoCode()]\"\n [src]=\"countryIsoCode() | tuiFlag\"\n />\n </ng-template>\n</tui-textfield>\n\n<tui-textfield>\n <!--TODO: Replace attribute bindings with inputs after Angular updated and signal bindings properly update-->\n <input\n autocomplete=\"new-password\"\n tuiTextfield\n [attr.data-mode]=\"mode()\"\n [attr.readonly]=\"readOnly() || null\"\n [disabled]=\"disabled()\"\n [maskito]=\"mask()\"\n [ngModelOptions]=\"{standalone: true}\"\n [(ngModel)]=\"textfieldValue\"\n (beforeinput.capture)=\"onPaste($event)\"\n (blur)=\"onTouched()\"\n (focus)=\"!readOnly() && onFocus()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n <!--\n TODO: get rid of built-in input and label and just externalize everything in 5.0\n <tui-input-phone-international>\n <label tuiLabel>My label</label>\n <input tuiTextfield placeholder=\"My placeholder\" [(ngModel)]=\"value\" />\n <tui-icon icon=\"@tui.phone\" />\n </tui-input-phone-international>\n -->\n <ng-content select=\"tui-icon, img\" />\n\n <label tuiLabel>\n <ng-content />\n </label>\n</tui-textfield>\n\n<ng-container *tuiTextfieldDropdown>\n @if (countrySearch) {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-search\"\n [iconStart]=\"icons.search\"\n >\n <input\n tuiTextfield\n [focused]=\"true\"\n [ngModel]=\"search()\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!isIos\"\n (keydown.arrowDown)=\"focusFirstItem()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n }\n\n <tui-data-list (keydown)=\"onKeyDown($event)\">\n @for (item of filtered(); track item) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span class=\"t-name\">{{ item.name }}</span>\n <span class=\"t-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: [".t-select{inline-size:5.625rem;flex:none}.t-select[data-size=m]{inline-size:5rem}.t-select[data-size=s]{inline-size:4rem}.t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-name{margin:0 auto 0 .75rem}.t-code{color:var(--tui-text-secondary);margin-inline-end:.25rem}.t-search{position:sticky;top:.375rem;background:var(--tui-background-elevation-3);box-shadow:0 -1rem var(--tui-background-elevation-3);margin:.375rem .375rem 0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i4.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "directive", type: i5.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i6.TuiSelect, selector: "select[tuiTextfield]", inputs: ["placeholder"] }, { kind: "component", type: i6.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i6.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i6.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
149
+ ], viewQueries: [{ propertyName: "list", predicate: TuiOption, descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithInput }, { directive: i3.TuiAppearanceProxy }], ngImport: i0, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()[countryIsoCode()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"countryIsoCode() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-template #filter>\n <div class=\"t-ipi-search\">\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiInput\n type=\"text\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!ios\"\n (keydown.arrowDown)=\"list()[0]?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n</ng-template>\n<ng-container *tuiDropdown>\n <!-- To keep it under local injector -->\n @if (countrySearch()) {\n <ng-container *ngTemplateOutlet=\"filter\" />\n }\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track $index) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: ["[tuiInputPhoneInternational][tuiInputPhoneInternational]{left:var(--t-offset);border-top-left-radius:0;border-bottom-left-radius:0;inline-size:calc(100% - var(--t-offset))}[tuiInputPhoneInternational][tuiInputPhoneInternational]+label{padding-inline-start:var(--t-offset)}tui-textfield[data-size=s]{--t-offset: 4.125rem}tui-textfield[data-size=s] .t-ipi-flag{margin:0 .1875rem}tui-textfield[data-size=m]{--t-offset: 4.875rem}tui-textfield[data-size=m] .t-ipi-flag{margin:0 -.1875rem}tui-textfield[data-size=l]{--t-offset: 5.25rem}tui-textfield[data-size=l] .t-ipi-flag{margin:0 -.1875rem}tui-textfield .t-ipi-select{position:absolute;left:0;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}tui-textfield .t-ipi-select_readonly{pointer-events:none}.t-ipi-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-ipi-flag_small{inline-size:1.25rem;block-size:1.25rem}.t-ipi-code{color:var(--tui-text-secondary)}.t-ipi-search{position:sticky;top:0;z-index:1;background:var(--tui-background-elevation-3);padding:.375rem .375rem 0}@supports (-webkit-touch-callout: none){.t-ipi-search input:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}tui-dropdown-mobile .t-ipi-search,tui-sheet-dialog .t-ipi-search{background:var(--tui-background-elevation-1)}tui-dropdown-mobile .t-ipi-options:not(:first-child),tui-sheet-dialog .t-ipi-options:not(:first-child){min-block-size:calc(100 * var(--tui-viewport-vh) - 8.75rem)}tui-sheet-dialog .t-ipi-search{top:4.5rem;padding-inline-start:0;padding-inline-end:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i5.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i5.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "component", type: i6.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i6.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i7.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i2.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
176
150
  }
177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhoneInternational, decorators: [{
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneInternationalComponent, decorators: [{
178
152
  type: Component,
179
- args: [{ selector: 'tui-input-phone-international', imports: [
153
+ args: [{ selector: 'input[tuiInputPhoneInternational]', imports: [
180
154
  FormsModule,
181
- MaskitoDirective,
155
+ NgTemplateOutlet,
182
156
  TuiAutoFocus,
157
+ TuiButton,
183
158
  TuiChevron,
184
159
  TuiDataList,
185
160
  TuiFlagPipe,
186
- TuiTextfield,
187
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
188
- tuiAsControl(TuiInputPhoneInternational),
161
+ TuiInput,
162
+ TuiTextfieldContent,
163
+ TuiTitle,
164
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
165
+ tuiAsControl(TuiInputPhoneInternationalComponent),
189
166
  tuiFallbackValueProvider(''),
190
167
  tuiAutoFocusOptionsProvider({ preventScroll: true }),
191
- tuiTextfieldOptionsProvider({ cleaner: signal(false) }),
192
- tuiDropdownOptionsProvider({
193
- limitWidth: 'fixed',
194
- align: 'right',
195
- }),
196
- ], hostDirectives: [TuiGroup, TuiDropdownDirective, TuiWithDropdownOpen], host: {
197
- '[attr.data-size]': 'size()',
198
- }, template: "<tui-textfield\n class=\"t-select\"\n [content]=\"flag\"\n [tuiChevron]=\"open()\"\n>\n <select\n aria-label=\"Country\"\n ngModel=\"\"\n tuiTextfield\n [attr.data-mode]=\"mode()\"\n [disabled]=\"disabled()\"\n [focused]=\"open()\"\n [ngModelOptions]=\"{standalone: true}\"\n ></select>\n\n <ng-template #flag>\n <img\n class=\"t-flag\"\n [alt]=\"names()?.[countryIsoCode()]\"\n [src]=\"countryIsoCode() | tuiFlag\"\n />\n </ng-template>\n</tui-textfield>\n\n<tui-textfield>\n <!--TODO: Replace attribute bindings with inputs after Angular updated and signal bindings properly update-->\n <input\n autocomplete=\"new-password\"\n tuiTextfield\n [attr.data-mode]=\"mode()\"\n [attr.readonly]=\"readOnly() || null\"\n [disabled]=\"disabled()\"\n [maskito]=\"mask()\"\n [ngModelOptions]=\"{standalone: true}\"\n [(ngModel)]=\"textfieldValue\"\n (beforeinput.capture)=\"onPaste($event)\"\n (blur)=\"onTouched()\"\n (focus)=\"!readOnly() && onFocus()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n <!--\n TODO: get rid of built-in input and label and just externalize everything in 5.0\n <tui-input-phone-international>\n <label tuiLabel>My label</label>\n <input tuiTextfield placeholder=\"My placeholder\" [(ngModel)]=\"value\" />\n <tui-icon icon=\"@tui.phone\" />\n </tui-input-phone-international>\n -->\n <ng-content select=\"tui-icon, img\" />\n\n <label tuiLabel>\n <ng-content />\n </label>\n</tui-textfield>\n\n<ng-container *tuiTextfieldDropdown>\n @if (countrySearch) {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-search\"\n [iconStart]=\"icons.search\"\n >\n <input\n tuiTextfield\n [focused]=\"true\"\n [ngModel]=\"search()\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!isIos\"\n (keydown.arrowDown)=\"focusFirstItem()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n }\n\n <tui-data-list (keydown)=\"onKeyDown($event)\">\n @for (item of filtered(); track item) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span class=\"t-name\">{{ item.name }}</span>\n <span class=\"t-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: [".t-select{inline-size:5.625rem;flex:none}.t-select[data-size=m]{inline-size:5rem}.t-select[data-size=s]{inline-size:4rem}.t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-name{margin:0 auto 0 .75rem}.t-code{color:var(--tui-text-secondary);margin-inline-end:.25rem}.t-search{position:sticky;top:.375rem;background:var(--tui-background-elevation-3);box-shadow:0 -1rem var(--tui-background-elevation-3);margin:.375rem .375rem 0}\n"] }]
199
- }], propDecorators: { input: [{
200
- type: ViewChild,
201
- args: [MaskitoDirective, { read: ElementRef }]
202
- }], filter: [{
203
- type: ViewChild,
204
- args: [TuiAutoFocus, { read: ElementRef }]
205
- }], listOptions: [{
206
- type: ViewChildren,
207
- args: [TuiOption, { read: ElementRef }]
208
- }], countrySearch: [{
209
- type: Input
210
- }], countryIsoCodeChange: [{
211
- type: Output
212
- }], countriesValue: [{
213
- type: Input,
214
- args: ['countries']
215
- }], isoCode: [{
216
- type: Input,
217
- args: ['countryIsoCode']
218
- }], template: [{
219
- type: ViewChild,
220
- args: [forwardRef(() => TuiTextfieldDropdownDirective), { read: TemplateRef }]
221
- }] } });
168
+ ], hostDirectives: [MaskitoDirective, TuiWithInput, TuiAppearanceProxy], host: {
169
+ type: 'tel',
170
+ ngSkipHydration: 'true',
171
+ '[attr.inputmode]': '!ios && open() ? "none" : null',
172
+ '[disabled]': 'disabled()',
173
+ '(input)': 'masked.set($event.target.value)',
174
+ '(click)': 'open.set(false)',
175
+ '(beforeinput.capture)': 'onPaste($event)',
176
+ }, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()[countryIsoCode()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"countryIsoCode() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-template #filter>\n <div class=\"t-ipi-search\">\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiInput\n type=\"text\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!ios\"\n (keydown.arrowDown)=\"list()[0]?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n</ng-template>\n<ng-container *tuiDropdown>\n <!-- To keep it under local injector -->\n @if (countrySearch()) {\n <ng-container *ngTemplateOutlet=\"filter\" />\n }\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track $index) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: ["[tuiInputPhoneInternational][tuiInputPhoneInternational]{left:var(--t-offset);border-top-left-radius:0;border-bottom-left-radius:0;inline-size:calc(100% - var(--t-offset))}[tuiInputPhoneInternational][tuiInputPhoneInternational]+label{padding-inline-start:var(--t-offset)}tui-textfield[data-size=s]{--t-offset: 4.125rem}tui-textfield[data-size=s] .t-ipi-flag{margin:0 .1875rem}tui-textfield[data-size=m]{--t-offset: 4.875rem}tui-textfield[data-size=m] .t-ipi-flag{margin:0 -.1875rem}tui-textfield[data-size=l]{--t-offset: 5.25rem}tui-textfield[data-size=l] .t-ipi-flag{margin:0 -.1875rem}tui-textfield .t-ipi-select{position:absolute;left:0;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}tui-textfield .t-ipi-select_readonly{pointer-events:none}.t-ipi-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-ipi-flag_small{inline-size:1.25rem;block-size:1.25rem}.t-ipi-code{color:var(--tui-text-secondary)}.t-ipi-search{position:sticky;top:0;z-index:1;background:var(--tui-background-elevation-3);padding:.375rem .375rem 0}@supports (-webkit-touch-callout: none){.t-ipi-search input:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}tui-dropdown-mobile .t-ipi-search,tui-sheet-dialog .t-ipi-search{background:var(--tui-background-elevation-1)}tui-dropdown-mobile .t-ipi-options:not(:first-child),tui-sheet-dialog .t-ipi-options:not(:first-child){min-block-size:calc(100 * var(--tui-viewport-vh) - 8.75rem)}tui-sheet-dialog .t-ipi-search{top:4.5rem;padding-inline-start:0;padding-inline-end:0}\n"] }]
177
+ }] });
178
+ function getCallingCode(iso, metadata) {
179
+ return metadata ? CHAR_PLUS + getCountryCallingCode(iso, metadata) : '';
180
+ }
181
+
182
+ const TuiInputPhoneInternational = [
183
+ TuiInputPhoneInternationalComponent,
184
+ TuiLabel,
185
+ TuiTextfieldComponent,
186
+ TuiTextfieldOptionsDirective,
187
+ TuiDropdownContent,
188
+ ];
222
189
 
223
190
  /**
224
191
  * Generated bundle index. Do not edit.
225
192
  */
226
193
 
227
- export { TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternational, tuiInputPhoneInternationalOptionsProvider };
194
+ export { TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternational, TuiInputPhoneInternationalComponent, tuiInputPhoneInternationalOptionsProvider };
228
195
  //# sourceMappingURL=taiga-ui-kit-components-input-phone-international.mjs.map