@taiga-ui/kit 2.35.0 → 2.37.1

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 (473) hide show
  1. package/abstract/input-slider.d.ts +22 -3
  2. package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
  3. package/bundles/taiga-ui-kit-abstract.umd.js +65 -17
  4. package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
  6. package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-accordion.umd.js +1 -1
  8. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
  10. package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
  12. package/bundles/taiga-ui-kit-components-arrow.umd.min.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  14. package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-badged-content.umd.js +1 -1
  16. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +1 -1
  18. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-combo-box.umd.js +1 -1
  20. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +1 -1
  22. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +4 -4
  24. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +2 -2
  26. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-files.umd.js +504 -0
  28. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -0
  29. package/bundles/taiga-ui-kit-components-files.umd.min.js +16 -0
  30. package/bundles/taiga-ui-kit-components-files.umd.min.js.map +1 -0
  31. package/bundles/taiga-ui-kit-components-input-count.umd.js +2 -2
  32. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
  34. package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +3 -1
  36. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
  38. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  40. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
  42. package/bundles/taiga-ui-kit-components-input-date.umd.js +4 -2
  43. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  44. package/bundles/taiga-ui-kit-components-input-date.umd.min.js +1 -1
  45. package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
  46. package/bundles/taiga-ui-kit-components-input-file.umd.js +43 -45
  47. package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
  48. package/bundles/taiga-ui-kit-components-input-file.umd.min.js +1 -1
  49. package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-kit-components-input-files.umd.js +490 -0
  51. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -0
  52. package/bundles/taiga-ui-kit-components-input-files.umd.min.js +16 -0
  53. package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -0
  54. package/bundles/taiga-ui-kit-components-input-number.umd.js +16 -14
  55. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  56. package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
  57. package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-kit-components-input-password.umd.js +2 -2
  59. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  60. package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
  61. package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +20 -8
  63. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  64. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +2 -2
  65. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
  66. package/bundles/taiga-ui-kit-components-input-phone.umd.js +5 -4
  67. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  68. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
  69. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
  70. package/bundles/taiga-ui-kit-components-input-range.umd.js +16 -4
  71. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  72. package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
  73. package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
  74. package/bundles/taiga-ui-kit-components-input-slider.umd.js +61 -14
  75. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  76. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +2 -2
  77. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
  78. package/bundles/taiga-ui-kit-components-input-tag.umd.js +2 -2
  79. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  80. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +2 -2
  81. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
  82. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
  84. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
  86. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +3 -2
  87. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  88. package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
  89. package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js.map +1 -1
  90. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +2 -2
  91. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  92. package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js +1 -1
  93. package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js.map +1 -1
  94. package/bundles/taiga-ui-kit-components-multi-select.umd.js +2 -2
  95. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  96. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
  97. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
  98. package/bundles/taiga-ui-kit-components-pagination.umd.js +1 -1
  99. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  100. package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
  101. package/bundles/taiga-ui-kit-components-pagination.umd.min.js.map +1 -1
  102. package/bundles/taiga-ui-kit-components-progress.umd.js +1 -1
  103. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  104. package/bundles/taiga-ui-kit-components-progress.umd.min.js +1 -1
  105. package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
  106. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
  108. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
  110. package/bundles/taiga-ui-kit-components-slider.umd.js +178 -16
  111. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  112. package/bundles/taiga-ui-kit-components-slider.umd.min.js +2 -2
  113. package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
  114. package/bundles/taiga-ui-kit-components-text-area.umd.js +50 -13
  115. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  116. package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
  117. package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
  118. package/bundles/taiga-ui-kit-components.umd.js +20 -4
  119. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  120. package/bundles/taiga-ui-kit-components.umd.min.js +1 -1
  121. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +22 -5
  122. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js +1 -1
  124. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
  125. package/bundles/taiga-ui-kit-enums.umd.js.map +1 -1
  126. package/bundles/taiga-ui-kit-enums.umd.min.js.map +1 -1
  127. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +10 -2
  128. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js +1 -1
  130. package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js.map +1 -1
  131. package/bundles/taiga-ui-kit-tokens.umd.js +8 -0
  132. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
  134. package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
  135. package/bundles/taiga-ui-kit-utils-files.umd.js +8 -0
  136. package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
  137. package/bundles/taiga-ui-kit-utils-files.umd.min.js +1 -1
  138. package/bundles/taiga-ui-kit-utils-files.umd.min.js.map +1 -1
  139. package/components/arrow/arrow-options.d.ts +4 -2
  140. package/components/arrow/taiga-ui-kit-components-arrow.metadata.json +1 -1
  141. package/components/badge/badge.component.d.ts +2 -1
  142. package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
  143. package/components/combo-box/combo-box.component.d.ts +4 -4
  144. package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
  145. package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
  146. package/components/files/file/file.component.d.ts +42 -0
  147. package/components/files/files.component.d.ts +12 -0
  148. package/components/files/files.module.d.ts +2 -0
  149. package/components/files/index.d.ts +2 -0
  150. package/components/files/package.json +13 -0
  151. package/components/files/taiga-ui-kit-components-files.d.ts +5 -0
  152. package/components/files/taiga-ui-kit-components-files.metadata.json +1 -0
  153. package/components/index.d.ts +2 -0
  154. package/components/input/input.component.d.ts +2 -2
  155. package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
  156. package/components/input-count/input-count.component.d.ts +3 -2
  157. package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
  158. package/components/input-date/input-date.component.d.ts +5 -3
  159. package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
  160. package/components/input-date-range/input-date-range.component.d.ts +3 -2
  161. package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
  162. package/components/input-date-time/input-date-time.component.d.ts +7 -5
  163. package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
  164. package/components/input-file/file/file.component.d.ts +1 -1
  165. package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
  166. package/components/input-files/index.d.ts +2 -0
  167. package/components/input-files/input-files.component.d.ts +41 -0
  168. package/components/input-files/input-files.module.d.ts +2 -0
  169. package/components/input-files/package.json +13 -0
  170. package/components/input-files/taiga-ui-kit-components-input-files.d.ts +4 -0
  171. package/components/input-files/taiga-ui-kit-components-input-files.metadata.json +1 -0
  172. package/components/input-number/input-number.component.d.ts +3 -2
  173. package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
  174. package/components/input-password/input-password.component.d.ts +4 -3
  175. package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
  176. package/components/input-phone/input-phone.component.d.ts +5 -6
  177. package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
  178. package/components/input-phone-international/input-phone-international.component.d.ts +4 -2
  179. package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
  180. package/components/input-range/input-range.component.d.ts +2 -0
  181. package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
  182. package/components/input-slider/input-slider.component.d.ts +19 -3
  183. package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
  184. package/components/input-tag/input-tag.component.d.ts +2 -1
  185. package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
  186. package/components/input-time/input-time.component.d.ts +2 -2
  187. package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
  188. package/components/multi-select/multi-select.component.d.ts +5 -5
  189. package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
  190. package/components/multi-select-option/taiga-ui-kit-components-multi-select-option.metadata.json +1 -1
  191. package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
  192. package/components/progress/utils/calculate-color-segments.d.ts +0 -4
  193. package/components/radio/radio.component.d.ts +1 -1
  194. package/components/select/select.component.d.ts +4 -4
  195. package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
  196. package/components/slider/index.d.ts +2 -0
  197. package/components/slider/slider-key-steps.directive.d.ts +27 -0
  198. package/components/slider/slider-options.d.ts +9 -0
  199. package/components/slider/slider.component.d.ts +6 -3
  200. package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
  201. package/components/taiga-ui-kit-components.metadata.json +1 -1
  202. package/components/text-area/index.d.ts +1 -0
  203. package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
  204. package/components/text-area/text-area.component.d.ts +2 -1
  205. package/components/text-area/text-area.directive.d.ts +5 -0
  206. package/directives/dropdown-selection/dropdown-selection.directive.d.ts +2 -2
  207. package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.metadata.json +1 -1
  208. package/enums/file-state.d.ts +1 -0
  209. package/enums/taiga-ui-kit-enums.metadata.json +1 -1
  210. package/esm2015/abstract/input-slider.js +43 -4
  211. package/esm2015/components/accordion/accordion.component.js +2 -2
  212. package/esm2015/components/arrow/arrow-options.js +1 -1
  213. package/esm2015/components/badge/badge.component.js +1 -1
  214. package/esm2015/components/badged-content/badged-content.component.js +3 -3
  215. package/esm2015/components/combo-box/combo-box.component.js +2 -2
  216. package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +3 -3
  217. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +3 -3
  218. package/esm2015/components/files/file/file.component.js +164 -0
  219. package/esm2015/components/files/files.component.js +45 -0
  220. package/esm2015/components/files/files.module.js +29 -0
  221. package/esm2015/components/files/index.js +3 -0
  222. package/esm2015/components/files/taiga-ui-kit-components-files.js +6 -0
  223. package/esm2015/components/index.js +3 -1
  224. package/esm2015/components/input/input.component.js +1 -1
  225. package/esm2015/components/input-count/input-count.component.js +3 -3
  226. package/esm2015/components/input-date/input-date.component.js +5 -3
  227. package/esm2015/components/input-date-range/input-date-range.component.js +4 -2
  228. package/esm2015/components/input-date-time/input-date-time.component.js +2 -2
  229. package/esm2015/components/input-file/file/file.component.js +19 -19
  230. package/esm2015/components/input-file/input-file.component.js +7 -7
  231. package/esm2015/components/input-file/input-file.module.js +3 -3
  232. package/esm2015/components/input-files/index.js +3 -0
  233. package/esm2015/components/input-files/input-files.component.js +208 -0
  234. package/esm2015/components/input-files/input-files.module.js +34 -0
  235. package/esm2015/components/input-files/taiga-ui-kit-components-input-files.js +5 -0
  236. package/esm2015/components/input-number/input-number.component.js +5 -5
  237. package/esm2015/components/input-password/input-password.component.js +3 -3
  238. package/esm2015/components/input-phone/input-phone.component.js +6 -5
  239. package/esm2015/components/input-phone-international/input-phone-international.component.js +20 -6
  240. package/esm2015/components/input-range/input-range.component.js +18 -6
  241. package/esm2015/components/input-slider/input-slider.component.js +55 -11
  242. package/esm2015/components/input-slider/input-slider.module.js +10 -6
  243. package/esm2015/components/input-tag/input-tag.component.js +3 -3
  244. package/esm2015/components/input-time/input-time.component.js +1 -1
  245. package/esm2015/components/line-clamp/line-clamp.directive.js +5 -4
  246. package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +3 -3
  247. package/esm2015/components/multi-select/multi-select.component.js +2 -2
  248. package/esm2015/components/multi-select-option/multi-select-option.component.js +3 -3
  249. package/esm2015/components/pagination/pagination.component.js +2 -2
  250. package/esm2015/components/progress/utils/calculate-color-segments.js +3 -2
  251. package/esm2015/components/radio/radio.component.js +1 -1
  252. package/esm2015/components/select/select.component.js +2 -2
  253. package/esm2015/components/slider/index.js +3 -1
  254. package/esm2015/components/slider/slider-key-steps.directive.js +106 -0
  255. package/esm2015/components/slider/slider-options.js +13 -0
  256. package/esm2015/components/slider/slider.component.js +19 -11
  257. package/esm2015/components/slider/slider.module.js +14 -3
  258. package/esm2015/components/text-area/index.js +2 -1
  259. package/esm2015/components/text-area/text-area.component.js +21 -13
  260. package/esm2015/components/text-area/text-area.directive.js +22 -0
  261. package/esm2015/components/text-area/text-area.module.js +7 -6
  262. package/esm2015/components/text-area/text-area.providers.js +6 -2
  263. package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
  264. package/esm2015/enums/file-state.js +1 -1
  265. package/esm2015/pipes/field-error/field-error-content-pipe.js +11 -3
  266. package/esm2015/tokens/i18n.js +7 -1
  267. package/esm2015/utils/files/get-accept-array.js +7 -0
  268. package/esm2015/utils/files/index.js +2 -1
  269. package/esm5/abstract/input-slider.js +65 -16
  270. package/esm5/components/accordion/accordion.component.js +2 -2
  271. package/esm5/components/arrow/arrow-options.js +1 -1
  272. package/esm5/components/badge/badge.component.js +1 -1
  273. package/esm5/components/badged-content/badged-content.component.js +3 -3
  274. package/esm5/components/combo-box/combo-box.component.js +2 -2
  275. package/esm5/components/data-list-wrapper/data-list-group-wrapper.component.js +3 -3
  276. package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +3 -3
  277. package/esm5/components/files/file/file.component.js +213 -0
  278. package/esm5/components/files/files.component.js +50 -0
  279. package/esm5/components/files/files.module.js +32 -0
  280. package/esm5/components/files/index.js +3 -0
  281. package/esm5/components/files/taiga-ui-kit-components-files.js +6 -0
  282. package/esm5/components/index.js +3 -1
  283. package/esm5/components/input/input.component.js +1 -1
  284. package/esm5/components/input-count/input-count.component.js +3 -3
  285. package/esm5/components/input-date/input-date.component.js +5 -3
  286. package/esm5/components/input-date-range/input-date-range.component.js +4 -2
  287. package/esm5/components/input-date-time/input-date-time.component.js +2 -2
  288. package/esm5/components/input-file/file/file.component.js +37 -37
  289. package/esm5/components/input-file/input-file.component.js +7 -9
  290. package/esm5/components/input-file/input-file.module.js +3 -3
  291. package/esm5/components/input-files/index.js +3 -0
  292. package/esm5/components/input-files/input-files.component.js +239 -0
  293. package/esm5/components/input-files/input-files.module.js +37 -0
  294. package/esm5/components/input-files/taiga-ui-kit-components-input-files.js +5 -0
  295. package/esm5/components/input-number/input-number.component.js +18 -16
  296. package/esm5/components/input-password/input-password.component.js +3 -3
  297. package/esm5/components/input-phone/input-phone.component.js +6 -5
  298. package/esm5/components/input-phone-international/input-phone-international.component.js +21 -9
  299. package/esm5/components/input-range/input-range.component.js +18 -6
  300. package/esm5/components/input-slider/input-slider.component.js +58 -11
  301. package/esm5/components/input-slider/input-slider.module.js +10 -6
  302. package/esm5/components/input-tag/input-tag.component.js +3 -3
  303. package/esm5/components/input-time/input-time.component.js +1 -1
  304. package/esm5/components/line-clamp/line-clamp.directive.js +5 -4
  305. package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +3 -3
  306. package/esm5/components/multi-select/multi-select.component.js +2 -2
  307. package/esm5/components/multi-select-option/multi-select-option.component.js +3 -3
  308. package/esm5/components/pagination/pagination.component.js +2 -2
  309. package/esm5/components/progress/utils/calculate-color-segments.js +3 -2
  310. package/esm5/components/radio/radio.component.js +1 -1
  311. package/esm5/components/select/select.component.js +2 -2
  312. package/esm5/components/slider/index.js +3 -1
  313. package/esm5/components/slider/slider-key-steps.directive.js +137 -0
  314. package/esm5/components/slider/slider-options.js +14 -0
  315. package/esm5/components/slider/slider.component.js +19 -11
  316. package/esm5/components/slider/slider.module.js +14 -3
  317. package/esm5/components/text-area/index.js +2 -1
  318. package/esm5/components/text-area/text-area.component.js +21 -13
  319. package/esm5/components/text-area/text-area.directive.js +28 -0
  320. package/esm5/components/text-area/text-area.module.js +7 -6
  321. package/esm5/components/text-area/text-area.providers.js +6 -2
  322. package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
  323. package/esm5/enums/file-state.js +1 -1
  324. package/esm5/pipes/field-error/field-error-content-pipe.js +11 -3
  325. package/esm5/tokens/i18n.js +7 -1
  326. package/esm5/utils/files/get-accept-array.js +7 -0
  327. package/esm5/utils/files/index.js +2 -1
  328. package/fesm2015/taiga-ui-kit-abstract.js +42 -3
  329. package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
  330. package/fesm2015/taiga-ui-kit-components-accordion.js +1 -1
  331. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  332. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  333. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  334. package/fesm2015/taiga-ui-kit-components-badged-content.js +2 -2
  335. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  336. package/fesm2015/taiga-ui-kit-components-combo-box.js +1 -1
  337. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  338. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +4 -4
  339. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  340. package/fesm2015/taiga-ui-kit-components-files.js +232 -0
  341. package/fesm2015/taiga-ui-kit-components-files.js.map +1 -0
  342. package/fesm2015/taiga-ui-kit-components-input-count.js +2 -2
  343. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  344. package/fesm2015/taiga-ui-kit-components-input-date-range.js +3 -1
  345. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  346. package/fesm2015/taiga-ui-kit-components-input-date-time.js +1 -1
  347. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  348. package/fesm2015/taiga-ui-kit-components-input-date.js +4 -2
  349. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  350. package/fesm2015/taiga-ui-kit-components-input-file.js +25 -25
  351. package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
  352. package/fesm2015/taiga-ui-kit-components-input-files.js +242 -0
  353. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -0
  354. package/fesm2015/taiga-ui-kit-components-input-number.js +4 -4
  355. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  356. package/fesm2015/taiga-ui-kit-components-input-password.js +3 -3
  357. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  358. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +19 -5
  359. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  360. package/fesm2015/taiga-ui-kit-components-input-phone.js +5 -4
  361. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  362. package/fesm2015/taiga-ui-kit-components-input-range.js +17 -5
  363. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  364. package/fesm2015/taiga-ui-kit-components-input-slider.js +61 -15
  365. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  366. package/fesm2015/taiga-ui-kit-components-input-tag.js +2 -2
  367. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  368. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  369. package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
  370. package/fesm2015/taiga-ui-kit-components-line-clamp.js +4 -3
  371. package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
  372. package/fesm2015/taiga-ui-kit-components-multi-select-option.js +2 -2
  373. package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  374. package/fesm2015/taiga-ui-kit-components-multi-select.js +2 -2
  375. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  376. package/fesm2015/taiga-ui-kit-components-pagination.js +1 -1
  377. package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
  378. package/fesm2015/taiga-ui-kit-components-progress.js +2 -2
  379. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  380. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  381. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  382. package/fesm2015/taiga-ui-kit-components-slider.js +143 -16
  383. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  384. package/fesm2015/taiga-ui-kit-components-text-area.js +47 -17
  385. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  386. package/fesm2015/taiga-ui-kit-components.js +2 -0
  387. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  388. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +22 -5
  389. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  390. package/fesm2015/taiga-ui-kit-enums.js.map +1 -1
  391. package/fesm2015/taiga-ui-kit-pipes-field-error.js +10 -2
  392. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
  393. package/fesm2015/taiga-ui-kit-tokens.js +7 -1
  394. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  395. package/fesm2015/taiga-ui-kit-utils-files.js +8 -1
  396. package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
  397. package/fesm5/taiga-ui-kit-abstract.js +64 -15
  398. package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
  399. package/fesm5/taiga-ui-kit-components-accordion.js +1 -1
  400. package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
  401. package/fesm5/taiga-ui-kit-components-arrow.js.map +1 -1
  402. package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
  403. package/fesm5/taiga-ui-kit-components-badged-content.js +2 -2
  404. package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
  405. package/fesm5/taiga-ui-kit-components-combo-box.js +1 -1
  406. package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
  407. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +4 -4
  408. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  409. package/fesm5/taiga-ui-kit-components-files.js +289 -0
  410. package/fesm5/taiga-ui-kit-components-files.js.map +1 -0
  411. package/fesm5/taiga-ui-kit-components-input-count.js +2 -2
  412. package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
  413. package/fesm5/taiga-ui-kit-components-input-date-range.js +3 -1
  414. package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
  415. package/fesm5/taiga-ui-kit-components-input-date-time.js +1 -1
  416. package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
  417. package/fesm5/taiga-ui-kit-components-input-date.js +4 -2
  418. package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
  419. package/fesm5/taiga-ui-kit-components-input-file.js +43 -45
  420. package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
  421. package/fesm5/taiga-ui-kit-components-input-files.js +276 -0
  422. package/fesm5/taiga-ui-kit-components-input-files.js.map +1 -0
  423. package/fesm5/taiga-ui-kit-components-input-number.js +17 -15
  424. package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
  425. package/fesm5/taiga-ui-kit-components-input-password.js +3 -3
  426. package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
  427. package/fesm5/taiga-ui-kit-components-input-phone-international.js +20 -8
  428. package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  429. package/fesm5/taiga-ui-kit-components-input-phone.js +5 -4
  430. package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
  431. package/fesm5/taiga-ui-kit-components-input-range.js +17 -5
  432. package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
  433. package/fesm5/taiga-ui-kit-components-input-slider.js +65 -16
  434. package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
  435. package/fesm5/taiga-ui-kit-components-input-tag.js +2 -2
  436. package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
  437. package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
  438. package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
  439. package/fesm5/taiga-ui-kit-components-line-clamp.js +4 -3
  440. package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
  441. package/fesm5/taiga-ui-kit-components-multi-select-option.js +2 -2
  442. package/fesm5/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  443. package/fesm5/taiga-ui-kit-components-multi-select.js +2 -2
  444. package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
  445. package/fesm5/taiga-ui-kit-components-pagination.js +1 -1
  446. package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
  447. package/fesm5/taiga-ui-kit-components-progress.js +2 -2
  448. package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
  449. package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
  450. package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
  451. package/fesm5/taiga-ui-kit-components-slider.js +175 -17
  452. package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
  453. package/fesm5/taiga-ui-kit-components-text-area.js +53 -17
  454. package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
  455. package/fesm5/taiga-ui-kit-components.js +2 -0
  456. package/fesm5/taiga-ui-kit-components.js.map +1 -1
  457. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +22 -5
  458. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  459. package/fesm5/taiga-ui-kit-enums.js.map +1 -1
  460. package/fesm5/taiga-ui-kit-pipes-field-error.js +10 -2
  461. package/fesm5/taiga-ui-kit-pipes-field-error.js.map +1 -1
  462. package/fesm5/taiga-ui-kit-tokens.js +7 -1
  463. package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
  464. package/fesm5/taiga-ui-kit-utils-files.js +8 -1
  465. package/fesm5/taiga-ui-kit-utils-files.js.map +1 -1
  466. package/package.json +4 -4
  467. package/pipes/field-error/field-error-content-pipe.d.ts +1 -0
  468. package/pipes/field-error/taiga-ui-kit-pipes-field-error.metadata.json +1 -1
  469. package/tokens/i18n.d.ts +2 -0
  470. package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
  471. package/utils/files/get-accept-array.d.ts +1 -0
  472. package/utils/files/index.d.ts +1 -0
  473. package/utils/files/taiga-ui-kit-utils-files.metadata.json +1 -1
@@ -1,21 +1,35 @@
1
- import { __decorate, __param, __extends } from 'tslib';
2
- import { Optional, Self, Inject, ChangeDetectorRef, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
1
+ import { __assign, __decorate, __param, __extends, __read } from 'tslib';
2
+ import { InjectionToken, Optional, Self, Inject, ChangeDetectorRef, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, Output, HostListener, Directive, Pipe, forwardRef, NgModule } from '@angular/core';
3
3
  import { NgModel, NgControl } from '@angular/forms';
4
4
  import { USER_AGENT } from '@ng-web-apis/common';
5
- import { watch, isEdgeOlderThan, CHROMIUM_EDGE_START_VERSION, tuiDefaultProp, isNativeFocused, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiRepeatTimesModule, TuiFocusableModule, TuiFocusVisibleModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
6
- import { take } from 'rxjs/operators';
5
+ import { watch, isEdgeOlderThan, CHROMIUM_EDGE_START_VERSION, tuiDefaultProp, typedFromEvent, isNativeFocused, round, AbstractTuiControl, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiRepeatTimesModule, TuiFocusableModule, TuiFocusVisibleModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
6
+ import { take, map } from 'rxjs/operators';
7
7
  import { DOCUMENT, CommonModule } from '@angular/common';
8
8
  import { TuiFormatNumberPipeModule } from '@taiga-ui/core';
9
+ import { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/constants';
9
10
  import { AbstractTuiSlider } from '@taiga-ui/kit/abstract';
10
11
  import { TUI_FROM_TO_TEXTS } from '@taiga-ui/kit/tokens';
11
12
  import { Observable } from 'rxjs';
12
13
 
14
+ var TUI_SLIDER_DEFAULT_OPTIONS = {
15
+ size: 'm',
16
+ trackColor: 'var(--tui-base-03)',
17
+ };
18
+ var TUI_SLIDER_OPTIONS = new InjectionToken('Default parameters for Slider component', { factory: function () { return TUI_SLIDER_DEFAULT_OPTIONS; } });
19
+ function tuiSliderOptionsProvider(options) {
20
+ return {
21
+ provide: TUI_SLIDER_OPTIONS,
22
+ useValue: __assign(__assign({}, TUI_SLIDER_DEFAULT_OPTIONS), options),
23
+ };
24
+ }
25
+
13
26
  var TuiSliderComponent = /** @class */ (function () {
14
- function TuiSliderComponent(control, changeDetectorRef, elementRef, userAgent) {
27
+ function TuiSliderComponent(control, changeDetectorRef, options, elementRef, userAgent) {
15
28
  var _a;
29
+ this.options = options;
16
30
  this.elementRef = elementRef;
17
31
  this.userAgent = userAgent;
18
- this.size = 'm';
32
+ this.size = this.options.size;
19
33
  this.segments = 1;
20
34
  if (control instanceof NgModel) {
21
35
  /**
@@ -53,19 +67,22 @@ var TuiSliderComponent = /** @class */ (function () {
53
67
  get: function () {
54
68
  return Number(this.elementRef.nativeElement.value) || 0;
55
69
  },
70
+ set: function (newValue) {
71
+ this.elementRef.nativeElement.value = "" + newValue;
72
+ },
56
73
  enumerable: true,
57
74
  configurable: true
58
75
  });
59
- Object.defineProperty(TuiSliderComponent.prototype, "fillPercentage", {
76
+ Object.defineProperty(TuiSliderComponent.prototype, "valuePercentage", {
60
77
  get: function () {
61
78
  return (100 * this.value) / (this.max - this.min);
62
79
  },
63
80
  enumerable: true,
64
81
  configurable: true
65
82
  });
66
- Object.defineProperty(TuiSliderComponent.prototype, "stepPercentage", {
83
+ Object.defineProperty(TuiSliderComponent.prototype, "segmentWidth", {
67
84
  get: function () {
68
- return 100 / this.segments - 0.1;
85
+ return 100 / Math.max(1, this.segments);
69
86
  },
70
87
  enumerable: true,
71
88
  configurable: true
@@ -80,6 +97,7 @@ var TuiSliderComponent = /** @class */ (function () {
80
97
  TuiSliderComponent.ctorParameters = function () { return [
81
98
  { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
82
99
  { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
100
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_SLIDER_OPTIONS,] }] },
83
101
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
84
102
  { type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
85
103
  ]; };
@@ -94,10 +112,10 @@ var TuiSliderComponent = /** @class */ (function () {
94
112
  ], TuiSliderComponent.prototype, "segments", void 0);
95
113
  __decorate([
96
114
  HostBinding('style.--tui-slider-fill-percentage.%')
97
- ], TuiSliderComponent.prototype, "fillPercentage", null);
115
+ ], TuiSliderComponent.prototype, "valuePercentage", null);
98
116
  __decorate([
99
117
  HostBinding('style.--tui-slider-segment-width.%')
100
- ], TuiSliderComponent.prototype, "stepPercentage", null);
118
+ ], TuiSliderComponent.prototype, "segmentWidth", null);
101
119
  __decorate([
102
120
  HostBinding('class._old-edge')
103
121
  ], TuiSliderComponent.prototype, "isOldEdge", null);
@@ -119,20 +137,150 @@ var TuiSliderComponent = /** @class */ (function () {
119
137
  * This function triggers change detection (for `fillPercentage` function) when we drag thumb of the input.
120
138
  */
121
139
  '(input)': '0',
140
+ '[style.--tui-slider-track-color]': 'options.trackColor',
122
141
  },
123
142
  changeDetection: ChangeDetectionStrategy.OnPush,
124
- styles: [":host{display:block;width:100%;color:var(--tui-primary);cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host:not(._old-edge){-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.125rem;padding:.4375rem 0;background:var(--tui-base-03);background-clip:content-box;outline:0}:host:not(._old-edge)::-webkit-slider-runnable-track{height:.125rem;border-radius:var(--tui-radius-m);background:linear-gradient(to right,currentColor 0 .25rem,transparent .25rem),linear-gradient(to left,var(--tui-base-03) 0 .25rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent .25rem var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage))}:host:not(._old-edge)::-moz-range-track{height:.125rem;border-radius:var(--tui-radius-m);background:linear-gradient(to right,currentColor 0 .25rem,transparent .25rem),linear-gradient(to left,var(--tui-base-03) 0 .25rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent .25rem var(--tui-slider-segment-width))}:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem;margin-top:-.4375rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem;margin-top:-.1875rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='m']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='m']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='s']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)::-moz-range-progress{background:currentColor}:host._old-edge::-ms-thumb{background:currentColor}:host._old-edge::-ms-fill-lower{background:currentColor}:host._old-edge::-ms-track{background:var(--tui-base-03)}"]
143
+ styles: [":host{display:block;width:100%;color:var(--tui-primary);cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host:not(._old-edge){-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.125rem;padding:.4375rem 0;background:var(--tui-slider-track-color);background-clip:content-box;outline:0;border-radius:var(--tui-radius-m)}:host:not(._old-edge)::-webkit-slider-container{border-radius:inherit}:host:not(._old-edge)[data-size='m']::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-image:linear-gradient(to right,currentColor 0 .625rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.375rem,0;background-size:calc(100% - 1rem),calc(100% - 1rem),auto}:host:not(._old-edge)[data-size='s']::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-image:linear-gradient(to right,currentColor 0 .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}:host:not(._old-edge)[data-size='m']::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-image:linear-gradient(to right,currentColor 0 .625rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.375rem;background-size:calc(100% - 1rem)}:host:not(._old-edge)[data-size='s']::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-image:linear-gradient(to right,currentColor 0 .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem;margin-top:-.4375rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem;margin-top:-.1875rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='m']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='m']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb{cursor:ew-resize}:focus-visible:host:not(._old-edge)[data-size='s']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)::-moz-range-progress{background:currentColor;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}:host._old-edge::-ms-thumb{background:currentColor}:host._old-edge::-ms-fill-lower{background:currentColor}:host._old-edge::-ms-track{background:var(--tui-slider-track-color)}"]
125
144
  }),
126
145
  __param(0, Optional()),
127
146
  __param(0, Self()),
128
147
  __param(0, Inject(NgControl)),
129
148
  __param(1, Inject(ChangeDetectorRef)),
130
- __param(2, Inject(ElementRef)),
131
- __param(3, Inject(USER_AGENT))
149
+ __param(2, Inject(TUI_SLIDER_OPTIONS)),
150
+ __param(3, Inject(ElementRef)),
151
+ __param(4, Inject(USER_AGENT))
132
152
  ], TuiSliderComponent);
133
153
  return TuiSliderComponent;
134
154
  }());
135
155
 
156
+ // @dynamic
157
+ var TuiSliderKeyStepsDirective = /** @class */ (function (_super) {
158
+ __extends(TuiSliderKeyStepsDirective, _super);
159
+ function TuiSliderKeyStepsDirective(control, changeDetectorRef, elementRef, slider) {
160
+ var _this = _super.call(this, control, changeDetectorRef) || this;
161
+ _this.elementRef = elementRef;
162
+ _this.slider = slider;
163
+ _this.keySteps = [];
164
+ _this.keyStepsInput = typedFromEvent(_this.elementRef.nativeElement, 'input').pipe(map(function () { return _this.controlValue; }));
165
+ return _this;
166
+ }
167
+ Object.defineProperty(TuiSliderKeyStepsDirective.prototype, "nativeFocusableElement", {
168
+ get: function () {
169
+ return this.computedDisabled ? null : this.elementRef.nativeElement;
170
+ },
171
+ enumerable: true,
172
+ configurable: true
173
+ });
174
+ Object.defineProperty(TuiSliderKeyStepsDirective.prototype, "focused", {
175
+ get: function () {
176
+ return isNativeFocused(this.nativeFocusableElement);
177
+ },
178
+ enumerable: true,
179
+ configurable: true
180
+ });
181
+ Object.defineProperty(TuiSliderKeyStepsDirective.prototype, "controlValue", {
182
+ get: function () {
183
+ var valuePercentage = this.slider.valuePercentage;
184
+ var _a = __read(findKeyStepsBoundariesByFn(this.keySteps, function (_a) {
185
+ var _b = __read(_a, 2), keyStepPercentage = _b[0], _ = _b[1];
186
+ return valuePercentage <= keyStepPercentage;
187
+ }), 2), lowerStep = _a[0], upperStep = _a[1];
188
+ return transformToControlValue(valuePercentage, lowerStep, upperStep);
189
+ },
190
+ enumerable: true,
191
+ configurable: true
192
+ });
193
+ TuiSliderKeyStepsDirective.prototype.updateControlValue = function () {
194
+ this.updateValue(this.controlValue);
195
+ };
196
+ TuiSliderKeyStepsDirective.prototype.writeValue = function (controlValue) {
197
+ if (controlValue === null) {
198
+ return;
199
+ }
200
+ var _a = __read(findKeyStepsBoundariesByFn(this.keySteps, function (_a) {
201
+ var _b = __read(_a, 2), _ = _b[0], keyStepValue = _b[1];
202
+ return controlValue <= keyStepValue;
203
+ }), 2), lowerStep = _a[0], upperStep = _a[1];
204
+ this.slider.value = this.transformToNativeValue(controlValue, lowerStep, upperStep);
205
+ };
206
+ TuiSliderKeyStepsDirective.prototype.getFallbackValue = function () {
207
+ return 0;
208
+ };
209
+ TuiSliderKeyStepsDirective.prototype.transformToNativeValue = function (controlValue, _a, _b) {
210
+ var _c = __read(_a, 2), upperStepPercent = _c[0], upperStepValue = _c[1];
211
+ var _d = __read(_b, 2), lowerStepPercent = _d[0], lowerStepValue = _d[1];
212
+ var _e = this.slider, min = _e.min, max = _e.max;
213
+ var ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);
214
+ var newValuePercentage = (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;
215
+ return (newValuePercentage * (max - min)) / 100;
216
+ };
217
+ TuiSliderKeyStepsDirective.ctorParameters = function () { return [
218
+ { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
219
+ { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
220
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
221
+ { type: TuiSliderComponent, decorators: [{ type: Inject, args: [TuiSliderComponent,] }] }
222
+ ]; };
223
+ __decorate([
224
+ Input(),
225
+ tuiDefaultProp(checkHasMinMaxPercents, 'Should contain min and max values')
226
+ ], TuiSliderKeyStepsDirective.prototype, "keySteps", void 0);
227
+ __decorate([
228
+ Output()
229
+ ], TuiSliderKeyStepsDirective.prototype, "keyStepsInput", void 0);
230
+ __decorate([
231
+ HostListener('change')
232
+ ], TuiSliderKeyStepsDirective.prototype, "updateControlValue", null);
233
+ TuiSliderKeyStepsDirective = __decorate([
234
+ Directive({
235
+ selector: 'input[tuiSlider][keySteps]',
236
+ }),
237
+ __param(0, Optional()),
238
+ __param(0, Self()),
239
+ __param(0, Inject(NgControl)),
240
+ __param(1, Inject(ChangeDetectorRef)),
241
+ __param(2, Inject(ElementRef)),
242
+ __param(3, Inject(TuiSliderComponent))
243
+ ], TuiSliderKeyStepsDirective);
244
+ return TuiSliderKeyStepsDirective;
245
+ }(AbstractTuiControl));
246
+ /**
247
+ * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.
248
+ * TODO delete it in v3.0
249
+ *
250
+ */
251
+ var TuiSliderTickLabelPipe = /** @class */ (function () {
252
+ function TuiSliderTickLabelPipe() {
253
+ }
254
+ TuiSliderTickLabelPipe.prototype.transform = function (tickIndex, totalSegments, keySteps) {
255
+ var percentage = (100 / totalSegments) * tickIndex;
256
+ var _a = __read(findKeyStepsBoundariesByFn(keySteps, function (_a) {
257
+ var _b = __read(_a, 2), keyStepPercentage = _b[0], _ = _b[1];
258
+ return percentage <= keyStepPercentage;
259
+ }), 2), lowerStep = _a[0], upperStep = _a[1];
260
+ return transformToControlValue(percentage, upperStep, lowerStep);
261
+ };
262
+ TuiSliderTickLabelPipe = __decorate([
263
+ Pipe({ name: 'tuiSliderTickLabel' })
264
+ ], TuiSliderTickLabelPipe);
265
+ return TuiSliderTickLabelPipe;
266
+ }());
267
+ function checkHasMinMaxPercents(steps) {
268
+ return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);
269
+ }
270
+ function findKeyStepsBoundariesByFn(keySteps, fn) {
271
+ var keyStepUpperIndex = keySteps.findIndex(function (ketStep, i) { return i && fn(ketStep); });
272
+ var lowerStep = keySteps[keyStepUpperIndex - 1];
273
+ var upperStep = keySteps[keyStepUpperIndex];
274
+ return [lowerStep, upperStep];
275
+ }
276
+ function transformToControlValue(valuePercentage, _a, _b) {
277
+ var _c = __read(_a, 2), upperStepPercent = _c[0], upperStepValue = _c[1];
278
+ var _d = __read(_b, 2), lowerStepPercent = _d[0], lowerStepValue = _d[1];
279
+ var ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);
280
+ var controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;
281
+ return round(controlValue, TUI_FLOATING_PRECISION);
282
+ }
283
+
136
284
  /**
137
285
  * @deprecated use {@link TuiSliderComponent} instead
138
286
  * TODO remove in 3.0
@@ -227,8 +375,18 @@ var TuiSliderModule = /** @class */ (function () {
227
375
  TuiActiveZoneModule,
228
376
  TuiFormatNumberPipeModule,
229
377
  ],
230
- declarations: [TuiSliderComponent, TuiSliderOldComponent],
231
- exports: [TuiSliderComponent, TuiSliderOldComponent],
378
+ declarations: [
379
+ TuiSliderComponent,
380
+ TuiSliderKeyStepsDirective,
381
+ TuiSliderTickLabelPipe,
382
+ TuiSliderOldComponent,
383
+ ],
384
+ exports: [
385
+ TuiSliderComponent,
386
+ TuiSliderKeyStepsDirective,
387
+ TuiSliderTickLabelPipe,
388
+ TuiSliderOldComponent,
389
+ ],
232
390
  })
233
391
  ], TuiSliderModule);
234
392
  return TuiSliderModule;
@@ -238,5 +396,5 @@ var TuiSliderModule = /** @class */ (function () {
238
396
  * Generated bundle index. Do not edit.
239
397
  */
240
398
 
241
- export { TuiSliderComponent, TuiSliderModule, TuiSliderOldComponent };
399
+ export { TUI_SLIDER_DEFAULT_OPTIONS, TUI_SLIDER_OPTIONS, TuiSliderComponent, TuiSliderKeyStepsDirective, TuiSliderModule, TuiSliderOldComponent, TuiSliderTickLabelPipe, tuiSliderOptionsProvider };
242
400
  //# sourceMappingURL=taiga-ui-kit-components-slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-slider.js","sources":["ng://@taiga-ui/kit/components/slider/slider.component.ts","ng://@taiga-ui/kit/components/slider/slider-old.component.ts","ng://@taiga-ui/kit/components/slider/slider.module.ts","ng://@taiga-ui/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n isEdgeOlderThan,\n tuiDefaultProp,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\nimport {take} from 'rxjs/operators';\n\n@Component({\n /**\n * We have to call our component as `<input tuiSlider type=\"range\" ... />`\n * because otherwise built-in angular\n * {@link https://github.com/angular/angular/blob/master/packages/forms/src/directives/range_value_accessor.ts#L45 RangeValueAccessor}\n * cannot be matched by its CSS selector.\n */\n selector: 'input[type=range][tuiSlider]',\n template: ``,\n styleUrls: ['./slider.style.less'],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for `fillPercentage` function) when we drag thumb of the input.\n */\n '(input)': '0',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSliderComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = 'm';\n\n @Input()\n @tuiDefaultProp()\n segments = 1;\n\n get min(): number {\n return Number(this.elementRef.nativeElement.min);\n }\n\n get max(): number {\n return Number(this.elementRef.nativeElement.max) || 100;\n }\n\n get step(): number {\n return Number(this.elementRef.nativeElement.step) || 1;\n }\n\n get value(): number {\n return Number(this.elementRef.nativeElement.value) || 0;\n }\n\n @HostBinding('style.--tui-slider-fill-percentage.%')\n get fillPercentage(): number {\n return (100 * this.value) / (this.max - this.min);\n }\n\n @HostBinding('style.--tui-slider-segment-width.%')\n get stepPercentage(): number {\n return 100 / this.segments - 0.1;\n }\n\n @HostBinding('class._old-edge')\n get isOldEdge(): boolean {\n return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n control.valueChanges?.pipe(watch(changeDetectorRef), take(1)).subscribe();\n }\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiSlider} from '@taiga-ui/kit/abstract';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated use {@link TuiSliderComponent} instead\n * TODO remove in 3.0\n */\n// @dynamic\n@Component({\n selector: 'tui-slider',\n templateUrl: '../../abstract/slider/slider.common.template.html',\n styleUrls: [\n '../../abstract/slider/slider.common.style.less',\n './slider-old.style.less',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiSliderOldComponent),\n },\n ],\n})\nexport class TuiSliderOldComponent\n extends AbstractTuiSlider<number>\n implements TuiFocusableElementAccessor\n{\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS) fromToTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef, documentRef, fromToTexts$);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.dotRight ? this.dotRight.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get left(): number {\n return 0;\n }\n\n get right(): number {\n return 100 - 100 * this.getFractionFromValue(this.value);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n protected processStep(increment: boolean) {\n const fraction = this.getFractionFromValue(this.value);\n const step = this.computedStep;\n const value = this.getValueFromFraction(\n increment ? fraction + step : fraction - step,\n );\n\n this.processValue(value);\n }\n\n protected processValue(value: number) {\n this.updateValue(this.valueGuard(value));\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiFormatNumberPipeModule} from '@taiga-ui/core';\n\nimport {TuiSliderComponent} from './slider.component';\nimport {TuiSliderOldComponent} from './slider-old.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiRepeatTimesModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiActiveZoneModule,\n TuiFormatNumberPipeModule,\n ],\n declarations: [TuiSliderComponent, TuiSliderOldComponent],\n exports: [TuiSliderComponent, TuiSliderOldComponent],\n})\nexport class TuiSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;IAoFI,4BAII,OAAyB,EACE,iBAAoC,EAC1B,UAAwC,EACxC,SAAiB;;QADjB,eAAU,GAAV,UAAU,CAA8B;QACxC,cAAS,GAAT,SAAS,CAAQ;QA5C1D,SAAI,GAAa,GAAG,CAAC;QAIrB,aAAQ,GAAG,CAAC,CAAC;QA0CT,IAAI,OAAO,YAAY,OAAO,EAAE;;;;;;;;YAQ5B,MAAA,OAAO,CAAC,YAAY,0CAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,GAAG;SAC7E;KACJ;IAlDD,sBAAI,mCAAG;aAAP;YACI,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SACpD;;;OAAA;IAED,sBAAI,mCAAG;aAAP;YACI,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;SAC3D;;;OAAA;IAED,sBAAI,oCAAI;aAAR;YACI,OAAO,MAAM,CAAC,IAAI,CAAC,UA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file":"taiga-ui-kit-components-slider.js","sources":["ng://@taiga-ui/kit/components/slider/slider-options.ts","ng://@taiga-ui/kit/components/slider/slider.component.ts","ng://@taiga-ui/kit/components/slider/slider-key-steps.directive.ts","ng://@taiga-ui/kit/components/slider/slider-old.component.ts","ng://@taiga-ui/kit/components/slider/slider.module.ts","ng://@taiga-ui/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiSliderOptions {\n readonly size: TuiSizeS;\n readonly trackColor: string;\n}\n\nexport const TUI_SLIDER_DEFAULT_OPTIONS: TuiSliderOptions = {\n size: 'm',\n trackColor: 'var(--tui-base-03)',\n};\n\nexport const TUI_SLIDER_OPTIONS = new InjectionToken<TuiSliderOptions>(\n 'Default parameters for Slider component',\n {factory: () => TUI_SLIDER_DEFAULT_OPTIONS},\n);\n\nexport function tuiSliderOptionsProvider(\n options: Partial<TuiSliderOptions>,\n): ValueProvider {\n return {\n provide: TUI_SLIDER_OPTIONS,\n useValue: {...TUI_SLIDER_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n isEdgeOlderThan,\n tuiDefaultProp,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\nimport {take} from 'rxjs/operators';\n\nimport {TUI_SLIDER_OPTIONS, TuiSliderOptions} from './slider-options';\n\n@Component({\n /**\n * We have to call our component as `<input tuiSlider type=\"range\" ... />`\n * because otherwise built-in angular\n * {@link https://github.com/angular/angular/blob/master/packages/forms/src/directives/range_value_accessor.ts#L45 RangeValueAccessor}\n * cannot be matched by its CSS selector.\n */\n selector: 'input[type=range][tuiSlider]',\n template: ``,\n styleUrls: ['./slider.style.less'],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for `fillPercentage` function) when we drag thumb of the input.\n */\n '(input)': '0',\n '[style.--tui-slider-track-color]': 'options.trackColor',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSliderComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n segments = 1;\n\n get min(): number {\n return Number(this.elementRef.nativeElement.min);\n }\n\n get max(): number {\n return Number(this.elementRef.nativeElement.max) || 100;\n }\n\n get step(): number {\n return Number(this.elementRef.nativeElement.step) || 1;\n }\n\n get value(): number {\n return Number(this.elementRef.nativeElement.value) || 0;\n }\n\n set value(newValue: number) {\n this.elementRef.nativeElement.value = `${newValue}`;\n }\n\n @HostBinding('style.--tui-slider-fill-percentage.%')\n get valuePercentage(): number {\n return (100 * this.value) / (this.max - this.min);\n }\n\n @HostBinding('style.--tui-slider-segment-width.%')\n get segmentWidth(): number {\n return 100 / Math.max(1, this.segments);\n }\n\n @HostBinding('class._old-edge')\n get isOldEdge(): boolean {\n return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_SLIDER_OPTIONS) readonly options: TuiSliderOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n control.valueChanges?.pipe(watch(changeDetectorRef), take(1)).subscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Pipe,\n PipeTransform,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n round,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {map} from 'rxjs/operators';\n\nimport {TuiSliderComponent} from './slider.component';\n\n// @dynamic\n@Directive({\n selector: 'input[tuiSlider][keySteps]',\n})\nexport class TuiSliderKeyStepsDirective\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp(checkHasMinMaxPercents, 'Should contain min and max values')\n keySteps: TuiKeySteps = [];\n\n @Output()\n keyStepsInput = typedFromEvent(this.elementRef.nativeElement, 'input').pipe(\n map(() => this.controlValue),\n );\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n private get controlValue(): number {\n const {valuePercentage} = this.slider;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n\n return transformToControlValue(valuePercentage, lowerStep, upperStep);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiSliderComponent) private readonly slider: TuiSliderComponent,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostListener('change')\n updateControlValue() {\n this.updateValue(this.controlValue);\n }\n\n writeValue(controlValue: number | null) {\n if (controlValue === null) {\n return;\n }\n\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([_, keyStepValue]) => controlValue <= keyStepValue,\n );\n\n this.slider.value = this.transformToNativeValue(\n controlValue,\n lowerStep,\n upperStep,\n );\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private transformToNativeValue(\n controlValue: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n ): number {\n const {min, max} = this.slider;\n const ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);\n const newValuePercentage =\n (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n\n return (newValuePercentage * (max - min)) / 100;\n }\n}\n\n/**\n * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.\n * TODO delete it in v3.0\n *\n */\n@Pipe({name: 'tuiSliderTickLabel'})\nexport class TuiSliderTickLabelPipe implements PipeTransform {\n transform(tickIndex: number, totalSegments: number, keySteps: TuiKeySteps): number {\n const percentage = (100 / totalSegments) * tickIndex;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => percentage <= keyStepPercentage,\n );\n\n return transformToControlValue(percentage, upperStep, lowerStep);\n }\n}\n\nfunction checkHasMinMaxPercents(steps: TuiKeySteps): boolean {\n return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);\n}\n\nfunction findKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((ketStep, i) => i && fn(ketStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nfunction transformToControlValue(\n valuePercentage: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n): number {\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return round(controlValue, TUI_FLOATING_PRECISION);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiSlider} from '@taiga-ui/kit/abstract';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated use {@link TuiSliderComponent} instead\n * TODO remove in 3.0\n */\n// @dynamic\n@Component({\n selector: 'tui-slider',\n templateUrl: '../../abstract/slider/slider.common.template.html',\n styleUrls: [\n '../../abstract/slider/slider.common.style.less',\n './slider-old.style.less',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiSliderOldComponent),\n },\n ],\n})\nexport class TuiSliderOldComponent\n extends AbstractTuiSlider<number>\n implements TuiFocusableElementAccessor\n{\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS) fromToTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef, documentRef, fromToTexts$);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.dotRight ? this.dotRight.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get left(): number {\n return 0;\n }\n\n get right(): number {\n return 100 - 100 * this.getFractionFromValue(this.value);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n protected processStep(increment: boolean) {\n const fraction = this.getFractionFromValue(this.value);\n const step = this.computedStep;\n const value = this.getValueFromFraction(\n increment ? fraction + step : fraction - step,\n );\n\n this.processValue(value);\n }\n\n protected processValue(value: number) {\n this.updateValue(this.valueGuard(value));\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiFormatNumberPipeModule} from '@taiga-ui/core';\n\nimport {TuiSliderComponent} from './slider.component';\nimport {\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n} from './slider-key-steps.directive';\nimport {TuiSliderOldComponent} from './slider-old.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiRepeatTimesModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiActiveZoneModule,\n TuiFormatNumberPipeModule,\n ],\n declarations: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n exports: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n})\nexport class TuiSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;IAQa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,oBAAoB;EAClC;IAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC,EAAC,OAAO,EAAE,cAAM,OAAA,0BAA0B,GAAA,EAAC,EAC7C;SAEc,wBAAwB,CACpC,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ACvCA;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { __extends, __decorate, __param } from 'tslib';
2
- import { forwardRef, Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
+ import { forwardRef, Optional, Self, Inject, ChangeDetectorRef, ViewChild, ContentChild, ElementRef, Input, HostBinding, HostListener, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
3
3
  import { NgControl, FormsModule } from '@angular/forms';
4
- import { TUI_FOCUSABLE_ITEM_ACCESSOR, isNativeFocused, setNativeFocused, TUI_IS_IOS, tuiDefaultProp, AbstractTuiControl, TuiFocusableModule, TuiFocusedModule, TuiHoveredModule } from '@taiga-ui/cdk';
5
- import { TEXTFIELD_CONTROLLER_PROVIDER, HINT_CONTROLLER_PROVIDER, MODE_PROVIDER, getBorder, TUI_TEXTFIELD_APPEARANCE, TUI_MODE, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER, TuiScrollbarModule, TuiTooltipModule, TuiWrapperModule, TuiDescribedByModule, TuiSvgModule } from '@taiga-ui/core';
4
+ import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl, isNativeFocused, setNativeFocused, TUI_IS_IOS, tuiDefaultProp, TuiFocusableModule, TuiHoveredModule } from '@taiga-ui/cdk';
5
+ import { TEXTFIELD_CONTROLLER_PROVIDER, HINT_CONTROLLER_PROVIDER, MODE_PROVIDER, getBorder, TUI_TEXTFIELD_APPEARANCE, TUI_MODE, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER, TuiTextfieldComponent, TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost, TuiScrollbarModule, TuiTooltipModule, TuiWrapperModule, TuiDescribedByModule, TuiSvgModule, TuiPrimitiveTextfieldModule } from '@taiga-ui/core';
6
6
  import { Observable } from 'rxjs';
7
7
  import { CommonModule } from '@angular/common';
8
8
 
@@ -11,6 +11,10 @@ var TUI_TEXT_AREA_PROVIDERS = [
11
11
  provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
12
12
  useExisting: forwardRef(function () { return TuiTextAreaComponent; }),
13
13
  },
14
+ {
15
+ provide: AbstractTuiControl,
16
+ useExisting: forwardRef(function () { return TuiTextAreaComponent; }),
17
+ },
14
18
  TEXTFIELD_CONTROLLER_PROVIDER,
15
19
  HINT_CONTROLLER_PROVIDER,
16
20
  MODE_PROVIDER,
@@ -41,9 +45,11 @@ var TuiTextAreaComponent = /** @class */ (function (_super) {
41
45
  });
42
46
  Object.defineProperty(TuiTextAreaComponent.prototype, "nativeFocusableElement", {
43
47
  get: function () {
44
- return this.computedDisabled || !this.focusableElement
45
- ? null
46
- : this.focusableElement.nativeElement;
48
+ var _a, _b;
49
+ if (this.computedDisabled) {
50
+ return null;
51
+ }
52
+ return (((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeElement) || ((_b = this.focusableElement) === null || _b === void 0 ? void 0 : _b.nativeElement) || null);
47
53
  },
48
54
  enumerable: true,
49
55
  configurable: true
@@ -106,10 +112,9 @@ var TuiTextAreaComponent = /** @class */ (function (_super) {
106
112
  });
107
113
  Object.defineProperty(TuiTextAreaComponent.prototype, "hasExampleText", {
108
114
  get: function () {
109
- return (!!this.controller.exampleText &&
110
- this.focused &&
111
- !this.hasValue &&
112
- !this.readOnly);
115
+ var _a;
116
+ var text = this.controller.exampleText || ((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeElement.placeholder);
117
+ return !!text && this.focused && !this.hasValue && !this.readOnly;
113
118
  },
114
119
  enumerable: true,
115
120
  configurable: true
@@ -152,7 +157,7 @@ var TuiTextAreaComponent = /** @class */ (function (_super) {
152
157
  TuiTextAreaComponent.prototype.onPressed = function (pressed) {
153
158
  this.updatePressed(pressed);
154
159
  };
155
- TuiTextAreaComponent.prototype.onValue = function (value) {
160
+ TuiTextAreaComponent.prototype.onValueChange = function (value) {
156
161
  this.updateValue(value);
157
162
  };
158
163
  TuiTextAreaComponent.prototype.onMouseDown = function (event) {
@@ -186,6 +191,9 @@ var TuiTextAreaComponent = /** @class */ (function (_super) {
186
191
  __decorate([
187
192
  ViewChild('focusableElement')
188
193
  ], TuiTextAreaComponent.prototype, "focusableElement", void 0);
194
+ __decorate([
195
+ ContentChild(TuiTextfieldComponent, { read: ElementRef })
196
+ ], TuiTextAreaComponent.prototype, "textfield", void 0);
189
197
  __decorate([
190
198
  Input(),
191
199
  tuiDefaultProp()
@@ -213,17 +221,21 @@ var TuiTextAreaComponent = /** @class */ (function (_super) {
213
221
  __decorate([
214
222
  HostBinding('class._has-counter')
215
223
  ], TuiTextAreaComponent.prototype, "hasCounter", null);
224
+ __decorate([
225
+ HostListener('focusin', ['true']),
226
+ HostListener('focusout', ['false'])
227
+ ], TuiTextAreaComponent.prototype, "onFocused", null);
216
228
  TuiTextAreaComponent = __decorate([
217
229
  Component({
218
230
  selector: 'tui-text-area',
219
- template: "<tui-wrapper\n automation-id=\"tui-text-area__wrapper\"\n class=\"outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"counter\"\n >\n {{ value.length }}/{{ controller.maxLength }}\n </div>\n</tui-wrapper>\n\n<label\n class=\"content\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (mousedown)=\"onMouseDown($event)\"\n>\n <div class=\"wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"input-wrapper\">\n <div class=\"relative\">\n <div aria-hidden=\"true\" class=\"pseudo-content\">\n <span\n [textContent]=\"fittedContent || controller.exampleText\"\n ></span>\n <span\n class=\"pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n &nbsp;\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"input\"\n [placeholder]=\"controller.exampleText\"\n [id]=\"id\"\n [tuiDescribedBy]=\"id\"\n [tuiFocusable]=\"focusable\"\n [disabled]=\"disabled\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (ngModelChange)=\"onValue($event)\"\n ></textarea>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"icons\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"cleaner\"\n (click.stop)=\"onValue('')\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n class=\"tooltip\"\n [describeId]=\"id\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [content]=\"hintController.content\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n </div>\n</label>\n",
231
+ template: "<tui-wrapper\n automation-id=\"tui-text-area__wrapper\"\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ controller.maxLength }}\n </div>\n</tui-wrapper>\n\n<label\n class=\"t-content\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (mousedown)=\"onMouseDown($event)\"\n>\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\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 aria-hidden=\"true\" class=\"t-pseudo-content\">\n <span\n [textContent]=\"fittedContent || controller.exampleText\"\n ></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n &nbsp;\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [placeholder]=\"controller.exampleText\"\n [id]=\"id\"\n [tuiDescribedBy]=\"id\"\n [tuiFocusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"t-cleaner\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"id\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [content]=\"hintController.content\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n </div>\n</label>\n",
220
232
  changeDetection: ChangeDetectionStrategy.OnPush,
221
233
  providers: TUI_TEXT_AREA_PROVIDERS,
222
234
  host: {
223
235
  '($.data-mode.attr)': 'mode$',
224
236
  '[class._ios]': 'isIOS',
225
237
  },
226
- styles: [":host{position:relative;z-index:0;display:flex;font:var(--tui-font-text-m);flex-direction:column;min-height:6.75rem;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size='m']{font:var(--tui-font-text-s);min-height:5.5rem}:host[data-size='m']._has-counter{min-height:6.625rem}:host[data-size='l']._has-counter{min-height:7.875rem}.outline{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-1}.content{margin-top:0;margin-bottom:0;min-height:inherit;width:100%;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .content{bottom:1.6875rem}.wrapper{position:relative;width:100%;height:100%;min-height:inherit;padding-bottom:.4375rem;box-sizing:border-box}:host[data-size='m']._label-outside .wrapper{padding-top:.75rem}:host[data-size='l']._label-outside .wrapper{padding-top:1rem}:host[data-size='m']:not(._label-outside) .wrapper{padding-top:1.375rem}:host[data-size='l']:not(._label-outside) .wrapper{padding-top:1.625rem}.input-wrapper{min-height:inherit;width:100%;flex:1}.relative{position:relative;min-height:inherit}.box{display:flex;min-height:100%;width:100%}:host:not(._expandable) .box{height:100%}:host._has-counter._expandable .box{margin-bottom:1.25rem}.pseudo-content{white-space:pre-wrap;word-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}:host[data-size='m'] .pseudo-content{padding:0 .75rem}:host[data-size='l'] .pseudo-content{padding:0 1rem}.pseudo-content__extra{background-color:var(--tui-error-bg-night)}.input{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:0;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}.input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}.input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .input::placeholder{color:var(--tui-text-03-night)}:host._focused .input:not(:read-only)::-ms-input-placeholder{opacity:1}:host._focused .input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .input:not(:read-only)::placeholder{opacity:1}:host[data-size='m'] .input{padding:0 .75rem}:host[data-size='l'] .input{padding:0 1rem}:host._ios .input{padding-left:.8125rem}:host[data-mode=onDark]._disabled .input{color:var(--tui-text-03-night)}.placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;font-size:.8125rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;position:absolute;left:0;max-width:100%;padding:0 1rem;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);box-sizing:border-box}.placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-size='l']._focused._label-outside .placeholder,:host[data-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-size='l'] .placeholder{font-size:.9375rem}:host[data-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .placeholder,:host[data-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}:host[data-size='m'] .placeholder{top:.75rem;padding:0 .75rem}:host[data-size='l'] .placeholder{top:1rem}:host._label-outside .placeholder{overflow:initial;height:auto;white-space:initial}.icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:1rem .75rem}:host[data-size='m'] .icons{padding:.75rem}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform;pointer-events:auto}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.tooltip{pointer-events:auto}.counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .counter{color:var(--tui-text-03-night)}"]
238
+ styles: [":host{position:relative;z-index:0;display:flex;font:var(--tui-font-text-m);flex-direction:column;min-height:6.75rem;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size='m']{font:var(--tui-font-text-s);min-height:5.5rem}:host[data-size='m']._has-counter{min-height:6.625rem}:host[data-size='l']._has-counter{min-height:7.875rem}.t-outline{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-1}.t-content{margin-top:0;margin-bottom:0;min-height:inherit;width:100%;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-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;padding-bottom:.4375rem;box-sizing:border-box}:host[data-size='m']._label-outside .t-wrapper{padding-top:.75rem}:host[data-size='l']._label-outside .t-wrapper{padding-top:1rem}:host[data-size='m']:not(._label-outside) .t-wrapper{padding-top:1.375rem}:host[data-size='l']:not(._label-outside) .t-wrapper{padding-top:1.625rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:100%;width:100%}:host:not(._expandable) .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}: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-error-bg-night)}.t-input{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:0;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:focus,.t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}.t-input:not(:last-child){display:none}.t-input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:read-only)::-ms-input-placeholder{opacity:1}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size='m'] .t-input{padding:0 .75rem}:host[data-size='l'] .t-input{padding:0 1rem}:host._ios .t-input{padding-left:.8125rem}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;position:absolute;left:0;max-width:100%;padding:0 1rem;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);box-sizing:border-box}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused)._hovered .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size='l']._focused._label-outside .t-placeholder,:host[data-size='m']._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size='l'] .t-placeholder{font-size:.9375rem}:host[data-size='l'] .t-placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .t-placeholder,:host[data-size='m']._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='m'] .t-placeholder{top:.75rem;padding:0 .75rem}:host[data-size='l'] .t-placeholder{top:1rem}:host._label-outside .t-placeholder{overflow:initial;height: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:1rem .75rem}:host[data-size='m'] .t-icons{padding:.75rem}.t-cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform;pointer-events:auto}.t-cleaner:hover{color:var(--tui-text-02)}:host._disabled .t-cleaner,:host._readonly .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-tooltip{pointer-events:auto}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}"]
227
239
  }),
228
240
  __param(0, Optional()),
229
241
  __param(0, Self()),
@@ -238,6 +250,30 @@ var TuiTextAreaComponent = /** @class */ (function (_super) {
238
250
  return TuiTextAreaComponent;
239
251
  }(AbstractTuiControl));
240
252
 
253
+ var TuiTextAreaDirective = /** @class */ (function (_super) {
254
+ __extends(TuiTextAreaDirective, _super);
255
+ function TuiTextAreaDirective() {
256
+ return _super !== null && _super.apply(this, arguments) || this;
257
+ }
258
+ TuiTextAreaDirective_1 = TuiTextAreaDirective;
259
+ TuiTextAreaDirective.prototype.onValueChange = function (value) {
260
+ this.host.onValueChange(value);
261
+ };
262
+ var TuiTextAreaDirective_1;
263
+ TuiTextAreaDirective = TuiTextAreaDirective_1 = __decorate([
264
+ Directive({
265
+ selector: 'tui-text-area',
266
+ providers: [
267
+ {
268
+ provide: TUI_TEXTFIELD_HOST,
269
+ useExisting: forwardRef(function () { return TuiTextAreaDirective_1; }),
270
+ },
271
+ ],
272
+ })
273
+ ], TuiTextAreaDirective);
274
+ return TuiTextAreaDirective;
275
+ }(TuiAbstractTextfieldHost));
276
+
241
277
  var TuiTextAreaModule = /** @class */ (function () {
242
278
  function TuiTextAreaModule() {
243
279
  }
@@ -247,16 +283,16 @@ var TuiTextAreaModule = /** @class */ (function () {
247
283
  CommonModule,
248
284
  FormsModule,
249
285
  TuiFocusableModule,
250
- TuiFocusedModule,
251
286
  TuiHoveredModule,
252
287
  TuiScrollbarModule,
253
288
  TuiTooltipModule,
254
289
  TuiWrapperModule,
255
290
  TuiDescribedByModule,
256
291
  TuiSvgModule,
292
+ TuiPrimitiveTextfieldModule,
257
293
  ],
258
- declarations: [TuiTextAreaComponent],
259
- exports: [TuiTextAreaComponent],
294
+ declarations: [TuiTextAreaComponent, TuiTextAreaDirective],
295
+ exports: [TuiTextAreaComponent, TuiTextAreaDirective, TuiTextfieldComponent],
260
296
  })
261
297
  ], TuiTextAreaModule);
262
298
  return TuiTextAreaModule;
@@ -266,5 +302,5 @@ var TuiTextAreaModule = /** @class */ (function () {
266
302
  * Generated bundle index. Do not edit.
267
303
  */
268
304
 
269
- export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TUI_TEXT_AREA_PROVIDERS, TuiTextAreaComponent, TuiTextAreaModule };
305
+ export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TUI_TEXT_AREA_PROVIDERS, TuiTextAreaComponent, TuiTextAreaDirective, TuiTextAreaModule };
270
306
  //# sourceMappingURL=taiga-ui-kit-components-text-area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-text-area.js","sources":["ng://@taiga-ui/kit/components/text-area/text-area.providers.ts","ng://@taiga-ui/kit/components/text-area/text-area.component.ts","ng://@taiga-ui/kit/components/text-area/text-area.module.ts","ng://@taiga-ui/kit/components/text-area/taiga-ui-kit-components-text-area.ts"],"sourcesContent":["import {forwardRef, Provider} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\nexport const TUI_TEXT_AREA_PROVIDERS: Provider[] = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n setNativeFocused,\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n} from '@taiga-ui/cdk';\nimport {\n getBorder,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_TEXT_AREA_PROVIDERS} from './text-area.providers';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n@Component({\n selector: 'tui-text-area',\n templateUrl: './text-area.template.html',\n styleUrls: ['./text-area.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TEXT_AREA_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiTextAreaComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLTextAreaElement>;\n\n @Input()\n @tuiDefaultProp()\n rows = DEFAULT_ROWS;\n\n @Input()\n @HostBinding('class._expandable')\n @tuiDefaultProp()\n expandable = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n get nativeFocusableElement(): HTMLTextAreaElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding('style.--border-end.rem')\n get border(): number {\n return getBorder(false, this.hasCleaner, this.hasTooltip);\n }\n\n get hasCleaner(): boolean {\n return this.controller.cleaner && this.hasValue && this.interactive;\n }\n\n @HostBinding('class._has-tooltip')\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding('class._has-value')\n get hasValue(): boolean {\n return this.value !== '';\n }\n\n @HostBinding('class._has-counter')\n get hasCounter(): boolean {\n return !!this.controller.maxLength && this.interactive;\n }\n\n get hasPlaceholder(): boolean {\n return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get hasExampleText(): boolean {\n return (\n !!this.controller.exampleText &&\n this.focused &&\n !this.hasValue &&\n !this.readOnly\n );\n }\n\n get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.controller.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get fittedContent(): string {\n return this.value.slice(0, this.controller.maxLength || Infinity);\n }\n\n get extraContent(): string {\n return this.value.slice(this.controller.maxLength || Infinity);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onValue(value: string) {\n this.updateValue(value);\n }\n\n onMouseDown(event: MouseEvent) {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement);\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","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule, TuiFocusedModule, TuiHoveredModule} from '@taiga-ui/cdk';\nimport {\n TuiDescribedByModule,\n TuiScrollbarModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiWrapperModule,\n TuiDescribedByModule,\n TuiSvgModule,\n ],\n declarations: [TuiTextAreaComponent],\n exports: [TuiTextAreaComponent],\n})\nexport class TuiTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAUa,uBAAuB,GAAe;IAC/C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ICoBJ,YAAY,GAAG,GAAG;IAClB,aAAa,GAAG,GAAG;IACnB,aAAa,GAAG,GAAG;;IAcpB,wCAA0B;IAelC,8BAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C;QAZvD,YAcI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAT8C,gBAAU,GAAV,UAAU,CAAQ;QAChC,WAAK,GAAL,KAAK,CAAS;QAChB,WAAK,GAAL,KAA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;IA3EQ,oBAAoB;QAXhC,SAAS,CAAC;YACP,QAAQ,EAAE,eAAe;YACzB,4iGAAwC;YAExC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,SAAS,EAAE,uBAAuB;YAClC,IAAI,EAAE;gBACF,oBAAoB,EAAE,OAAO;gBAC7B,cAAc,EAAE,OAAO;aAC1B;;SACJ,CAAC;QAkBO,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,IAAI,EAAE,CAAA;QACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,wBAAwB,CAAC,CAAA;QAChC,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChB,WAAA,MAAM,CAAC,gCAAgC,CAAC,CAAA;QAExC,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;OA3B/B,oBAAoB,CAgJhC;IAAD,2BAAC;CAAA,CA/IW,kBAAkB;;;ICvB9B;KAAiC;IAApB,iBAAiB;QAhB7B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,WAAW;gBACX,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,oBAAoB;gBACpB,YAAY;aACf;YACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;AC9BA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-text-area.js","sources":["ng://@taiga-ui/kit/components/text-area/text-area.providers.ts","ng://@taiga-ui/kit/components/text-area/text-area.component.ts","ng://@taiga-ui/kit/components/text-area/text-area.directive.ts","ng://@taiga-ui/kit/components/text-area/text-area.module.ts","ng://@taiga-ui/kit/components/text-area/taiga-ui-kit-components-text-area.ts"],"sourcesContent":["import {forwardRef, Provider} from '@angular/core';\nimport {AbstractTuiControl, TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\nexport const TUI_TEXT_AREA_PROVIDERS: Provider[] = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n setNativeFocused,\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n} from '@taiga-ui/cdk';\nimport {\n getBorder,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldComponent,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_TEXT_AREA_PROVIDERS} from './text-area.providers';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n@Component({\n selector: 'tui-text-area',\n templateUrl: './text-area.template.html',\n styleUrls: ['./text-area.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TEXT_AREA_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._ios]': 'isIOS',\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 @Input()\n @tuiDefaultProp()\n rows = DEFAULT_ROWS;\n\n @Input()\n @HostBinding('class._expandable')\n @tuiDefaultProp()\n expandable = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n 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 get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding('style.--border-end.rem')\n get border(): number {\n return getBorder(false, this.hasCleaner, this.hasTooltip);\n }\n\n get hasCleaner(): boolean {\n return this.controller.cleaner && this.hasValue && this.interactive;\n }\n\n @HostBinding('class._has-tooltip')\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding('class._has-value')\n get hasValue(): boolean {\n return this.value !== '';\n }\n\n @HostBinding('class._has-counter')\n get hasCounter(): boolean {\n return !!this.controller.maxLength && this.interactive;\n }\n\n get hasPlaceholder(): boolean {\n return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get hasExampleText(): boolean {\n const text =\n this.controller.exampleText || this.textfield?.nativeElement.placeholder;\n\n return !!text && this.focused && !this.hasValue && !this.readOnly;\n }\n\n get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.controller.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get fittedContent(): string {\n return this.value.slice(0, this.controller.maxLength || Infinity);\n }\n\n get extraContent(): string {\n return this.value.slice(this.controller.maxLength || Infinity);\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onValueChange(value: string) {\n this.updateValue(value);\n }\n\n onMouseDown(event: MouseEvent) {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement);\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","import {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\n@Directive({\n selector: 'tui-text-area',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiTextAreaDirective),\n },\n ],\n})\nexport class TuiTextAreaDirective extends TuiAbstractTextfieldHost<TuiTextAreaComponent> {\n onValueChange(value: string) {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule, TuiHoveredModule} from '@taiga-ui/cdk';\nimport {\n TuiDescribedByModule,\n TuiPrimitiveTextfieldModule,\n TuiScrollbarModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTooltipModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\nimport {TuiTextAreaDirective} from './text-area.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiWrapperModule,\n TuiDescribedByModule,\n TuiSvgModule,\n TuiPrimitiveTextfieldModule,\n ],\n declarations: [TuiTextAreaComponent, TuiTextAreaDirective],\n exports: [TuiTextAreaComponent, TuiTextAreaDirective, TuiTextfieldComponent],\n})\nexport class TuiTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAUa,uBAAuB,GAAe;IAC/C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ICmBJ,YAAY,GAAG,GAAG;IAClB,aAAa,GAAG,GAAG;IACnB,aAAa,GAAG,GAAG;;IAcpB,wCAA0B;IAkBlC,8BAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C;QAZvD,YAcI,kBAAM,OAAO,E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