@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
1
  import { __decorate, __param } from 'tslib';
2
- import { Optional, Self, Inject, ChangeDetectorRef, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
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, AbstractTuiControl, typedFromEvent, isNativeFocused, round, 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
+ const TUI_SLIDER_DEFAULT_OPTIONS = {
15
+ size: 'm',
16
+ trackColor: 'var(--tui-base-03)',
17
+ };
18
+ const TUI_SLIDER_OPTIONS = new InjectionToken('Default parameters for Slider component', { factory: () => TUI_SLIDER_DEFAULT_OPTIONS });
19
+ function tuiSliderOptionsProvider(options) {
20
+ return {
21
+ provide: TUI_SLIDER_OPTIONS,
22
+ useValue: Object.assign(Object.assign({}, TUI_SLIDER_DEFAULT_OPTIONS), options),
23
+ };
24
+ }
25
+
13
26
  let TuiSliderComponent = class TuiSliderComponent {
14
- constructor(control, changeDetectorRef, elementRef, userAgent) {
27
+ constructor(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
  /**
@@ -40,11 +54,14 @@ let TuiSliderComponent = class TuiSliderComponent {
40
54
  get value() {
41
55
  return Number(this.elementRef.nativeElement.value) || 0;
42
56
  }
43
- get fillPercentage() {
57
+ set value(newValue) {
58
+ this.elementRef.nativeElement.value = `${newValue}`;
59
+ }
60
+ get valuePercentage() {
44
61
  return (100 * this.value) / (this.max - this.min);
45
62
  }
46
- get stepPercentage() {
47
- return 100 / this.segments - 0.1;
63
+ get segmentWidth() {
64
+ return 100 / Math.max(1, this.segments);
48
65
  }
49
66
  get isOldEdge() {
50
67
  return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);
@@ -53,6 +70,7 @@ let TuiSliderComponent = class TuiSliderComponent {
53
70
  TuiSliderComponent.ctorParameters = () => [
54
71
  { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
55
72
  { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
73
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_SLIDER_OPTIONS,] }] },
56
74
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
57
75
  { type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
58
76
  ];
@@ -67,10 +85,10 @@ __decorate([
67
85
  ], TuiSliderComponent.prototype, "segments", void 0);
68
86
  __decorate([
69
87
  HostBinding('style.--tui-slider-fill-percentage.%')
70
- ], TuiSliderComponent.prototype, "fillPercentage", null);
88
+ ], TuiSliderComponent.prototype, "valuePercentage", null);
71
89
  __decorate([
72
90
  HostBinding('style.--tui-slider-segment-width.%')
73
- ], TuiSliderComponent.prototype, "stepPercentage", null);
91
+ ], TuiSliderComponent.prototype, "segmentWidth", null);
74
92
  __decorate([
75
93
  HostBinding('class._old-edge')
76
94
  ], TuiSliderComponent.prototype, "isOldEdge", null);
@@ -92,18 +110,117 @@ TuiSliderComponent = __decorate([
92
110
  * This function triggers change detection (for `fillPercentage` function) when we drag thumb of the input.
93
111
  */
94
112
  '(input)': '0',
113
+ '[style.--tui-slider-track-color]': 'options.trackColor',
95
114
  },
96
115
  changeDetection: ChangeDetectionStrategy.OnPush,
97
- 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)}"]
116
+ 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)}"]
98
117
  }),
99
118
  __param(0, Optional()),
100
119
  __param(0, Self()),
101
120
  __param(0, Inject(NgControl)),
102
121
  __param(1, Inject(ChangeDetectorRef)),
103
- __param(2, Inject(ElementRef)),
104
- __param(3, Inject(USER_AGENT))
122
+ __param(2, Inject(TUI_SLIDER_OPTIONS)),
123
+ __param(3, Inject(ElementRef)),
124
+ __param(4, Inject(USER_AGENT))
105
125
  ], TuiSliderComponent);
106
126
 
127
+ // @dynamic
128
+ let TuiSliderKeyStepsDirective = class TuiSliderKeyStepsDirective extends AbstractTuiControl {
129
+ constructor(control, changeDetectorRef, elementRef, slider) {
130
+ super(control, changeDetectorRef);
131
+ this.elementRef = elementRef;
132
+ this.slider = slider;
133
+ this.keySteps = [];
134
+ this.keyStepsInput = typedFromEvent(this.elementRef.nativeElement, 'input').pipe(map(() => this.controlValue));
135
+ }
136
+ get nativeFocusableElement() {
137
+ return this.computedDisabled ? null : this.elementRef.nativeElement;
138
+ }
139
+ get focused() {
140
+ return isNativeFocused(this.nativeFocusableElement);
141
+ }
142
+ get controlValue() {
143
+ const { valuePercentage } = this.slider;
144
+ const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(this.keySteps, ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage);
145
+ return transformToControlValue(valuePercentage, lowerStep, upperStep);
146
+ }
147
+ updateControlValue() {
148
+ this.updateValue(this.controlValue);
149
+ }
150
+ writeValue(controlValue) {
151
+ if (controlValue === null) {
152
+ return;
153
+ }
154
+ const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(this.keySteps, ([_, keyStepValue]) => controlValue <= keyStepValue);
155
+ this.slider.value = this.transformToNativeValue(controlValue, lowerStep, upperStep);
156
+ }
157
+ getFallbackValue() {
158
+ return 0;
159
+ }
160
+ transformToNativeValue(controlValue, [upperStepPercent, upperStepValue], [lowerStepPercent, lowerStepValue]) {
161
+ const { min, max } = this.slider;
162
+ const ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);
163
+ const newValuePercentage = (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;
164
+ return (newValuePercentage * (max - min)) / 100;
165
+ }
166
+ };
167
+ TuiSliderKeyStepsDirective.ctorParameters = () => [
168
+ { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
169
+ { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
170
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
171
+ { type: TuiSliderComponent, decorators: [{ type: Inject, args: [TuiSliderComponent,] }] }
172
+ ];
173
+ __decorate([
174
+ Input(),
175
+ tuiDefaultProp(checkHasMinMaxPercents, 'Should contain min and max values')
176
+ ], TuiSliderKeyStepsDirective.prototype, "keySteps", void 0);
177
+ __decorate([
178
+ Output()
179
+ ], TuiSliderKeyStepsDirective.prototype, "keyStepsInput", void 0);
180
+ __decorate([
181
+ HostListener('change')
182
+ ], TuiSliderKeyStepsDirective.prototype, "updateControlValue", null);
183
+ TuiSliderKeyStepsDirective = __decorate([
184
+ Directive({
185
+ selector: 'input[tuiSlider][keySteps]',
186
+ }),
187
+ __param(0, Optional()),
188
+ __param(0, Self()),
189
+ __param(0, Inject(NgControl)),
190
+ __param(1, Inject(ChangeDetectorRef)),
191
+ __param(2, Inject(ElementRef)),
192
+ __param(3, Inject(TuiSliderComponent))
193
+ ], TuiSliderKeyStepsDirective);
194
+ /**
195
+ * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.
196
+ * TODO delete it in v3.0
197
+ *
198
+ */
199
+ let TuiSliderTickLabelPipe = class TuiSliderTickLabelPipe {
200
+ transform(tickIndex, totalSegments, keySteps) {
201
+ const percentage = (100 / totalSegments) * tickIndex;
202
+ const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(keySteps, ([keyStepPercentage, _]) => percentage <= keyStepPercentage);
203
+ return transformToControlValue(percentage, upperStep, lowerStep);
204
+ }
205
+ };
206
+ TuiSliderTickLabelPipe = __decorate([
207
+ Pipe({ name: 'tuiSliderTickLabel' })
208
+ ], TuiSliderTickLabelPipe);
209
+ function checkHasMinMaxPercents(steps) {
210
+ return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);
211
+ }
212
+ function findKeyStepsBoundariesByFn(keySteps, fn) {
213
+ const keyStepUpperIndex = keySteps.findIndex((ketStep, i) => i && fn(ketStep));
214
+ const lowerStep = keySteps[keyStepUpperIndex - 1];
215
+ const upperStep = keySteps[keyStepUpperIndex];
216
+ return [lowerStep, upperStep];
217
+ }
218
+ function transformToControlValue(valuePercentage, [upperStepPercent, upperStepValue], [lowerStepPercent, lowerStepValue]) {
219
+ const ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);
220
+ const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;
221
+ return round(controlValue, TUI_FLOATING_PRECISION);
222
+ }
223
+
107
224
  var TuiSliderOldComponent_1;
108
225
  /**
109
226
  * @deprecated use {@link TuiSliderComponent} instead
@@ -178,8 +295,18 @@ TuiSliderModule = __decorate([
178
295
  TuiActiveZoneModule,
179
296
  TuiFormatNumberPipeModule,
180
297
  ],
181
- declarations: [TuiSliderComponent, TuiSliderOldComponent],
182
- exports: [TuiSliderComponent, TuiSliderOldComponent],
298
+ declarations: [
299
+ TuiSliderComponent,
300
+ TuiSliderKeyStepsDirective,
301
+ TuiSliderTickLabelPipe,
302
+ TuiSliderOldComponent,
303
+ ],
304
+ exports: [
305
+ TuiSliderComponent,
306
+ TuiSliderKeyStepsDirective,
307
+ TuiSliderTickLabelPipe,
308
+ TuiSliderOldComponent,
309
+ ],
183
310
  })
184
311
  ], TuiSliderModule);
185
312
 
@@ -187,5 +314,5 @@ TuiSliderModule = __decorate([
187
314
  * Generated bundle index. Do not edit.
188
315
  */
189
316
 
190
- export { TuiSliderComponent, TuiSliderModule, TuiSliderOldComponent };
317
+ export { TUI_SLIDER_DEFAULT_OPTIONS, TUI_SLIDER_OPTIONS, TuiSliderComponent, TuiSliderKeyStepsDirective, TuiSliderModule, TuiSliderOldComponent, TuiSliderTickLabelPipe, tuiSliderOptionsProvider };
191
318
  //# 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":";;;;;;;;;;;;IA2Ca,kBAAkB,GAA/B,MAAa,kBAAkB;IAyC3B,YAII,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,IAAI,GAAG;QACH,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;KACpD;IAED,IAAI,GAAG;QACH,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;KAC3D;IAED,IAAI,IAAI;QACJ,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,C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,QAAQ,YACR,IAAI,YACJ,MAAM,SAAC,SAAS;YAE6B,iBAAiB,uBAA9D,MAAM,SAAC,iBAAiB;YACM,QAAQ,uBAAtC,MAAM,SAAC,QAAQ;YACyB,UAAU,uBAAlD,MAAM,SAAC,iBAAiB;;AAXpB,qBAAqB;IAfjC,SAAS,CAAC;QACP,QAAQ,EAAE,YAAY;QACtB,61EAAgE;QAKhE,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,uBAAqB,CAAC;aACvD;SACJ;;KACJ,CAAC;IAMO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GAXrB,qBAAqB,CAiDjC;;ICjEY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAZ3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,oBAAoB;YACpB,kBAAkB;YAClB,qBAAqB;YACrB,mBAAmB;YACnB,yBAAyB;SAC5B;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;QACzD,OAAO,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;KACvD,CAAC;GACW,eAAe,CAAG;;ACzB/B;;;;;;"}
1
+ {"version":3,"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":";;;;;;;;;;;;;MAQa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,oBAAoB;EAClC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC,EAAC,OAAO,EAAE,MAAM,0BAA0B,EAAC,EAC7C;SAEc,wBAAwB,CACpC,OAAkC;IAElC,OAAO;QACH,OAAO,EAAE,kBAAkB;QAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;KACxD,CAAC;AACN;;ICqBa,kBAAkB,GAA/B,MAAa,kBAAkB;IA6C3B,YAII,OAAyB,EACE,iBAAoC,EAC1B,OAAyB,EACzB,UAAwC,EACxC,SAAiB;;QAF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,uBAA9D,MAAM,SAAC,iBAAiB;YACM,QAAQ,uBAAtC,MAAM,SAAC,QAAQ;YACyB,UAAU,uBAAlD,MAAM,SAAC,iBAAiB;;AAXpB,qBAAqB;IAfjC,SAAS,CAAC;QACP,QAAQ,EAAE,YAAY;QACtB,61EAAgE;QAKhE,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,uBAAqB,CAAC;aACvD;SACJ;;KACJ,CAAC;IAMO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GAXrB,qBAAqB,CAiDjC;;ICnDY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAtB3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,oBAAoB;YACpB,kBAAkB;YAClB,qBAAqB;YACrB,mBAAmB;YACnB,yBAAyB;SAC5B;QACD,YAAY,EAAE;YACV,kBAAkB;YAClB,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;QACD,OAAO,EAAE;YACL,kBAAkB;YAClB,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;KACJ,CAAC;GACW,eAAe,CAAG;;ACvC/B;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { __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, AbstractTuiControl, isNativeFocused, setNativeFocused, TUI_IS_IOS, tuiDefaultProp, 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, TuiAbstractTextfieldHost, TUI_TEXTFIELD_HOST, 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 @@ const TUI_TEXT_AREA_PROVIDERS = [
11
11
  provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
12
12
  useExisting: forwardRef(() => TuiTextAreaComponent),
13
13
  },
14
+ {
15
+ provide: AbstractTuiControl,
16
+ useExisting: forwardRef(() => TuiTextAreaComponent),
17
+ },
14
18
  TEXTFIELD_CONTROLLER_PROVIDER,
15
19
  HINT_CONTROLLER_PROVIDER,
16
20
  MODE_PROVIDER,
@@ -34,9 +38,11 @@ let TuiTextAreaComponent = class TuiTextAreaComponent extends AbstractTuiControl
34
38
  return this.controller.labelOutside;
35
39
  }
36
40
  get nativeFocusableElement() {
37
- return this.computedDisabled || !this.focusableElement
38
- ? null
39
- : this.focusableElement.nativeElement;
41
+ var _a, _b;
42
+ if (this.computedDisabled) {
43
+ return null;
44
+ }
45
+ return (((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeElement) || ((_b = this.focusableElement) === null || _b === void 0 ? void 0 : _b.nativeElement) || null);
40
46
  }
41
47
  get focused() {
42
48
  return isNativeFocused(this.nativeFocusableElement);
@@ -63,10 +69,9 @@ let TuiTextAreaComponent = class TuiTextAreaComponent extends AbstractTuiControl
63
69
  return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);
64
70
  }
65
71
  get hasExampleText() {
66
- return (!!this.controller.exampleText &&
67
- this.focused &&
68
- !this.hasValue &&
69
- !this.readOnly);
72
+ var _a;
73
+ const text = this.controller.exampleText || ((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.nativeElement.placeholder);
74
+ return !!text && this.focused && !this.hasValue && !this.readOnly;
70
75
  }
71
76
  get computeMaxHeight() {
72
77
  return this.expandable ? this.rows * this.lineHeight : null;
@@ -90,7 +95,7 @@ let TuiTextAreaComponent = class TuiTextAreaComponent extends AbstractTuiControl
90
95
  onPressed(pressed) {
91
96
  this.updatePressed(pressed);
92
97
  }
93
- onValue(value) {
98
+ onValueChange(value) {
94
99
  this.updateValue(value);
95
100
  }
96
101
  onMouseDown(event) {
@@ -121,6 +126,9 @@ TuiTextAreaComponent.ctorParameters = () => [
121
126
  __decorate([
122
127
  ViewChild('focusableElement')
123
128
  ], TuiTextAreaComponent.prototype, "focusableElement", void 0);
129
+ __decorate([
130
+ ContentChild(TuiTextfieldComponent, { read: ElementRef })
131
+ ], TuiTextAreaComponent.prototype, "textfield", void 0);
124
132
  __decorate([
125
133
  Input(),
126
134
  tuiDefaultProp()
@@ -148,17 +156,21 @@ __decorate([
148
156
  __decorate([
149
157
  HostBinding('class._has-counter')
150
158
  ], TuiTextAreaComponent.prototype, "hasCounter", null);
159
+ __decorate([
160
+ HostListener('focusin', ['true']),
161
+ HostListener('focusout', ['false'])
162
+ ], TuiTextAreaComponent.prototype, "onFocused", null);
151
163
  TuiTextAreaComponent = __decorate([
152
164
  Component({
153
165
  selector: 'tui-text-area',
154
- 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",
166
+ 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",
155
167
  changeDetection: ChangeDetectionStrategy.OnPush,
156
168
  providers: TUI_TEXT_AREA_PROVIDERS,
157
169
  host: {
158
170
  '($.data-mode.attr)': 'mode$',
159
171
  '[class._ios]': 'isIOS',
160
172
  },
161
- 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)}"]
173
+ 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)}"]
162
174
  }),
163
175
  __param(0, Optional()),
164
176
  __param(0, Self()),
@@ -171,6 +183,24 @@ TuiTextAreaComponent = __decorate([
171
183
  __param(6, Inject(TUI_HINT_WATCHED_CONTROLLER))
172
184
  ], TuiTextAreaComponent);
173
185
 
186
+ var TuiTextAreaDirective_1;
187
+ let TuiTextAreaDirective = TuiTextAreaDirective_1 = class TuiTextAreaDirective extends TuiAbstractTextfieldHost {
188
+ onValueChange(value) {
189
+ this.host.onValueChange(value);
190
+ }
191
+ };
192
+ TuiTextAreaDirective = TuiTextAreaDirective_1 = __decorate([
193
+ Directive({
194
+ selector: 'tui-text-area',
195
+ providers: [
196
+ {
197
+ provide: TUI_TEXTFIELD_HOST,
198
+ useExisting: forwardRef(() => TuiTextAreaDirective_1),
199
+ },
200
+ ],
201
+ })
202
+ ], TuiTextAreaDirective);
203
+
174
204
  let TuiTextAreaModule = class TuiTextAreaModule {
175
205
  };
176
206
  TuiTextAreaModule = __decorate([
@@ -179,16 +209,16 @@ TuiTextAreaModule = __decorate([
179
209
  CommonModule,
180
210
  FormsModule,
181
211
  TuiFocusableModule,
182
- TuiFocusedModule,
183
212
  TuiHoveredModule,
184
213
  TuiScrollbarModule,
185
214
  TuiTooltipModule,
186
215
  TuiWrapperModule,
187
216
  TuiDescribedByModule,
188
217
  TuiSvgModule,
218
+ TuiPrimitiveTextfieldModule,
189
219
  ],
190
- declarations: [TuiTextAreaComponent],
191
- exports: [TuiTextAreaComponent],
220
+ declarations: [TuiTextAreaComponent, TuiTextAreaDirective],
221
+ exports: [TuiTextAreaComponent, TuiTextAreaDirective, TuiTextfieldComponent],
192
222
  })
193
223
  ], TuiTextAreaModule);
194
224
 
@@ -196,5 +226,5 @@ TuiTextAreaModule = __decorate([
196
226
  * Generated bundle index. Do not edit.
197
227
  */
198
228
 
199
- export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TUI_TEXT_AREA_PROVIDERS, TuiTextAreaComponent, TuiTextAreaModule };
229
+ export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TUI_TEXT_AREA_PROVIDERS, TuiTextAreaComponent, TuiTextAreaDirective, TuiTextAreaModule };
200
230
  //# 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":";;;;;;;;MAUa,uBAAuB,GAAe;IAC/C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;KACtD;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;MCoBJ,YAAY,GAAG,GAAG;MAClB,aAAa,GAAG,GAAG;MACnB,aAAa,GAAG,GAAG;IAanB,oBAAoB,GAAjC,MAAa,oBACT,SAAQ,kBAA0B;IAelC,YAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C;QAEnD,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QARS,eAAU,GAAV,UAAU,CAAQ;QAChC,UAAK,GAAL,KAAK,CAAS;QAChB,UAAK,GAAL,KAAK,CAAkC;QAEzD,eAAU,GAAV,UAAU,CAAwB;QAElC,mBAAc,GAAd,cAAc,CAA4B;QAnBvD,SAAI,GAAG,YAAY,CAAC;QAKpB,eAAU,GAAG,KAAK,CAAC;KAiBlB;IAGD,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;KACvC;IAED,IAAI,sBAAsB;QACtB,OAAO,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,gBAAgB;cAChD,IAAI;cACJ,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;KAC7C;IAED,IAAI,OAAO;QACP,OAAO,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KACvD;IAGD,IAAI,IAAI;QACJ,OAA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kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,oBAAoB;YACpB,YAAY;SACf;QACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;QACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAClC,CAAC;GACW,iBAAiB,CAAG;;AC9BjC;;;;;;"}
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":";;;;;;;;MAUa,uBAAuB,GAAe;IAC/C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,MAAM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aAAa,CAAC,KAAa;QACvB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAClC;EACJ;AAJY,oBAAoB;IAThC,SAAS,CAAC;QACP,QAAQ,EAAE,eAAe;QACzB,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,kBAAkB;gBAC3B,WAAW,EAAE,UAAU,CAAC,MAAM,sBAAoB,CAAC;aACtD;SACJ;KACJ,CAAC;GACW,oBAAoB,CAIhC;;ICeY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAhB7B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,gBAAgB;YAChB,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,oBAAoB;YACpB,YAAY;YACZ,2BAA2B;SAC9B;QACD,YAAY,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;QAC1D,OAAO,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;KAC/E,CAAC;GACW,iBAAiB,CAAG;;ACjCjC;;;;;;"}
@@ -14,6 +14,7 @@ export * from '@taiga-ui/kit/components/checkbox-labeled';
14
14
  export * from '@taiga-ui/kit/components/combo-box';
15
15
  export * from '@taiga-ui/kit/components/data-list-wrapper';
16
16
  export * from '@taiga-ui/kit/components/field-error';
17
+ export * from '@taiga-ui/kit/components/files';
17
18
  export * from '@taiga-ui/kit/components/filter';
18
19
  export * from '@taiga-ui/kit/components/input';
19
20
  export * from '@taiga-ui/kit/components/input-copy';
@@ -22,6 +23,7 @@ export * from '@taiga-ui/kit/components/input-date';
22
23
  export * from '@taiga-ui/kit/components/input-date-range';
23
24
  export * from '@taiga-ui/kit/components/input-date-time';
24
25
  export * from '@taiga-ui/kit/components/input-file';
26
+ export * from '@taiga-ui/kit/components/input-files';
25
27
  export * from '@taiga-ui/kit/components/input-inline';
26
28
  export * from '@taiga-ui/kit/components/input-month';
27
29
  export * from '@taiga-ui/kit/components/input-month-range';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}