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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/README.md +1 -1
  2. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  3. package/components/avatar/avatar-stack.component.d.ts +2 -2
  4. package/components/badge/badge.options.d.ts +1 -3
  5. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  6. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  7. package/components/badged-content/badged-content.directive.d.ts +2 -3
  8. package/components/block/block.options.d.ts +1 -3
  9. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  10. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  11. package/components/button-loading/button-loading.component.d.ts +5 -5
  12. package/components/calendar-month/calendar-month.component.d.ts +5 -5
  13. package/components/calendar-range/calendar-range.component.d.ts +1 -3
  14. package/components/calendar-range/day-range-period.d.ts +2 -1
  15. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  16. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  17. package/components/carousel/carousel.component.d.ts +15 -18
  18. package/components/carousel/carousel.directive.d.ts +5 -4
  19. package/components/chip/chip.options.d.ts +1 -3
  20. package/components/combo-box/combo-box.d.ts +5 -0
  21. package/components/combo-box/combo-box.directive.d.ts +7 -9
  22. package/components/combo-box/index.d.ts +1 -0
  23. package/components/compass/compass.component.d.ts +2 -2
  24. package/components/confirm/confirm.component.d.ts +4 -3
  25. package/components/confirm/confirm.service.d.ts +1 -1
  26. package/components/copy/copy.component.d.ts +3 -4
  27. package/components/copy/copy.directive.d.ts +2 -4
  28. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
  29. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  30. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  31. package/components/data-list-wrapper/index.d.ts +1 -1
  32. package/components/drawer/drawer.component.d.ts +3 -4
  33. package/components/files/file/file.component.d.ts +16 -29
  34. package/components/files/file/file.options.d.ts +1 -1
  35. package/components/files/files/files.component.d.ts +5 -8
  36. package/components/files/input-files/input-files.component.d.ts +2 -2
  37. package/components/files/input-files/input-files.content.d.ts +7 -8
  38. package/components/files/input-files/input-files.directive.d.ts +2 -2
  39. package/components/files/input-files/input-files.options.d.ts +1 -3
  40. package/components/filter/filter.component.d.ts +9 -12
  41. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  42. package/components/index.d.ts +0 -3
  43. package/components/input-chip/input-chip.component.d.ts +9 -8
  44. package/components/input-chip/input-chip.d.ts +5 -1
  45. package/components/input-chip/input-chip.directive.d.ts +7 -12
  46. package/components/input-color/index.d.ts +1 -0
  47. package/components/input-color/input-color.component.d.ts +9 -13
  48. package/components/input-color/input-color.d.ts +5 -0
  49. package/components/input-date/input-date.component.d.ts +2 -2
  50. package/components/input-date/input-date.d.ts +4 -1
  51. package/components/input-date/input-date.directive.d.ts +21 -22
  52. package/components/input-date/input-date.options.d.ts +3 -3
  53. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  54. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  55. package/components/input-date-range/input-date-range.d.ts +4 -1
  56. package/components/input-date-range/input-date-range.directive.d.ts +9 -10
  57. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  58. package/components/input-date-time/input-date-time.d.ts +4 -1
  59. package/components/input-date-time/input-date-time.directive.d.ts +14 -14
  60. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  61. package/components/input-inline/input-inline.component.d.ts +3 -2
  62. package/components/input-month/input-month.component.d.ts +3 -5
  63. package/components/input-month/input-month.d.ts +4 -1
  64. package/components/input-month/input-month.directive.d.ts +6 -5
  65. package/components/input-month-range/input-month-range.d.ts +4 -1
  66. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  67. package/components/input-number/index.d.ts +3 -0
  68. package/components/input-number/input-number.d.ts +7 -2
  69. package/components/input-number/input-number.directive.d.ts +11 -28
  70. package/components/input-number/input-number.options.d.ts +4 -7
  71. package/components/input-number/number-mask.directive.d.ts +42 -0
  72. package/components/input-number/quantum.directive.d.ts +10 -8
  73. package/components/input-number/step/input-number-step.component.d.ts +10 -9
  74. package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
  75. package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
  76. package/components/input-phone/index.d.ts +1 -0
  77. package/components/input-phone/input-phone.d.ts +5 -0
  78. package/components/input-phone/input-phone.directive.d.ts +12 -14
  79. package/components/input-phone-international/index.d.ts +1 -0
  80. package/components/input-phone-international/input-phone-international.component.d.ts +14 -16
  81. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  82. package/components/input-phone-international/input-phone-international.options.d.ts +2 -3
  83. package/components/input-pin/index.d.ts +1 -0
  84. package/components/input-pin/input-pin.component.d.ts +5 -6
  85. package/components/input-pin/input-pin.d.ts +5 -0
  86. package/components/input-range/index.d.ts +0 -1
  87. package/components/input-range/input-range.component.d.ts +23 -53
  88. package/components/input-slider/input-slider.d.ts +4 -1
  89. package/components/input-slider/input-slider.directive.d.ts +4 -3
  90. package/components/input-time/input-time.component.d.ts +1 -3
  91. package/components/input-time/input-time.d.ts +4 -1
  92. package/components/input-time/input-time.directive.d.ts +5 -5
  93. package/components/input-year/input-year.d.ts +4 -1
  94. package/components/input-year/input-year.directive.d.ts +8 -10
  95. package/components/input-year/input-year.options.d.ts +2 -2
  96. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  97. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  98. package/components/like/like.options.d.ts +1 -1
  99. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  100. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  101. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
  102. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  103. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  104. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  105. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  106. package/components/pager/pager.component.d.ts +12 -12
  107. package/components/pagination/index.d.ts +1 -0
  108. package/components/pagination/pagination.component.d.ts +24 -54
  109. package/components/pagination/pagination.options.d.ts +7 -0
  110. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  111. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  112. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  113. package/components/preview/index.d.ts +1 -0
  114. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  115. package/components/preview/preview.component.d.ts +6 -6
  116. package/components/preview/preview.d.ts +2 -1
  117. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  118. package/components/preview/zoom/preview-zoom.component.d.ts +11 -17
  119. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  120. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  121. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  122. package/components/progress/progress.options.d.ts +1 -3
  123. package/components/pulse/pulse.component.d.ts +2 -2
  124. package/components/push/push-alert.component.d.ts +2 -2
  125. package/components/push/push.component.d.ts +6 -7
  126. package/components/push/push.options.d.ts +4 -3
  127. package/components/push/push.service.d.ts +2 -2
  128. package/components/radio/radio.component.d.ts +1 -1
  129. package/components/radio-list/radio-list.component.d.ts +11 -9
  130. package/components/range/range.component.d.ts +3 -4
  131. package/components/rating/rating.component.d.ts +1 -1
  132. package/components/rating/rating.options.d.ts +1 -3
  133. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  134. package/components/segmented/segmented.component.d.ts +4 -6
  135. package/components/segmented/segmented.directive.d.ts +6 -7
  136. package/components/select/native-select/native-select.component.d.ts +7 -8
  137. package/components/select/select.d.ts +4 -1
  138. package/components/select/select.directive.d.ts +4 -3
  139. package/components/slider/helpers/slider-key-steps.directive.d.ts +10 -7
  140. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  141. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  142. package/components/slider/slider.component.d.ts +4 -7
  143. package/components/slider/slider.options.d.ts +1 -6
  144. package/components/stepper/step.component.d.ts +14 -9
  145. package/components/stepper/stepper.component.d.ts +5 -12
  146. package/components/switch/switch.component.d.ts +1 -0
  147. package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
  148. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  149. package/components/tabs/tabs-with-more.component.d.ts +12 -16
  150. package/components/tabs/tabs.directive.d.ts +5 -7
  151. package/components/tabs/tabs.options.d.ts +1 -6
  152. package/components/textarea/index.d.ts +2 -1
  153. package/components/textarea/textarea.component.d.ts +10 -11
  154. package/components/textarea/textarea.d.ts +6 -0
  155. package/components/textarea/textarea.directive.d.ts +13 -0
  156. package/components/tiles/tile-handle.directive.d.ts +2 -1
  157. package/components/tiles/tile.component.d.ts +7 -10
  158. package/components/tiles/tile.service.d.ts +1 -1
  159. package/components/tiles/tiles.component.d.ts +4 -7
  160. package/components/toast/toast.component.d.ts +4 -4
  161. package/components/toast/toast.options.d.ts +4 -3
  162. package/components/toast/toast.service.d.ts +2 -2
  163. package/components/tree/components/tree/tree.component.d.ts +7 -7
  164. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  165. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +7 -0
  166. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  167. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  168. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  169. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  170. package/components/tree/misc/tree.constants.d.ts +0 -3
  171. package/components/tree/misc/tree.tokens.d.ts +1 -6
  172. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  173. package/directives/appearance-proxy/index.d.ts +1 -0
  174. package/directives/button-select/button-select.directive.d.ts +3 -2
  175. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  176. package/directives/fade/fade.directive.d.ts +5 -6
  177. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  178. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  179. package/directives/highlight/highlight.directive.d.ts +4 -4
  180. package/directives/index.d.ts +1 -2
  181. package/directives/password/password.directive.d.ts +1 -1
  182. package/directives/present/present.directive.d.ts +2 -4
  183. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  184. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  185. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  186. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -9
  187. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  189. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-avatar.mjs +35 -49
  191. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
  193. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
  195. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
  197. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-block.mjs +11 -15
  199. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +18 -37
  201. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  203. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +13 -35
  205. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +26 -35
  207. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-carousel.mjs +70 -123
  209. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
  211. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
  213. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -45
  215. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  217. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
  219. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-confirm.mjs +10 -12
  221. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -33
  223. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
  225. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-drawer.mjs +11 -32
  227. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-files.mjs +112 -240
  229. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -34
  231. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  233. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -77
  235. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-input-color.mjs +31 -32
  237. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +35 -51
  239. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +37 -37
  241. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +41 -57
  243. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  244. package/fesm2022/taiga-ui-kit-components-input-date.mjs +55 -68
  245. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  246. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -13
  247. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +26 -23
  249. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-input-month.mjs +39 -46
  251. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-input-number.mjs +266 -211
  253. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +64 -74
  255. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +38 -43
  257. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  258. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +24 -22
  259. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
  261. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +27 -17
  263. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-components-input-time.mjs +39 -41
  265. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-components-input-year.mjs +31 -37
  267. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -72
  269. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
  271. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +18 -23
  273. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -8
  275. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +38 -53
  277. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -26
  279. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-components-pager.mjs +30 -44
  281. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-components-pagination.mjs +75 -149
  283. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  285. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-components-preview.mjs +97 -157
  287. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  288. package/fesm2022/taiga-ui-kit-components-progress.mjs +81 -92
  289. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  291. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  292. package/fesm2022/taiga-ui-kit-components-push.mjs +27 -40
  293. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  294. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
  295. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  296. package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
  297. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  298. package/fesm2022/taiga-ui-kit-components-range.mjs +20 -33
  299. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  300. package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
  301. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  303. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  305. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-components-select.mjs +57 -45
  307. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  308. package/fesm2022/taiga-ui-kit-components-slider.mjs +56 -88
  309. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  311. package/fesm2022/taiga-ui-kit-components-stepper.mjs +61 -88
  312. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  314. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-components-tabs.mjs +90 -157
  316. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-components-textarea.mjs +60 -73
  318. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  319. package/fesm2022/taiga-ui-kit-components-tiles.mjs +54 -99
  320. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-components-toast.mjs +27 -28
  322. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-components-tree.mjs +90 -125
  324. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  326. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  328. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  329. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  330. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -12
  332. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
  334. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -8
  336. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  337. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  338. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  340. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  341. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  342. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  343. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
  344. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  345. package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -9
  346. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  347. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
  348. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  349. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  350. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  351. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  352. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  353. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +9 -9
  354. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  355. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -11
  356. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  357. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
  358. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  359. package/fesm2022/taiga-ui-kit-directives.mjs +1 -2
  360. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  361. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  362. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  363. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  364. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  365. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +22 -36
  366. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  367. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  368. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  369. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +23 -27
  370. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  371. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  372. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  373. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -9
  374. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  375. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  376. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  377. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  378. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  379. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  380. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  381. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -123
  382. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  383. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  384. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  385. package/package.json +75 -80
  386. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  387. package/pipes/auto-color/index.d.ts +1 -0
  388. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +5 -2
  389. package/pipes/flag/flag.pipe.d.ts +13 -0
  390. package/pipes/flag/index.d.ts +1 -0
  391. package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -0
  392. package/pipes/index.d.ts +3 -0
  393. package/pipes/initials/index.d.ts +1 -0
  394. package/pipes/initials/initials.pipe.d.ts +7 -0
  395. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  396. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  397. package/styles/components/avatar.less +14 -14
  398. package/styles/components/badge.less +3 -3
  399. package/styles/components/block.less +4 -4
  400. package/styles/components/chip.less +4 -4
  401. package/styles/components/comment.less +15 -17
  402. package/styles/components/message.less +1 -1
  403. package/styles/components/pin.less +3 -3
  404. package/styles/components/switch.less +3 -2
  405. package/styles/components/toast.less +1 -1
  406. package/tokens/i18n.d.ts +1 -0
  407. package/tokens/index.d.ts +0 -7
  408. package/utils/index.d.ts +0 -2
  409. package/utils/maskito.binding.d.ts +1 -1
  410. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  411. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  412. package/components/elastic-container/index.d.ts +0 -2
  413. package/components/floating-container/floating-container.directive.d.ts +0 -7
  414. package/components/floating-container/index.d.ts +0 -1
  415. package/components/input-range/input-range.d.ts +0 -3
  416. package/components/slides/index.d.ts +0 -1
  417. package/components/slides/slides.directive.d.ts +0 -11
  418. package/components/textarea/textarea-limit.directive.d.ts +0 -26
  419. package/directives/button-close/button-close.directive.d.ts +0 -5
  420. package/directives/button-close/index.d.ts +0 -1
  421. package/directives/lazy-loading/index.d.ts +0 -2
  422. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  423. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  424. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  425. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  426. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  427. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  428. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  429. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  430. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  431. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  432. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +0 -39
  433. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +0 -1
  434. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  435. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  436. package/tokens/calendar-date-stream.d.ts +0 -10
  437. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  438. package/tokens/input-date-options.d.ts +0 -15
  439. package/tokens/items-handlers.d.ts +0 -26
  440. package/tokens/mobile-calendar.d.ts +0 -6
  441. package/tokens/month-formatter.d.ts +0 -5
  442. package/utils/phone.d.ts +0 -3
  443. package/utils/toggle-day.d.ts +0 -2
@@ -1,13 +1,16 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import { TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
3
+ import { TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
1
4
  import * as i0 from '@angular/core';
2
- import { inject, computed, effect, untracked, signal, Input, Directive } from '@angular/core';
5
+ import { inject, computed, effect, untracked, input, Directive } from '@angular/core';
3
6
  import * as i2 from '@maskito/angular';
4
7
  import { MaskitoDirective } from '@maskito/angular';
5
8
  import { maskitoTransform, MASKITO_DEFAULT_OPTIONS } from '@maskito/core';
6
9
  import { maskitoCaretGuard, maskitoPrefixPostprocessorGenerator } from '@maskito/kit';
7
10
  import { TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
8
11
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
9
- import * as i1 from '@taiga-ui/core/components/textfield';
10
- import { TuiTextfieldDirective, TuiTextfieldComponent, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
12
+ import * as i1 from '@taiga-ui/core/components/input';
13
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
11
14
  import { tuiMaskito } from '@taiga-ui/kit/utils';
12
15
  import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
13
16
 
@@ -30,7 +33,7 @@ function tuiCreateCompletePhoneInsertionPreprocessor(countryCode, phoneMaskAfter
30
33
  const completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replaceAll(/[^#\d]+/g, '').length;
31
34
  const trimCountryPrefix = (value) => countryCode === '+7'
32
35
  ? value.replace(/^(\+?\s*7?\s?8?)\s?/, '')
33
- : value.replace(new RegExp(`^(\\+?\\s*${countryCode.replace('+', '')}?)\\s?`), '');
36
+ : value.replace(new RegExp(String.raw `^(\+?\s*${countryCode.replace('+', '')}?)\s?`), '');
34
37
  return ({ elementState, data }) => {
35
38
  const { value, selection } = elementState;
36
39
  return {
@@ -80,48 +83,39 @@ const MASK_SYMBOLS = /[ \-_()]/g;
80
83
  function isText(value) {
81
84
  return Number.isNaN(parseInt(value.replaceAll(MASK_SYMBOLS, ''), 10));
82
85
  }
83
- class TuiInputPhone extends TuiControl {
86
+ class TuiInputPhoneDirective extends TuiControl {
84
87
  constructor() {
85
88
  super(...arguments);
86
- this.textfield = inject(TuiTextfieldDirective);
89
+ this.input = inject(TuiInputDirective);
87
90
  this.host = inject(TuiTextfieldComponent);
91
+ this.options = inject(TUI_INPUT_PHONE_OPTIONS);
92
+ this.el = tuiInjectElement();
88
93
  this.nonRemovablePrefix = computed(() => `${this.countryCode()} `);
89
94
  this.inputMode = computed(() => (this.allowText() ? 'text' : 'numeric'));
90
95
  this.valueEffect = effect(() => {
91
96
  if (this.value()) {
92
- this.textfield.value.set(maskitoTransform(this.value() ?? '', this.mask()));
97
+ this.input.value.set(maskitoTransform(this.value() ?? '', this.maskito()));
93
98
  }
94
99
  });
95
100
  this.blurEffect = effect(() => {
96
101
  const incomplete = untracked(() => !this.value());
97
102
  const prefix = incomplete && this.interactive() && !this.allowText();
98
103
  if (!this.host.focused() && incomplete) {
99
- this.textfield.value.set('');
104
+ this.input.value.set('');
100
105
  }
101
106
  else if (this.host.focused() && prefix) {
102
- this.textfield.value.set(this.nonRemovablePrefix());
107
+ this.input.value.set(this.nonRemovablePrefix());
103
108
  }
104
109
  });
105
- this.options = inject(TUI_INPUT_PHONE_OPTIONS);
106
- this.el = tuiInjectElement();
107
- this.mask = computed(() => this.calculateMask(this.countryCode(), this.phoneMask(), this.nonRemovablePrefix(), this.allowText()));
108
- this.maskito = tuiMaskito(computed(() => this.mask()));
109
- this.countryCode = signal(extractCountryCode(this.options.mask));
110
- this.allowText = signal(this.options.allowText);
111
- this.phoneMask = signal(extractMask(this.options.mask));
112
- }
113
- // TODO(v5): replace with signal input
114
- set allowTextSetter(allow) {
115
- this.allowText.set(allow);
116
- }
117
- // TODO(v5): replace with signal input
118
- set maskSetter(mask) {
119
- this.countryCode.set(extractCountryCode(mask));
120
- this.phoneMask.set(extractMask(mask));
110
+ this.countryCode = computed(() => extractCode(this.mask()));
111
+ this.phoneMask = computed(() => extractMask(this.mask()));
112
+ this.maskito = tuiMaskito(computed(() => this.calculateMask(this.countryCode(), this.phoneMask(), this.nonRemovablePrefix(), this.allowText())));
113
+ this.allowText = input(this.options.allowText);
114
+ this.mask = input(this.options.mask);
121
115
  }
122
116
  onInput(value) {
123
117
  if (!value && !this.allowText()) {
124
- this.textfield.value.set(this.nonRemovablePrefix());
118
+ this.input.value.set(this.nonRemovablePrefix());
125
119
  }
126
120
  const parsed = isText(value)
127
121
  ? value
@@ -157,22 +151,21 @@ class TuiInputPhone extends TuiControl {
157
151
  ],
158
152
  };
159
153
  }
160
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhone, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
161
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputPhone, isStandalone: true, selector: "input[tuiInputPhone]", inputs: { allowTextSetter: ["allowText", "allowTextSetter"], maskSetter: ["mask", "maskSetter"] }, host: { attributes: { "type": "tel" }, listeners: { "input": "onInput($event.target.value)" }, properties: { "inputMode": "inputMode()", "disabled": "disabled()" } }, providers: [
162
- tuiAsControl(TuiInputPhone),
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
155
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiInputPhoneDirective, isStandalone: true, selector: "input[tuiInputPhone]", inputs: { allowText: { classPropertyName: "allowText", publicName: "allowText", isSignal: true, isRequired: false, transformFunction: null }, mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "tel" }, listeners: { "input": "onInput($event.target.value)" }, properties: { "inputMode": "inputMode()", "disabled": "disabled()" } }, providers: [
156
+ tuiAsControl(TuiInputPhoneDirective),
163
157
  tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),
164
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
158
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
165
159
  }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhone, decorators: [{
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneDirective, decorators: [{
167
161
  type: Directive,
168
162
  args: [{
169
- standalone: true,
170
163
  selector: 'input[tuiInputPhone]',
171
164
  providers: [
172
- tuiAsControl(TuiInputPhone),
165
+ tuiAsControl(TuiInputPhoneDirective),
173
166
  tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),
174
167
  ],
175
- hostDirectives: [TuiWithTextfield, MaskitoDirective],
168
+ hostDirectives: [TuiWithInput, MaskitoDirective],
176
169
  host: {
177
170
  type: 'tel',
178
171
  '[inputMode]': 'inputMode()',
@@ -180,14 +173,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
180
173
  '(input)': 'onInput($event.target.value)',
181
174
  },
182
175
  }]
183
- }], propDecorators: { allowTextSetter: [{
184
- type: Input,
185
- args: ['allowText']
186
- }], maskSetter: [{
187
- type: Input,
188
- args: ['mask']
189
- }] } });
190
- function extractCountryCode(mask) {
176
+ }] });
177
+ function extractCode(mask) {
191
178
  const match = /^(\+\d+)/.exec(mask);
192
179
  return match?.[1] || '';
193
180
  }
@@ -196,9 +183,17 @@ function extractMask(mask) {
196
183
  return match?.[1]?.trim() || '';
197
184
  }
198
185
 
186
+ const TuiInputPhone = [
187
+ TuiInputPhoneDirective,
188
+ TuiLabel,
189
+ TuiTextfieldComponent,
190
+ TuiTextfieldOptionsDirective,
191
+ TuiDropdownContent,
192
+ ];
193
+
199
194
  /**
200
195
  * Generated bundle index. Do not edit.
201
196
  */
202
197
 
203
- export { TUI_INPUT_PHONE_DEFAULT_OPTIONS, TUI_INPUT_PHONE_OPTIONS, TuiInputPhone, tuiInputPhoneOptionsProvider };
198
+ export { TUI_INPUT_PHONE_DEFAULT_OPTIONS, TUI_INPUT_PHONE_OPTIONS, TuiInputPhone, TuiInputPhoneDirective, tuiInputPhoneOptionsProvider };
204
199
  //# sourceMappingURL=taiga-ui-kit-components-input-phone.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-phone.mjs","sources":["../../../projects/kit/components/input-phone/input-phone.options.ts","../../../projects/kit/components/input-phone/utils/complete-phone-insertion-preprocessor.ts","../../../projects/kit/components/input-phone/utils/create-phone-mask-expression.ts","../../../projects/kit/components/input-phone/input-phone.directive.ts","../../../projects/kit/components/input-phone/taiga-ui-kit-components-input-phone.ts"],"sourcesContent":["import {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiInputPhoneOptions {\n readonly allowText: boolean;\n readonly mask: string;\n readonly valueTransformer: TuiValueTransformer<string | null, any>;\n}\n\nexport const TUI_INPUT_PHONE_DEFAULT_OPTIONS: TuiInputPhoneOptions = {\n mask: '+1 ### ###-####',\n allowText: false,\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n};\n\nexport const [TUI_INPUT_PHONE_OPTIONS, tuiInputPhoneOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_PHONE_DEFAULT_OPTIONS,\n);\n","import {type MaskitoPreprocessor} from '@maskito/core';\n\nconst countDigits = (value: string): number => value.replaceAll(/\\D/g, '').length;\n\n/**\n * `InputPhone` component sets country code as non-removable prefix.\n * This prefix appears on focus and cannot be erased.\n * But users sometimes can copy complete phone number (from any different source)\n * and try to insert the whole string inside our `InputPhone` textfield.\n * This preprocessor helps to avoid country prefix duplication on paste/drop/autofill events.\n */\nexport function tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): MaskitoPreprocessor {\n const completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replaceAll(\n /[^#\\d]+/g,\n '',\n ).length;\n\n const trimCountryPrefix = (value: string): string =>\n countryCode === '+7'\n ? value.replace(/^(\\+?\\s*7?\\s?8?)\\s?/, '')\n : value.replace(\n new RegExp(`^(\\\\+?\\\\s*${countryCode.replace('+', '')}?)\\\\s?`),\n '',\n );\n\n return ({elementState, data}) => {\n const {value, selection} = elementState;\n\n return {\n elementState: {\n selection,\n value:\n /**\n * The only possible case when `value` includes digits more\n * than mask expression allows – browser autofill.\n * It means that we are inside `input`-event\n * and mask are ready to reject \"extra\" characters.\n * We should cut leading country prefix to save trailing characters!\n */\n countDigits(value) > completePhoneLength\n ? trimCountryPrefix(value)\n : value,\n },\n data:\n countDigits(data) >= completePhoneLength || data.startsWith(countryCode)\n ? /**\n * User tries to insert/drop the complete phone number (with country prefix).\n * We should drop already existing non-removable prefix.\n */\n trimCountryPrefix(data)\n : data,\n };\n };\n}\n","/**\n * Create {@link https://maskito.dev/core-concepts/mask-expression pattern mask expression} for phone number\n *\n * @example\n * tuiCreatePhoneMaskExpression('+1', '(###) ###-####');\n */\nexport function tuiCreatePhoneMaskExpression(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): Array<RegExp | string> {\n return [\n ...countryCode.split(''),\n ' ',\n ...phoneMaskAfterCountryCode\n .replaceAll(/[^#\\- ()]+/g, '')\n .split('')\n .map((item) => (item === '#' ? /\\d/ : item)),\n ];\n}\n","import {\n computed,\n Directive,\n effect,\n inject,\n Input,\n signal,\n untracked,\n} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoCaretGuard, maskitoPrefixPostprocessorGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_PHONE_OPTIONS} from './input-phone.options';\nimport {tuiCreateCompletePhoneInsertionPreprocessor} from './utils/complete-phone-insertion-preprocessor';\nimport {tuiCreatePhoneMaskExpression} from './utils/create-phone-mask-expression';\n\nconst MASK_SYMBOLS = /[ \\-_()]/g;\n\nfunction isText(value: string): boolean {\n return Number.isNaN(parseInt(value.replaceAll(MASK_SYMBOLS, ''), 10));\n}\n\n@Directive({\n standalone: true,\n selector: 'input[tuiInputPhone]',\n providers: [\n tuiAsControl(TuiInputPhone),\n tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective],\n host: {\n type: 'tel',\n '[inputMode]': 'inputMode()',\n '[disabled]': 'disabled()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputPhone extends TuiControl<string | null> {\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly host: TuiTextfieldComponent<string> = inject(TuiTextfieldComponent);\n\n protected readonly nonRemovablePrefix = computed(() => `${this.countryCode()} `);\n protected inputMode = computed(() => (this.allowText() ? 'text' : 'numeric'));\n\n protected readonly valueEffect = effect(() => {\n if (this.value()) {\n this.textfield.value.set(maskitoTransform(this.value() ?? '', this.mask()));\n }\n });\n\n protected readonly blurEffect = effect(() => {\n const incomplete = untracked(() => !this.value());\n const prefix = incomplete && this.interactive() && !this.allowText();\n\n if (!this.host.focused() && incomplete) {\n this.textfield.value.set('');\n } else if (this.host.focused() && prefix) {\n this.textfield.value.set(this.nonRemovablePrefix());\n }\n });\n\n protected readonly options = inject(TUI_INPUT_PHONE_OPTIONS);\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n\n protected readonly mask = computed(() =>\n this.calculateMask(\n this.countryCode(),\n this.phoneMask(),\n this.nonRemovablePrefix(),\n this.allowText(),\n ),\n );\n\n protected readonly maskito = tuiMaskito(computed(() => this.mask()));\n\n public readonly countryCode = signal(extractCountryCode(this.options.mask));\n public readonly allowText = signal(this.options.allowText);\n public readonly phoneMask = signal(extractMask(this.options.mask));\n\n // TODO(v5): replace with signal input\n @Input('allowText')\n public set allowTextSetter(allow: boolean) {\n this.allowText.set(allow);\n }\n\n // TODO(v5): replace with signal input\n @Input('mask')\n public set maskSetter(mask: string) {\n this.countryCode.set(extractCountryCode(mask));\n this.phoneMask.set(extractMask(mask));\n }\n\n protected onInput(value: string): void {\n if (!value && !this.allowText()) {\n this.textfield.value.set(this.nonRemovablePrefix());\n }\n\n const parsed = isText(value)\n ? value\n : value.replaceAll(MASK_SYMBOLS, '').slice(0, this.maxPhoneLength);\n\n this.onChange(parsed === this.countryCode() || isText(parsed) ? '' : parsed);\n }\n\n private get maxPhoneLength(): number {\n return (\n this.countryCode().length + this.phoneMask().replaceAll(/[^#]+/g, '').length\n );\n }\n\n private calculateMask(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n nonRemovablePrefix: string,\n allowText: boolean,\n ): MaskitoOptions {\n const mask = tuiCreatePhoneMaskExpression(countryCode, phoneMaskAfterCountryCode);\n const preprocessors = [\n tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode,\n phoneMaskAfterCountryCode,\n ),\n ];\n\n return allowText\n ? {\n mask: ({value}) =>\n isText(value) && value !== '+'\n ? (MASKITO_DEFAULT_OPTIONS.mask as RegExp)\n : mask,\n preprocessors,\n }\n : {\n mask,\n preprocessors,\n postprocessors: [\n maskitoPrefixPostprocessorGenerator(nonRemovablePrefix),\n ],\n plugins: [\n maskitoCaretGuard((value, [from, to]) => [\n from === to ? nonRemovablePrefix.length : 0,\n value.length,\n ]),\n ],\n };\n }\n}\n\nfunction extractCountryCode(mask: string): string {\n const match = /^(\\+\\d+)/.exec(mask);\n\n return match?.[1] || '';\n}\n\nfunction extractMask(mask: string): string {\n const match = /^\\+\\d+(.*)$/.exec(mask);\n\n return match?.[1]?.trim() || '';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAYa,MAAA,+BAA+B,GAAyB;AACjE,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,gBAAgB,EAAE,8BAA8B;;AAG7C,MAAM,CAAC,uBAAuB,EAAE,4BAA4B,CAAC,GAAG,gBAAgB,CACnF,+BAA+B;;ACjBnC,MAAM,WAAW,GAAG,CAAC,KAAa,KAAa,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM;AAEjF;;;;;;AAMG;AACa,SAAA,2CAA2C,CACvD,WAAmB,EACnB,yBAAiC,EAAA;AAEjC,IAAA,MAAM,mBAAmB,GAAG,CAAC,WAAW,GAAG,yBAAyB,EAAE,UAAU,CAC5E,UAAU,E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,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AACpD,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,KAAK;AACX,wBAAA,aAAa,EAAE,aAAa;AAC5B,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,SAAS,EAAE,8BAA8B;AAC5C,qBAAA;AACJ,iBAAA;8BA6Cc,eAAe,EAAA,CAAA;sBADzB,KAAK;uBAAC,WAAW;gBAOP,UAAU,EAAA,CAAA;sBADpB,KAAK;uBAAC,MAAM;;AA8DjB,SAAS,kBAAkB,CAAC,IAAY,EAAA;IACpC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;AAEnC,IAAA,OAAO,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE;AAC3B;AAEA,SAAS,WAAW,CAAC,IAAY,EAAA;IAC7B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;IAEtC,OAAO,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;AACnC;;AC3KA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-phone.mjs","sources":["../../../projects/kit/components/input-phone/input-phone.options.ts","../../../projects/kit/components/input-phone/utils/complete-phone-insertion-preprocessor.ts","../../../projects/kit/components/input-phone/utils/create-phone-mask-expression.ts","../../../projects/kit/components/input-phone/input-phone.directive.ts","../../../projects/kit/components/input-phone/input-phone.ts","../../../projects/kit/components/input-phone/taiga-ui-kit-components-input-phone.ts"],"sourcesContent":["import {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiInputPhoneOptions {\n readonly allowText: boolean;\n readonly mask: string;\n readonly valueTransformer: TuiValueTransformer<string | null, any>;\n}\n\nexport const TUI_INPUT_PHONE_DEFAULT_OPTIONS: TuiInputPhoneOptions = {\n mask: '+1 ### ###-####',\n allowText: false,\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n};\n\nexport const [TUI_INPUT_PHONE_OPTIONS, tuiInputPhoneOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_PHONE_DEFAULT_OPTIONS,\n);\n","import {type MaskitoPreprocessor} from '@maskito/core';\n\nconst countDigits = (value: string): number => value.replaceAll(/\\D/g, '').length;\n\n/**\n * `InputPhone` component sets country code as non-removable prefix.\n * This prefix appears on focus and cannot be erased.\n * But users sometimes can copy complete phone number (from any different source)\n * and try to insert the whole string inside our `InputPhone` textfield.\n * This preprocessor helps to avoid country prefix duplication on paste/drop/autofill events.\n */\nexport function tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): MaskitoPreprocessor {\n const completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replaceAll(\n /[^#\\d]+/g,\n '',\n ).length;\n\n const trimCountryPrefix = (value: string): string =>\n countryCode === '+7'\n ? value.replace(/^(\\+?\\s*7?\\s?8?)\\s?/, '')\n : value.replace(\n new RegExp(String.raw`^(\\+?\\s*${countryCode.replace('+', '')}?)\\s?`),\n '',\n );\n\n return ({elementState, data}) => {\n const {value, selection} = elementState;\n\n return {\n elementState: {\n selection,\n value:\n /**\n * The only possible case when `value` includes digits more\n * than mask expression allows – browser autofill.\n * It means that we are inside `input`-event\n * and mask are ready to reject \"extra\" characters.\n * We should cut leading country prefix to save trailing characters!\n */\n countDigits(value) > completePhoneLength\n ? trimCountryPrefix(value)\n : value,\n },\n data:\n countDigits(data) >= completePhoneLength || data.startsWith(countryCode)\n ? /**\n * User tries to insert/drop the complete phone number (with country prefix).\n * We should drop already existing non-removable prefix.\n */\n trimCountryPrefix(data)\n : data,\n };\n };\n}\n","/**\n * Create {@link https://maskito.dev/core-concepts/mask-expression pattern mask expression} for phone number\n *\n * @example\n * tuiCreatePhoneMaskExpression('+1', '(###) ###-####');\n */\nexport function tuiCreatePhoneMaskExpression(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): Array<RegExp | string> {\n return [\n ...countryCode.split(''),\n ' ',\n ...phoneMaskAfterCountryCode\n .replaceAll(/[^#\\- ()]+/g, '')\n .split('')\n .map((item) => (item === '#' ? /\\d/ : item)),\n ];\n}\n","import {computed, Directive, effect, inject, input, untracked} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoCaretGuard, maskitoPrefixPostprocessorGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_PHONE_OPTIONS} from './input-phone.options';\nimport {tuiCreateCompletePhoneInsertionPreprocessor} from './utils/complete-phone-insertion-preprocessor';\nimport {tuiCreatePhoneMaskExpression} from './utils/create-phone-mask-expression';\n\nconst MASK_SYMBOLS = /[ \\-_()]/g;\n\nfunction isText(value: string): boolean {\n return Number.isNaN(parseInt(value.replaceAll(MASK_SYMBOLS, ''), 10));\n}\n\n@Directive({\n selector: 'input[tuiInputPhone]',\n providers: [\n tuiAsControl(TuiInputPhoneDirective),\n tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),\n ],\n hostDirectives: [TuiWithInput, MaskitoDirective],\n host: {\n type: 'tel',\n '[inputMode]': 'inputMode()',\n '[disabled]': 'disabled()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputPhoneDirective extends TuiControl<string | null> {\n private readonly input = inject(TuiInputDirective);\n private readonly host: TuiTextfieldComponent<string> = inject(TuiTextfieldComponent);\n\n protected readonly options = inject(TUI_INPUT_PHONE_OPTIONS);\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly nonRemovablePrefix = computed(() => `${this.countryCode()} `);\n protected inputMode = computed(() => (this.allowText() ? 'text' : 'numeric'));\n protected readonly valueEffect = effect(() => {\n if (this.value()) {\n this.input.value.set(maskitoTransform(this.value() ?? '', this.maskito()));\n }\n });\n\n protected readonly blurEffect = effect(() => {\n const incomplete = untracked(() => !this.value());\n const prefix = incomplete && this.interactive() && !this.allowText();\n\n if (!this.host.focused() && incomplete) {\n this.input.value.set('');\n } else if (this.host.focused() && prefix) {\n this.input.value.set(this.nonRemovablePrefix());\n }\n });\n\n protected readonly countryCode = computed(() => extractCode(this.mask()));\n protected readonly phoneMask = computed(() => extractMask(this.mask()));\n protected readonly maskito = tuiMaskito(\n computed(() =>\n this.calculateMask(\n this.countryCode(),\n this.phoneMask(),\n this.nonRemovablePrefix(),\n this.allowText(),\n ),\n ),\n );\n\n public readonly allowText = input(this.options.allowText);\n public readonly mask = input(this.options.mask);\n\n protected onInput(value: string): void {\n if (!value && !this.allowText()) {\n this.input.value.set(this.nonRemovablePrefix());\n }\n\n const parsed = isText(value)\n ? value\n : value.replaceAll(MASK_SYMBOLS, '').slice(0, this.maxPhoneLength);\n\n this.onChange(parsed === this.countryCode() || isText(parsed) ? '' : parsed);\n }\n\n private get maxPhoneLength(): number {\n return (\n this.countryCode().length + this.phoneMask().replaceAll(/[^#]+/g, '').length\n );\n }\n\n private calculateMask(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n nonRemovablePrefix: string,\n allowText: boolean,\n ): MaskitoOptions {\n const mask = tuiCreatePhoneMaskExpression(countryCode, phoneMaskAfterCountryCode);\n const preprocessors = [\n tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode,\n phoneMaskAfterCountryCode,\n ),\n ];\n\n return allowText\n ? {\n mask: ({value}) =>\n isText(value) && value !== '+'\n ? (MASKITO_DEFAULT_OPTIONS.mask as RegExp)\n : mask,\n preprocessors,\n }\n : {\n mask,\n preprocessors,\n postprocessors: [\n maskitoPrefixPostprocessorGenerator(nonRemovablePrefix),\n ],\n plugins: [\n maskitoCaretGuard((value, [from, to]) => [\n from === to ? nonRemovablePrefix.length : 0,\n value.length,\n ]),\n ],\n };\n }\n}\n\nfunction extractCode(mask: string): string {\n const match = /^(\\+\\d+)/.exec(mask);\n\n return match?.[1] || '';\n}\n\nfunction extractMask(mask: string): string {\n const match = /^\\+\\d+(.*)$/.exec(mask);\n\n return match?.[1]?.trim() || '';\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 {TuiInputPhoneDirective} from './input-phone.directive';\n\nexport const TuiInputPhone = [\n TuiInputPhoneDirective,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAYa,MAAA,+BAA+B,GAAyB;AACjE,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,gBAAgB,EAAE,8BAA8B;;AAG7C,MAAM,CAAC,uBAAuB,EAAE,4BAA4B,CAAC,GAAG,gBAAgB,CACnF,+BAA+B;;ACjBnC,MAAM,WAAW,GAAG,CAAC,KAAa,KAAa,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM;AAEjF;;;;;;AAMG;AACa,SAAA,2CAA2C,CACvD,WAAmB,EACnB,yBAAiC,EAAA;AAEjC,IAAA,MAAM,mBAAmB,GAAG,CAAC,WAAW,GAAG,yBAAyB,EAAE,UAAU,CAC5E,UAAU,EACV,EAAE,CACL,CAAC,MAAM;IAER,MAAM,iBAAiB,GAAG,CAAC,KAAa,KACpC,W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B,wBAAA,SAAS,EAAE,8BAA8B;AAC5C,qBAAA;AACJ,iBAAA;;AAkGD,SAAS,WAAW,CAAC,IAAY,EAAA;IAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;AAEnC,IAAA,OAAO,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE;AAC3B;AAEA,SAAS,WAAW,CAAC,IAAY,EAAA;IAC7B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;IAEtC,OAAO,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;AACnC;;ACxIa,MAAA,aAAa,GAAG;IACzB,sBAAsB;IACtB,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;;;ACdtB;;AAEG;;;;"}
@@ -1,29 +1,26 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
3
+ import { TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
1
4
  import * as i0 from '@angular/core';
2
- import { signal, inject, computed, Input, ChangeDetectionStrategy, Component } from '@angular/core';
5
+ import { inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
3
6
  import { NgControl } from '@angular/forms';
4
7
  import * as i1 from '@maskito/angular';
5
8
  import { MaskitoDirective } from '@maskito/angular';
6
- import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
7
9
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
8
10
  import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
9
11
  import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
10
- import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent } from '@taiga-ui/core/components/textfield';
11
12
  import { TuiAppearance } from '@taiga-ui/core/directives/appearance';
12
13
  import { tuiMaskito } from '@taiga-ui/kit/utils';
13
14
 
14
- class TuiInputPin {
15
+ class TuiInputPinComponent {
15
16
  constructor() {
16
17
  this.el = tuiInjectElement();
17
- this.mask = signal(/^\d+$/);
18
18
  this.appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;
19
19
  this.control = inject(NgControl);
20
- this.maskito = tuiMaskito(computed(() => ({
21
- mask: this.mask(),
22
- overwriteMode: 'replace',
23
- })));
24
- }
25
- set maskSetter(mask) {
26
- this.mask.set(tuiIsString(mask) ? new RegExp(mask) : mask);
20
+ this.maskito = tuiMaskito(computed(() => ({ mask: this.mask(), overwriteMode: 'replace' })));
21
+ this.mask = input(/^\d+$/, {
22
+ transform: (mask) => tuiIsString(mask) ? new RegExp(mask) : mask,
23
+ });
27
24
  }
28
25
  onClick(index) {
29
26
  this.el.focus();
@@ -46,27 +43,32 @@ class TuiInputPin {
46
43
  (this.el.selectionStart === this.el.maxLength &&
47
44
  index === this.el.maxLength - 1)));
48
45
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPin, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
50
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputPin, isStandalone: true, selector: "input[tuiInputPin]", inputs: { maskSetter: ["mask", "maskSetter"] }, host: { attributes: { "ngSkipHydration": "true", "inputmode": "numeric", "spellcheck": "false" }, listeners: { "pointerdown.prevent": "onClick(0)", "selectionchange": "onSelection()", "keydown.arrowLeft": "onArrow()" } }, hostDirectives: [{ directive: i1.MaskitoDirective }], ngImport: i0, template: "<div\n *tuiTextfieldContent\n class=\"t-wrapper\"\n>\n <label\n *tuiRepeatTimes=\"let index of el.maxLength\"\n class=\"t-item\"\n [tuiAppearance]=\"appearance()\"\n [tuiAppearanceFocus]=\"isFocused(index)\"\n [tuiAppearanceMode]=\"control.invalid && control.touched ? 'invalid' : null\"\n (pointerdown.prevent)=\"onClick(index)\"\n >\n <span\n class=\"t-value\"\n [class.t-value_filled]=\"el.value[index]\"\n [textContent]=\"el.value[index] || el.placeholder[index]\"\n ></span>\n </label>\n</div>\n", styles: ["@keyframes blink{50%{opacity:0}}:host{color:transparent;background:transparent;border:none;outline:none;--t-caret-color: rgba(255, 255, 255, .01);caret-color:var(--t-caret-color)}:host :host-context([tuiTheme=\"dark\"]){--t-caret-color: rgba(50, 50, 50, .01)}:host::selection{background:transparent}:host::placeholder{color:transparent!important}:host ::ng-deep+.t-content .t-clear{display:none!important}.t-wrapper{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;gap:inherit;border-radius:inherit}.t-item{display:flex;flex:1;align-items:center;justify-content:center;border-radius:inherit;pointer-events:auto;cursor:text}.t-item:first-child{pointer-events:none}.t-item[data-focus=true] .t-value_filled{background:var(--tui-service-selection-background)}.t-item[data-focus=true] .t-value_filled:before{display:none}.t-item[data-focus=true] .t-value:before{content:\"\";block-size:1em;border-inline-start:1px solid var(--tui-text-primary);animation:blink 1s steps(1) infinite}.t-value{color:var(--tui-text-tertiary)}.t-value_filled{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "directive", type: TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
47
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputPinComponent, isStandalone: true, selector: "input[tuiInputPin]", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ngSkipHydration": "true", "inputmode": "numeric", "spellcheck": "false" }, listeners: { "pointerdown.prevent": "onClick(0)", "selectionchange": "onSelection()", "keydown.arrowLeft": "onArrow()" } }, hostDirectives: [{ directive: i1.MaskitoDirective }], ngImport: i0, template: "<div\n *tuiTextfieldContent\n class=\"t-wrapper\"\n>\n @for (_ of '-'.repeat(el.maxLength); track $index) {\n <label\n class=\"t-item\"\n [tuiAppearance]=\"appearance()\"\n [tuiAppearanceFocus]=\"isFocused($index)\"\n [tuiAppearanceMode]=\"control.invalid && control.touched ? 'invalid' : null\"\n (pointerdown.prevent)=\"onClick($index)\"\n >\n <span\n class=\"t-value\"\n [class.t-value_filled]=\"el.value[$index]\"\n [textContent]=\"el.value[$index] || el.placeholder[$index]\"\n ></span>\n </label>\n }\n</div>\n", styles: ["@keyframes blink{50%{opacity:0}}:host{position:absolute;inset:0;color:transparent;background:transparent;border:none;outline:none;--t-caret-color: rgba(255, 255, 255, .01);caret-color:var(--t-caret-color)}:host :host-context([tuiTheme=\"dark\"]){--t-caret-color: rgba(50, 50, 50, .01)}:host::selection{background:transparent}:host::placeholder{color:transparent!important}:host ::ng-deep+.t-content [tuiButtonX]{display:none!important}.t-wrapper{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;gap:inherit;border-radius:inherit}.t-item{display:flex;flex:1;align-items:center;justify-content:center;border-radius:inherit;pointer-events:auto;cursor:text}.t-item:first-child{pointer-events:none}.t-item[data-focus=true] .t-value_filled{background:var(--tui-service-selection-background)}.t-item[data-focus=true] .t-value_filled:before{display:none}.t-item[data-focus=true] .t-value:before{content:\"\";block-size:1em;border-inline-start:1px solid var(--tui-text-primary);animation:blink 1s steps(1) infinite}.t-value{color:var(--tui-text-tertiary)}.t-value_filled{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "directive", type: TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
51
48
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPin, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPinComponent, decorators: [{
53
50
  type: Component,
54
- args: [{ selector: 'input[tuiInputPin]', imports: [TuiAppearance, TuiRepeatTimes, TuiTextfieldContent], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [MaskitoDirective], host: {
51
+ args: [{ selector: 'input[tuiInputPin]', imports: [TuiAppearance, TuiTextfieldContent], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [MaskitoDirective], host: {
55
52
  ngSkipHydration: 'true',
56
53
  inputmode: 'numeric',
57
54
  spellcheck: 'false',
58
55
  '(pointerdown.prevent)': 'onClick(0)',
59
56
  '(selectionchange)': 'onSelection()',
60
57
  '(keydown.arrowLeft)': 'onArrow()',
61
- }, template: "<div\n *tuiTextfieldContent\n class=\"t-wrapper\"\n>\n <label\n *tuiRepeatTimes=\"let index of el.maxLength\"\n class=\"t-item\"\n [tuiAppearance]=\"appearance()\"\n [tuiAppearanceFocus]=\"isFocused(index)\"\n [tuiAppearanceMode]=\"control.invalid && control.touched ? 'invalid' : null\"\n (pointerdown.prevent)=\"onClick(index)\"\n >\n <span\n class=\"t-value\"\n [class.t-value_filled]=\"el.value[index]\"\n [textContent]=\"el.value[index] || el.placeholder[index]\"\n ></span>\n </label>\n</div>\n", styles: ["@keyframes blink{50%{opacity:0}}:host{color:transparent;background:transparent;border:none;outline:none;--t-caret-color: rgba(255, 255, 255, .01);caret-color:var(--t-caret-color)}:host :host-context([tuiTheme=\"dark\"]){--t-caret-color: rgba(50, 50, 50, .01)}:host::selection{background:transparent}:host::placeholder{color:transparent!important}:host ::ng-deep+.t-content .t-clear{display:none!important}.t-wrapper{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;gap:inherit;border-radius:inherit}.t-item{display:flex;flex:1;align-items:center;justify-content:center;border-radius:inherit;pointer-events:auto;cursor:text}.t-item:first-child{pointer-events:none}.t-item[data-focus=true] .t-value_filled{background:var(--tui-service-selection-background)}.t-item[data-focus=true] .t-value_filled:before{display:none}.t-item[data-focus=true] .t-value:before{content:\"\";block-size:1em;border-inline-start:1px solid var(--tui-text-primary);animation:blink 1s steps(1) infinite}.t-value{color:var(--tui-text-tertiary)}.t-value_filled{color:var(--tui-text-primary)}\n"] }]
62
- }], propDecorators: { maskSetter: [{
63
- type: Input,
64
- args: ['mask']
65
- }] } });
58
+ }, template: "<div\n *tuiTextfieldContent\n class=\"t-wrapper\"\n>\n @for (_ of '-'.repeat(el.maxLength); track $index) {\n <label\n class=\"t-item\"\n [tuiAppearance]=\"appearance()\"\n [tuiAppearanceFocus]=\"isFocused($index)\"\n [tuiAppearanceMode]=\"control.invalid && control.touched ? 'invalid' : null\"\n (pointerdown.prevent)=\"onClick($index)\"\n >\n <span\n class=\"t-value\"\n [class.t-value_filled]=\"el.value[$index]\"\n [textContent]=\"el.value[$index] || el.placeholder[$index]\"\n ></span>\n </label>\n }\n</div>\n", styles: ["@keyframes blink{50%{opacity:0}}:host{position:absolute;inset:0;color:transparent;background:transparent;border:none;outline:none;--t-caret-color: rgba(255, 255, 255, .01);caret-color:var(--t-caret-color)}:host :host-context([tuiTheme=\"dark\"]){--t-caret-color: rgba(50, 50, 50, .01)}:host::selection{background:transparent}:host::placeholder{color:transparent!important}:host ::ng-deep+.t-content [tuiButtonX]{display:none!important}.t-wrapper{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;gap:inherit;border-radius:inherit}.t-item{display:flex;flex:1;align-items:center;justify-content:center;border-radius:inherit;pointer-events:auto;cursor:text}.t-item:first-child{pointer-events:none}.t-item[data-focus=true] .t-value_filled{background:var(--tui-service-selection-background)}.t-item[data-focus=true] .t-value_filled:before{display:none}.t-item[data-focus=true] .t-value:before{content:\"\";block-size:1em;border-inline-start:1px solid var(--tui-text-primary);animation:blink 1s steps(1) infinite}.t-value{color:var(--tui-text-tertiary)}.t-value_filled{color:var(--tui-text-primary)}\n"] }]
59
+ }] });
60
+
61
+ const TuiInputPin = [
62
+ TuiInputPinComponent,
63
+ TuiLabel,
64
+ TuiTextfieldComponent,
65
+ TuiTextfieldOptionsDirective,
66
+ TuiDropdownContent,
67
+ ];
66
68
 
67
69
  /**
68
70
  * Generated bundle index. Do not edit.
69
71
  */
70
72
 
71
- export { TuiInputPin };
73
+ export { TuiInputPin, TuiInputPinComponent };
72
74
  //# sourceMappingURL=taiga-ui-kit-components-input-pin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-pin.mjs","sources":["../../../projects/kit/components/input-pin/input-pin.component.ts","../../../projects/kit/components/input-pin/input-pin.template.html","../../../projects/kit/components/input-pin/taiga-ui-kit-components-input-pin.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n Input,\n signal,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoMask} from '@maskito/core';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldContent,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Component({\n selector: 'input[tuiInputPin]',\n imports: [TuiAppearance, TuiRepeatTimes, TuiTextfieldContent],\n templateUrl: './input-pin.template.html',\n styleUrl: './input-pin.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [MaskitoDirective],\n host: {\n ngSkipHydration: 'true',\n inputmode: 'numeric',\n spellcheck: 'false',\n '(pointerdown.prevent)': 'onClick(0)',\n '(selectionchange)': 'onSelection()',\n '(keydown.arrowLeft)': 'onArrow()',\n },\n})\nexport class TuiInputPin {\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly mask = signal<MaskitoMask>(/^\\d+$/);\n protected readonly appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;\n protected readonly control = inject(NgControl);\n\n protected readonly maskito = tuiMaskito(\n computed(() => ({\n mask: this.mask(),\n overwriteMode: 'replace',\n })),\n );\n\n @Input('mask')\n public set maskSetter(mask: MaskitoMask | string) {\n this.mask.set(tuiIsString(mask) ? new RegExp(mask) : mask);\n }\n\n public onClick(index: number): void {\n this.el.focus();\n this.el.setSelectionRange(index, index + 1);\n }\n\n public onSelection(): void {\n if (this.el.selectionStart === this.el.maxLength) {\n this.el.setSelectionRange(this.el.maxLength - 1, this.el.maxLength);\n }\n }\n\n public onArrow(): void {\n if (\n this.el.selectionStart === this.el.maxLength - 1 &&\n this.el.selectionEnd === this.el.maxLength\n ) {\n this.el.setSelectionRange(this.el.maxLength - 2, this.el.maxLength - 2);\n }\n }\n\n public isFocused(index: number): boolean {\n return (\n tuiIsFocused(this.el) &&\n (this.el.selectionStart === index ||\n (this.el.selectionStart === this.el.maxLength &&\n index === this.el.maxLength - 1))\n );\n }\n}\n","<div\n *tuiTextfieldContent\n class=\"t-wrapper\"\n>\n <label\n *tuiRepeatTimes=\"let index of el.maxLength\"\n class=\"t-item\"\n [tuiAppearance]=\"appearance()\"\n [tuiAppearanceFocus]=\"isFocused(index)\"\n [tuiAppearanceMode]=\"control.invalid && control.touched ? 'invalid' : null\"\n (pointerdown.prevent)=\"onClick(index)\"\n >\n <span\n class=\"t-value\"\n [class.t-value_filled]=\"el.value[index]\"\n [textContent]=\"el.value[index] || el.placeholder[index]\"\n ></span>\n </label>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAsCa,WAAW,CAAA;AAhBxB,IAAA,WAAA,GAAA;QAiBuB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAc,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,UAAU;AACrD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAE3B,IAAO,CAAA,OAAA,GAAG,UAAU,CACnC,QAAQ,CAAC,OAAO;AACZ,YAAA,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;AACjB,YAAA,aAAa,EAAE,SAAS;SAC3B,CAAC,CAAC,CACN;AAmCJ;IAjCG,IACW,UAAU,CAAC,IAA0B,EAAA;QAC5C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;;AAGvD,IAAA,OAAO,CAAC,KAAa,EAAA;AACxB,QAAA,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC;;IAGxC,WAAW,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,EAAE,CAAC,cAAc,KAAK,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE;AAC9C,YAAA,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;;;IAIpE,OAAO,GAAA;AACV,QAAA,IACI,IAAI,CAAC,EAAE,CAAC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cnD,WAAW,EAAA,UAAA,EAAA,CAAA;kBAhBvB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,WACrB,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAG5C,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,gBAAgB,CAAC,EAC5B,IAAA,EAAA;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,UAAU,EAAE,OAAO;AACnB,wBAAA,uBAAuB,EAAE,YAAY;AACrC,wBAAA,mBAAmB,EAAE,eAAe;AACpC,wBAAA,qBAAqB,EAAE,WAAW;AACrC,qBAAA,EAAA,QAAA,EAAA,8lBAAA,EAAA,MAAA,EAAA,CAAA,skCAAA,CAAA,EAAA;8BAgBU,UAAU,EAAA,CAAA;sBADpB,KAAK;uBAAC,MAAM;;;AEnDjB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-pin.mjs","sources":["../../../projects/kit/components/input-pin/input-pin.component.ts","../../../projects/kit/components/input-pin/input-pin.template.html","../../../projects/kit/components/input-pin/input-pin.ts","../../../projects/kit/components/input-pin/taiga-ui-kit-components-input-pin.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoMask} from '@maskito/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldContent,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\n@Component({\n selector: 'input[tuiInputPin]',\n imports: [TuiAppearance, TuiTextfieldContent],\n templateUrl: './input-pin.template.html',\n styleUrl: './input-pin.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [MaskitoDirective],\n host: {\n ngSkipHydration: 'true',\n inputmode: 'numeric',\n spellcheck: 'false',\n '(pointerdown.prevent)': 'onClick(0)',\n '(selectionchange)': 'onSelection()',\n '(keydown.arrowLeft)': 'onArrow()',\n },\n})\nexport class TuiInputPinComponent {\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;\n protected readonly control = inject(NgControl);\n protected readonly maskito = tuiMaskito(\n computed(() => ({mask: this.mask(), overwriteMode: 'replace'})),\n );\n\n public readonly mask = input(/^\\d+$/, {\n transform: (mask: MaskitoMask | string): MaskitoMask =>\n tuiIsString(mask) ? new RegExp(mask) : mask,\n });\n\n public onClick(index: number): void {\n this.el.focus();\n this.el.setSelectionRange(index, index + 1);\n }\n\n public onSelection(): void {\n if (this.el.selectionStart === this.el.maxLength) {\n this.el.setSelectionRange(this.el.maxLength - 1, this.el.maxLength);\n }\n }\n\n public onArrow(): void {\n if (\n this.el.selectionStart === this.el.maxLength - 1 &&\n this.el.selectionEnd === this.el.maxLength\n ) {\n this.el.setSelectionRange(this.el.maxLength - 2, this.el.maxLength - 2);\n }\n }\n\n public isFocused(index: number): boolean {\n return (\n tuiIsFocused(this.el) &&\n (this.el.selectionStart === index ||\n (this.el.selectionStart === this.el.maxLength &&\n index === this.el.maxLength - 1))\n );\n }\n}\n","<div\n *tuiTextfieldContent\n class=\"t-wrapper\"\n>\n @for (_ of '-'.repeat(el.maxLength); track $index) {\n <label\n class=\"t-item\"\n [tuiAppearance]=\"appearance()\"\n [tuiAppearanceFocus]=\"isFocused($index)\"\n [tuiAppearanceMode]=\"control.invalid && control.touched ? 'invalid' : null\"\n (pointerdown.prevent)=\"onClick($index)\"\n >\n <span\n class=\"t-value\"\n [class.t-value_filled]=\"el.value[$index]\"\n [textContent]=\"el.value[$index] || el.placeholder[$index]\"\n ></span>\n </label>\n }\n</div>\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 {TuiInputPinComponent} from './input-pin.component';\n\nexport const TuiInputPin = [\n TuiInputPinComponent,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA8Ba,oBAAoB,CAAA;AAhBjC,IAAA,WAAA,GAAA;QAiBuB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,UAAU;AACrD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAC3B,IAAO,CAAA,OAAA,GAAG,UAAU,CACnC,QAAQ,CAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,SAAS,EAAC,CAAC,CAAC,CAClE;AAEe,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE;YAClC,SAAS,EAAE,CAAC,IAA0B,KAClC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI;AAClD,SAAA,CAAC;AA8BL;AA5BU,IAAA,OAAO,CAAC,KAAa,EAAA;AACxB,QAAA,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC;;IAGxC,WAAW,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,EAAE,CAAC,cAAc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