@taiga-ui/kit 2.33.0 → 2.36.0

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 (685) hide show
  1. package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
  2. package/bundles/taiga-ui-kit-abstract.umd.js +2 -2
  3. package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
  4. package/bundles/taiga-ui-kit-abstract.umd.min.js +1 -1
  5. package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
  6. package/bundles/taiga-ui-kit-components-accordion.umd.js +2 -2
  7. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  8. package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
  9. package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
  10. package/bundles/taiga-ui-kit-components-arrow.umd.js +14 -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 +1 -1
  13. package/bundles/taiga-ui-kit-components-arrow.umd.min.js.map +1 -1
  14. package/bundles/taiga-ui-kit-components-avatar.umd.js +2 -2
  15. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  16. package/bundles/taiga-ui-kit-components-avatar.umd.min.js +2 -2
  17. package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
  18. package/bundles/taiga-ui-kit-components-badge.umd.js +2 -2
  19. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  20. package/bundles/taiga-ui-kit-components-badge.umd.min.js +1 -1
  21. package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
  22. package/bundles/taiga-ui-kit-components-badged-content.umd.js +2 -2
  23. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  24. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +2 -2
  25. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js.map +1 -1
  26. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +2 -2
  27. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  28. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js +1 -1
  29. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
  30. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +2 -2
  31. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  32. package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +2 -2
  33. package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
  34. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
  36. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +2 -2
  37. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  38. package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js +2 -2
  39. package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js.map +1 -1
  40. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +2 -2
  41. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  42. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js +1 -1
  43. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js.map +1 -1
  44. package/bundles/taiga-ui-kit-components-checkbox.umd.js +2 -2
  45. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  46. package/bundles/taiga-ui-kit-components-checkbox.umd.min.js +1 -1
  47. package/bundles/taiga-ui-kit-components-checkbox.umd.min.js.map +1 -1
  48. package/bundles/taiga-ui-kit-components-combo-box.umd.js +64 -22
  49. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  50. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +2 -2
  51. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
  52. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +17 -11
  53. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  54. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +2 -2
  55. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
  56. package/bundles/taiga-ui-kit-components-field-error.umd.js +10 -15
  57. package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
  58. package/bundles/taiga-ui-kit-components-field-error.umd.min.js +1 -1
  59. package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
  60. package/bundles/taiga-ui-kit-components-filter.umd.js +2 -2
  61. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  62. package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
  63. package/bundles/taiga-ui-kit-components-filter.umd.min.js.map +1 -1
  64. package/bundles/taiga-ui-kit-components-input-count.umd.js +7 -2
  65. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  66. package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
  67. package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
  68. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +64 -41
  69. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  70. package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js +2 -2
  71. package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js.map +1 -1
  72. package/bundles/taiga-ui-kit-components-input-month.umd.js +57 -32
  73. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  74. package/bundles/taiga-ui-kit-components-input-month.umd.min.js +2 -2
  75. package/bundles/taiga-ui-kit-components-input-month.umd.min.js.map +1 -1
  76. package/bundles/taiga-ui-kit-components-input-number.umd.js +8 -2
  77. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  78. package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
  79. package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
  80. package/bundles/taiga-ui-kit-components-input-password.umd.js +5 -0
  81. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  82. package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
  83. package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
  84. package/bundles/taiga-ui-kit-components-input-phone.umd.js +8 -2
  85. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  86. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +2 -2
  87. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
  88. package/bundles/taiga-ui-kit-components-input-range.umd.js +2 -2
  89. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  90. package/bundles/taiga-ui-kit-components-input-range.umd.min.js +1 -1
  91. package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
  92. package/bundles/taiga-ui-kit-components-input-slider.umd.js +2 -2
  93. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  94. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +2 -2
  95. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
  96. package/bundles/taiga-ui-kit-components-input-tag.umd.js +53 -17
  97. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  98. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +2 -2
  99. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
  100. package/bundles/taiga-ui-kit-components-input-time.umd.js +5 -0
  101. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  102. package/bundles/taiga-ui-kit-components-input-time.umd.min.js +1 -1
  103. package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
  104. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +25 -14
  105. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  106. package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
  107. package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js.map +1 -1
  108. package/bundles/taiga-ui-kit-components-marker-icon.umd.js +2 -2
  109. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  110. package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js +1 -1
  111. package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js.map +1 -1
  112. package/bundles/taiga-ui-kit-components-multi-select.umd.js +51 -16
  113. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  114. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +2 -2
  115. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
  116. package/bundles/taiga-ui-kit-components-progress.umd.js +140 -73
  117. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  118. package/bundles/taiga-ui-kit-components-progress.umd.min.js +2 -2
  119. package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
  120. package/bundles/taiga-ui-kit-components-radio-block.umd.js +2 -2
  121. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  122. package/bundles/taiga-ui-kit-components-radio-block.umd.min.js +1 -1
  123. package/bundles/taiga-ui-kit-components-radio-block.umd.min.js.map +1 -1
  124. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +2 -2
  125. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  126. package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js +1 -1
  127. package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js.map +1 -1
  128. package/bundles/taiga-ui-kit-components-radio-list.umd.js +2 -2
  129. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  130. package/bundles/taiga-ui-kit-components-radio-list.umd.min.js +1 -1
  131. package/bundles/taiga-ui-kit-components-radio-list.umd.min.js.map +1 -1
  132. package/bundles/taiga-ui-kit-components-radio.umd.js +7 -2
  133. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  134. package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
  135. package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
  136. package/bundles/taiga-ui-kit-components-range.umd.js +1 -1
  137. package/bundles/taiga-ui-kit-components-range.umd.min.js +1 -1
  138. package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
  139. package/bundles/taiga-ui-kit-components-rating.umd.js +5 -0
  140. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  141. package/bundles/taiga-ui-kit-components-rating.umd.min.js +1 -1
  142. package/bundles/taiga-ui-kit-components-rating.umd.min.js.map +1 -1
  143. package/bundles/taiga-ui-kit-components-select.umd.js +35 -10
  144. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  145. package/bundles/taiga-ui-kit-components-select.umd.min.js +2 -2
  146. package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
  147. package/bundles/taiga-ui-kit-components-slider.umd.js +272 -27
  148. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  149. package/bundles/taiga-ui-kit-components-slider.umd.min.js +2 -2
  150. package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
  151. package/bundles/taiga-ui-kit-components-tag.umd.js +9 -3
  152. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  153. package/bundles/taiga-ui-kit-components-tag.umd.min.js +1 -1
  154. package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
  155. package/bundles/taiga-ui-kit-components-text-area.umd.js +50 -13
  156. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  157. package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
  158. package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
  159. package/bundles/taiga-ui-kit-components-toggle.umd.js +7 -2
  160. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  161. package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
  162. package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
  163. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +22 -5
  164. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
  165. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js +1 -1
  166. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
  167. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +1 -1
  168. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.min.js +1 -1
  169. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +421 -0
  170. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -0
  171. package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js +16 -0
  172. package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js.map +1 -0
  173. package/bundles/taiga-ui-kit-pipes.umd.js +12 -4
  174. package/bundles/taiga-ui-kit-pipes.umd.js.map +1 -1
  175. package/bundles/taiga-ui-kit-pipes.umd.min.js +1 -1
  176. package/bundles/taiga-ui-kit-providers.umd.js +29 -12
  177. package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
  178. package/bundles/taiga-ui-kit-providers.umd.min.js +1 -1
  179. package/bundles/taiga-ui-kit-providers.umd.min.js.map +1 -1
  180. package/bundles/taiga-ui-kit-tokens.umd.js +242 -4
  181. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  182. package/bundles/taiga-ui-kit-tokens.umd.min.js +15 -1
  183. package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
  184. package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
  185. package/components/arrow/arrow-options.d.ts +7 -5
  186. package/components/arrow/taiga-ui-kit-components-arrow.metadata.json +1 -1
  187. package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
  188. package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
  189. package/components/badged-content/taiga-ui-kit-components-badged-content.metadata.json +1 -1
  190. package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
  191. package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
  192. package/components/carousel/carousel-buttons.directive.d.ts +2 -2
  193. package/components/checkbox/checkbox.component.d.ts +2 -2
  194. package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
  195. package/components/checkbox-block/taiga-ui-kit-components-checkbox-block.metadata.json +1 -1
  196. package/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.metadata.json +1 -1
  197. package/components/combo-box/combo-box-strict.directive.d.ts +7 -0
  198. package/components/combo-box/combo-box.component.d.ts +8 -5
  199. package/components/combo-box/index.d.ts +1 -0
  200. package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
  201. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +5 -3
  202. package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
  203. package/components/field-error/field-error.component.d.ts +1 -2
  204. package/components/field-error/field-error.module.d.ts +3 -0
  205. package/components/field-error/taiga-ui-kit-components-field-error.metadata.json +1 -1
  206. package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
  207. package/components/input-count/input-count-options.d.ts +10 -4
  208. package/components/input-count/input-count.component.d.ts +3 -3
  209. package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
  210. package/components/input-month/index.d.ts +1 -0
  211. package/components/input-month/input-month.component.d.ts +6 -4
  212. package/components/input-month/input-month.directive.d.ts +8 -1
  213. package/components/input-month/input-month.providers.d.ts +2 -0
  214. package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +1 -1
  215. package/components/input-month-range/index.d.ts +1 -0
  216. package/components/input-month-range/input-month-range.component.d.ts +6 -7
  217. package/components/input-month-range/input-month-range.directive.d.ts +8 -1
  218. package/components/input-month-range/input-month-range.providers.d.ts +2 -0
  219. package/components/input-month-range/taiga-ui-kit-components-input-month-range.metadata.json +1 -1
  220. package/components/input-number/input-number.directive.d.ts +4 -1
  221. package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
  222. package/components/input-password/input-password-options.d.ts +10 -4
  223. package/components/input-password/input-password.component.d.ts +3 -3
  224. package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
  225. package/components/input-phone/input-phone.directive.d.ts +4 -1
  226. package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
  227. package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
  228. package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
  229. package/components/input-tag/index.d.ts +1 -0
  230. package/components/input-tag/input-tag-options.d.ts +7 -0
  231. package/components/input-tag/input-tag.component.d.ts +9 -4
  232. package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
  233. package/components/input-time/input-time-options.d.ts +10 -4
  234. package/components/input-time/input-time.component.d.ts +6 -6
  235. package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
  236. package/components/line-clamp/line-clamp.component.d.ts +7 -3
  237. package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
  238. package/components/marker-icon/taiga-ui-kit-components-marker-icon.metadata.json +1 -1
  239. package/components/multi-select/hide-selected.pipe.d.ts +1 -1
  240. package/components/multi-select/index.d.ts +1 -0
  241. package/components/multi-select/multi-select-options.d.ts +10 -0
  242. package/components/multi-select/multi-select.component.d.ts +14 -8
  243. package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
  244. package/components/progress/index.d.ts +4 -3
  245. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +11 -0
  246. package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
  247. package/components/progress/{pipes → utils}/abstract-color-segments.d.ts +0 -0
  248. package/components/progress/utils/calculate-color-segments.d.ts +5 -0
  249. package/components/progress/{pipes → utils}/progress-color-segments-async.pipe.d.ts +5 -0
  250. package/components/progress/utils/progress-color-segments.pipe.d.ts +9 -0
  251. package/components/radio/radio-options.d.ts +10 -4
  252. package/components/radio/radio.component.d.ts +2 -2
  253. package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
  254. package/components/radio-block/taiga-ui-kit-components-radio-block.metadata.json +1 -1
  255. package/components/radio-labeled/taiga-ui-kit-components-radio-labeled.metadata.json +1 -1
  256. package/components/radio-list/taiga-ui-kit-components-radio-list.metadata.json +1 -1
  257. package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
  258. package/components/rating/rating-options.d.ts +2 -1
  259. package/components/rating/taiga-ui-kit-components-rating.metadata.json +1 -1
  260. package/components/select/index.d.ts +1 -0
  261. package/components/select/select-options.d.ts +9 -0
  262. package/components/select/select.component.d.ts +9 -4
  263. package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
  264. package/components/slider/index.d.ts +3 -0
  265. package/components/slider/slider-key-steps.directive.d.ts +17 -0
  266. package/components/slider/slider-old.component.d.ts +19 -0
  267. package/components/slider/slider-options.d.ts +9 -0
  268. package/components/slider/slider.component.d.ts +18 -13
  269. package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
  270. package/components/tag/tag.component.d.ts +1 -0
  271. package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
  272. package/components/text-area/index.d.ts +1 -0
  273. package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
  274. package/components/text-area/text-area.component.d.ts +2 -1
  275. package/components/text-area/text-area.directive.d.ts +5 -0
  276. package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
  277. package/components/toggle/toggle-options.d.ts +10 -4
  278. package/components/toggle/toggle.component.d.ts +3 -3
  279. package/directives/dropdown-selection/dropdown-selection.directive.d.ts +2 -2
  280. package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.metadata.json +1 -1
  281. package/directives/lazy-loading/index.d.ts +1 -0
  282. package/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.d.ts +0 -1
  283. package/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.metadata.json +1 -1
  284. package/esm2015/abstract/input-slider.js +2 -2
  285. package/esm2015/abstract/slider/slider.js +2 -2
  286. package/esm2015/components/accordion/accordion-item/accordion-item.component.js +3 -3
  287. package/esm2015/components/arrow/arrow-options.js +13 -2
  288. package/esm2015/components/avatar/avatar.component.js +3 -3
  289. package/esm2015/components/badge/badge.component.js +3 -3
  290. package/esm2015/components/badged-content/badged-content.component.js +3 -3
  291. package/esm2015/components/breadcrumbs/breadcrumbs.component.js +3 -3
  292. package/esm2015/components/calendar-month/calendar-month.component.js +3 -3
  293. package/esm2015/components/carousel/carousel-buttons.directive.js +1 -1
  294. package/esm2015/components/checkbox/checkbox.component.js +3 -3
  295. package/esm2015/components/checkbox-block/checkbox-block.component.js +3 -3
  296. package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +3 -3
  297. package/esm2015/components/combo-box/combo-box-strict.directive.js +31 -0
  298. package/esm2015/components/combo-box/combo-box.component.js +24 -18
  299. package/esm2015/components/combo-box/combo-box.module.js +13 -3
  300. package/esm2015/components/combo-box/index.js +2 -1
  301. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +17 -11
  302. package/esm2015/components/field-error/field-error.component.js +8 -12
  303. package/esm2015/components/field-error/field-error.module.js +6 -2
  304. package/esm2015/components/filter/filter.component.js +3 -3
  305. package/esm2015/components/input-count/input-count-options.js +5 -1
  306. package/esm2015/components/input-count/input-count.component.js +3 -3
  307. package/esm2015/components/input-month/index.js +2 -1
  308. package/esm2015/components/input-month/input-month.component.js +19 -25
  309. package/esm2015/components/input-month/input-month.directive.js +32 -7
  310. package/esm2015/components/input-month/input-month.module.js +4 -4
  311. package/esm2015/components/input-month/input-month.providers.js +19 -0
  312. package/esm2015/components/input-month-range/index.js +2 -1
  313. package/esm2015/components/input-month-range/input-month-range.component.js +21 -37
  314. package/esm2015/components/input-month-range/input-month-range.directive.js +37 -7
  315. package/esm2015/components/input-month-range/input-month-range.module.js +3 -2
  316. package/esm2015/components/input-month-range/input-month-range.providers.js +19 -0
  317. package/esm2015/components/input-number/input-number.directive.js +9 -3
  318. package/esm2015/components/input-password/input-password-options.js +5 -1
  319. package/esm2015/components/input-password/input-password.component.js +2 -2
  320. package/esm2015/components/input-phone/input-phone.directive.js +9 -3
  321. package/esm2015/components/input-range/input-range.component.js +3 -3
  322. package/esm2015/components/input-slider/input-slider.component.js +3 -3
  323. package/esm2015/components/input-tag/index.js +2 -1
  324. package/esm2015/components/input-tag/input-tag-options.js +9 -0
  325. package/esm2015/components/input-tag/input-tag.component.js +40 -17
  326. package/esm2015/components/input-time/input-time-options.js +5 -1
  327. package/esm2015/components/input-time/input-time.component.js +1 -1
  328. package/esm2015/components/line-clamp/line-clamp.component.js +25 -15
  329. package/esm2015/components/line-clamp/line-clamp.directive.js +2 -1
  330. package/esm2015/components/marker-icon/marker-icon.component.js +3 -3
  331. package/esm2015/components/multi-select/hide-selected.pipe.js +4 -3
  332. package/esm2015/components/multi-select/index.js +2 -1
  333. package/esm2015/components/multi-select/multi-select-options.js +13 -0
  334. package/esm2015/components/multi-select/multi-select.component.js +30 -12
  335. package/esm2015/components/progress/index.js +5 -4
  336. package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +48 -0
  337. package/esm2015/components/progress/progress.module.js +6 -3
  338. package/esm2015/components/progress/utils/abstract-color-segments.js +32 -0
  339. package/esm2015/components/progress/utils/calculate-color-segments.js +10 -0
  340. package/esm2015/components/progress/utils/progress-color-segments-async.pipe.js +21 -0
  341. package/esm2015/components/progress/utils/progress-color-segments.pipe.js +19 -0
  342. package/esm2015/components/radio/radio-options.js +5 -1
  343. package/esm2015/components/radio/radio.component.js +3 -3
  344. package/esm2015/components/radio-block/radio-block.component.js +3 -3
  345. package/esm2015/components/radio-labeled/radio-labeled.component.js +3 -3
  346. package/esm2015/components/radio-list/radio-list.component.js +3 -3
  347. package/esm2015/components/range/range.component.js +1 -1
  348. package/esm2015/components/rating/rating-options.js +5 -1
  349. package/esm2015/components/select/index.js +2 -1
  350. package/esm2015/components/select/select-options.js +12 -0
  351. package/esm2015/components/select/select.component.js +21 -8
  352. package/esm2015/components/slider/index.js +4 -1
  353. package/esm2015/components/slider/slider-key-steps.directive.js +81 -0
  354. package/esm2015/components/slider/slider-old.component.js +71 -0
  355. package/esm2015/components/slider/slider-options.js +11 -0
  356. package/esm2015/components/slider/slider.component.js +86 -44
  357. package/esm2015/components/slider/slider.module.js +5 -3
  358. package/esm2015/components/tag/tag.component.js +10 -4
  359. package/esm2015/components/text-area/index.js +2 -1
  360. package/esm2015/components/text-area/text-area.component.js +21 -13
  361. package/esm2015/components/text-area/text-area.directive.js +22 -0
  362. package/esm2015/components/text-area/text-area.module.js +7 -6
  363. package/esm2015/components/text-area/text-area.providers.js +6 -2
  364. package/esm2015/components/toggle/toggle-options.js +5 -1
  365. package/esm2015/components/toggle/toggle.component.js +3 -3
  366. package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
  367. package/esm2015/directives/lazy-loading/index.js +2 -1
  368. package/esm2015/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.js +1 -2
  369. package/esm2015/pipes/field-error/field-error-content-pipe.js +35 -0
  370. package/esm2015/pipes/field-error/field-error-pipe.js +120 -0
  371. package/esm2015/pipes/field-error/field-error.module.js +14 -0
  372. package/esm2015/pipes/field-error/index.js +4 -0
  373. package/esm2015/pipes/field-error/taiga-ui-kit-pipes-field-error.js +5 -0
  374. package/esm2015/pipes/index.js +2 -1
  375. package/esm2015/providers/index.js +2 -1
  376. package/esm2015/providers/month-formatter.provider.js +17 -0
  377. package/esm2015/providers/value-accessor.provider.js +2 -2
  378. package/esm2015/tokens/index.js +3 -1
  379. package/esm2015/tokens/items-handlers.js +15 -0
  380. package/esm2015/tokens/month-formatter.js +3 -0
  381. package/esm5/abstract/input-slider.js +2 -2
  382. package/esm5/abstract/slider/slider.js +2 -2
  383. package/esm5/components/accordion/accordion-item/accordion-item.component.js +3 -3
  384. package/esm5/components/arrow/arrow-options.js +14 -2
  385. package/esm5/components/avatar/avatar.component.js +3 -3
  386. package/esm5/components/badge/badge.component.js +3 -3
  387. package/esm5/components/badged-content/badged-content.component.js +3 -3
  388. package/esm5/components/breadcrumbs/breadcrumbs.component.js +3 -3
  389. package/esm5/components/calendar-month/calendar-month.component.js +3 -3
  390. package/esm5/components/carousel/carousel-buttons.directive.js +1 -1
  391. package/esm5/components/checkbox/checkbox.component.js +3 -3
  392. package/esm5/components/checkbox-block/checkbox-block.component.js +3 -3
  393. package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +3 -3
  394. package/esm5/components/combo-box/combo-box-strict.directive.js +32 -0
  395. package/esm5/components/combo-box/combo-box.component.js +24 -18
  396. package/esm5/components/combo-box/combo-box.module.js +13 -3
  397. package/esm5/components/combo-box/index.js +2 -1
  398. package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +18 -11
  399. package/esm5/components/field-error/field-error.component.js +8 -16
  400. package/esm5/components/field-error/field-error.module.js +6 -2
  401. package/esm5/components/filter/filter.component.js +3 -3
  402. package/esm5/components/input-count/input-count-options.js +6 -1
  403. package/esm5/components/input-count/input-count.component.js +3 -3
  404. package/esm5/components/input-month/index.js +2 -1
  405. package/esm5/components/input-month/input-month.component.js +18 -25
  406. package/esm5/components/input-month/input-month.directive.js +32 -9
  407. package/esm5/components/input-month/input-month.module.js +4 -4
  408. package/esm5/components/input-month/input-month.providers.js +19 -0
  409. package/esm5/components/input-month-range/index.js +2 -1
  410. package/esm5/components/input-month-range/input-month-range.component.js +20 -38
  411. package/esm5/components/input-month-range/input-month-range.directive.js +38 -8
  412. package/esm5/components/input-month-range/input-month-range.module.js +3 -2
  413. package/esm5/components/input-month-range/input-month-range.providers.js +19 -0
  414. package/esm5/components/input-number/input-number.directive.js +9 -3
  415. package/esm5/components/input-password/input-password-options.js +6 -1
  416. package/esm5/components/input-password/input-password.component.js +2 -2
  417. package/esm5/components/input-phone/input-phone.directive.js +9 -3
  418. package/esm5/components/input-range/input-range.component.js +3 -3
  419. package/esm5/components/input-slider/input-slider.component.js +3 -3
  420. package/esm5/components/input-tag/index.js +2 -1
  421. package/esm5/components/input-tag/input-tag-options.js +9 -0
  422. package/esm5/components/input-tag/input-tag.component.js +45 -18
  423. package/esm5/components/input-time/input-time-options.js +6 -1
  424. package/esm5/components/input-time/input-time.component.js +1 -1
  425. package/esm5/components/line-clamp/line-clamp.component.js +26 -16
  426. package/esm5/components/line-clamp/line-clamp.directive.js +2 -1
  427. package/esm5/components/marker-icon/marker-icon.component.js +3 -3
  428. package/esm5/components/multi-select/hide-selected.pipe.js +4 -4
  429. package/esm5/components/multi-select/index.js +2 -1
  430. package/esm5/components/multi-select/multi-select-options.js +14 -0
  431. package/esm5/components/multi-select/multi-select.component.js +34 -12
  432. package/esm5/components/progress/index.js +5 -4
  433. package/esm5/components/progress/progress-bar/progress-color-segments.directive.js +56 -0
  434. package/esm5/components/progress/progress.module.js +6 -3
  435. package/esm5/components/progress/utils/abstract-color-segments.js +33 -0
  436. package/esm5/components/progress/utils/calculate-color-segments.js +12 -0
  437. package/esm5/components/progress/utils/progress-color-segments-async.pipe.js +27 -0
  438. package/esm5/components/progress/utils/progress-color-segments.pipe.js +24 -0
  439. package/esm5/components/radio/radio-options.js +6 -1
  440. package/esm5/components/radio/radio.component.js +3 -3
  441. package/esm5/components/radio-block/radio-block.component.js +3 -3
  442. package/esm5/components/radio-labeled/radio-labeled.component.js +3 -3
  443. package/esm5/components/radio-list/radio-list.component.js +3 -3
  444. package/esm5/components/range/range.component.js +1 -1
  445. package/esm5/components/rating/rating-options.js +6 -1
  446. package/esm5/components/select/index.js +2 -1
  447. package/esm5/components/select/select-options.js +13 -0
  448. package/esm5/components/select/select.component.js +21 -8
  449. package/esm5/components/slider/index.js +4 -1
  450. package/esm5/components/slider/slider-key-steps.directive.js +102 -0
  451. package/esm5/components/slider/slider-old.component.js +90 -0
  452. package/esm5/components/slider/slider-options.js +12 -0
  453. package/esm5/components/slider/slider.component.js +103 -51
  454. package/esm5/components/slider/slider.module.js +5 -3
  455. package/esm5/components/tag/tag.component.js +10 -4
  456. package/esm5/components/text-area/index.js +2 -1
  457. package/esm5/components/text-area/text-area.component.js +21 -13
  458. package/esm5/components/text-area/text-area.directive.js +28 -0
  459. package/esm5/components/text-area/text-area.module.js +7 -6
  460. package/esm5/components/text-area/text-area.providers.js +6 -2
  461. package/esm5/components/toggle/toggle-options.js +6 -1
  462. package/esm5/components/toggle/toggle.component.js +3 -3
  463. package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
  464. package/esm5/directives/lazy-loading/index.js +2 -1
  465. package/esm5/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.js +1 -2
  466. package/esm5/pipes/field-error/field-error-content-pipe.js +36 -0
  467. package/esm5/pipes/field-error/field-error-pipe.js +153 -0
  468. package/esm5/pipes/field-error/field-error.module.js +17 -0
  469. package/esm5/pipes/field-error/index.js +4 -0
  470. package/esm5/pipes/field-error/taiga-ui-kit-pipes-field-error.js +5 -0
  471. package/esm5/pipes/index.js +2 -1
  472. package/esm5/providers/index.js +2 -1
  473. package/esm5/providers/month-formatter.provider.js +19 -0
  474. package/esm5/providers/value-accessor.provider.js +2 -2
  475. package/esm5/tokens/index.js +3 -1
  476. package/esm5/tokens/items-handlers.js +16 -0
  477. package/esm5/tokens/month-formatter.js +3 -0
  478. package/fesm2015/taiga-ui-kit-abstract.js +2 -2
  479. package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
  480. package/fesm2015/taiga-ui-kit-components-accordion.js +2 -2
  481. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  482. package/fesm2015/taiga-ui-kit-components-arrow.js +13 -2
  483. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  484. package/fesm2015/taiga-ui-kit-components-avatar.js +2 -2
  485. package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
  486. package/fesm2015/taiga-ui-kit-components-badge.js +2 -2
  487. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  488. package/fesm2015/taiga-ui-kit-components-badged-content.js +2 -2
  489. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  490. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +2 -2
  491. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  492. package/fesm2015/taiga-ui-kit-components-calendar-month.js +2 -2
  493. package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
  494. package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
  495. package/fesm2015/taiga-ui-kit-components-checkbox-block.js +2 -2
  496. package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  497. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +2 -2
  498. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
  499. package/fesm2015/taiga-ui-kit-components-checkbox.js +2 -2
  500. package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
  501. package/fesm2015/taiga-ui-kit-components-combo-box.js +62 -21
  502. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  503. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +16 -10
  504. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  505. package/fesm2015/taiga-ui-kit-components-field-error.js +12 -13
  506. package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
  507. package/fesm2015/taiga-ui-kit-components-filter.js +2 -2
  508. package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
  509. package/fesm2015/taiga-ui-kit-components-input-count.js +7 -3
  510. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  511. package/fesm2015/taiga-ui-kit-components-input-month-range.js +67 -41
  512. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  513. package/fesm2015/taiga-ui-kit-components-input-month.js +61 -31
  514. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  515. package/fesm2015/taiga-ui-kit-components-input-number.js +8 -2
  516. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  517. package/fesm2015/taiga-ui-kit-components-input-password.js +5 -1
  518. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  519. package/fesm2015/taiga-ui-kit-components-input-phone.js +8 -2
  520. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  521. package/fesm2015/taiga-ui-kit-components-input-range.js +2 -2
  522. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  523. package/fesm2015/taiga-ui-kit-components-input-slider.js +2 -2
  524. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  525. package/fesm2015/taiga-ui-kit-components-input-tag.js +48 -18
  526. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  527. package/fesm2015/taiga-ui-kit-components-input-time.js +5 -1
  528. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  529. package/fesm2015/taiga-ui-kit-components-line-clamp.js +25 -14
  530. package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
  531. package/fesm2015/taiga-ui-kit-components-marker-icon.js +2 -2
  532. package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
  533. package/fesm2015/taiga-ui-kit-components-multi-select.js +45 -15
  534. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  535. package/fesm2015/taiga-ui-kit-components-progress.js +113 -55
  536. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  537. package/fesm2015/taiga-ui-kit-components-radio-block.js +2 -2
  538. package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
  539. package/fesm2015/taiga-ui-kit-components-radio-labeled.js +2 -2
  540. package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
  541. package/fesm2015/taiga-ui-kit-components-radio-list.js +2 -2
  542. package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
  543. package/fesm2015/taiga-ui-kit-components-radio.js +7 -3
  544. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  545. package/fesm2015/taiga-ui-kit-components-range.js +1 -1
  546. package/fesm2015/taiga-ui-kit-components-rating.js +5 -1
  547. package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
  548. package/fesm2015/taiga-ui-kit-components-select.js +32 -9
  549. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  550. package/fesm2015/taiga-ui-kit-components-slider.js +206 -14
  551. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  552. package/fesm2015/taiga-ui-kit-components-tag.js +9 -3
  553. package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
  554. package/fesm2015/taiga-ui-kit-components-text-area.js +47 -17
  555. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  556. package/fesm2015/taiga-ui-kit-components-toggle.js +7 -3
  557. package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
  558. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +22 -5
  559. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  560. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +1 -1
  561. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
  562. package/fesm2015/taiga-ui-kit-pipes-field-error.js +166 -0
  563. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -0
  564. package/fesm2015/taiga-ui-kit-pipes.js +1 -0
  565. package/fesm2015/taiga-ui-kit-pipes.js.map +1 -1
  566. package/fesm2015/taiga-ui-kit-providers.js +18 -4
  567. package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
  568. package/fesm2015/taiga-ui-kit-tokens.js +17 -1
  569. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  570. package/fesm5/taiga-ui-kit-abstract.js +2 -2
  571. package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
  572. package/fesm5/taiga-ui-kit-components-accordion.js +2 -2
  573. package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
  574. package/fesm5/taiga-ui-kit-components-arrow.js +14 -3
  575. package/fesm5/taiga-ui-kit-components-arrow.js.map +1 -1
  576. package/fesm5/taiga-ui-kit-components-avatar.js +2 -2
  577. package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
  578. package/fesm5/taiga-ui-kit-components-badge.js +2 -2
  579. package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
  580. package/fesm5/taiga-ui-kit-components-badged-content.js +2 -2
  581. package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
  582. package/fesm5/taiga-ui-kit-components-breadcrumbs.js +2 -2
  583. package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  584. package/fesm5/taiga-ui-kit-components-calendar-month.js +2 -2
  585. package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
  586. package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
  587. package/fesm5/taiga-ui-kit-components-checkbox-block.js +2 -2
  588. package/fesm5/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  589. package/fesm5/taiga-ui-kit-components-checkbox-labeled.js +2 -2
  590. package/fesm5/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
  591. package/fesm5/taiga-ui-kit-components-checkbox.js +2 -2
  592. package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
  593. package/fesm5/taiga-ui-kit-components-combo-box.js +63 -21
  594. package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
  595. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +17 -10
  596. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  597. package/fesm5/taiga-ui-kit-components-field-error.js +12 -17
  598. package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
  599. package/fesm5/taiga-ui-kit-components-filter.js +2 -2
  600. package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
  601. package/fesm5/taiga-ui-kit-components-input-count.js +8 -4
  602. package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
  603. package/fesm5/taiga-ui-kit-components-input-month-range.js +68 -44
  604. package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
  605. package/fesm5/taiga-ui-kit-components-input-month.js +60 -33
  606. package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
  607. package/fesm5/taiga-ui-kit-components-input-number.js +8 -2
  608. package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
  609. package/fesm5/taiga-ui-kit-components-input-password.js +6 -2
  610. package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
  611. package/fesm5/taiga-ui-kit-components-input-phone.js +8 -2
  612. package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
  613. package/fesm5/taiga-ui-kit-components-input-range.js +2 -2
  614. package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
  615. package/fesm5/taiga-ui-kit-components-input-slider.js +2 -2
  616. package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
  617. package/fesm5/taiga-ui-kit-components-input-tag.js +53 -19
  618. package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
  619. package/fesm5/taiga-ui-kit-components-input-time.js +6 -2
  620. package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
  621. package/fesm5/taiga-ui-kit-components-line-clamp.js +26 -15
  622. package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
  623. package/fesm5/taiga-ui-kit-components-marker-icon.js +2 -2
  624. package/fesm5/taiga-ui-kit-components-marker-icon.js.map +1 -1
  625. package/fesm5/taiga-ui-kit-components-multi-select.js +50 -17
  626. package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
  627. package/fesm5/taiga-ui-kit-components-progress.js +135 -69
  628. package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
  629. package/fesm5/taiga-ui-kit-components-radio-block.js +2 -2
  630. package/fesm5/taiga-ui-kit-components-radio-block.js.map +1 -1
  631. package/fesm5/taiga-ui-kit-components-radio-labeled.js +2 -2
  632. package/fesm5/taiga-ui-kit-components-radio-labeled.js.map +1 -1
  633. package/fesm5/taiga-ui-kit-components-radio-list.js +2 -2
  634. package/fesm5/taiga-ui-kit-components-radio-list.js.map +1 -1
  635. package/fesm5/taiga-ui-kit-components-radio.js +8 -4
  636. package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
  637. package/fesm5/taiga-ui-kit-components-range.js +1 -1
  638. package/fesm5/taiga-ui-kit-components-rating.js +6 -2
  639. package/fesm5/taiga-ui-kit-components-rating.js.map +1 -1
  640. package/fesm5/taiga-ui-kit-components-select.js +33 -10
  641. package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
  642. package/fesm5/taiga-ui-kit-components-slider.js +268 -26
  643. package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
  644. package/fesm5/taiga-ui-kit-components-tag.js +9 -3
  645. package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
  646. package/fesm5/taiga-ui-kit-components-text-area.js +53 -17
  647. package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
  648. package/fesm5/taiga-ui-kit-components-toggle.js +8 -4
  649. package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
  650. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +22 -5
  651. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  652. package/fesm5/taiga-ui-kit-directives-lazy-loading.js +1 -1
  653. package/fesm5/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
  654. package/fesm5/taiga-ui-kit-pipes-field-error.js +203 -0
  655. package/fesm5/taiga-ui-kit-pipes-field-error.js.map +1 -0
  656. package/fesm5/taiga-ui-kit-pipes.js +1 -0
  657. package/fesm5/taiga-ui-kit-pipes.js.map +1 -1
  658. package/fesm5/taiga-ui-kit-providers.js +20 -4
  659. package/fesm5/taiga-ui-kit-providers.js.map +1 -1
  660. package/fesm5/taiga-ui-kit-tokens.js +18 -1
  661. package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
  662. package/package.json +4 -4
  663. package/pipes/field-error/field-error-content-pipe.d.ts +11 -0
  664. package/pipes/field-error/field-error-pipe.d.ts +29 -0
  665. package/pipes/field-error/field-error.module.d.ts +2 -0
  666. package/pipes/field-error/index.d.ts +3 -0
  667. package/pipes/field-error/package.json +13 -0
  668. package/pipes/field-error/taiga-ui-kit-pipes-field-error.d.ts +4 -0
  669. package/pipes/field-error/taiga-ui-kit-pipes-field-error.metadata.json +1 -0
  670. package/pipes/index.d.ts +1 -0
  671. package/pipes/taiga-ui-kit-pipes.metadata.json +1 -1
  672. package/providers/index.d.ts +1 -0
  673. package/providers/month-formatter.provider.d.ts +6 -0
  674. package/providers/taiga-ui-kit-providers.metadata.json +1 -1
  675. package/tokens/index.d.ts +2 -0
  676. package/tokens/items-handlers.d.ts +10 -0
  677. package/tokens/month-formatter.d.ts +4 -0
  678. package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
  679. package/components/progress/pipes/progress-color-segments.pipe.d.ts +0 -9
  680. package/esm2015/components/progress/pipes/abstract-color-segments.js +0 -32
  681. package/esm2015/components/progress/pipes/progress-color-segments-async.pipe.js +0 -15
  682. package/esm2015/components/progress/pipes/progress-color-segments.pipe.js +0 -18
  683. package/esm5/components/progress/pipes/abstract-color-segments.js +0 -35
  684. package/esm5/components/progress/pipes/progress-color-segments-async.pipe.js +0 -21
  685. package/esm5/components/progress/pipes/progress-color-segments.pipe.js +0 -23
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-tag.js","sources":["ng://@taiga-ui/kit/components/tag/tag.component.ts","ng://@taiga-ui/kit/components/tag/tag.module.ts","ng://@taiga-ui/kit/components/tag/taiga-ui-kit-components-tag.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {setNativeFocused, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n sizeBigger,\n TUI_MODE,\n TuiBrightness,\n TuiSizeL,\n TuiSizeS,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {stringHashToHsl} from '@taiga-ui/kit/utils/format';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nexport const ALLOWED_SPACE_REGEXP = new RegExp(`,|[\\\\s]`);\n\n@Component({\n selector: 'tui-tag, a[tuiTag]',\n templateUrl: './tag.template.html',\n styleUrls: ['./tag.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiTagComponent {\n // TODO: Possibly implement standard focus mechanisms and outline\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Input()\n @tuiDefaultProp()\n editable = false;\n\n @Input()\n @tuiDefaultProp()\n allowSpaces = true;\n\n @Input()\n @tuiDefaultProp()\n maxLength: number | null = null;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-tui-host-status')\n @tuiDefaultProp()\n status: TuiStatusT = 'default';\n\n @Input()\n @HostBinding('class._hoverable')\n @tuiDefaultProp()\n hoverable = false;\n\n @Input()\n @tuiDefaultProp()\n removable = false;\n\n @Input()\n @HostBinding('class._disabled')\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @HostBinding('class._autocolor')\n @tuiDefaultProp()\n autoColor = false;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n leftContent: PolymorpheusContent | null = null;\n\n @Output()\n readonly edited = new EventEmitter<string>();\n\n @HostBinding('class._editing')\n editing = false;\n\n editedText: string | null = null;\n\n @ViewChild('input', {read: ElementRef})\n set input(input: ElementRef<HTMLInputElement>) {\n if (input) {\n setNativeFocused(input.nativeElement);\n }\n }\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n get backgroundColor(): string | null {\n return this.autoColor ? stringHashToHsl(this.value) : null;\n }\n\n get canRemove(): boolean {\n return this.removable && !this.disabled && !this.showLoader;\n }\n\n get displayText(): string {\n return this.editedText === null ? this.value : this.editedText;\n }\n\n get loaderSize(): TuiSizeXS {\n return sizeBigger(this.size) ? 's' : 'xs';\n }\n\n @HostBinding('class._has-icon')\n get hasIcon(): boolean {\n return this.showLoader || this.removable;\n }\n\n @HostListener('keydown.enter', ['$event'])\n edit(event: Event) {\n if (!this.canEdit) {\n return;\n }\n\n event.preventDefault();\n this.editing = true;\n this.editedText = this.value;\n }\n\n @HostListener('keydown.delete', ['$event'])\n @HostListener('keydown.backspace', ['$event'])\n remove(event: Event) {\n if (!this.canRemove) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.edited.emit('');\n }\n\n onInput(value: string) {\n const newTags = this.allowSpaces\n ? value.split(',')\n : value.split(ALLOWED_SPACE_REGEXP);\n\n if (newTags.length > 1) {\n this.save(String(newTags));\n\n return;\n }\n\n this.editedText = value;\n }\n\n onKeyDown(event: KeyboardEvent) {\n event.stopPropagation();\n\n switch (event.key.toLowerCase()) {\n case 'enter':\n event.preventDefault();\n this.save(this.editedText || '');\n break;\n case 'escape':\n case 'esc':\n event.preventDefault();\n this.stopEditing();\n setNativeFocused(this.elementRef.nativeElement);\n break;\n default:\n break;\n }\n }\n\n onBlur() {\n if (this.editedText !== null) {\n this.save(this.editedText);\n }\n }\n\n private get canEdit(): boolean {\n return this.editable && !this.disabled && !this.showLoader;\n }\n\n private stopEditing() {\n this.editing = false;\n this.editedText = null;\n }\n\n private save(value: string) {\n this.stopEditing();\n this.edited.emit(value.trim());\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTagComponent} from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiPreventDefaultModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTagComponent],\n exports: [TuiTagComponent],\n})\nexport class TuiTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MA2Ba,oBAAoB,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE;IAY7C,eAAe,GAA5B,MAAa,eAAe;IAuExB,YACyC,UAAmC,EAC7C,KAAuC;QAD7B,eAAU,GAAV,UAAU,CAAyB;QAC7C,UAAK,GAAL,KAAK,CAAkC;;QArEtE,UAAK,GAAG,EAAE,CAAC;QAIX,aAAQ,GAAG,KAAK,CAAC;QAIjB,gBAAW,GAAG,IAAI,CAAC;QAInB,cAAS,GAAkB,IAAI,CAAC;QAKhC,SAAI,GAAwB,GAAG,CAAC;QAIhC,eAAU,GAAG,KAAK,CAAC;QAKnB,WAAM,GAAe,SAAS,CAAC;QAK/B,cAAS,GAAG,KAAK,CAAC;QAIlB,cAAS,GAAG,KAAK,CAAC;QAKlB,aAAQ,GAAG,KAAK,CAAC;QAKjB,cAAS,GAAG,KAAK,CAAC;;QAKlB,gBAAW,GAA+B,IAAI,CAAC;QAGtC,WAAM,GAAG,IAAI,YAAY,EAAU,CAAC;QAG7C,YAAO,GAAG,KAAK,CAAC;QAEhB,eAAU,GAAkB,IAAI,CAAC;KAY7B;IATJ,IAAI,KAAK,CAAC,KAAmC;QACzC,IAAI,KAAK,EAAE;YACP,gBAAgB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;SACzC;KACJ;IAOD,IAAI,eAAe;QACf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C;;KACJ,CAAC;IAyEO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;GAzEZ,eAAe,CA4K3B;;IC9LY,YAAY,GAAzB,MAAa,YAAY;EAAG;AAAf,YAAY;IAZxB,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,uBAAuB;YACvB,YAAY;YACZ,eAAe;YACf,kBAAkB;SACrB;QACD,YAAY,EAAE,CAAC,eAAe,CAAC;QAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;KAC7B,CAAC;GACW,YAAY,CAAG;;ACrB5B;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-tag.js","sources":["ng://@taiga-ui/kit/components/tag/tag.component.ts","ng://@taiga-ui/kit/components/tag/tag.module.ts","ng://@taiga-ui/kit/components/tag/taiga-ui-kit-components-tag.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {setNativeFocused, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n sizeBigger,\n TUI_MODE,\n TuiBrightness,\n TuiSizeL,\n TuiSizeS,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {stringHashToHsl} from '@taiga-ui/kit/utils/format';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nexport const ALLOWED_SPACE_REGEXP = new RegExp(`,|[\\\\s]`);\n\n@Component({\n selector: 'tui-tag, a[tuiTag]',\n templateUrl: './tag.template.html',\n styleUrls: ['./tag.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiTagComponent {\n // TODO: Possibly implement standard focus mechanisms and outline\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Input()\n @tuiDefaultProp()\n editable = false;\n\n // TODO: Remove in 3.0\n @Input()\n @tuiDefaultProp()\n allowSpaces = true;\n\n @Input()\n @tuiDefaultProp()\n separator: string | RegExp = ',';\n\n @Input()\n @tuiDefaultProp()\n maxLength: number | null = null;\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-tui-host-status')\n @tuiDefaultProp()\n status: TuiStatusT = 'default';\n\n @Input()\n @HostBinding('class._hoverable')\n @tuiDefaultProp()\n hoverable = false;\n\n @Input()\n @tuiDefaultProp()\n removable = false;\n\n @Input()\n @HostBinding('class._disabled')\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @HostBinding('class._autocolor')\n @tuiDefaultProp()\n autoColor = false;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n leftContent: PolymorpheusContent | null = null;\n\n @Output()\n readonly edited = new EventEmitter<string>();\n\n @HostBinding('class._editing')\n editing = false;\n\n editedText: string | null = null;\n\n @ViewChild('input', {read: ElementRef})\n set input(input: ElementRef<HTMLInputElement>) {\n if (input) {\n setNativeFocused(input.nativeElement);\n }\n }\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n get backgroundColor(): string | null {\n return this.autoColor ? stringHashToHsl(this.value) : null;\n }\n\n get canRemove(): boolean {\n return this.removable && !this.disabled && !this.showLoader;\n }\n\n get displayText(): string {\n return this.editedText === null ? this.value : this.editedText;\n }\n\n get loaderSize(): TuiSizeXS {\n return sizeBigger(this.size) ? 's' : 'xs';\n }\n\n @HostBinding('class._has-icon')\n get hasIcon(): boolean {\n return this.showLoader || this.removable;\n }\n\n @HostListener('keydown.enter', ['$event'])\n edit(event: Event) {\n if (!this.canEdit) {\n return;\n }\n\n event.preventDefault();\n this.editing = true;\n this.editedText = this.value;\n }\n\n @HostListener('keydown.delete', ['$event'])\n @HostListener('keydown.backspace', ['$event'])\n remove(event: Event) {\n if (!this.canRemove) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.edited.emit('');\n }\n\n onInput(value: string) {\n const newTags = this.allowSpaces\n ? value.split(this.separator)\n : value.split(ALLOWED_SPACE_REGEXP);\n\n if (newTags.length > 1) {\n this.save(String(newTags));\n\n return;\n }\n\n this.editedText = value;\n }\n\n onKeyDown(event: KeyboardEvent) {\n event.stopPropagation();\n\n switch (event.key.toLowerCase()) {\n case 'enter':\n event.preventDefault();\n this.save(this.editedText || '');\n break;\n case 'escape':\n case 'esc':\n event.preventDefault();\n this.stopEditing();\n setNativeFocused(this.elementRef.nativeElement);\n break;\n default:\n break;\n }\n }\n\n onBlur() {\n if (this.editedText !== null) {\n this.save(this.editedText);\n }\n }\n\n private get canEdit(): boolean {\n return this.editable && !this.disabled && !this.showLoader;\n }\n\n private stopEditing() {\n this.editing = false;\n this.editedText = null;\n }\n\n private save(value: string) {\n this.stopEditing();\n this.edited.emit(value.trim());\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTagComponent} from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiPreventDefaultModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTagComponent],\n exports: [TuiTagComponent],\n})\nexport class TuiTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MA2Ba,oBAAoB,GAAG,IAA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OAAO,EAAE,CAAC,eAAe,CAAC;KAC7B,CAAC;GACW,YAAY,CAAG;;ACrB5B;;;;;;"}
@@ -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:0 solid transparent;border-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end)}: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 solid transparent;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-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end)}.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:0 solid transparent;border-width:0 var(--border-end) 0 var(--border-start);border-inline-start-width:var(--border-start);border-inline-end-width:var(--border-end);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%;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}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font-size:.69rem;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,CA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AAA;IAChB,WAAA,MAAM,CAAC,gCAAgC,CAAC,CAAA;IAExC,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GA3B/B,oBAAoB,CAgJhC;;ICtKY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAhB7B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,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,oBAAoB,CAAC;KACtD;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;KACtD;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;MCmBJ,YAAY,GAAG,GAAG;MAClB,aAAa,GAAG,GAAG;MACnB,aAAa,GAAG,GAAG;IAanB,oBAAoB,GAAjC,MAAa,oBACT,SAAQ,kBAA0B;IAkBlC,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,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,OAAO,IAAI,CAAC;SACf;QAED,QACI,OAAA,IAAI,CAAC,SAAS,0CAAE,aAAa,YAAI,IAAI,CAAC,gBAAgB,0CAAE,aAAa,CAAA,IAAI,IAAI,EAC/E;KACL;IAED,IAAI,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CAAC,wBAAwB,CAAC,CAAA;IAChC,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,gCAAgC,CAAC,CAAA;IAExC,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GA9B/B,oBAAoB,CAuJhC;;;IChMY,oBAAoB,4BAAjC,MAAa,oBAAqB,SAAQ,wBAA8C;IACpF,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;;;;;;"}
@@ -23,6 +23,10 @@ const TUI_TOGGLE_DEFAULT_OPTIONS = {
23
23
  const TUI_TOGGLE_OPTIONS = new InjectionToken('Default parameters for toggle component', {
24
24
  factory: () => TUI_TOGGLE_DEFAULT_OPTIONS,
25
25
  });
26
+ const tuiToggleOptionsProvider = (options) => ({
27
+ provide: TUI_TOGGLE_OPTIONS,
28
+ useValue: Object.assign(Object.assign({}, TUI_TOGGLE_DEFAULT_OPTIONS), options),
29
+ });
26
30
 
27
31
  var TuiToggleComponent_1;
28
32
  let TuiToggleComponent = TuiToggleComponent_1 = class TuiToggleComponent extends AbstractTuiControl {
@@ -106,7 +110,7 @@ __decorate([
106
110
  ], TuiToggleComponent.prototype, "showLoader", void 0);
107
111
  __decorate([
108
112
  Input(),
109
- HostBinding('attr.data-tui-host-size'),
113
+ HostBinding('attr.data-size'),
110
114
  tuiDefaultProp()
111
115
  ], TuiToggleComponent.prototype, "size", void 0);
112
116
  __decorate([
@@ -126,7 +130,7 @@ TuiToggleComponent = TuiToggleComponent_1 = __decorate([
126
130
  useExisting: forwardRef(() => TuiToggleComponent_1),
127
131
  },
128
132
  ],
129
- styles: [":host{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}:host[data-tui-host-size='m']{width:2rem;height:1rem}:host[data-tui-host-size='l']{width:3rem;height:1.5rem}.checkbox{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.checkbox:-webkit-autofill,.checkbox:-webkit-autofill:focus,.checkbox:-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}:host._disabled .checkbox{pointer-events:none;cursor:default}.toggle{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}:host[data-tui-host-size='m'] .toggle{width:3rem;height:1rem;transform:translateX(-1rem)}:host[data-tui-host-size='l'] .toggle{width:4.5rem;height:1.5rem;transform:translateX(-1.5rem)}:host._checked .toggle{transform:translateX(0)}.circle{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}:host._disabled .circle_light{opacity:.24}:host[data-tui-host-size='m'] .circle{width:.75rem;height:.75rem}:host[data-tui-host-size='l'] .circle{width:1rem;height:1rem}:host._disabled .circle{background-color:var(--tui-base-01)}:host:not(._checked) .loader{color:var(--tui-base-06)}:host:not(._checked)._disabled .loader{color:var(--tui-base-05)}:host:not(._checked)[data-mode=onDark] .loader{color:var(--tui-text-03-night)}:host:not(._checked)[data-mode=onDark]._disabled .loader{color:var(--tui-clear-inverse-active)}:host:not(._checked)[data-mode=onLight] .loader{color:var(--tui-text-03)}:host:not(._checked)[data-mode=onLight]._disabled .loader{color:var(--tui-clear-active)}:host[data-tui-host-size='m'] .loader{width:.75rem;margin:0 .2rem;transform:scale(.75)}:host[data-tui-host-size='l'] .loader{width:1rem;margin:0 .25rem}.icon-wrapper{display:flex}.icon{opacity:.8}.icon_off{color:var(--tui-base-06)}:host._disabled .icon_off{color:var(--tui-base-05)}:host[data-mode=onDark] .icon_off{color:var(--tui-text-03-night)}:host[data-mode=onDark]._disabled .icon_off{color:var(--tui-clear-inverse-active)}:host[data-mode=onLight] .icon_off{color:var(--tui-text-03)}:host[data-mode=onLight]._disabled .icon_off{color:var(--tui-clear-active)}:host[data-tui-host-size='m'] .icon{width:1rem;height:1rem;transform:scale(.75)}:host[data-tui-host-size='l'] .icon{margin:0 .125rem;width:1.5rem;height:1.5rem}:host._hovered .icon{opacity:1}"]
133
+ styles: [":host{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}:host[data-size='m']{width:2rem;height:1rem}:host[data-size='l']{width:3rem;height:1.5rem}.checkbox{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.checkbox:-webkit-autofill,.checkbox:-webkit-autofill:focus,.checkbox:-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}:host._disabled .checkbox{pointer-events:none;cursor:default}.toggle{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}:host[data-size='m'] .toggle{width:3rem;height:1rem;transform:translateX(-1rem)}:host[data-size='l'] .toggle{width:4.5rem;height:1.5rem;transform:translateX(-1.5rem)}:host._checked .toggle{transform:translateX(0)}.circle{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}:host._disabled .circle_light{opacity:.24}:host[data-size='m'] .circle{width:.75rem;height:.75rem}:host[data-size='l'] .circle{width:1rem;height:1rem}:host._disabled .circle{background-color:var(--tui-base-01)}:host:not(._checked) .loader{color:var(--tui-base-06)}:host:not(._checked)._disabled .loader{color:var(--tui-base-05)}:host:not(._checked)[data-mode=onDark] .loader{color:var(--tui-text-03-night)}:host:not(._checked)[data-mode=onDark]._disabled .loader{color:var(--tui-clear-inverse-active)}:host:not(._checked)[data-mode=onLight] .loader{color:var(--tui-text-03)}:host:not(._checked)[data-mode=onLight]._disabled .loader{color:var(--tui-clear-active)}:host[data-size='m'] .loader{width:.75rem;margin:0 .2rem;transform:scale(.75)}:host[data-size='l'] .loader{width:1rem;margin:0 .25rem}.icon-wrapper{display:flex}.icon{opacity:.8}.icon_off{color:var(--tui-base-06)}:host._disabled .icon_off{color:var(--tui-base-05)}:host[data-mode=onDark] .icon_off{color:var(--tui-text-03-night)}:host[data-mode=onDark]._disabled .icon_off{color:var(--tui-clear-inverse-active)}:host[data-mode=onLight] .icon_off{color:var(--tui-text-03)}:host[data-mode=onLight]._disabled .icon_off{color:var(--tui-clear-active)}:host[data-size='m'] .icon{width:1rem;height:1rem;transform:scale(.75)}:host[data-size='l'] .icon{margin:0 .125rem;width:1.5rem;height:1.5rem}:host._hovered .icon{opacity:1}"]
130
134
  }),
131
135
  __param(0, Optional()),
132
136
  __param(0, Self()),
@@ -163,5 +167,5 @@ TuiToggleModule = __decorate([
163
167
  * Generated bundle index. Do not edit.
164
168
  */
165
169
 
166
- export { TUI_TOGGLE_DEFAULT_OPTIONS, TUI_TOGGLE_OPTIONS, TuiToggleComponent, TuiToggleModule };
170
+ export { TUI_TOGGLE_DEFAULT_OPTIONS, TUI_TOGGLE_OPTIONS, TuiToggleComponent, TuiToggleModule, tuiToggleOptionsProvider };
167
171
  //# sourceMappingURL=taiga-ui-kit-components-toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-toggle.js","sources":["ng://@taiga-ui/kit/components/toggle/toggle-options.ts","ng://@taiga-ui/kit/components/toggle/toggle.component.ts","ng://@taiga-ui/kit/components/toggle/toggle.module.ts","ng://@taiga-ui/kit/components/toggle/taiga-ui-kit-components-toggle.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface ToggleOptions {\n readonly icons: Readonly<{\n toggleOff: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n toggleOn: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n readonly singleColor: boolean;\n readonly showIcons: boolean;\n readonly size: TuiSizeL;\n}\n\n/** Default values for the toggle options. */\nexport const TUI_TOGGLE_DEFAULT_OPTIONS: ToggleOptions = {\n icons: {\n toggleOff({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconToggleOff' : 'tuiIconToggleOffLarge';\n },\n toggleOn({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconToggleOn' : 'tuiIconToggleOnLarge';\n },\n },\n singleColor: false,\n showIcons: false,\n size: 'm',\n};\n\nexport const TUI_TOGGLE_OPTIONS = new InjectionToken<ToggleOptions>(\n 'Default parameters for toggle component',\n {\n factory: () => TUI_TOGGLE_DEFAULT_OPTIONS,\n },\n);\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\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 TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiBrightness,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {ToggleOptions, TUI_TOGGLE_OPTIONS} from './toggle-options';\n\n@Component({\n selector: 'tui-toggle',\n templateUrl: './toggle.template.html',\n styleUrls: ['./toggle.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiToggleComponent),\n },\n ],\n})\nexport class TuiToggleComponent\n extends AbstractTuiControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<TuiNativeFocusableElement>;\n\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n @Input()\n @tuiDefaultProp()\n showIcons = this.options.showIcons;\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TOGGLE_OPTIONS)\n readonly options: ToggleOptions,\n ) {\n super(control, changeDetectorRef);\n }\n\n get iconOn(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOn;\n }\n\n get iconOff(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOff;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.focusableElement ? this.focusableElement.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n return this.singleColor || this.checked\n ? TuiAppearance.Primary\n : TuiAppearance.Secondary;\n }\n\n get sizeM(): boolean {\n return this.size === 'm';\n }\n\n @HostBinding('class._checked')\n get checked(): boolean {\n return this.value;\n }\n\n get loaderSize(): TuiSizeXS {\n return this.sizeM ? 'xs' : 's';\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onChecked(checked: boolean) {\n this.updateValue(checked);\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 onFocusVisible(focusVisible: boolean) {\n this.updateFocusVisible(focusVisible);\n }\n\n protected getFallbackValue(): boolean {\n return false;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiToggleComponent} from './toggle.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiFocusedModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiFocusVisibleModule,\n TuiCheckedModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiToggleComponent],\n exports: [TuiToggleComponent],\n})\nexport class TuiToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAeA;MACa,0BAA0B,GAAkB;IACrD,KAAK,EAAE;QACH,SAAS,CAAC,EAAC,SAAS,EAAmC;YACnD,OAAO,SAAS,KAAK,GAAG,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;SAC3E;QACD,QAAQ,CAAC,EAAC,SAAS,EAAmC;YAClD,OAAO,SAAS,KAAK,GAAG,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;SACzE;KACJ;IACD,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,GAAG;EACX;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C;;;ICYQ,kBAAkB,0BAA/B,MAAa,kBACT,SAAQ,kBAA2B;IAuBnC,YAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAE9C,OAAsB;QAE/B,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAJjB,kBAAa,GAAb,aAAa,CAAyB;QAE9C,YAAO,GAAP,OAAO,CAAe;QAzBnC,gBAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAIvC,cAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QAInC,eAAU,GAAG,KAAK,CAAC;QAKnB,SAAI,GAAa,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;KAelC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,C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;YAChB,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,kBAAkB;SACrB;QACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;AChC/B;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-toggle.js","sources":["ng://@taiga-ui/kit/components/toggle/toggle-options.ts","ng://@taiga-ui/kit/components/toggle/toggle.component.ts","ng://@taiga-ui/kit/components/toggle/toggle.module.ts","ng://@taiga-ui/kit/components/toggle/taiga-ui-kit-components-toggle.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiToggleOptions {\n readonly icons: Readonly<{\n toggleOff: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n toggleOn: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n readonly singleColor: boolean;\n readonly showIcons: boolean;\n readonly size: TuiSizeL;\n}\n\n/**\n * @deprecated: use TuiToggleOptions instead\n * todo: remove in 3.0\n */\nexport type ToggleOptions = TuiToggleOptions;\n\n/** Default values for the toggle options. */\nexport const TUI_TOGGLE_DEFAULT_OPTIONS: TuiToggleOptions = {\n icons: {\n toggleOff({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconToggleOff' : 'tuiIconToggleOffLarge';\n },\n toggleOn({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconToggleOn' : 'tuiIconToggleOnLarge';\n },\n },\n singleColor: false,\n showIcons: false,\n size: 'm',\n};\n\nexport const TUI_TOGGLE_OPTIONS = new InjectionToken<TuiToggleOptions>(\n 'Default parameters for toggle component',\n {\n factory: () => TUI_TOGGLE_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiToggleOptionsProvider: (\n options: Partial<TuiToggleOptions>,\n) => ValueProvider = (options: Partial<TuiToggleOptions>) => ({\n provide: TUI_TOGGLE_OPTIONS,\n useValue: {...TUI_TOGGLE_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\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 TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiBrightness,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_TOGGLE_OPTIONS, TuiToggleOptions} from './toggle-options';\n\n@Component({\n selector: 'tui-toggle',\n templateUrl: './toggle.template.html',\n styleUrls: ['./toggle.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiToggleComponent),\n },\n ],\n})\nexport class TuiToggleComponent\n extends AbstractTuiControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<TuiNativeFocusableElement>;\n\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n @Input()\n @tuiDefaultProp()\n showIcons = this.options.showIcons;\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TOGGLE_OPTIONS)\n readonly options: TuiToggleOptions,\n ) {\n super(control, changeDetectorRef);\n }\n\n get iconOn(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOn;\n }\n\n get iconOff(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOff;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.focusableElement ? this.focusableElement.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n return this.singleColor || this.checked\n ? TuiAppearance.Primary\n : TuiAppearance.Secondary;\n }\n\n get sizeM(): boolean {\n return this.size === 'm';\n }\n\n @HostBinding('class._checked')\n get checked(): boolean {\n return this.value;\n }\n\n get loaderSize(): TuiSizeXS {\n return this.sizeM ? 'xs' : 's';\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onChecked(checked: boolean) {\n this.updateValue(checked);\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 onFocusVisible(focusVisible: boolean) {\n this.updateFocusVisible(focusVisible);\n }\n\n protected getFallbackValue(): boolean {\n return false;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiToggleComponent} from './toggle.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiFocusedModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiFocusVisibleModule,\n TuiCheckedModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiToggleComponent],\n exports: [TuiToggleComponent],\n})\nexport class TuiToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAqBA;MACa,0BAA0B,GAAqB;IACxD,KAAK,EAAE;QACH,SAAS,CAAC,EAAC,SAAS,EAAmC;YACnD,OAAO,SAAS,KAAK,GAAG,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;SAC3E;QACD,QAAQ,CAAC,EAAC,SAAS,EAAmC;YAClD,OAAO,SAAS,KAAK,GAAG,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;SACzE;KACJ;IACD,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,GAAG;EACX;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;;ICFY,kBAAkB,0BAA/B,MAAa,kBACT,SAAQ,kBAA2B;IAuBnC,YAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAE9C,OAAyB;QAElC,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAJjB,kBAAa,GAAb,aAAa,CAAyB;QAE9C,YAAO,GAAP,OAAO,CAAkB;QAzBtC,gBAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAIvC,cAAS,GAAG,IAAI,CAAC,OAAO,CAAC,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AAe;IAjB3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,gBAAgB;YAChB,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,kBAAkB;SACrB;QACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;AChC/B;;;;;;"}
@@ -8,6 +8,14 @@ import { merge } from 'rxjs';
8
8
  import { switchMapTo, takeUntil, map } from 'rxjs/operators';
9
9
 
10
10
  var TuiDropdownSelectionDirective_1;
11
+ const EMPTY_RECT = {
12
+ bottom: 0,
13
+ height: 0,
14
+ left: 0,
15
+ right: 0,
16
+ top: 0,
17
+ width: 0,
18
+ };
11
19
  // @dynamic
12
20
  let TuiDropdownSelectionDirective = TuiDropdownSelectionDirective_1 = class TuiDropdownSelectionDirective extends AbstractTuiDropdown {
13
21
  constructor(documentRef, componentFactoryResolver, injector, portalService, elementRef, activeZone, shadowRootRef, customElementRef, destroy$, refresh$, changeDetectorRef, ngZone, renderer, viewContainerRef) {
@@ -20,6 +28,10 @@ let TuiDropdownSelectionDirective = TuiDropdownSelectionDirective_1 = class TuiD
20
28
  this.visibilityHandler = ALWAYS_TRUE_HANDLER;
21
29
  this.position = 'selection';
22
30
  this.documentRef = shadowRootRef || documentRef;
31
+ // SSR protection
32
+ if (!this.documentRef.createRange) {
33
+ return;
34
+ }
23
35
  this.range = this.documentRef.createRange();
24
36
  const { nativeElement } = this.elementRef;
25
37
  merge(typedFromEvent(this.documentRef, 'mouseup'), typedFromEvent(nativeElement, 'mousedown').pipe(switchMapTo(typedFromEvent(nativeElement, 'mousemove').pipe(takeUntil(typedFromEvent(this.documentRef, 'mouseup'))))), typedFromEvent(nativeElement, 'keyup'))
@@ -37,15 +49,17 @@ let TuiDropdownSelectionDirective = TuiDropdownSelectionDirective_1 = class TuiD
37
49
  : this.range;
38
50
  }), takeUntil(destroy$))
39
51
  .subscribe(range => {
40
- const contained = nativeElement.contains(range.commonAncestorContainer);
52
+ const contained = !!range && nativeElement.contains(range.commonAncestorContainer);
41
53
  this.range = contained ? range : this.range;
42
54
  const valid = contained &&
43
- (!this.visibilityHandler || this.visibilityHandler(this.range));
44
- this.toggleDropdownBox(valid || this.inDropdown(range));
55
+ (!this.visibilityHandler ||
56
+ !this.range ||
57
+ this.visibilityHandler(this.range));
58
+ this.toggleDropdownBox(!!range && (valid || this.inDropdown(range)));
45
59
  });
46
60
  }
47
61
  set tuiDropdownSelection(handler) {
48
- if (!handler) {
62
+ if (!handler || !this.range) {
49
63
  return;
50
64
  }
51
65
  const inHostAndValid = this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&
@@ -80,6 +94,9 @@ let TuiDropdownSelectionDirective = TuiDropdownSelectionDirective_1 = class TuiD
80
94
  * get ClientRect of current Range according to provided position
81
95
  */
82
96
  get rangeRect() {
97
+ if (!this.range) {
98
+ return EMPTY_RECT;
99
+ }
83
100
  switch (this.position) {
84
101
  case 'tag': {
85
102
  const { commonAncestorContainer } = this.range;
@@ -116,7 +133,7 @@ let TuiDropdownSelectionDirective = TuiDropdownSelectionDirective_1 = class TuiD
116
133
  this.dropdownBoxRef.location.nativeElement.contains(node));
117
134
  }
118
135
  /**
119
- * Check if given range is at leaset partially inside dropdown
136
+ * Check if given range is at least partially inside dropdown
120
137
  */
121
138
  inDropdown(range) {
122
139
  const { startContainer, endContainer } = range;
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-directives-dropdown-selection.js","sources":["ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.directive.ts","ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.module.ts","ng://@taiga-ui/kit/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ALWAYS_TRUE_HANDLER,\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n getNativeFocused,\n px,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiDestroyService,\n TuiParentsScrollService,\n TuiPortalService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n AbstractTuiDropdown,\n TUI_DOCUMENT_OR_SHADOW_ROOT,\n TUI_DROPDOWN_DIRECTIVE,\n TUI_ELEMENT_REF,\n TuiDropdown,\n} from '@taiga-ui/core';\nimport {getWordRange} from '@taiga-ui/kit/utils/dom';\nimport {merge} from 'rxjs';\nimport {map, switchMapTo, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownSelection]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownSelectionDirective),\n },\n TuiParentsScrollService,\n TuiDestroyService,\n ],\n})\nexport class TuiDropdownSelectionDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, OnDestroy\n{\n private visibilityHandler: TuiBooleanHandler<Range> = ALWAYS_TRUE_HANDLER;\n private readonly documentRef: Document;\n private ghost?: HTMLElement;\n private range: Range;\n\n @Input()\n set tuiDropdownSelection(handler: TuiBooleanHandler<Range> | undefined) {\n if (!handler) {\n return;\n }\n\n const inHostAndValid =\n this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&\n handler(this.range);\n\n this.visibilityHandler = handler;\n this.toggleDropdownBox(inHostAndValid);\n }\n\n @Input('tuiDropdownSelectionPosition')\n position: 'selection' | 'word' | 'tag' = 'selection';\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n @Host() @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_DOCUMENT_OR_SHADOW_ROOT)\n @Optional()\n shadowRootRef: Document | null,\n @Inject(TUI_ELEMENT_REF)\n @Optional()\n customElementRef: ElementRef<HTMLElement> | null,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef,\n ) {\n super(\n componentFactoryResolver,\n injector,\n portalService,\n customElementRef || elementRef,\n activeZone,\n );\n this.documentRef = shadowRootRef || documentRef;\n this.range = this.documentRef.createRange();\n\n const {nativeElement} = this.elementRef;\n\n merge(\n typedFromEvent(this.documentRef, 'mouseup'),\n typedFromEvent(nativeElement, 'mousedown').pipe(\n switchMapTo(\n typedFromEvent(nativeElement, 'mousemove').pipe(\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n ),\n ),\n ),\n typedFromEvent(nativeElement, 'keyup'),\n )\n .pipe(\n map(() => {\n const active = getNativeFocused(this.documentRef);\n const selection = this.documentRef.getSelection();\n\n // TODO: iframe warning\n if (\n (active instanceof HTMLInputElement ||\n active instanceof HTMLTextAreaElement) &&\n nativeElement.contains(active)\n ) {\n return this.veryVerySadInputFix(active);\n }\n\n return selection && selection.rangeCount\n ? selection.getRangeAt(0)\n : this.range;\n }),\n takeUntil(destroy$),\n )\n .subscribe(range => {\n const contained = nativeElement.contains(range.commonAncestorContainer);\n\n this.range = contained ? range : this.range;\n\n const valid =\n contained &&\n (!this.visibilityHandler || this.visibilityHandler(this.range));\n\n this.toggleDropdownBox(valid || this.inDropdown(range));\n });\n }\n\n get clientRect(): ClientRect {\n const {defaultView} = this.documentRef;\n const {rangeRect} = this;\n const frameElement = defaultView ? defaultView.frameElement : null;\n\n if (!frameElement) {\n return rangeRect;\n }\n\n const documentRect = frameElement.getBoundingClientRect();\n\n return {\n top: rangeRect.top + documentRect.top,\n left: rangeRect.left + documentRect.left,\n right: rangeRect.left + documentRect.left + rangeRect.width,\n bottom: rangeRect.top + documentRect.top + rangeRect.height,\n width: rangeRect.width,\n height: rangeRect.height,\n };\n }\n\n ngOnDestroy() {\n this.closeDropdownBox();\n\n if (this.ghost) {\n this.renderer.removeChild(\n this.viewContainerRef.element.nativeElement,\n this.ghost,\n );\n }\n }\n\n /**\n * get ClientRect of current Range according to provided position\n */\n private get rangeRect(): ClientRect {\n switch (this.position) {\n case 'tag': {\n const {commonAncestorContainer} = this.range;\n const element =\n commonAncestorContainer.nodeType === Node.ELEMENT_NODE\n ? commonAncestorContainer\n : commonAncestorContainer.parentNode;\n\n return (element as Element).getBoundingClientRect();\n }\n case 'word':\n return getWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n\n /**\n * Toggle dropdown visibility (has to be in ngZone.run because it could be initiated inside iframe in Editor)\n */\n private toggleDropdownBox(visible: boolean) {\n this.ngZone.run(() => {\n if (visible) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Check if Node is inside dropdown\n */\n private boxContains(node: Node): boolean {\n return (\n !!this.dropdownBoxRef &&\n this.dropdownBoxRef.location.nativeElement.contains(node)\n );\n }\n\n /**\n * Check if given range is at leaset partially inside dropdown\n */\n private inDropdown(range: Range): boolean {\n const {startContainer, endContainer} = range;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown =\n this.boxContains(endContainer) &&\n this.elementRef.nativeElement.contains(startContainer);\n const dropdownToHost =\n this.boxContains(startContainer) &&\n this.elementRef.nativeElement.contains(endContainer);\n\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n\n /**\n * Position invisible DIV and create Range similar to selected range inside input/textarea\n */\n private veryVerySadInputFix(element: HTMLInputElement | HTMLTextAreaElement): Range {\n const {ghost = this.initGhost(element)} = this;\n const {top, left, width, height} = element.getBoundingClientRect();\n const {selectionStart, selectionEnd} = element;\n const range = this.documentRef.createRange();\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n ghost.style.top = px(top - hostRect.top);\n ghost.style.left = px(left - hostRect.left);\n ghost.style.width = px(width);\n ghost.style.height = px(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + element.value + CHAR_NO_BREAK_SPACE;\n\n range.setStart(ghost.firstChild!, selectionStart || 0);\n range.setEnd(ghost.firstChild!, selectionEnd || 0);\n\n return range;\n }\n\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n private initGhost(element: HTMLInputElement | HTMLTextAreaElement): HTMLElement {\n const ghost = this.renderer.createElement('div');\n const {nativeElement} = this.viewContainerRef.element;\n const {font, letterSpacing, textTransform, padding} = getComputedStyle(element);\n\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n\n this.renderer.appendChild(nativeElement, ghost);\n this.ghost = ghost;\n\n return ghost;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\n\nimport {TuiDropdownSelectionDirective} from './dropdown-selection.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownSelectionDirective],\n exports: [TuiDropdownSelectionDirective],\n})\nexport class TuiDropdownSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAyCA;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;"}
1
+ {"version":3,"file":"taiga-ui-kit-directives-dropdown-selection.js","sources":["ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.directive.ts","ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.module.ts","ng://@taiga-ui/kit/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ALWAYS_TRUE_HANDLER,\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n getNativeFocused,\n px,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiDestroyService,\n TuiParentsScrollService,\n TuiPortalService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n AbstractTuiDropdown,\n TUI_DOCUMENT_OR_SHADOW_ROOT,\n TUI_DROPDOWN_DIRECTIVE,\n TUI_ELEMENT_REF,\n TuiDropdown,\n} from '@taiga-ui/core';\nimport {getWordRange} from '@taiga-ui/kit/utils/dom';\nimport {merge} from 'rxjs';\nimport {map, switchMapTo, takeUntil} from 'rxjs/operators';\n\nconst EMPTY_RECT: ClientRect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n};\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownSelection]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownSelectionDirective),\n },\n TuiParentsScrollService,\n TuiDestroyService,\n ],\n})\nexport class TuiDropdownSelectionDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, OnDestroy\n{\n private visibilityHandler: TuiBooleanHandler<Range> = ALWAYS_TRUE_HANDLER;\n private readonly documentRef: Document;\n private ghost?: HTMLElement;\n private range?: Range;\n\n @Input()\n set tuiDropdownSelection(handler: TuiBooleanHandler<Range> | undefined) {\n if (!handler || !this.range) {\n return;\n }\n\n const inHostAndValid =\n this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&\n handler(this.range);\n\n this.visibilityHandler = handler;\n this.toggleDropdownBox(inHostAndValid);\n }\n\n @Input('tuiDropdownSelectionPosition')\n position: 'selection' | 'word' | 'tag' = 'selection';\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n @Host() @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_DOCUMENT_OR_SHADOW_ROOT)\n @Optional()\n shadowRootRef: Document | null,\n @Inject(TUI_ELEMENT_REF)\n @Optional()\n customElementRef: ElementRef<HTMLElement> | null,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef,\n ) {\n super(\n componentFactoryResolver,\n injector,\n portalService,\n customElementRef || elementRef,\n activeZone,\n );\n this.documentRef = shadowRootRef || documentRef;\n\n // SSR protection\n if (!this.documentRef.createRange) {\n return;\n }\n\n this.range = this.documentRef.createRange();\n\n const {nativeElement} = this.elementRef;\n\n merge(\n typedFromEvent(this.documentRef, 'mouseup'),\n typedFromEvent(nativeElement, 'mousedown').pipe(\n switchMapTo(\n typedFromEvent(nativeElement, 'mousemove').pipe(\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n ),\n ),\n ),\n typedFromEvent(nativeElement, 'keyup'),\n )\n .pipe(\n map(() => {\n const active = getNativeFocused(this.documentRef);\n const selection = this.documentRef.getSelection();\n\n // TODO: iframe warning\n if (\n (active instanceof HTMLInputElement ||\n active instanceof HTMLTextAreaElement) &&\n nativeElement.contains(active)\n ) {\n return this.veryVerySadInputFix(active);\n }\n\n return selection && selection.rangeCount\n ? selection.getRangeAt(0)\n : this.range;\n }),\n takeUntil(destroy$),\n )\n .subscribe(range => {\n const contained =\n !!range && nativeElement.contains(range.commonAncestorContainer);\n\n this.range = contained ? range : this.range;\n\n const valid =\n contained &&\n (!this.visibilityHandler ||\n !this.range ||\n this.visibilityHandler(this.range));\n\n this.toggleDropdownBox(!!range && (valid || this.inDropdown(range)));\n });\n }\n\n get clientRect(): ClientRect {\n const {defaultView} = this.documentRef;\n const {rangeRect} = this;\n const frameElement = defaultView ? defaultView.frameElement : null;\n\n if (!frameElement) {\n return rangeRect;\n }\n\n const documentRect = frameElement.getBoundingClientRect();\n\n return {\n top: rangeRect.top + documentRect.top,\n left: rangeRect.left + documentRect.left,\n right: rangeRect.left + documentRect.left + rangeRect.width,\n bottom: rangeRect.top + documentRect.top + rangeRect.height,\n width: rangeRect.width,\n height: rangeRect.height,\n };\n }\n\n ngOnDestroy() {\n this.closeDropdownBox();\n\n if (this.ghost) {\n this.renderer.removeChild(\n this.viewContainerRef.element.nativeElement,\n this.ghost,\n );\n }\n }\n\n /**\n * get ClientRect of current Range according to provided position\n */\n private get rangeRect(): ClientRect {\n if (!this.range) {\n return EMPTY_RECT;\n }\n\n switch (this.position) {\n case 'tag': {\n const {commonAncestorContainer} = this.range;\n const element =\n commonAncestorContainer.nodeType === Node.ELEMENT_NODE\n ? commonAncestorContainer\n : commonAncestorContainer.parentNode;\n\n return (element as Element).getBoundingClientRect();\n }\n case 'word':\n return getWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n\n /**\n * Toggle dropdown visibility (has to be in ngZone.run because it could be initiated inside iframe in Editor)\n */\n private toggleDropdownBox(visible: boolean) {\n this.ngZone.run(() => {\n if (visible) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Check if Node is inside dropdown\n */\n private boxContains(node: Node): boolean {\n return (\n !!this.dropdownBoxRef &&\n this.dropdownBoxRef.location.nativeElement.contains(node)\n );\n }\n\n /**\n * Check if given range is at least partially inside dropdown\n */\n private inDropdown(range: Range): boolean {\n const {startContainer, endContainer} = range;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown =\n this.boxContains(endContainer) &&\n this.elementRef.nativeElement.contains(startContainer);\n const dropdownToHost =\n this.boxContains(startContainer) &&\n this.elementRef.nativeElement.contains(endContainer);\n\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n\n /**\n * Position invisible DIV and create Range similar to selected range inside input/textarea\n */\n private veryVerySadInputFix(element: HTMLInputElement | HTMLTextAreaElement): Range {\n const {ghost = this.initGhost(element)} = this;\n const {top, left, width, height} = element.getBoundingClientRect();\n const {selectionStart, selectionEnd} = element;\n const range = this.documentRef.createRange();\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n ghost.style.top = px(top - hostRect.top);\n ghost.style.left = px(left - hostRect.left);\n ghost.style.width = px(width);\n ghost.style.height = px(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + element.value + CHAR_NO_BREAK_SPACE;\n\n range.setStart(ghost.firstChild!, selectionStart || 0);\n range.setEnd(ghost.firstChild!, selectionEnd || 0);\n\n return range;\n }\n\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n private initGhost(element: HTMLInputElement | HTMLTextAreaElement): HTMLElement {\n const ghost = this.renderer.createElement('div');\n const {nativeElement} = this.viewContainerRef.element;\n const {font, letterSpacing, textTransform, padding} = getComputedStyle(element);\n\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n\n this.renderer.appendChild(nativeElement, ghost);\n this.ghost = ghost;\n\n return ghost;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\n\nimport {TuiDropdownSelectionDirective} from './dropdown-selection.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownSelectionDirective],\n exports: [TuiDropdownSelectionDirective],\n})\nexport class TuiDropdownSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAyCA,MAAM,UAAU,GAAe;IAC3B,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;CACX,CAAC;AAEF;IAYa,6BAA6B,qCAA1C,MAAa,6BACT,SAAQ,mBAAmB;IAyB3B,YACsB,WAAqB,EAEvC,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAC7B,UAAmC,EAG/D,UAAyC,EAGzC,aAA8B,EAG9B,gBAAgD,EAEhD,QAA2B,EACe,QAAiC,EAC/B,iBAAoC,EAC/C,MAAc,EACX,QAAmB,EACZ,gBAAkC;QAE7E,KAAK,CACD,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,gBAAgB,IAAI,UAAU,EAC9B,UAAU,CACb,CAAC;QAZwC,aAAQ,GAAR,QAAQ,CAAyB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAC/C,WAAM,GAAN,MAAM,CAAQ;QACX,aAAQ,GAAR,QAAQ,CAAW;QACZ,qBAAgB,GAAhB,gBAAgB,CAAkB;QA5CzE,sBAAiB,GAA6B,mBAAmB,CAAC;QAoB1E,aAAQ,GAAiC,WAAW,CA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AQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;IACxB,WAAA,IAAI,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAC1B,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;IAC9B,WAAA,QAAQ,EAAE,CAAA;IAEV,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;IACnC,WAAA,QAAQ,EAAE,CAAA;IAEV,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;IACvB,WAAA,QAAQ,EAAE,CAAA;IAEV,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;IAC/B,YAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,YAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,YAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,YAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;GAhDpB,6BAA6B,CAiQzC;;ICrTY,0BAA0B,GAAvC,MAAa,0BAA0B;EAAG;AAA7B,0BAA0B;IALtC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;QAC/B,YAAY,EAAE,CAAC,6BAA6B,CAAC;QAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,0BAA0B,CAAG;;ACV1C;;;;;;"}
@@ -94,5 +94,5 @@ TuiLazyLoadingModule = __decorate([
94
94
  * Generated bundle index. Do not edit.
95
95
  */
96
96
 
97
- export { TuiLazyLoadingDirective, TuiLazyLoadingModule, TuiLazyLoadingService as ɵa };
97
+ export { TuiLazyLoadingDirective, TuiLazyLoadingModule, TuiLazyLoadingService };
98
98
  //# sourceMappingURL=taiga-ui-kit-directives-lazy-loading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-directives-lazy-loading.js","sources":["ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.service.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.directive.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.module.ts","ng://@taiga-ui/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {ChangeDetectorRef, Inject, Injectable} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService, watch} from '@taiga-ui/cdk';\nimport {Observable, of, Subject} from 'rxjs';\nimport {catchError, filter, mapTo, switchMap, take, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<string> {\n private readonly src$ = new Subject<string>();\n\n constructor(\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(IntersectionObserverService)\n intersections$: Observable<IntersectionObserverEntry[]>,\n ) {\n super(subscriber =>\n this.src$\n .pipe(\n switchMap(src =>\n intersections$.pipe(\n filter(([{isIntersecting}]) => isIntersecting),\n mapTo(src),\n catchError(() => of(src)),\n watch(changeDetectorRef),\n take(1),\n ),\n ),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n next(src: string) {\n this.src$.next(src);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n@Directive({\n selector: 'img[loading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService, TuiDestroyService],\n})\nexport class TuiLazyLoadingDirective {\n @Input('src')\n set srcSetter(src: string) {\n this.src = this.supported ? src : null;\n this.src$.next(src);\n }\n\n @HostBinding('style.animation')\n animation = 'tuiSkeletonVibe ease-in-out 1s infinite alternate';\n\n @HostBinding('style.background')\n background = 'rgba(0, 0, 0, .16)';\n\n @HostBinding('attr.src')\n src: string | null = null;\n\n constructor(\n @Inject(TuiLazyLoadingService)\n private readonly src$: TuiLazyLoadingService,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLImageElement>,\n ) {\n if (!this.supported) {\n this.src$.subscribe(src => {\n this.src = src;\n });\n }\n }\n\n private get supported() {\n return 'loading' in this.elementRef.nativeElement;\n }\n\n @HostListener('load')\n onLoad() {\n this.background = '';\n this.animation = '';\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiLazyLoadingDirective} from './lazy-loading.directive';\n\n@NgModule({\n declarations: [TuiLazyLoadingDirective],\n exports: [TuiLazyLoadingDirective],\n})\nexport class TuiLazyLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiLazyLoadingService as ɵa} from './lazy-loading.service';"],"names":[],"mappings":";;;;;;;IAOa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,UAAkB;IAGzD,YAC+B,iBAAoC,EACpC,QAA0B,EAErD,cAAuD;QAEvD,KAAK,CAAC,UAAU,IACZ,IAAI,CAAC,IAAI;aACJ,IAAI,CACD,SAAS,CAAC,GAAG,IACT,cAAc,CAAC,IAAI,CACf,MAAM,CAAC,CAAC,CAAC,EAAC,cAAc,EAAC,CAAC,KAAK,cAAc,CAAC,EAC9C,KAAK,CAAC,GAAG,CAAC,EACV,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EACzB,KAAK,CAAC,iBAAiB,CAAC,EACxB,IAAI,CAAC,CAAC,CAAC,CACV,CACJ,EACD,SAAS,CAAC,QAAQ,CAAC,CACtB;aACA,SAAS,CAAC,UAAU,CAAC,CAC7B,CAAC;QAvBW,SAAI,GAAG,IAAI,OAAO,EAAU,CAAC;KAwB7C;IAED,IAAI,CAAC,GAAW;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACvB;EACJ;;YA1BqD,iBAAi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AAiB,CAAC;0DACiC;AAGhE;IADC,WAAW,CAAC,kBAAkB,CAAC;2DACE;AAGlC;IADC,WAAW,CAAC,UAAU,CAAC;oDACE;AAoB1B;IADC,YAAY,CAAC,MAAM,CAAC;qDAIpB;AArCQ,uBAAuB;IAJnC,SAAS,CAAC;QACP,QAAQ,EAAE,qBAAqB;QAC/B,SAAS,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,EAAE,iBAAiB,CAAC;KACrF,CAAC;IAkBO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAE7B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GAnBd,uBAAuB,CAsCnC;;IC/CY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAJhC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACRpC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-directives-lazy-loading.js","sources":["ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.service.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.directive.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.module.ts","ng://@taiga-ui/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {ChangeDetectorRef, Inject, Injectable} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService, watch} from '@taiga-ui/cdk';\nimport {Observable, of, Subject} from 'rxjs';\nimport {catchError, filter, mapTo, switchMap, take, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<string> {\n private readonly src$ = new Subject<string>();\n\n constructor(\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(IntersectionObserverService)\n intersections$: Observable<IntersectionObserverEntry[]>,\n ) {\n super(subscriber =>\n this.src$\n .pipe(\n switchMap(src =>\n intersections$.pipe(\n filter(([{isIntersecting}]) => isIntersecting),\n mapTo(src),\n catchError(() => of(src)),\n watch(changeDetectorRef),\n take(1),\n ),\n ),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n next(src: string) {\n this.src$.next(src);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n@Directive({\n selector: 'img[loading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService, TuiDestroyService],\n})\nexport class TuiLazyLoadingDirective {\n @Input('src')\n set srcSetter(src: string) {\n this.src = this.supported ? src : null;\n this.src$.next(src);\n }\n\n @HostBinding('style.animation')\n animation = 'tuiSkeletonVibe ease-in-out 1s infinite alternate';\n\n @HostBinding('style.background')\n background = 'rgba(0, 0, 0, .16)';\n\n @HostBinding('attr.src')\n src: string | null = null;\n\n constructor(\n @Inject(TuiLazyLoadingService)\n private readonly src$: TuiLazyLoadingService,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLImageElement>,\n ) {\n if (!this.supported) {\n this.src$.subscribe(src => {\n this.src = src;\n });\n }\n }\n\n private get supported() {\n return 'loading' in this.elementRef.nativeElement;\n }\n\n @HostListener('load')\n onLoad() {\n this.background = '';\n this.animation = '';\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiLazyLoadingDirective} from './lazy-loading.directive';\n\n@NgModule({\n declarations: [TuiLazyLoadingDirective],\n exports: [TuiLazyLoadingDirective],\n})\nexport class TuiLazyLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAOa,qBAAqB,GAAlC,MAAa,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