@taiga-ui/legacy 4.52.0-canary.6c67ccf → 4.52.0-canary.811ffeb

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 (290) hide show
  1. package/README.md +1 -1
  2. package/classes/abstract-textfield-host.d.ts +1 -1
  3. package/components/arrow/arrow.options.d.ts +1 -3
  4. package/components/arrow/arrow.providers.d.ts +1 -6
  5. package/components/dialog/dialog.component.d.ts +19 -0
  6. package/components/dialog/dialog.directive.d.ts +8 -0
  7. package/components/dialog/dialog.factory.d.ts +16 -0
  8. package/components/dialog/dialog.interfaces.d.ts +30 -0
  9. package/components/dialog/dialog.service.d.ts +10 -0
  10. package/components/dialog/dialog.tokens.d.ts +6 -0
  11. package/components/dialog/index.d.ts +6 -0
  12. package/components/index.d.ts +3 -28
  13. package/components/mobile-dialog/index.d.ts +3 -0
  14. package/components/mobile-dialog/mobile-dialog.component.d.ts +10 -0
  15. package/components/mobile-dialog/mobile-dialog.options.d.ts +10 -0
  16. package/components/mobile-dialog/mobile-dialog.service.d.ts +14 -0
  17. package/components/pdf-viewer/index.d.ts +4 -0
  18. package/components/pdf-viewer/pdf-viewer.component.d.ts +12 -0
  19. package/components/pdf-viewer/pdf-viewer.directive.d.ts +8 -0
  20. package/components/pdf-viewer/pdf-viewer.options.d.ts +11 -0
  21. package/components/pdf-viewer/pdf-viewer.service.d.ts +17 -0
  22. package/components/primitive-textfield/primitive-textfield-options.d.ts +2 -2
  23. package/components/primitive-textfield/primitive-textfield.module.d.ts +5 -5
  24. package/components/select/select.module.d.ts +8 -8
  25. package/components/select/select.options.d.ts +1 -7
  26. package/components/select-option/select-option.module.d.ts +3 -3
  27. package/directives/textfield-controller/textfield.options.d.ts +1 -3
  28. package/fesm2022/taiga-ui-legacy-classes.mjs +3 -4
  29. package/fesm2022/taiga-ui-legacy-classes.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-legacy-components-arrow.mjs +4 -17
  31. package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-legacy-components-dialog.mjs +136 -0
  33. package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -0
  34. package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs +62 -0
  35. package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs.map +1 -0
  36. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +88 -0
  37. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -0
  38. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +18 -18
  39. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-legacy-components-select-option.mjs +6 -6
  41. package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-legacy-components-select.mjs +30 -40
  43. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-legacy-components.mjs +3 -28
  45. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -1
  47. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +2 -7
  49. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +2 -4
  51. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-legacy-tokens.mjs +1 -1
  53. package/fesm2022/taiga-ui-legacy-tokens.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-legacy-utils.mjs +1 -7
  55. package/fesm2022/taiga-ui-legacy-utils.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-legacy.mjs +0 -2
  57. package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
  58. package/index.d.ts +0 -2
  59. package/package.json +34 -151
  60. package/utils/icons-path-factory.d.ts +1 -1
  61. package/utils/index.d.ts +0 -1
  62. package/components/color-selector/color-edit/color-edit.component.d.ts +0 -18
  63. package/components/color-selector/color-edit/color-edit.module.d.ts +0 -21
  64. package/components/color-selector/color-picker/color-picker.component.d.ts +0 -22
  65. package/components/color-selector/color-picker/color-picker.module.d.ts +0 -14
  66. package/components/color-selector/color-selector.component.d.ts +0 -47
  67. package/components/color-selector/color-selector.module.d.ts +0 -24
  68. package/components/color-selector/color-selector.options.d.ts +0 -25
  69. package/components/color-selector/flat-picker/flat-picker.component.d.ts +0 -12
  70. package/components/color-selector/flat-picker/flat-picker.module.d.ts +0 -12
  71. package/components/color-selector/index.d.ts +0 -16
  72. package/components/color-selector/linear-multi-picker/linear-multi-picker.component.d.ts +0 -17
  73. package/components/color-selector/linear-multi-picker/linear-multi-picker.module.d.ts +0 -12
  74. package/components/color-selector/linear-picker/linear-picker.component.d.ts +0 -10
  75. package/components/color-selector/linear-picker/linear-picker.module.d.ts +0 -12
  76. package/components/color-selector/palette/palette.component.d.ts +0 -10
  77. package/components/color-selector/palette/palette.module.d.ts +0 -13
  78. package/components/color-selector/services/picker.service.d.ts +0 -15
  79. package/components/combo-box/combo-box-strict.directive.d.ts +0 -12
  80. package/components/combo-box/combo-box.component.d.ts +0 -52
  81. package/components/combo-box/combo-box.directive.d.ts +0 -13
  82. package/components/combo-box/combo-box.module.d.ts +0 -20
  83. package/components/combo-box/index.d.ts +0 -4
  84. package/components/input/index.d.ts +0 -3
  85. package/components/input/input.component.d.ts +0 -32
  86. package/components/input/input.directive.d.ts +0 -12
  87. package/components/input/input.module.d.ts +0 -16
  88. package/components/input-color/index.d.ts +0 -2
  89. package/components/input-color/input-color.component.d.ts +0 -30
  90. package/components/input-color/input-color.module.d.ts +0 -17
  91. package/components/input-copy/index.d.ts +0 -4
  92. package/components/input-copy/input-copy.component.d.ts +0 -33
  93. package/components/input-copy/input-copy.directive.d.ts +0 -11
  94. package/components/input-copy/input-copy.module.d.ts +0 -18
  95. package/components/input-copy/input-copy.options.d.ts +0 -26
  96. package/components/input-date/index.d.ts +0 -3
  97. package/components/input-date/input-date.component.d.ts +0 -62
  98. package/components/input-date/input-date.directive.d.ts +0 -19
  99. package/components/input-date/input-date.module.d.ts +0 -24
  100. package/components/input-date/native-date/native-date.component.d.ts +0 -15
  101. package/components/input-date-multi/index.d.ts +0 -2
  102. package/components/input-date-multi/input-date-multi.component.d.ts +0 -66
  103. package/components/input-date-multi/input-date-multi.module.d.ts +0 -20
  104. package/components/input-date-range/index.d.ts +0 -3
  105. package/components/input-date-range/input-date-range.component.d.ts +0 -67
  106. package/components/input-date-range/input-date-range.directive.d.ts +0 -16
  107. package/components/input-date-range/input-date-range.module.d.ts +0 -22
  108. package/components/input-date-time/index.d.ts +0 -3
  109. package/components/input-date-time/input-date-time.component.d.ts +0 -87
  110. package/components/input-date-time/input-date-time.directive.d.ts +0 -17
  111. package/components/input-date-time/input-date-time.module.d.ts +0 -23
  112. package/components/input-date-time/native-date-time/native-date-time.directive.d.ts +0 -13
  113. package/components/input-month/index.d.ts +0 -3
  114. package/components/input-month/input-month.component.d.ts +0 -44
  115. package/components/input-month/input-month.directive.d.ts +0 -19
  116. package/components/input-month/input-month.module.d.ts +0 -19
  117. package/components/input-month-range/index.d.ts +0 -3
  118. package/components/input-month-range/input-month-range.component.d.ts +0 -38
  119. package/components/input-month-range/input-month-range.directive.d.ts +0 -23
  120. package/components/input-month-range/input-month-range.module.d.ts +0 -18
  121. package/components/input-number/index.d.ts +0 -4
  122. package/components/input-number/input-number.component.d.ts +0 -63
  123. package/components/input-number/input-number.directive.d.ts +0 -16
  124. package/components/input-number/input-number.module.d.ts +0 -18
  125. package/components/input-number/input-number.options.d.ts +0 -29
  126. package/components/input-password/index.d.ts +0 -4
  127. package/components/input-password/input-password.component.d.ts +0 -33
  128. package/components/input-password/input-password.directive.d.ts +0 -15
  129. package/components/input-password/input-password.module.d.ts +0 -19
  130. package/components/input-password/input-password.options.d.ts +0 -25
  131. package/components/input-phone/index.d.ts +0 -4
  132. package/components/input-phone/input-phone.component.d.ts +0 -49
  133. package/components/input-phone/input-phone.directive.d.ts +0 -13
  134. package/components/input-phone/input-phone.module.d.ts +0 -12
  135. package/components/input-phone/input-phone.options.d.ts +0 -13
  136. package/components/input-phone/utils/complete-phone-insertion-preprocessor.d.ts +0 -9
  137. package/components/input-phone/utils/create-phone-mask-expression.d.ts +0 -7
  138. package/components/input-phone/utils/index.d.ts +0 -2
  139. package/components/input-phone-international/index.d.ts +0 -3
  140. package/components/input-phone-international/input-phone-international.component.d.ts +0 -43
  141. package/components/input-phone-international/input-phone-international.options.d.ts +0 -25
  142. package/components/input-phone-international/utils/extract-value-from-event.d.ts +0 -4
  143. package/components/input-range/index.d.ts +0 -2
  144. package/components/input-range/input-range.component.d.ts +0 -56
  145. package/components/input-range/input-range.module.d.ts +0 -19
  146. package/components/input-slider/index.d.ts +0 -2
  147. package/components/input-slider/input-slider.component.d.ts +0 -42
  148. package/components/input-slider/input-slider.module.d.ts +0 -18
  149. package/components/input-tag/index.d.ts +0 -3
  150. package/components/input-tag/input-tag.component.d.ts +0 -103
  151. package/components/input-tag/input-tag.module.d.ts +0 -22
  152. package/components/input-tag/input-tag.options.d.ts +0 -27
  153. package/components/input-time/index.d.ts +0 -4
  154. package/components/input-time/input-time.component.d.ts +0 -62
  155. package/components/input-time/input-time.directive.d.ts +0 -17
  156. package/components/input-time/input-time.module.d.ts +0 -23
  157. package/components/input-time/input-time.options.d.ts +0 -42
  158. package/components/input-time/native-time/native-time.component.d.ts +0 -12
  159. package/components/input-year/index.d.ts +0 -3
  160. package/components/input-year/input-year.component.d.ts +0 -36
  161. package/components/input-year/input-year.directive.d.ts +0 -14
  162. package/components/input-year/input-year.module.d.ts +0 -18
  163. package/components/island/index.d.ts +0 -1
  164. package/components/island/island.directive.d.ts +0 -20
  165. package/components/multi-select/hide-selected.pipe.d.ts +0 -11
  166. package/components/multi-select/index.d.ts +0 -10
  167. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +0 -23
  168. package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -8
  169. package/components/multi-select/multi-select.component.d.ts +0 -71
  170. package/components/multi-select/multi-select.directive.d.ts +0 -14
  171. package/components/multi-select/multi-select.module.d.ts +0 -31
  172. package/components/multi-select/multi-select.options.d.ts +0 -14
  173. package/components/multi-select/native-multi-select/native-multi-select-group.component.d.ts +0 -9
  174. package/components/multi-select/native-multi-select/native-multi-select.component.d.ts +0 -8
  175. package/components/multi-select/native-multi-select/native-multi-select.d.ts +0 -11
  176. package/components/multi-select-option/index.d.ts +0 -2
  177. package/components/multi-select-option/multi-select-option.component.d.ts +0 -9
  178. package/components/multi-select-option/multi-select-option.module.d.ts +0 -9
  179. package/components/sheet/components/sheet/sheet.component.d.ts +0 -31
  180. package/components/sheet/components/sheet/sheet.providers.d.ts +0 -2
  181. package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +0 -11
  182. package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +0 -14
  183. package/components/sheet/components/sheets-host/sheets-host.component.d.ts +0 -15
  184. package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +0 -14
  185. package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +0 -9
  186. package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +0 -14
  187. package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +0 -17
  188. package/components/sheet/index.d.ts +0 -14
  189. package/components/sheet/sheet-options.d.ts +0 -27
  190. package/components/sheet/sheet-tokens.d.ts +0 -18
  191. package/components/sheet/sheet.d.ts +0 -21
  192. package/components/sheet/sheet.directive.d.ts +0 -17
  193. package/components/sheet/sheet.module.d.ts +0 -24
  194. package/components/sheet/sheet.service.d.ts +0 -17
  195. package/components/svg/content-processor.d.ts +0 -19
  196. package/components/svg/deprecated-icons.d.ts +0 -5
  197. package/components/svg/index.d.ts +0 -5
  198. package/components/svg/svg-options.d.ts +0 -50
  199. package/components/svg/svg.component.d.ts +0 -50
  200. package/components/svg/svg.service.d.ts +0 -21
  201. package/components/table-bar/index.d.ts +0 -4
  202. package/components/table-bar/table-bar.component.d.ts +0 -17
  203. package/components/table-bar/table-bar.directive.d.ts +0 -11
  204. package/components/table-bar/table-bar.options.d.ts +0 -31
  205. package/components/table-bar/table-bars-host.component.d.ts +0 -10
  206. package/components/table-bar/table-bars.service.d.ts +0 -11
  207. package/components/tag/index.d.ts +0 -3
  208. package/components/tag/tag.component.d.ts +0 -44
  209. package/components/tag/tag.module.d.ts +0 -16
  210. package/components/tag/tag.options.d.ts +0 -27
  211. package/components/textarea/index.d.ts +0 -3
  212. package/components/textarea/textarea.component.d.ts +0 -54
  213. package/components/textarea/textarea.directive.d.ts +0 -12
  214. package/components/textarea/textarea.module.d.ts +0 -21
  215. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs +0 -730
  216. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs.map +0 -1
  217. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +0 -300
  218. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +0 -1
  219. package/fesm2022/taiga-ui-legacy-components-input-color.mjs +0 -127
  220. package/fesm2022/taiga-ui-legacy-components-input-color.mjs.map +0 -1
  221. package/fesm2022/taiga-ui-legacy-components-input-copy.mjs +0 -197
  222. package/fesm2022/taiga-ui-legacy-components-input-copy.mjs.map +0 -1
  223. package/fesm2022/taiga-ui-legacy-components-input-date-multi.mjs +0 -272
  224. package/fesm2022/taiga-ui-legacy-components-input-date-multi.mjs.map +0 -1
  225. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +0 -356
  226. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +0 -1
  227. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +0 -465
  228. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +0 -1
  229. package/fesm2022/taiga-ui-legacy-components-input-date.mjs +0 -372
  230. package/fesm2022/taiga-ui-legacy-components-input-date.mjs.map +0 -1
  231. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +0 -221
  232. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +0 -1
  233. package/fesm2022/taiga-ui-legacy-components-input-month.mjs +0 -231
  234. package/fesm2022/taiga-ui-legacy-components-input-month.mjs.map +0 -1
  235. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +0 -390
  236. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +0 -1
  237. package/fesm2022/taiga-ui-legacy-components-input-password.mjs +0 -187
  238. package/fesm2022/taiga-ui-legacy-components-input-password.mjs.map +0 -1
  239. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs +0 -215
  240. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs.map +0 -1
  241. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs +0 -358
  242. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs.map +0 -1
  243. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +0 -261
  244. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +0 -1
  245. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +0 -199
  246. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +0 -1
  247. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +0 -524
  248. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +0 -1
  249. package/fesm2022/taiga-ui-legacy-components-input-time.mjs +0 -430
  250. package/fesm2022/taiga-ui-legacy-components-input-time.mjs.map +0 -1
  251. package/fesm2022/taiga-ui-legacy-components-input-year.mjs +0 -188
  252. package/fesm2022/taiga-ui-legacy-components-input-year.mjs.map +0 -1
  253. package/fesm2022/taiga-ui-legacy-components-input.mjs +0 -156
  254. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +0 -1
  255. package/fesm2022/taiga-ui-legacy-components-island.mjs +0 -68
  256. package/fesm2022/taiga-ui-legacy-components-island.mjs.map +0 -1
  257. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs +0 -47
  258. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +0 -1
  259. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +0 -690
  260. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +0 -1
  261. package/fesm2022/taiga-ui-legacy-components-sheet.mjs +0 -577
  262. package/fesm2022/taiga-ui-legacy-components-sheet.mjs.map +0 -1
  263. package/fesm2022/taiga-ui-legacy-components-svg.mjs +0 -387
  264. package/fesm2022/taiga-ui-legacy-components-svg.mjs.map +0 -1
  265. package/fesm2022/taiga-ui-legacy-components-table-bar.mjs +0 -147
  266. package/fesm2022/taiga-ui-legacy-components-table-bar.mjs.map +0 -1
  267. package/fesm2022/taiga-ui-legacy-components-tag.mjs +0 -225
  268. package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +0 -1
  269. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +0 -262
  270. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +0 -1
  271. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs +0 -59
  272. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs.map +0 -1
  273. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs +0 -50
  274. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs.map +0 -1
  275. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs +0 -80
  276. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs.map +0 -1
  277. package/fesm2022/taiga-ui-legacy-pipes.mjs +0 -8
  278. package/fesm2022/taiga-ui-legacy-pipes.mjs.map +0 -1
  279. package/fesm2022/taiga-ui-legacy-services.mjs +0 -42
  280. package/fesm2022/taiga-ui-legacy-services.mjs.map +0 -1
  281. package/pipes/format-phone/format-phone.pipe.d.ts +0 -37
  282. package/pipes/format-phone/index.d.ts +0 -1
  283. package/pipes/index.d.ts +0 -3
  284. package/pipes/iso-to-country-code/index.d.ts +0 -1
  285. package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +0 -30
  286. package/pipes/to-country-code/index.d.ts +0 -1
  287. package/pipes/to-country-code/to-country-code.pipe.d.ts +0 -38
  288. package/services/index.d.ts +0 -1
  289. package/services/static-request.service.d.ts +0 -11
  290. package/utils/is-apple.d.ts +0 -5
@@ -1,262 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Input, ContentChild, ViewChild, ChangeDetectionStrategy, Component, Directive, NgModule } from '@angular/core';
3
- import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
4
- import { tuiIsNativeFocused } from '@taiga-ui/cdk/utils/focus';
5
- import { TUI_TEXTFIELD_OPTIONS } from '@taiga-ui/core/components/textfield';
6
- import { TuiHintOptionsDirective } from '@taiga-ui/core/directives/hint';
7
- import { AbstractTuiControl, tuiAsControl, AbstractTuiTextfieldHost } from '@taiga-ui/legacy/classes';
8
- import { TUI_ICON_START_PADDINGS, TuiTextfieldComponent, TuiPrimitiveTextfieldModule } from '@taiga-ui/legacy/components/primitive-textfield';
9
- import * as i4 from '@taiga-ui/legacy/directives';
10
- import { TUI_TEXTFIELD_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER, TuiWrapperModule } from '@taiga-ui/legacy/directives';
11
- import { tuiAsFocusableItemAccessor, tuiAsTextfieldHost } from '@taiga-ui/legacy/tokens';
12
- import { tuiGetBorder } from '@taiga-ui/legacy/utils';
13
- import * as i1 from '@angular/forms';
14
- import { FormsModule } from '@angular/forms';
15
- import * as i2 from '@taiga-ui/core/components/scrollbar';
16
- import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
17
- import * as i3 from '@taiga-ui/legacy/components/tooltip';
18
- import { TuiTooltipModule } from '@taiga-ui/legacy/components/tooltip';
19
- import * as i5 from '@taiga-ui/polymorpheus';
20
- import { PolymorpheusOutlet, PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
21
- import * as i6 from '@taiga-ui/core/components/icon';
22
- import { TuiIcon } from '@taiga-ui/core/components/icon';
23
- import * as i7 from '@taiga-ui/core/directives/appearance';
24
- import { TuiAppearance } from '@taiga-ui/core/directives/appearance';
25
- import * as i8 from '@angular/common';
26
- import { CommonModule } from '@angular/common';
27
-
28
- const DEFAULT_ROWS = 20;
29
- const LINE_HEIGHT_M = 20;
30
- const LINE_HEIGHT_L = 24;
31
- /**
32
- * TODO(v5): delete it
33
- * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead
34
- */
35
- class TuiTextareaComponent extends AbstractTuiControl {
36
- constructor() {
37
- super(...arguments);
38
- this.options = inject(TUI_TEXTFIELD_OPTIONS);
39
- this.isIOS = inject(TUI_IS_IOS);
40
- this.controller = inject(TUI_TEXTFIELD_WATCHED_CONTROLLER);
41
- this.hintOptions = inject(TuiHintOptionsDirective, { optional: true });
42
- this.rows = DEFAULT_ROWS;
43
- this.maxLength = null;
44
- this.expandable = false;
45
- }
46
- get nativeFocusableElement() {
47
- if (this.computedDisabled) {
48
- return null;
49
- }
50
- return (this.textfield?.nativeElement || this.focusableElement?.nativeElement || null);
51
- }
52
- get focused() {
53
- return tuiIsNativeFocused(this.nativeFocusableElement);
54
- }
55
- get computeMaxHeight() {
56
- return this.expandable ? this.rows * this.lineHeight : null;
57
- }
58
- onValueChange(value) {
59
- this.value = value;
60
- }
61
- get labelOutside() {
62
- return this.options.appearance() === 'table' || this.controller.labelOutside;
63
- }
64
- get size() {
65
- return this.controller.size;
66
- }
67
- get borderStart() {
68
- return this.iconLeftContent ? TUI_ICON_START_PADDINGS[this.size] : 0;
69
- }
70
- get borderEnd() {
71
- return tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent, this.size);
72
- }
73
- get hasTooltip() {
74
- return (!!this.hintOptions?.content &&
75
- (this.controller.options.hintOnDisabled || !this.computedDisabled));
76
- }
77
- get hasValue() {
78
- return this.value !== '';
79
- }
80
- get hasCounter() {
81
- return !!this.maxLength && this.interactive;
82
- }
83
- get appearance() {
84
- return this.options.appearance() === 'table'
85
- ? 'table'
86
- : this.controller.appearance;
87
- }
88
- get hasCleaner() {
89
- return this.controller.cleaner && this.hasValue && this.interactive;
90
- }
91
- get hasPlaceholder() {
92
- return this.placeholderRaisable || (!this.hasValue && !this.hasExampleText);
93
- }
94
- get hasCustomContent() {
95
- return !!this.controller.customContent;
96
- }
97
- get iconLeftContent() {
98
- return this.controller.iconStart;
99
- }
100
- get iconContent() {
101
- return this.controller.icon;
102
- }
103
- get iconCleaner() {
104
- return this.controller.options.iconCleaner;
105
- }
106
- get hasExampleText() {
107
- return (!!this.textfield?.nativeElement.placeholder &&
108
- this.focused &&
109
- !this.hasValue &&
110
- !this.readOnly);
111
- }
112
- get placeholderRaised() {
113
- return (this.placeholderRaisable &&
114
- ((this.computedFocused && !this.readOnly) || this.hasValue));
115
- }
116
- get fittedContent() {
117
- return this.value.slice(0, this.maxLength || Infinity);
118
- }
119
- get extraContent() {
120
- return this.value.slice(this.maxLength || Infinity);
121
- }
122
- onFocused(focused) {
123
- this.updateFocused(focused);
124
- }
125
- onMouseDown(event) {
126
- if (event.target === this.nativeFocusableElement) {
127
- return;
128
- }
129
- event.preventDefault();
130
- if (this.nativeFocusableElement) {
131
- this.nativeFocusableElement.focus();
132
- }
133
- }
134
- getFallbackValue() {
135
- return '';
136
- }
137
- get lineHeight() {
138
- return this.controller.size === 'm' ? LINE_HEIGHT_M : LINE_HEIGHT_L;
139
- }
140
- get placeholderRaisable() {
141
- return this.size !== 's' && !this.controller.labelOutside;
142
- }
143
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
144
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiTextareaComponent, isStandalone: false, selector: "tui-textarea", inputs: { rows: "rows", maxLength: "maxLength", expandable: "expandable" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)" }, properties: { "attr.data-size": "size", "class._ios": "isIOS", "class._expandable": "expandable", "class._has-counter": "hasCounter", "class._label-outside": "labelOutside", "class._has-tooltip": "hasTooltip", "class._has-value": "hasValue", "style.--t-border-end.rem": "borderEnd", "style.--t-border-start.rem": "borderStart" } }, providers: [
145
- tuiAsFocusableItemAccessor(TuiTextareaComponent),
146
- tuiAsControl(TuiTextareaComponent),
147
- TEXTFIELD_CONTROLLER_PROVIDER,
148
- ], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (hintOptions?.change$ | async) {}\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n @if (hasCounter) {\n <div\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n }\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n @if (hasPlaceholder) {\n <div\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content />\n </div>\n }\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModelOptions]=\"{standalone: true}\"\n [readOnly]=\"readOnly\"\n [tabIndex]=\"computedFocusable ? 0 : -1\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\" />\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n @if (iconLeftContent) {\n <div class=\"t-icon t-icon_left t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n @if (hasCustomContent) {\n <tui-icon\n *polymorpheusOutlet=\"controller.customContent as src\"\n [icon]=\"src\"\n />\n }\n @if (hasCleaner) {\n <tui-icon\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n class=\"t-cleaner\"\n [icon]=\"src.toString()\"\n (click.stop)=\"onValueChange('')\"\n />\n }\n @if (hasTooltip) {\n <tui-tooltip\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n />\n }\n @if (iconContent) {\n <div class=\"t-icon t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-block-size:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-primary)}:host :host-context(*:disabled){pointer-events:none}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance;white-space:break-spaces}}.t-outline{min-block-size:inherit}.t-content{display:block;margin-block-start:0;margin-block-end:0;min-block-size:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-block-size:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;inline-size:100%;block-size:100%;min-block-size:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-block-end:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-block-end:1rem}.t-input-wrapper{min-block-size:inherit;inline-size:100%;flex:1}.t-relative{position:relative;min-block-size:inherit}.t-box{display:flex;min-block-size:calc(100% - 1rem);inline-size:100%;box-sizing:content-box}:host:not(._expandable) .t-box{block-size:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{block-size:100%}:host._has-counter._expandable .t-box{margin-block-end:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-block-start:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-block-start:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;overflow-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-status-negative-pale)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;inline-size:100%;block-size:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border-style:solid;border-color:transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{-webkit-text-fill-color:var(--tui-text-primary)!important;border-color:var(--tui-service-autofill-background);box-shadow:0 0 0 100rem var(--tui-service-autofill-background) inset!important}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-tertiary);opacity:0}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-inline-start:.8125rem}}.t-pseudo-content,.t-input{word-break:break-word}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;inline-size:100%;-webkit-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-inline-size:100%;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-text-negative)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-tertiary)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-primary)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;block-size:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){margin-inline-start:.25rem}.t-icon{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{margin-inline-end:auto}.t-cleaner{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-cleaner:before{font-size:1rem}.t-caret{display:inline-block;block-size:1rem;inline-size:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-block-start:auto;text-align:end;color:var(--tui-text-tertiary)}:host._readonly .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]{pointer-events:none}@media (hover: hover) and (pointer: fine){:host:not(._readonly):not(._disabled):hover .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]:before{color:var(--tui-text-secondary)}}\n"], dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "component", type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }, { kind: "directive", type: i4.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { kind: "directive", type: i5.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i6.TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: i7.TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
149
- }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaComponent, decorators: [{
151
- type: Component,
152
- args: [{ standalone: false, selector: 'tui-textarea', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
153
- tuiAsFocusableItemAccessor(TuiTextareaComponent),
154
- tuiAsControl(TuiTextareaComponent),
155
- TEXTFIELD_CONTROLLER_PROVIDER,
156
- ], host: {
157
- '[attr.data-size]': 'size',
158
- '[class._ios]': 'isIOS',
159
- '[class._expandable]': 'expandable',
160
- '[class._has-counter]': 'hasCounter',
161
- '[class._label-outside]': 'labelOutside',
162
- '[class._has-tooltip]': 'hasTooltip',
163
- '[class._has-value]': 'hasValue',
164
- '[style.--t-border-end.rem]': 'borderEnd',
165
- '[style.--t-border-start.rem]': 'borderStart',
166
- '(focusin)': 'onFocused(true)',
167
- '(focusout)': 'onFocused(false)',
168
- }, template: "@if (hintOptions?.change$ | async) {}\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n @if (hasCounter) {\n <div\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n }\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n @if (hasPlaceholder) {\n <div\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content />\n </div>\n }\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModelOptions]=\"{standalone: true}\"\n [readOnly]=\"readOnly\"\n [tabIndex]=\"computedFocusable ? 0 : -1\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\" />\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n @if (iconLeftContent) {\n <div class=\"t-icon t-icon_left t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n @if (hasCustomContent) {\n <tui-icon\n *polymorpheusOutlet=\"controller.customContent as src\"\n [icon]=\"src\"\n />\n }\n @if (hasCleaner) {\n <tui-icon\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n class=\"t-cleaner\"\n [icon]=\"src.toString()\"\n (click.stop)=\"onValueChange('')\"\n />\n }\n @if (hasTooltip) {\n <tui-tooltip\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n />\n }\n @if (iconContent) {\n <div class=\"t-icon t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-block-size:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-primary)}:host :host-context(*:disabled){pointer-events:none}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance;white-space:break-spaces}}.t-outline{min-block-size:inherit}.t-content{display:block;margin-block-start:0;margin-block-end:0;min-block-size:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-block-size:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;inline-size:100%;block-size:100%;min-block-size:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-block-end:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-block-end:1rem}.t-input-wrapper{min-block-size:inherit;inline-size:100%;flex:1}.t-relative{position:relative;min-block-size:inherit}.t-box{display:flex;min-block-size:calc(100% - 1rem);inline-size:100%;box-sizing:content-box}:host:not(._expandable) .t-box{block-size:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{block-size:100%}:host._has-counter._expandable .t-box{margin-block-end:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-block-start:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-block-start:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;overflow-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-status-negative-pale)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;inline-size:100%;block-size:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border-style:solid;border-color:transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{-webkit-text-fill-color:var(--tui-text-primary)!important;border-color:var(--tui-service-autofill-background);box-shadow:0 0 0 100rem var(--tui-service-autofill-background) inset!important}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-tertiary);opacity:0}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-inline-start:.8125rem}}.t-pseudo-content,.t-input{word-break:break-word}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;inline-size:100%;-webkit-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-inline-size:100%;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-text-negative)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-tertiary)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-primary)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;block-size:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){margin-inline-start:.25rem}.t-icon{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{margin-inline-end:auto}.t-cleaner{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-cleaner:before{font-size:1rem}.t-caret{display:inline-block;block-size:1rem;inline-size:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-block-start:auto;text-align:end;color:var(--tui-text-tertiary)}:host._readonly .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]{pointer-events:none}@media (hover: hover) and (pointer: fine){:host:not(._readonly):not(._disabled):hover .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]:before{color:var(--tui-text-secondary)}}\n"] }]
169
- }], propDecorators: { focusableElement: [{
170
- type: ViewChild,
171
- args: ['focusableElement']
172
- }], textfield: [{
173
- type: ContentChild,
174
- args: [TuiTextfieldComponent, { read: ElementRef }]
175
- }], rows: [{
176
- type: Input
177
- }], maxLength: [{
178
- type: Input
179
- }], expandable: [{
180
- type: Input
181
- }] } });
182
-
183
- /**
184
- * TODO(v5): delete it
185
- * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead
186
- */
187
- class TuiTextareaDirective extends AbstractTuiTextfieldHost {
188
- onValueChange(value) {
189
- this.host.onValueChange(value);
190
- }
191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
192
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiTextareaDirective, isStandalone: false, selector: "tui-textarea", providers: [tuiAsTextfieldHost(TuiTextareaDirective)], usesInheritance: true, ngImport: i0 }); }
193
- }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaDirective, decorators: [{
195
- type: Directive,
196
- args: [{
197
- standalone: false,
198
- selector: 'tui-textarea',
199
- providers: [tuiAsTextfieldHost(TuiTextareaDirective)],
200
- }]
201
- }] });
202
-
203
- /**
204
- * TODO(v5): delete it
205
- * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead
206
- */
207
- class TuiTextareaModule {
208
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
209
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, declarations: [TuiTextareaComponent, TuiTextareaDirective], imports: [CommonModule,
210
- FormsModule,
211
- TuiScrollbar,
212
- TuiTooltipModule,
213
- TuiWrapperModule,
214
- TuiPrimitiveTextfieldModule,
215
- PolymorpheusOutlet,
216
- PolymorpheusTemplate,
217
- TuiIcon,
218
- TuiAppearance], exports: [TuiTextareaComponent,
219
- TuiTextareaDirective,
220
- TuiTextfieldComponent,
221
- PolymorpheusOutlet,
222
- PolymorpheusTemplate] }); }
223
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, imports: [CommonModule,
224
- FormsModule,
225
- TuiScrollbar,
226
- TuiTooltipModule,
227
- TuiWrapperModule,
228
- TuiPrimitiveTextfieldModule,
229
- TuiIcon] }); }
230
- }
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, decorators: [{
232
- type: NgModule,
233
- args: [{
234
- imports: [
235
- CommonModule,
236
- FormsModule,
237
- TuiScrollbar,
238
- TuiTooltipModule,
239
- TuiWrapperModule,
240
- TuiPrimitiveTextfieldModule,
241
- PolymorpheusOutlet,
242
- PolymorpheusTemplate,
243
- TuiIcon,
244
- TuiAppearance,
245
- ],
246
- declarations: [TuiTextareaComponent, TuiTextareaDirective],
247
- exports: [
248
- TuiTextareaComponent,
249
- TuiTextareaDirective,
250
- TuiTextfieldComponent,
251
- PolymorpheusOutlet,
252
- PolymorpheusTemplate,
253
- ],
254
- }]
255
- }] });
256
-
257
- /**
258
- * Generated bundle index. Do not edit.
259
- */
260
-
261
- export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TuiTextareaComponent, TuiTextareaDirective, TuiTextareaModule };
262
- //# sourceMappingURL=taiga-ui-legacy-components-textarea.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-components-textarea.mjs","sources":["../../../projects/legacy/components/textarea/textarea.component.ts","../../../projects/legacy/components/textarea/textarea.template.html","../../../projects/legacy/components/textarea/textarea.directive.ts","../../../projects/legacy/components/textarea/textarea.module.ts","../../../projects/legacy/components/textarea/taiga-ui-legacy-components-textarea.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n inject,\n Input,\n ViewChild,\n} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TUI_TEXTFIELD_OPTIONS} from '@taiga-ui/core/components/textfield';\nimport {TuiHintOptionsDirective} from '@taiga-ui/core/directives/hint';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {AbstractTuiControl, tuiAsControl} from '@taiga-ui/legacy/classes';\nimport {\n TUI_ICON_START_PADDINGS,\n TuiTextfieldComponent,\n} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n} from '@taiga-ui/legacy/directives';\nimport {\n tuiAsFocusableItemAccessor,\n type TuiFocusableElementAccessor,\n} from '@taiga-ui/legacy/tokens';\nimport {tuiGetBorder} from '@taiga-ui/legacy/utils';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead\n */\n@Component({\n standalone: false,\n selector: 'tui-textarea',\n templateUrl: './textarea.template.html',\n styleUrls: ['./textarea.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiTextareaComponent),\n tuiAsControl(TuiTextareaComponent),\n TEXTFIELD_CONTROLLER_PROVIDER,\n ],\n host: {\n '[attr.data-size]': 'size',\n '[class._ios]': 'isIOS',\n '[class._expandable]': 'expandable',\n '[class._has-counter]': 'hasCounter',\n '[class._label-outside]': 'labelOutside',\n '[class._has-tooltip]': 'hasTooltip',\n '[class._has-value]': 'hasValue',\n '[style.--t-border-end.rem]': 'borderEnd',\n '[style.--t-border-start.rem]': 'borderStart',\n '(focusin)': 'onFocused(true)',\n '(focusout)': 'onFocused(false)',\n },\n})\nexport class TuiTextareaComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLTextAreaElement>;\n\n @ContentChild(TuiTextfieldComponent, {read: ElementRef})\n private readonly textfield?: ElementRef<HTMLTextAreaElement>;\n\n private readonly options = inject(TUI_TEXTFIELD_OPTIONS);\n\n protected readonly isIOS = inject(TUI_IS_IOS);\n protected readonly controller = inject(TUI_TEXTFIELD_WATCHED_CONTROLLER);\n protected readonly hintOptions = inject(TuiHintOptionsDirective, {optional: true});\n\n @Input()\n public rows = DEFAULT_ROWS;\n\n @Input()\n public maxLength: number | null = null;\n\n @Input()\n public expandable = false;\n\n public get nativeFocusableElement(): HTMLTextAreaElement | null {\n if (this.computedDisabled) {\n return null;\n }\n\n return (\n this.textfield?.nativeElement || this.focusableElement?.nativeElement || null\n );\n }\n\n public get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n public get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n public onValueChange(value: string): void {\n this.value = value;\n }\n\n protected get labelOutside(): boolean {\n return this.options.appearance() === 'table' || this.controller.labelOutside;\n }\n\n protected get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n protected get borderStart(): number {\n return this.iconLeftContent ? TUI_ICON_START_PADDINGS[this.size] : 0;\n }\n\n protected get borderEnd(): number {\n return tuiGetBorder(\n !!this.iconContent,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n this.size,\n );\n }\n\n protected get hasTooltip(): boolean {\n return (\n !!this.hintOptions?.content &&\n (this.controller.options.hintOnDisabled || !this.computedDisabled)\n );\n }\n\n protected get hasValue(): boolean {\n return this.value !== '';\n }\n\n protected get hasCounter(): boolean {\n return !!this.maxLength && this.interactive;\n }\n\n protected get appearance(): string {\n return this.options.appearance() === 'table'\n ? 'table'\n : this.controller.appearance;\n }\n\n protected get hasCleaner(): boolean {\n return this.controller.cleaner && this.hasValue && this.interactive;\n }\n\n protected get hasPlaceholder(): boolean {\n return this.placeholderRaisable || (!this.hasValue && !this.hasExampleText);\n }\n\n protected get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n protected get iconLeftContent(): PolymorpheusContent<\n TuiContext<TuiSizeL | TuiSizeS>\n > {\n return this.controller.iconStart;\n }\n\n protected get iconContent(): PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeS>> {\n return this.controller.icon;\n }\n\n protected get iconCleaner(): PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeS>> {\n return this.controller.options.iconCleaner;\n }\n\n protected get hasExampleText(): boolean {\n return (\n !!this.textfield?.nativeElement.placeholder &&\n this.focused &&\n !this.hasValue &&\n !this.readOnly\n );\n }\n\n protected get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n protected get fittedContent(): string {\n return this.value.slice(0, this.maxLength || Infinity);\n }\n\n protected get extraContent(): string {\n return this.value.slice(this.maxLength || Infinity);\n }\n\n protected onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n protected onMouseDown(event: MouseEvent): void {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.focus();\n }\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private get lineHeight(): number {\n return this.controller.size === 'm' ? LINE_HEIGHT_M : LINE_HEIGHT_L;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.controller.labelOutside;\n }\n}\n","@if (hintOptions?.change$ | async) {}\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n @if (hasCounter) {\n <div\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n }\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n @if (hasPlaceholder) {\n <div\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content />\n </div>\n }\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModelOptions]=\"{standalone: true}\"\n [readOnly]=\"readOnly\"\n [tabIndex]=\"computedFocusable ? 0 : -1\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\" />\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n @if (iconLeftContent) {\n <div class=\"t-icon t-icon_left t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n @if (hasCustomContent) {\n <tui-icon\n *polymorpheusOutlet=\"controller.customContent as src\"\n [icon]=\"src\"\n />\n }\n @if (hasCleaner) {\n <tui-icon\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n class=\"t-cleaner\"\n [icon]=\"src.toString()\"\n (click.stop)=\"onValueChange('')\"\n />\n }\n @if (hasTooltip) {\n <tui-tooltip\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n />\n }\n @if (iconContent) {\n <div class=\"t-icon t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n </div>\n </label>\n</div>\n","import {Directive} from '@angular/core';\nimport {AbstractTuiTextfieldHost} from '@taiga-ui/legacy/classes';\nimport {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';\n\nimport {type TuiTextareaComponent} from './textarea.component';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead\n */\n@Directive({\n standalone: false,\n selector: 'tui-textarea',\n providers: [tuiAsTextfieldHost(TuiTextareaDirective)],\n})\nexport class TuiTextareaDirective extends AbstractTuiTextfieldHost<TuiTextareaComponent> {\n public onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {TuiTooltipModule} from '@taiga-ui/legacy/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/legacy/directives';\nimport {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiTextareaComponent} from './textarea.component';\nimport {TuiTextareaDirective} from './textarea.directive';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead\n */\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiScrollbar,\n TuiTooltipModule,\n TuiWrapperModule,\n TuiPrimitiveTextfieldModule,\n PolymorpheusOutlet,\n PolymorpheusTemplate,\n TuiIcon,\n TuiAppearance,\n ],\n declarations: [TuiTextareaComponent, TuiTextareaDirective],\n exports: [\n TuiTextareaComponent,\n TuiTextareaDirective,\n TuiTextfieldComponent,\n PolymorpheusOutlet,\n PolymorpheusTemplate,\n ],\n})\nexport class TuiTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAM,YAAY,GAAG;AACrB,MAAM,aAAa,GAAG;AACtB,MAAM,aAAa,GAAG;AAE7B;;;AAGG;AA0BG,MAAO,oBACT,SAAQ,kBAA0B,CAAA;AA1BtC,IAAA,WAAA,GAAA;;AAmCqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAErC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;AAC1B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A,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EATX,YAAA,EAAA,CAAA,oBAAoB,EAAE,oBAAoB,aAXrD,YAAY;YACZ,WAAW;YACX,YAAY;YACZ,gBAAgB;YAChB,gBAAgB;YAChB,2BAA2B;YAC3B,kBAAkB;YAClB,oBAAoB;YACpB,OAAO;AACP,YAAA,aAAa,aAIb,oBAAoB;YACpB,oBAAoB;YACpB,qBAAqB;YACrB,kBAAkB;YAClB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YApBtB,YAAY;YACZ,WAAW;YACX,YAAY;YACZ,gBAAgB;YAChB,gBAAgB;YAChB,2BAA2B;YAG3B,OAAO,CAAA,EAAA,CAAA,CAAA;;4FAYF,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAtB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,YAAY;wBACZ,gBAAgB;wBAChB,gBAAgB;wBAChB,2BAA2B;wBAC3B,kBAAkB;wBAClB,oBAAoB;wBACpB,OAAO;wBACP,aAAa;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;AAC1D,oBAAA,OAAO,EAAE;wBACL,oBAAoB;wBACpB,oBAAoB;wBACpB,qBAAqB;wBACrB,kBAAkB;wBAClB,oBAAoB;AACvB,qBAAA;AACJ,iBAAA;;;AC1CD;;AAEG;;;;"}
@@ -1,59 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Pipe } from '@angular/core';
3
- import { CHAR_PLUS } from '@taiga-ui/cdk/constants';
4
- import { tuiFormatPhone } from '@taiga-ui/legacy/utils';
5
-
6
- /// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
7
- /**
8
- * @deprecated: drop in v5.0
9
- */
10
- class TuiFormatPhonePipe {
11
- /**
12
- * Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!
13
- * ```ts
14
- * import {maskitoTransform} from '@maskito/core';
15
- * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';
16
- * import metadata from 'libphonenumber-js/min/metadata';
17
- *
18
- * @Component({
19
- * standalone: true,
20
- * imports: [MaskitoPipe],
21
- * template: `
22
- * Phone: {{'12125552368' | maskito: options}}
23
- * <!-- Phone: +1 (212) 555-2368 -->
24
- * `,
25
- * })
26
- * export class YourComponent {
27
- * options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});
28
- * }
29
- * ```
30
- * ___
31
- * @deprecated Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!
32
- * Formats phone number string of +7XXXXXXXXXX format with adding separator symbols
33
- * @param value
34
- * @param countryCode
35
- * @param phoneMask
36
- * @return formatted phone number string +7(XXX)XXX-XX-XX
37
- */
38
- transform(value, countryCode = `${CHAR_PLUS}7`, phoneMask = '(###) ###-##-##') {
39
- ngDevMode &&
40
- console.assert(value !== undefined, 'Undefined was passed to tuiFormatPhone pipe');
41
- return tuiFormatPhone(value, countryCode, phoneMask);
42
- }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatPhonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
44
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatPhonePipe, isStandalone: true, name: "tuiFormatPhone" }); }
45
- }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatPhonePipe, decorators: [{
47
- type: Pipe,
48
- args: [{
49
- standalone: true,
50
- name: 'tuiFormatPhone',
51
- }]
52
- }] });
53
-
54
- /**
55
- * Generated bundle index. Do not edit.
56
- */
57
-
58
- export { TuiFormatPhonePipe };
59
- //# sourceMappingURL=taiga-ui-legacy-pipes-format-phone.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes-format-phone.mjs","sources":["../../../projects/legacy/pipes/format-phone/format-phone.pipe.ts","../../../projects/legacy/pipes/format-phone/taiga-ui-legacy-pipes-format-phone.ts"],"sourcesContent":["/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {Pipe, type PipeTransform} from '@angular/core';\nimport {CHAR_PLUS} from '@taiga-ui/cdk/constants';\nimport {tuiFormatPhone} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0\n */\n@Pipe({\n standalone: true,\n name: 'tuiFormatPhone',\n})\nexport class TuiFormatPhonePipe implements PipeTransform {\n /**\n * Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!\n * ```ts\n * import {maskitoTransform} from '@maskito/core';\n * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * @Component({\n * standalone: true,\n * imports: [MaskitoPipe],\n * template: `\n * Phone: {{'12125552368' | maskito: options}}\n * <!-- Phone: +1 (212) 555-2368 -->\n * `,\n * })\n * export class YourComponent {\n * options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});\n * }\n * ```\n * ___\n * @deprecated Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!\n * Formats phone number string of +7XXXXXXXXXX format with adding separator symbols\n * @param value\n * @param countryCode\n * @param phoneMask\n * @return formatted phone number string +7(XXX)XXX-XX-XX\n */\n public transform(\n value: string,\n countryCode = `${CHAR_PLUS}7`,\n phoneMask = '(###) ###-##-##',\n ): string {\n ngDevMode &&\n console.assert(\n value !== undefined,\n 'Undefined was passed to tuiFormatPhone pipe',\n );\n\n return tuiFormatPhone(value, countryCode, phoneMask);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AAKA;;AAEG;MAKU,kBAAkB,CAAA;AAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;IACI,SAAS,CACZ,KAAa,EACb,WAAW,GAAG,CAAG,EAAA,SAAS,CAAG,CAAA,CAAA,EAC7B,SAAS,GAAG,iBAAiB,EAAA;QAE7B,SAAS;YACL,OAAO,CAAC,MAAM,CACV,KAAK,KAAK,SAAS,EACnB,6CAA6C,CAChD;QAEL,OAAO,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC;;+GAvC/C,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -1,50 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Pipe } from '@angular/core';
3
- import { TUI_COUNTRIES_MASKS } from '@taiga-ui/legacy/tokens';
4
- import { tuiIsoToCountryCode } from '@taiga-ui/legacy/utils';
5
-
6
- /**
7
- * @deprecated: drop in v5.0
8
- * Use `getCountryCallingCode` from `libphonenumber-js/core` instead
9
- * ```ts
10
- * import {getCountryCallingCode} from 'libphonenumber-js/core';
11
- * import metadata from 'libphonenumber-js/max/metadata';
12
- *
13
- * getCountryCallingCode('US', metadata) // 1
14
- * getCountryCallingCode('GB', metadata) // 44
15
- * ```
16
- */
17
- class TuiIsoToCountryCodePipe {
18
- constructor() {
19
- this.countriesMasks = inject(TUI_COUNTRIES_MASKS);
20
- }
21
- /**
22
- * @deprecated Use `getCountryCallingCode` from `libphonenumber-js/core` instead
23
- * ```ts
24
- * import {getCountryCallingCode} from 'libphonenumber-js/core';
25
- * import metadata from 'libphonenumber-js/max/metadata';
26
- *
27
- * getCountryCallingCode('US', metadata) // 1
28
- * getCountryCallingCode('GB', metadata) // 44
29
- * ```
30
- */
31
- transform(isoCode) {
32
- return tuiIsoToCountryCode(this.countriesMasks, isoCode);
33
- }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIsoToCountryCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
35
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiIsoToCountryCodePipe, isStandalone: true, name: "tuiIsoToCountryCode" }); }
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIsoToCountryCodePipe, decorators: [{
38
- type: Pipe,
39
- args: [{
40
- standalone: true,
41
- name: 'tuiIsoToCountryCode',
42
- }]
43
- }] });
44
-
45
- /**
46
- * Generated bundle index. Do not edit.
47
- */
48
-
49
- export { TuiIsoToCountryCodePipe };
50
- //# sourceMappingURL=taiga-ui-legacy-pipes-iso-to-country-code.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes-iso-to-country-code.mjs","sources":["../../../projects/legacy/pipes/iso-to-country-code/iso-to-country-code.pipe.ts","../../../projects/legacy/pipes/iso-to-country-code/taiga-ui-legacy-pipes-iso-to-country-code.ts"],"sourcesContent":["import {inject, Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TUI_COUNTRIES_MASKS} from '@taiga-ui/legacy/tokens';\nimport {tuiIsoToCountryCode} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0\n * Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\n@Pipe({\n standalone: true,\n name: 'tuiIsoToCountryCode',\n})\nexport class TuiIsoToCountryCodePipe implements PipeTransform {\n private readonly countriesMasks = inject(TUI_COUNTRIES_MASKS);\n\n /**\n * @deprecated Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\n public transform(isoCode: TuiCountryIsoCode): string {\n return tuiIsoToCountryCode(this.countriesMasks, isoCode);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA;;;;;;;;;;AAUG;MAKU,uBAAuB,CAAA;AAJpC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAehE;AAbG;;;;;;;;;AASG;AACI,IAAA,SAAS,CAAC,OAA0B,EAAA;QACvC,OAAO,mBAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;;+GAdnD,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,qBAAqB;AAC9B,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -1,80 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Pipe } from '@angular/core';
3
- import { CHAR_PLUS } from '@taiga-ui/cdk/constants';
4
- import { TUI_COUNTRIES_MASKS } from '@taiga-ui/legacy/tokens';
5
- import { tuiGetMaxAllowedPhoneLength, tuiIsoToCountryCode, tuiNotKzRegion } from '@taiga-ui/legacy/utils';
6
-
7
- /**
8
- * @deprecated: drop in v5.0
9
- * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
10
- * ```
11
- * npm i @maskito/phone
12
- * ```
13
- *
14
- * ```ts
15
- * import {maskitoGetCountryFromNumber} from '@maskito/phone';
16
- * import metadata from 'libphonenumber-js/min/metadata';
17
- *
18
- * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'
19
- * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'
20
- * ```
21
- */
22
- class TuiToCountryCodePipe {
23
- constructor() {
24
- this.countriesMasks = inject(TUI_COUNTRIES_MASKS);
25
- }
26
- /**
27
- * @deprecated use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
28
- * ```
29
- * npm i @maskito/phone
30
- * ```
31
- *
32
- * ```ts
33
- * import {maskitoGetCountryFromNumber} from '@maskito/phone';
34
- * import metadata from 'libphonenumber-js/min/metadata';
35
- *
36
- * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'
37
- * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'
38
- * ```
39
- */
40
- transform(value, countries) {
41
- return countries.find((countryIsoCode) => {
42
- const ruCodeTest = countryIsoCode === 'RU' &&
43
- /^[78]/.test(value) &&
44
- /^(?!880[1-9 ])/.test(value) &&
45
- value.length + 1 ===
46
- tuiGetMaxAllowedPhoneLength(this.countriesMasks, 'RU');
47
- const matched = ruCodeTest ||
48
- (value.startsWith(tuiIsoToCountryCode(this.countriesMasks, countryIsoCode).replace(CHAR_PLUS, '')) &&
49
- value.length + 1 ===
50
- tuiGetMaxAllowedPhoneLength(this.countriesMasks, countryIsoCode));
51
- if (matched) {
52
- switch (countryIsoCode) {
53
- case 'KZ':
54
- return !tuiNotKzRegion(value);
55
- case 'RU':
56
- return tuiNotKzRegion(value);
57
- default:
58
- return true;
59
- }
60
- }
61
- return false;
62
- });
63
- }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiToCountryCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
65
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiToCountryCodePipe, isStandalone: true, name: "tuiToCountryCode" }); }
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiToCountryCodePipe, decorators: [{
68
- type: Pipe,
69
- args: [{
70
- standalone: true,
71
- name: 'tuiToCountryCode',
72
- }]
73
- }] });
74
-
75
- /**
76
- * Generated bundle index. Do not edit.
77
- */
78
-
79
- export { TuiToCountryCodePipe };
80
- //# sourceMappingURL=taiga-ui-legacy-pipes-to-country-code.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes-to-country-code.mjs","sources":["../../../projects/legacy/pipes/to-country-code/to-country-code.pipe.ts","../../../projects/legacy/pipes/to-country-code/taiga-ui-legacy-pipes-to-country-code.ts"],"sourcesContent":["import {inject, Pipe, type PipeTransform} from '@angular/core';\nimport {CHAR_PLUS} from '@taiga-ui/cdk/constants';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TUI_COUNTRIES_MASKS} from '@taiga-ui/legacy/tokens';\nimport {\n tuiGetMaxAllowedPhoneLength,\n tuiIsoToCountryCode,\n tuiNotKzRegion,\n} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0\n * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'\n * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'\n * ```\n */\n@Pipe({\n standalone: true,\n name: 'tuiToCountryCode',\n})\nexport class TuiToCountryCodePipe implements PipeTransform {\n private readonly countriesMasks = inject(TUI_COUNTRIES_MASKS);\n\n /**\n * @deprecated use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'\n * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'\n * ```\n */\n public transform(\n value: string,\n countries: readonly TuiCountryIsoCode[],\n ): TuiCountryIsoCode | undefined {\n return countries.find((countryIsoCode) => {\n const ruCodeTest =\n countryIsoCode === 'RU' &&\n /^[78]/.test(value) &&\n /^(?!880[1-9 ])/.test(value) &&\n value.length + 1 ===\n tuiGetMaxAllowedPhoneLength(this.countriesMasks, 'RU');\n\n const matched =\n ruCodeTest ||\n (value.startsWith(\n tuiIsoToCountryCode(this.countriesMasks, countryIsoCode).replace(\n CHAR_PLUS,\n '',\n ),\n ) &&\n value.length + 1 ===\n tuiGetMaxAllowedPhoneLength(this.countriesMasks, countryIsoCode));\n\n if (matched) {\n switch (countryIsoCode) {\n case 'KZ':\n return !tuiNotKzRegion(value);\n case 'RU':\n return tuiNotKzRegion(value);\n default:\n return true;\n }\n }\n\n return false;\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAUA;;;;;;;;;;;;;;AAcG;MAKU,oBAAoB,CAAA;AAJjC,IAAA,WAAA,G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I;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,kBAAkB;AAC3B,iBAAA;;;AC5BD;;AAEG;;;;"}
@@ -1,8 +0,0 @@
1
- export * from '@taiga-ui/legacy/pipes/format-phone';
2
- export * from '@taiga-ui/legacy/pipes/iso-to-country-code';
3
- export * from '@taiga-ui/legacy/pipes/to-country-code';
4
-
5
- /**
6
- * Generated bundle index. Do not edit.
7
- */
8
- //# sourceMappingURL=taiga-ui-legacy-pipes.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes.mjs","sources":["../../../projects/legacy/pipes/taiga-ui-legacy-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;AAEG"}