@taiga-ui/kit 2.40.0 → 2.41.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 (553) hide show
  1. package/abstract/input-slider.d.ts +27 -9
  2. package/abstract/slider/slider.d.ts +3 -6
  3. package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
  4. package/bundles/taiga-ui-kit-abstract.umd.js +43 -64
  5. package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
  6. package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
  7. package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
  8. package/bundles/taiga-ui-kit-components-accordion.umd.js +1 -1
  9. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  10. package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
  11. package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-kit-components-action.umd.js +1 -1
  13. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  14. package/bundles/taiga-ui-kit-components-action.umd.min.js +1 -1
  15. package/bundles/taiga-ui-kit-components-action.umd.min.js.map +1 -1
  16. package/bundles/taiga-ui-kit-components-avatar.umd.js +27 -5
  17. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  18. package/bundles/taiga-ui-kit-components-avatar.umd.min.js +2 -2
  19. package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
  20. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
  21. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  22. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js +1 -1
  23. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
  24. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +1 -1
  25. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  26. package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +1 -1
  27. package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
  28. package/bundles/taiga-ui-kit-components-carousel.umd.js +1 -1
  29. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  30. package/bundles/taiga-ui-kit-components-carousel.umd.min.js +1 -1
  31. package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
  32. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +1 -1
  33. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  34. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js +1 -1
  35. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js.map +1 -1
  36. package/bundles/taiga-ui-kit-components-checkbox.umd.js +1 -1
  37. package/bundles/taiga-ui-kit-components-checkbox.umd.min.js +1 -1
  38. package/bundles/taiga-ui-kit-components-checkbox.umd.min.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-combo-box.umd.js +1 -1
  40. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +1 -1
  42. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +2 -2
  44. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +1 -1
  46. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-files.umd.js +3 -3
  48. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-files.umd.min.js +1 -1
  50. package/bundles/taiga-ui-kit-components-files.umd.min.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
  52. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
  54. package/bundles/taiga-ui-kit-components-filter.umd.min.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-copy.umd.js +1 -1
  56. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-copy.umd.min.js +1 -1
  58. package/bundles/taiga-ui-kit-components-input-copy.umd.min.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-count.umd.js +1 -1
  60. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
  62. package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +1 -1
  64. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js +1 -1
  66. package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1 -1
  68. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +1 -1
  70. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-input-date.umd.js +1 -1
  72. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-input-date.umd.min.js +1 -1
  74. package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-input-file.umd.js +1 -1
  76. package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-input-file.umd.min.js +2 -2
  78. package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-input-files.umd.js +1 -1
  80. package/bundles/taiga-ui-kit-components-input-files.umd.min.js +2 -2
  81. package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -1
  82. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +1 -1
  83. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  84. package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js +1 -1
  85. package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js.map +1 -1
  86. package/bundles/taiga-ui-kit-components-input-month.umd.js +1 -1
  87. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  88. package/bundles/taiga-ui-kit-components-input-month.umd.min.js +1 -1
  89. package/bundles/taiga-ui-kit-components-input-month.umd.min.js.map +1 -1
  90. package/bundles/taiga-ui-kit-components-input-number.umd.js +2 -2
  91. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  92. package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
  93. package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
  94. package/bundles/taiga-ui-kit-components-input-password.umd.js +1 -1
  95. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  96. package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
  97. package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
  98. package/bundles/taiga-ui-kit-components-input-phone.umd.js +1 -1
  99. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  100. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
  101. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
  102. package/bundles/taiga-ui-kit-components-input-range.umd.js +196 -164
  103. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  104. package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
  105. package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
  106. package/bundles/taiga-ui-kit-components-input-slider.umd.js +6 -18
  107. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  108. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
  109. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
  110. package/bundles/taiga-ui-kit-components-input-tag.umd.js +5 -5
  111. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  112. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +1 -1
  113. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
  114. package/bundles/taiga-ui-kit-components-input.umd.js +1 -1
  115. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  116. package/bundles/taiga-ui-kit-components-input.umd.min.js +1 -1
  117. package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
  118. package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
  119. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  120. package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js +1 -1
  121. package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js.map +1 -1
  122. package/bundles/taiga-ui-kit-components-multi-select.umd.js +1 -1
  123. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  124. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
  125. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
  126. package/bundles/taiga-ui-kit-components-pagination.umd.js +1 -1
  127. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  128. package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
  129. package/bundles/taiga-ui-kit-components-pagination.umd.min.js.map +1 -1
  130. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +1 -1
  131. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  132. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js +1 -1
  133. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js.map +1 -1
  134. package/bundles/taiga-ui-kit-components-progress.umd.js +2 -2
  135. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  136. package/bundles/taiga-ui-kit-components-progress.umd.min.js +1 -1
  137. package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
  138. package/bundles/taiga-ui-kit-components-radio.umd.js +2 -2
  139. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  140. package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
  141. package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
  142. package/bundles/taiga-ui-kit-components-range.umd.js +221 -31
  143. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  144. package/bundles/taiga-ui-kit-components-range.umd.min.js +2 -2
  145. package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
  146. package/bundles/taiga-ui-kit-components-rating.umd.js +1 -1
  147. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  148. package/bundles/taiga-ui-kit-components-rating.umd.min.js +1 -1
  149. package/bundles/taiga-ui-kit-components-rating.umd.min.js.map +1 -1
  150. package/bundles/taiga-ui-kit-components-select.umd.js +1 -1
  151. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  152. package/bundles/taiga-ui-kit-components-select.umd.min.js +1 -1
  153. package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
  154. package/bundles/taiga-ui-kit-components-slider.umd.js +62 -6
  155. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  156. package/bundles/taiga-ui-kit-components-slider.umd.min.js +1 -1
  157. package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
  158. package/bundles/taiga-ui-kit-components-stepper.umd.js +1 -1
  159. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  160. package/bundles/taiga-ui-kit-components-stepper.umd.min.js +2 -2
  161. package/bundles/taiga-ui-kit-components-stepper.umd.min.js.map +1 -1
  162. package/bundles/taiga-ui-kit-components-tabs.umd.js +38 -36
  163. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  164. package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
  165. package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
  166. package/bundles/taiga-ui-kit-components-tag.umd.js +2 -2
  167. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  168. package/bundles/taiga-ui-kit-components-tag.umd.min.js +1 -1
  169. package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
  170. package/bundles/taiga-ui-kit-components-text-area.umd.js +2 -2
  171. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  172. package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
  173. package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
  174. package/bundles/taiga-ui-kit-components-toggle.umd.js +1 -1
  175. package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
  176. package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
  177. package/bundles/taiga-ui-kit-tokens.umd.js +6 -0
  178. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  179. package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
  180. package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
  181. package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
  182. package/components/action/taiga-ui-kit-components-action.metadata.json +1 -1
  183. package/components/avatar/avatar-options.d.ts +11 -0
  184. package/components/avatar/avatar.component.d.ts +4 -2
  185. package/components/avatar/index.d.ts +1 -0
  186. package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
  187. package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
  188. package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
  189. package/components/carousel/taiga-ui-kit-components-carousel.metadata.json +1 -1
  190. package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
  191. package/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.metadata.json +1 -1
  192. package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
  193. package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
  194. package/components/files/taiga-ui-kit-components-files.metadata.json +1 -1
  195. package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
  196. package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
  197. package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
  198. package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
  199. package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
  200. package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
  201. package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
  202. package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
  203. package/components/input-files/taiga-ui-kit-components-input-files.metadata.json +1 -1
  204. package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +1 -1
  205. package/components/input-month-range/taiga-ui-kit-components-input-month-range.metadata.json +1 -1
  206. package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
  207. package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
  208. package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
  209. package/components/input-range/input-range.component.d.ts +44 -31
  210. package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
  211. package/components/input-slider/input-slider.component.d.ts +2 -8
  212. package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
  213. package/components/input-tag/input-tag.component.d.ts +1 -1
  214. package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
  215. package/components/marker-icon/taiga-ui-kit-components-marker-icon.metadata.json +1 -1
  216. package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
  217. package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
  218. package/components/pdf-viewer/taiga-ui-kit-components-pdf-viewer.metadata.json +1 -1
  219. package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
  220. package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
  221. package/components/range/index.d.ts +1 -0
  222. package/components/range/range-change.directive.d.ts +20 -0
  223. package/components/range/range.component.d.ts +33 -5
  224. package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
  225. package/components/rating/taiga-ui-kit-components-rating.metadata.json +1 -1
  226. package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
  227. package/components/slider/index.d.ts +1 -0
  228. package/components/slider/slider-old.component.d.ts +3 -1
  229. package/components/slider/slider-readonly.directive.d.ts +9 -0
  230. package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
  231. package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
  232. package/components/tabs/index.d.ts +0 -1
  233. package/components/tabs/tab/tab.component.d.ts +2 -1
  234. package/components/tabs/tabs/tabs.component.d.ts +2 -3
  235. package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +4 -1
  236. package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
  237. package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
  238. package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
  239. package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
  240. package/esm2015/abstract/input-slider.js +30 -37
  241. package/esm2015/abstract/slider/slider.js +13 -19
  242. package/esm2015/components/accordion/accordion-item/accordion-item.component.js +2 -2
  243. package/esm2015/components/action/action.component.js +2 -2
  244. package/esm2015/components/avatar/avatar-options.js +15 -0
  245. package/esm2015/components/avatar/avatar.component.js +14 -8
  246. package/esm2015/components/avatar/index.js +2 -1
  247. package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +2 -2
  248. package/esm2015/components/calendar-month/calendar-month.component.js +2 -2
  249. package/esm2015/components/carousel/carousel.component.js +2 -2
  250. package/esm2015/components/checkbox/checkbox.component.js +1 -1
  251. package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +2 -2
  252. package/esm2015/components/combo-box/combo-box.component.js +2 -2
  253. package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +2 -2
  254. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +2 -2
  255. package/esm2015/components/files/file/file.component.js +2 -2
  256. package/esm2015/components/files/files.component.js +3 -3
  257. package/esm2015/components/filter/filter.component.js +2 -2
  258. package/esm2015/components/input/input.component.js +2 -2
  259. package/esm2015/components/input-copy/input-copy.component.js +2 -2
  260. package/esm2015/components/input-count/input-count.component.js +2 -2
  261. package/esm2015/components/input-date/input-date.component.js +2 -2
  262. package/esm2015/components/input-date-range/input-date-range.component.js +2 -2
  263. package/esm2015/components/input-date-time/input-date-time.component.js +2 -2
  264. package/esm2015/components/input-file/file/file.component.js +2 -2
  265. package/esm2015/components/input-files/input-files.component.js +1 -1
  266. package/esm2015/components/input-month/input-month.component.js +2 -2
  267. package/esm2015/components/input-month-range/input-month-range.component.js +2 -2
  268. package/esm2015/components/input-number/input-number.component.js +3 -3
  269. package/esm2015/components/input-password/input-password.component.js +2 -2
  270. package/esm2015/components/input-phone/input-phone.component.js +2 -2
  271. package/esm2015/components/input-range/input-range.component.js +192 -156
  272. package/esm2015/components/input-range/input-range.module.js +13 -15
  273. package/esm2015/components/input-slider/input-slider.component.js +8 -20
  274. package/esm2015/components/input-tag/input-tag.component.js +6 -6
  275. package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
  276. package/esm2015/components/multi-select/multi-select.component.js +2 -2
  277. package/esm2015/components/pagination/pagination.component.js +2 -2
  278. package/esm2015/components/pdf-viewer/pdf-viewer.component.js +2 -2
  279. package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
  280. package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +2 -2
  281. package/esm2015/components/radio/radio.component.js +3 -3
  282. package/esm2015/components/range/index.js +2 -1
  283. package/esm2015/components/range/range-change.directive.js +83 -0
  284. package/esm2015/components/range/range.component.js +118 -28
  285. package/esm2015/components/range/range.module.js +10 -7
  286. package/esm2015/components/rating/rating.component.js +2 -2
  287. package/esm2015/components/select/select.component.js +2 -2
  288. package/esm2015/components/slider/index.js +2 -1
  289. package/esm2015/components/slider/slider-key-steps.directive.js +2 -2
  290. package/esm2015/components/slider/slider-old.component.js +11 -5
  291. package/esm2015/components/slider/slider-readonly.directive.js +50 -0
  292. package/esm2015/components/slider/slider.component.js +1 -1
  293. package/esm2015/components/slider/slider.module.js +4 -1
  294. package/esm2015/components/stepper/step/step.component.js +2 -2
  295. package/esm2015/components/tabs/index.js +1 -2
  296. package/esm2015/components/tabs/tab/tab.component.js +13 -9
  297. package/esm2015/components/tabs/tabs/tabs.component.js +5 -11
  298. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +24 -16
  299. package/esm2015/components/tabs/underline/underline.component.js +2 -2
  300. package/esm2015/components/tag/tag.component.js +3 -3
  301. package/esm2015/components/text-area/text-area.component.js +3 -3
  302. package/esm2015/components/toggle/toggle.component.js +1 -1
  303. package/esm2015/tokens/index.js +2 -1
  304. package/esm2015/tokens/mobile-aware.js +2 -1
  305. package/esm2015/tokens/tab-margin.js +5 -0
  306. package/esm5/abstract/input-slider.js +30 -48
  307. package/esm5/abstract/slider/slider.js +13 -19
  308. package/esm5/components/accordion/accordion-item/accordion-item.component.js +2 -2
  309. package/esm5/components/action/action.component.js +2 -2
  310. package/esm5/components/avatar/avatar-options.js +16 -0
  311. package/esm5/components/avatar/avatar.component.js +14 -8
  312. package/esm5/components/avatar/index.js +2 -1
  313. package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +2 -2
  314. package/esm5/components/calendar-month/calendar-month.component.js +2 -2
  315. package/esm5/components/carousel/carousel.component.js +2 -2
  316. package/esm5/components/checkbox/checkbox.component.js +1 -1
  317. package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +2 -2
  318. package/esm5/components/combo-box/combo-box.component.js +2 -2
  319. package/esm5/components/data-list-wrapper/data-list-group-wrapper.component.js +2 -2
  320. package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +2 -2
  321. package/esm5/components/files/file/file.component.js +2 -2
  322. package/esm5/components/files/files.component.js +3 -3
  323. package/esm5/components/filter/filter.component.js +2 -2
  324. package/esm5/components/input/input.component.js +2 -2
  325. package/esm5/components/input-copy/input-copy.component.js +2 -2
  326. package/esm5/components/input-count/input-count.component.js +2 -2
  327. package/esm5/components/input-date/input-date.component.js +2 -2
  328. package/esm5/components/input-date-range/input-date-range.component.js +2 -2
  329. package/esm5/components/input-date-time/input-date-time.component.js +2 -2
  330. package/esm5/components/input-file/file/file.component.js +2 -2
  331. package/esm5/components/input-files/input-files.component.js +1 -1
  332. package/esm5/components/input-month/input-month.component.js +2 -2
  333. package/esm5/components/input-month-range/input-month-range.component.js +2 -2
  334. package/esm5/components/input-number/input-number.component.js +3 -3
  335. package/esm5/components/input-password/input-password.component.js +2 -2
  336. package/esm5/components/input-phone/input-phone.component.js +2 -2
  337. package/esm5/components/input-range/input-range.component.js +194 -157
  338. package/esm5/components/input-range/input-range.module.js +13 -15
  339. package/esm5/components/input-slider/input-slider.component.js +8 -20
  340. package/esm5/components/input-tag/input-tag.component.js +6 -6
  341. package/esm5/components/marker-icon/marker-icon.component.js +2 -2
  342. package/esm5/components/multi-select/multi-select.component.js +2 -2
  343. package/esm5/components/pagination/pagination.component.js +2 -2
  344. package/esm5/components/pdf-viewer/pdf-viewer.component.js +2 -2
  345. package/esm5/components/progress/progress-circle/progress-circle.component.js +2 -2
  346. package/esm5/components/progress/progress-segmented/progress-segmented.component.js +2 -2
  347. package/esm5/components/radio/radio.component.js +3 -3
  348. package/esm5/components/range/index.js +2 -1
  349. package/esm5/components/range/range-change.directive.js +101 -0
  350. package/esm5/components/range/range.component.js +126 -29
  351. package/esm5/components/range/range.module.js +10 -7
  352. package/esm5/components/rating/rating.component.js +2 -2
  353. package/esm5/components/select/select.component.js +2 -2
  354. package/esm5/components/slider/index.js +2 -1
  355. package/esm5/components/slider/slider-key-steps.directive.js +2 -2
  356. package/esm5/components/slider/slider-old.component.js +11 -5
  357. package/esm5/components/slider/slider-readonly.directive.js +51 -0
  358. package/esm5/components/slider/slider.component.js +1 -1
  359. package/esm5/components/slider/slider.module.js +4 -1
  360. package/esm5/components/stepper/step/step.component.js +2 -2
  361. package/esm5/components/tabs/index.js +1 -2
  362. package/esm5/components/tabs/tab/tab.component.js +13 -9
  363. package/esm5/components/tabs/tabs/tabs.component.js +5 -15
  364. package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +27 -16
  365. package/esm5/components/tabs/underline/underline.component.js +2 -2
  366. package/esm5/components/tag/tag.component.js +3 -3
  367. package/esm5/components/text-area/text-area.component.js +3 -3
  368. package/esm5/components/toggle/toggle.component.js +1 -1
  369. package/esm5/tokens/index.js +2 -1
  370. package/esm5/tokens/mobile-aware.js +2 -1
  371. package/esm5/tokens/tab-margin.js +5 -0
  372. package/fesm2015/taiga-ui-kit-abstract.js +43 -55
  373. package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
  374. package/fesm2015/taiga-ui-kit-components-accordion.js +1 -1
  375. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  376. package/fesm2015/taiga-ui-kit-components-action.js +1 -1
  377. package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
  378. package/fesm2015/taiga-ui-kit-components-avatar.js +27 -8
  379. package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
  380. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
  381. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  382. package/fesm2015/taiga-ui-kit-components-calendar-month.js +1 -1
  383. package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
  384. package/fesm2015/taiga-ui-kit-components-carousel.js +1 -1
  385. package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
  386. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +1 -1
  387. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
  388. package/fesm2015/taiga-ui-kit-components-checkbox.js +1 -1
  389. package/fesm2015/taiga-ui-kit-components-combo-box.js +1 -1
  390. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  391. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +2 -2
  392. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  393. package/fesm2015/taiga-ui-kit-components-files.js +3 -3
  394. package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
  395. package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
  396. package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
  397. package/fesm2015/taiga-ui-kit-components-input-copy.js +1 -1
  398. package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
  399. package/fesm2015/taiga-ui-kit-components-input-count.js +1 -1
  400. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  401. package/fesm2015/taiga-ui-kit-components-input-date-range.js +1 -1
  402. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  403. package/fesm2015/taiga-ui-kit-components-input-date-time.js +1 -1
  404. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  405. package/fesm2015/taiga-ui-kit-components-input-date.js +1 -1
  406. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  407. package/fesm2015/taiga-ui-kit-components-input-file.js +1 -1
  408. package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
  409. package/fesm2015/taiga-ui-kit-components-input-files.js +1 -1
  410. package/fesm2015/taiga-ui-kit-components-input-month-range.js +1 -1
  411. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  412. package/fesm2015/taiga-ui-kit-components-input-month.js +1 -1
  413. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  414. package/fesm2015/taiga-ui-kit-components-input-number.js +2 -2
  415. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  416. package/fesm2015/taiga-ui-kit-components-input-password.js +1 -1
  417. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  418. package/fesm2015/taiga-ui-kit-components-input-phone.js +1 -1
  419. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  420. package/fesm2015/taiga-ui-kit-components-input-range.js +198 -167
  421. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  422. package/fesm2015/taiga-ui-kit-components-input-slider.js +7 -19
  423. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  424. package/fesm2015/taiga-ui-kit-components-input-tag.js +5 -5
  425. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  426. package/fesm2015/taiga-ui-kit-components-input.js +1 -1
  427. package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
  428. package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
  429. package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
  430. package/fesm2015/taiga-ui-kit-components-multi-select.js +1 -1
  431. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  432. package/fesm2015/taiga-ui-kit-components-pagination.js +1 -1
  433. package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
  434. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +1 -1
  435. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
  436. package/fesm2015/taiga-ui-kit-components-progress.js +2 -2
  437. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  438. package/fesm2015/taiga-ui-kit-components-radio.js +2 -2
  439. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  440. package/fesm2015/taiga-ui-kit-components-range.js +199 -34
  441. package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
  442. package/fesm2015/taiga-ui-kit-components-rating.js +1 -1
  443. package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
  444. package/fesm2015/taiga-ui-kit-components-select.js +1 -1
  445. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  446. package/fesm2015/taiga-ui-kit-components-slider.js +61 -7
  447. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  448. package/fesm2015/taiga-ui-kit-components-stepper.js +1 -1
  449. package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
  450. package/fesm2015/taiga-ui-kit-components-tabs.js +39 -34
  451. package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
  452. package/fesm2015/taiga-ui-kit-components-tag.js +2 -2
  453. package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
  454. package/fesm2015/taiga-ui-kit-components-text-area.js +2 -2
  455. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  456. package/fesm2015/taiga-ui-kit-components-toggle.js +1 -1
  457. package/fesm2015/taiga-ui-kit-tokens.js +6 -1
  458. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  459. package/fesm5/taiga-ui-kit-abstract.js +43 -66
  460. package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
  461. package/fesm5/taiga-ui-kit-components-accordion.js +1 -1
  462. package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
  463. package/fesm5/taiga-ui-kit-components-action.js +1 -1
  464. package/fesm5/taiga-ui-kit-components-action.js.map +1 -1
  465. package/fesm5/taiga-ui-kit-components-avatar.js +27 -8
  466. package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
  467. package/fesm5/taiga-ui-kit-components-breadcrumbs.js +1 -1
  468. package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  469. package/fesm5/taiga-ui-kit-components-calendar-month.js +1 -1
  470. package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
  471. package/fesm5/taiga-ui-kit-components-carousel.js +1 -1
  472. package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
  473. package/fesm5/taiga-ui-kit-components-checkbox-labeled.js +1 -1
  474. package/fesm5/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
  475. package/fesm5/taiga-ui-kit-components-checkbox.js +1 -1
  476. package/fesm5/taiga-ui-kit-components-combo-box.js +1 -1
  477. package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
  478. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +2 -2
  479. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  480. package/fesm5/taiga-ui-kit-components-files.js +3 -3
  481. package/fesm5/taiga-ui-kit-components-files.js.map +1 -1
  482. package/fesm5/taiga-ui-kit-components-filter.js +1 -1
  483. package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
  484. package/fesm5/taiga-ui-kit-components-input-copy.js +1 -1
  485. package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
  486. package/fesm5/taiga-ui-kit-components-input-count.js +1 -1
  487. package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
  488. package/fesm5/taiga-ui-kit-components-input-date-range.js +1 -1
  489. package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
  490. package/fesm5/taiga-ui-kit-components-input-date-time.js +1 -1
  491. package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
  492. package/fesm5/taiga-ui-kit-components-input-date.js +1 -1
  493. package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
  494. package/fesm5/taiga-ui-kit-components-input-file.js +1 -1
  495. package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
  496. package/fesm5/taiga-ui-kit-components-input-files.js +1 -1
  497. package/fesm5/taiga-ui-kit-components-input-month-range.js +1 -1
  498. package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
  499. package/fesm5/taiga-ui-kit-components-input-month.js +1 -1
  500. package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
  501. package/fesm5/taiga-ui-kit-components-input-number.js +2 -2
  502. package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
  503. package/fesm5/taiga-ui-kit-components-input-password.js +1 -1
  504. package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
  505. package/fesm5/taiga-ui-kit-components-input-phone.js +1 -1
  506. package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
  507. package/fesm5/taiga-ui-kit-components-input-range.js +200 -168
  508. package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
  509. package/fesm5/taiga-ui-kit-components-input-slider.js +7 -19
  510. package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
  511. package/fesm5/taiga-ui-kit-components-input-tag.js +5 -5
  512. package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
  513. package/fesm5/taiga-ui-kit-components-input.js +1 -1
  514. package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
  515. package/fesm5/taiga-ui-kit-components-marker-icon.js +1 -1
  516. package/fesm5/taiga-ui-kit-components-marker-icon.js.map +1 -1
  517. package/fesm5/taiga-ui-kit-components-multi-select.js +1 -1
  518. package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
  519. package/fesm5/taiga-ui-kit-components-pagination.js +1 -1
  520. package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
  521. package/fesm5/taiga-ui-kit-components-pdf-viewer.js +1 -1
  522. package/fesm5/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
  523. package/fesm5/taiga-ui-kit-components-progress.js +2 -2
  524. package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
  525. package/fesm5/taiga-ui-kit-components-radio.js +2 -2
  526. package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
  527. package/fesm5/taiga-ui-kit-components-range.js +225 -35
  528. package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
  529. package/fesm5/taiga-ui-kit-components-rating.js +1 -1
  530. package/fesm5/taiga-ui-kit-components-rating.js.map +1 -1
  531. package/fesm5/taiga-ui-kit-components-select.js +1 -1
  532. package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
  533. package/fesm5/taiga-ui-kit-components-slider.js +62 -7
  534. package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
  535. package/fesm5/taiga-ui-kit-components-stepper.js +1 -1
  536. package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
  537. package/fesm5/taiga-ui-kit-components-tabs.js +42 -38
  538. package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
  539. package/fesm5/taiga-ui-kit-components-tag.js +2 -2
  540. package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
  541. package/fesm5/taiga-ui-kit-components-text-area.js +2 -2
  542. package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
  543. package/fesm5/taiga-ui-kit-components-toggle.js +1 -1
  544. package/fesm5/taiga-ui-kit-tokens.js +6 -1
  545. package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
  546. package/package.json +4 -4
  547. package/tokens/index.d.ts +1 -0
  548. package/tokens/mobile-aware.d.ts +1 -0
  549. package/tokens/tab-margin.d.ts +2 -0
  550. package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
  551. package/components/tabs/tabs.const.d.ts +0 -2
  552. package/esm2015/components/tabs/tabs.const.js +0 -3
  553. package/esm5/components/tabs/tabs.const.js +0 -3
@@ -113,7 +113,7 @@ TuiSliderComponent = __decorate([
113
113
  '[style.--tui-slider-track-color]': 'options.trackColor',
114
114
  },
115
115
  changeDetection: ChangeDetectionStrategy.OnPush,
116
- styles: [":host{display:block;width:100%;color:var(--tui-primary);cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host:not(._old-edge){-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.125rem;padding:.4375rem 0;background-color:transparent;background-clip:content-box;outline:0;border-radius:var(--tui-radius-m)}:host:not(._old-edge)::-webkit-slider-container{border-radius:inherit}:host:not(._old-edge)[data-size='m']::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .625rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.375rem,0;background-size:calc(100% - 1rem),calc(100% - 1rem),auto}:host:not(._old-edge)[data-size='s']::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}:host:not(._old-edge)[data-size='m']::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .625rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.375rem;background-size:calc(100% - 1rem)}:host:not(._old-edge)[data-size='s']::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem;margin-top:-.4375rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem;margin-top:-.1875rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='m']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='m']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='s']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)::-moz-range-progress{background:currentColor;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}:host._old-edge::-ms-thumb{background:currentColor}:host._old-edge::-ms-fill-lower{background:currentColor}:host._old-edge::-ms-track{background:var(--tui-slider-track-color)}"]
116
+ styles: [":host{display:block;width:100%;color:var(--tui-primary);cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host:not(._old-edge){-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.125rem;padding:.4375rem 0;background-color:transparent;background-clip:content-box;outline:0;border-radius:var(--tui-radius-m)}:host:not(._old-edge)::-webkit-slider-container{border-radius:inherit}:host:not(._old-edge)[data-size='m']::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .625rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.375rem,0;background-size:calc(100% - 1rem),calc(100% - 1rem),auto}:host:not(._old-edge)[data-size='s']::-webkit-slider-runnable-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor var(--tui-slider-fill-percentage),transparent var(--tui-slider-fill-percentage));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}:host:not(._old-edge)[data-size='m']::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .625rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.375rem;background-size:calc(100% - 1rem)}:host:not(._old-edge)[data-size='s']::-moz-range-track{height:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0 .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-base-07) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem;margin-top:-.4375rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='m']::-webkit-slider-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='m']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem;margin-top:-.1875rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='s']::-webkit-slider-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='s']::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='m']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:1rem;width:1rem}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='m']::-moz-range-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='m']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)[data-size='s']::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border:none;border-radius:50%;height:.5rem;width:.5rem}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb:hover{background:var(--tui-primary-hover)}:not(:disabled):host:not(._old-edge)[data-size='s']::-moz-range-thumb:active{background:var(--tui-primary-active)}:focus-visible:host:not(._old-edge)[data-size='s']::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-focus)}:host:not(._old-edge)::-moz-range-progress{background:currentColor;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}:host._old-edge::-ms-thumb{background:currentColor;border-radius:50%}:host._old-edge::-ms-fill-lower{background:currentColor}:host._old-edge::-ms-track{background:var(--tui-slider-track-color);border:none}"]
117
117
  }),
118
118
  __param(0, Optional()),
119
119
  __param(0, Self()),
@@ -169,7 +169,7 @@ let TuiSliderKeyStepsDirective = class TuiSliderKeyStepsDirective extends Abstra
169
169
  const { min, max } = this.slider;
170
170
  const ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);
171
171
  const newValuePercentage = (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;
172
- return (newValuePercentage * (max - min)) / 100;
172
+ return (newValuePercentage * (max - min)) / 100 + min;
173
173
  }
174
174
  };
175
175
  TuiSliderKeyStepsDirective.ctorParameters = () => [
@@ -256,6 +256,15 @@ let TuiSliderOldComponent = TuiSliderOldComponent_1 = class TuiSliderOldComponen
256
256
  get right() {
257
257
  return 100 - 100 * this.getFractionFromValue(this.value);
258
258
  }
259
+ processValue(value) {
260
+ this.updateValue(this.valueGuard(value));
261
+ }
262
+ decrement() {
263
+ this.processStep(false);
264
+ }
265
+ increment() {
266
+ this.processStep(true);
267
+ }
259
268
  getFallbackValue() {
260
269
  return 0;
261
270
  }
@@ -265,9 +274,6 @@ let TuiSliderOldComponent = TuiSliderOldComponent_1 = class TuiSliderOldComponen
265
274
  const value = this.getValueFromFraction(increment ? fraction + step : fraction - step);
266
275
  this.processValue(value);
267
276
  }
268
- processValue(value) {
269
- this.updateValue(this.valueGuard(value));
270
- }
271
277
  };
272
278
  TuiSliderOldComponent.ctorParameters = () => [
273
279
  { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
@@ -278,7 +284,7 @@ TuiSliderOldComponent.ctorParameters = () => [
278
284
  TuiSliderOldComponent = TuiSliderOldComponent_1 = __decorate([
279
285
  Component({
280
286
  selector: 'tui-slider',
281
- template: "<div\n class=\"event-catcher\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n>\n <div class=\"wrapper\">\n <div *ngIf=\"segmented\" class=\"segments\">\n <span\n *tuiRepeatTimes=\"let segmentIndex of segments + 1\"\n automation-id=\"tui-slider__segment\"\n class=\"segment\"\n >\n <span *ngIf=\"fromToTexts$ | async as fromToText\" class=\"number\">\n {{ getSegmentPrefix(segmentIndex, fromToText) }} {{\n getSegmentLabel(segmentIndex) | tuiFormatNumber }}\n <span *ngIf=\"pluralizeMap\">\n {{ getSegmentLabel(segmentIndex) | i18nPlural:\n pluralizeMap }}\n </span>\n </span>\n </span>\n </div>\n <div\n automation-id=\"tui-slider__bar\"\n class=\"bar\"\n [style.left.%]=\"left\"\n [style.right.%]=\"right\"\n >\n <div\n #dotLeft\n automation-id=\"tui-slider__left\"\n class=\"dot\"\n [class.dot_focus-visible]=\"focusVisibleLeft && computedFocused\"\n [tuiFocusable]=\"isLeftFocusable\"\n (tuiFocusVisibleChange)=\"onLeftFocusVisible($event)\"\n (keydown.arrowLeft.prevent)=\"decrement(false)\"\n (keydown.arrowDown.prevent)=\"decrement(false)\"\n (keydown.arrowRight.prevent)=\"increment(false)\"\n (keydown.arrowUp.prevent)=\"increment(false)\"\n ></div>\n <div\n #dotRight\n automation-id=\"tui-slider__right\"\n class=\"dot\"\n [class.dot_focus-visible]=\"focusVisibleRight && computedFocused\"\n [tuiFocusable]=\"isRightFocusable\"\n (tuiFocusVisibleChange)=\"onRightFocusVisible($event)\"\n (keydown.arrowLeft.prevent)=\"decrement(true)\"\n (keydown.arrowDown.prevent)=\"decrement(true)\"\n (keydown.arrowRight.prevent)=\"increment(true)\"\n (keydown.arrowUp.prevent)=\"increment(true)\"\n ></div>\n </div>\n </div>\n</div>\n",
287
+ template: "<div\n class=\"event-catcher\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n>\n <div class=\"wrapper\">\n <div\n *ngIf=\"segmented\"\n class=\"segments\"\n >\n <span\n *tuiRepeatTimes=\"let segmentIndex of segments + 1\"\n automation-id=\"tui-slider__segment\"\n class=\"segment\"\n >\n <span\n *ngIf=\"fromToTexts$ | async as fromToText\"\n class=\"number\"\n >\n {{ getSegmentPrefix(segmentIndex, fromToText) }} {{\n getSegmentLabel(segmentIndex) | tuiFormatNumber }}\n <span *ngIf=\"pluralizeMap\">\n {{ getSegmentLabel(segmentIndex) | i18nPlural:\n pluralizeMap }}\n </span>\n </span>\n </span>\n </div>\n <div\n automation-id=\"tui-slider__bar\"\n class=\"bar\"\n [style.left.%]=\"left\"\n [style.right.%]=\"right\"\n >\n <div\n #dotLeft\n automation-id=\"tui-slider__left\"\n class=\"dot\"\n [class.dot_focus-visible]=\"focusVisibleLeft && computedFocused\"\n [tuiFocusable]=\"isLeftFocusable\"\n (tuiFocusVisibleChange)=\"onLeftFocusVisible($event)\"\n (keydown.arrowLeft.prevent)=\"decrement()\"\n (keydown.arrowDown.prevent)=\"decrement()\"\n (keydown.arrowRight.prevent)=\"increment()\"\n (keydown.arrowUp.prevent)=\"increment()\"\n ></div>\n <div\n #dotRight\n automation-id=\"tui-slider__right\"\n class=\"dot\"\n [class.dot_focus-visible]=\"focusVisibleRight && computedFocused\"\n [tuiFocusable]=\"isRightFocusable\"\n (tuiFocusVisibleChange)=\"onRightFocusVisible($event)\"\n (keydown.arrowLeft.prevent)=\"decrement()\"\n (keydown.arrowDown.prevent)=\"decrement()\"\n (keydown.arrowRight.prevent)=\"increment()\"\n (keydown.arrowUp.prevent)=\"increment()\"\n ></div>\n </div>\n </div>\n</div>\n",
282
288
  changeDetection: ChangeDetectionStrategy.OnPush,
283
289
  providers: [
284
290
  {
@@ -296,6 +302,52 @@ TuiSliderOldComponent = TuiSliderOldComponent_1 = __decorate([
296
302
  __param(3, Inject(TUI_FROM_TO_TEXTS))
297
303
  ], TuiSliderOldComponent);
298
304
 
305
+ const SLIDER_INTERACTION_KEYS = new Set([
306
+ 'ArrowLeft',
307
+ 'ArrowRight',
308
+ 'ArrowUp',
309
+ 'ArrowDown',
310
+ 'Home',
311
+ 'End',
312
+ 'PageUp',
313
+ 'PageDown',
314
+ ]);
315
+ /**
316
+ * Native <input type='range' readonly> doesn't work.
317
+ * This directive imitates this native behaviour.
318
+ */
319
+ let TuiSliderReadonlyDirective = class TuiSliderReadonlyDirective {
320
+ constructor() {
321
+ this.readonly = true;
322
+ }
323
+ preventEvent(event) {
324
+ if (this.readonly === '' || this.readonly) {
325
+ event.preventDefault();
326
+ }
327
+ }
328
+ preventKeyboardInteraction(event) {
329
+ if (SLIDER_INTERACTION_KEYS.has(event.key)) {
330
+ this.preventEvent(event);
331
+ }
332
+ }
333
+ };
334
+ __decorate([
335
+ Input(),
336
+ tuiDefaultProp()
337
+ ], TuiSliderReadonlyDirective.prototype, "readonly", void 0);
338
+ __decorate([
339
+ HostListener('mousedown', ['$event']),
340
+ HostListener('touchstart', ['$event'])
341
+ ], TuiSliderReadonlyDirective.prototype, "preventEvent", null);
342
+ __decorate([
343
+ HostListener('keydown', ['$event'])
344
+ ], TuiSliderReadonlyDirective.prototype, "preventKeyboardInteraction", null);
345
+ TuiSliderReadonlyDirective = __decorate([
346
+ Directive({
347
+ selector: 'input[tuiSlider][readonly]',
348
+ })
349
+ ], TuiSliderReadonlyDirective);
350
+
299
351
  let TuiSliderModule = class TuiSliderModule {
300
352
  };
301
353
  TuiSliderModule = __decorate([
@@ -311,12 +363,14 @@ TuiSliderModule = __decorate([
311
363
  declarations: [
312
364
  TuiSliderComponent,
313
365
  TuiSliderKeyStepsDirective,
366
+ TuiSliderReadonlyDirective,
314
367
  TuiSliderTickLabelPipe,
315
368
  TuiSliderOldComponent,
316
369
  ],
317
370
  exports: [
318
371
  TuiSliderComponent,
319
372
  TuiSliderKeyStepsDirective,
373
+ TuiSliderReadonlyDirective,
320
374
  TuiSliderTickLabelPipe,
321
375
  TuiSliderOldComponent,
322
376
  ],
@@ -327,5 +381,5 @@ TuiSliderModule = __decorate([
327
381
  * Generated bundle index. Do not edit.
328
382
  */
329
383
 
330
- export { TUI_SLIDER_DEFAULT_OPTIONS, TUI_SLIDER_OPTIONS, TuiSliderComponent, TuiSliderKeyStepsDirective, TuiSliderModule, TuiSliderOldComponent, TuiSliderTickLabelPipe, tuiSliderOptionsProvider };
384
+ export { TUI_SLIDER_DEFAULT_OPTIONS, TUI_SLIDER_OPTIONS, TuiSliderComponent, TuiSliderKeyStepsDirective, TuiSliderModule, TuiSliderOldComponent, TuiSliderReadonlyDirective, TuiSliderTickLabelPipe, tuiSliderOptionsProvider };
331
385
  //# sourceMappingURL=taiga-ui-kit-components-slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-slider.js","sources":["ng://@taiga-ui/kit/components/slider/slider-options.ts","ng://@taiga-ui/kit/components/slider/slider.component.ts","ng://@taiga-ui/kit/components/slider/slider-key-steps.directive.ts","ng://@taiga-ui/kit/components/slider/slider-old.component.ts","ng://@taiga-ui/kit/components/slider/slider.module.ts","ng://@taiga-ui/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiSliderOptions {\n readonly size: TuiSizeS;\n readonly trackColor: string;\n}\n\nexport const TUI_SLIDER_DEFAULT_OPTIONS: TuiSliderOptions = {\n size: 'm',\n trackColor: 'var(--tui-base-03)',\n};\n\nexport const TUI_SLIDER_OPTIONS = new InjectionToken<TuiSliderOptions>(\n 'Default parameters for Slider component',\n {factory: () => TUI_SLIDER_DEFAULT_OPTIONS},\n);\n\nexport function tuiSliderOptionsProvider(\n options: Partial<TuiSliderOptions>,\n): ValueProvider {\n return {\n provide: TUI_SLIDER_OPTIONS,\n useValue: {...TUI_SLIDER_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n isEdgeOlderThan,\n tuiDefaultProp,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\nimport {take} from 'rxjs/operators';\n\nimport {TUI_SLIDER_OPTIONS, TuiSliderOptions} from './slider-options';\n\n@Component({\n /**\n * We have to call our component as `<input tuiSlider type=\"range\" ... />`\n * because otherwise built-in angular\n * {@link https://github.com/angular/angular/blob/master/packages/forms/src/directives/range_value_accessor.ts#L45 RangeValueAccessor}\n * cannot be matched by its CSS selector.\n */\n selector: 'input[type=range][tuiSlider]',\n template: ``,\n styleUrls: ['./slider.style.less'],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for {@link valuePercentage} function) when we drag thumb of the input.\n */\n '(input)': '0',\n '[style.--tui-slider-track-color]': 'options.trackColor',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSliderComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n segments = 1;\n\n get min(): number {\n return Number(this.elementRef.nativeElement.min);\n }\n\n get max(): number {\n return Number(this.elementRef.nativeElement.max || 100);\n }\n\n get step(): number {\n return Number(this.elementRef.nativeElement.step) || 1;\n }\n\n get value(): number {\n return Number(this.elementRef.nativeElement.value) || 0;\n }\n\n set value(newValue: number) {\n this.elementRef.nativeElement.value = `${newValue}`;\n }\n\n @HostBinding('style.--tui-slider-fill-percentage.%')\n get valuePercentage(): number {\n return (100 * (this.value - this.min)) / (this.max - this.min);\n }\n\n @HostBinding('style.--tui-slider-segment-width.%')\n get segmentWidth(): number {\n return 100 / Math.max(1, this.segments);\n }\n\n @HostBinding('class._old-edge')\n get isOldEdge(): boolean {\n return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_SLIDER_OPTIONS) readonly options: TuiSliderOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n control.valueChanges?.pipe(watch(changeDetectorRef), take(1)).subscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Pipe,\n PipeTransform,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n round,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {map} from 'rxjs/operators';\n\nimport {TuiSliderComponent} from './slider.component';\n\n// @dynamic\n@Directive({\n selector: 'input[tuiSlider][keySteps]',\n host: {\n '[attr.aria-valuenow]': 'controlValue',\n '[attr.aria-valuemin]': 'min',\n '[attr.aria-valuemax]': 'max',\n },\n})\nexport class TuiSliderKeyStepsDirective\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp(checkHasMinMaxPercents, 'Should contain min and max values')\n keySteps: TuiKeySteps = [];\n\n @Output()\n keyStepsInput = typedFromEvent(this.elementRef.nativeElement, 'input').pipe(\n map(() => this.controlValue),\n );\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get min(): number {\n return this.keySteps[0]?.[1] || 0;\n }\n\n get max(): number {\n return this.keySteps[this.keySteps.length - 1]?.[1] || 100;\n }\n\n get controlValue(): number {\n const {valuePercentage} = this.slider;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n\n return transformToControlValue(valuePercentage, lowerStep, upperStep);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiSliderComponent) private readonly slider: TuiSliderComponent,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostListener('change')\n updateControlValue() {\n this.updateValue(this.controlValue);\n }\n\n writeValue(controlValue: number | null) {\n if (controlValue === null) {\n return;\n }\n\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([_, keyStepValue]) => controlValue <= keyStepValue,\n );\n\n this.slider.value = this.transformToNativeValue(\n controlValue,\n lowerStep,\n upperStep,\n );\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private transformToNativeValue(\n controlValue: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n ): number {\n const {min, max} = this.slider;\n const ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);\n const newValuePercentage =\n (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n\n return (newValuePercentage * (max - min)) / 100;\n }\n}\n\n/**\n * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.\n * TODO delete it in v3.0\n *\n */\n@Pipe({name: 'tuiSliderTickLabel'})\nexport class TuiSliderTickLabelPipe implements PipeTransform {\n transform(tickIndex: number, totalSegments: number, keySteps: TuiKeySteps): number {\n const percentage = (100 / totalSegments) * tickIndex;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => percentage <= keyStepPercentage,\n );\n\n return transformToControlValue(percentage, upperStep, lowerStep);\n }\n}\n\nfunction checkHasMinMaxPercents(steps: TuiKeySteps): boolean {\n return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);\n}\n\nfunction findKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((ketStep, i) => i && fn(ketStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nfunction transformToControlValue(\n valuePercentage: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n): number {\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return round(controlValue, TUI_FLOATING_PRECISION);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiSlider} from '@taiga-ui/kit/abstract';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated use {@link TuiSliderComponent} instead\n * TODO remove in 3.0\n */\n// @dynamic\n@Component({\n selector: 'tui-slider',\n templateUrl: '../../abstract/slider/slider.common.template.html',\n styleUrls: [\n '../../abstract/slider/slider.common.style.less',\n './slider-old.style.less',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiSliderOldComponent),\n },\n ],\n})\nexport class TuiSliderOldComponent\n extends AbstractTuiSlider<number>\n implements TuiFocusableElementAccessor\n{\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS) fromToTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef, documentRef, fromToTexts$);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.dotRight ? this.dotRight.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get left(): number {\n return 0;\n }\n\n get right(): number {\n return 100 - 100 * this.getFractionFromValue(this.value);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n protected processStep(increment: boolean) {\n const fraction = this.getFractionFromValue(this.value);\n const step = this.computedStep;\n const value = this.getValueFromFraction(\n increment ? fraction + step : fraction - step,\n );\n\n this.processValue(value);\n }\n\n protected processValue(value: number) {\n this.updateValue(this.valueGuard(value));\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiFormatNumberPipeModule} from '@taiga-ui/core';\n\nimport {TuiSliderComponent} from './slider.component';\nimport {\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n} from './slider-key-steps.directive';\nimport {TuiSliderOldComponent} from './slider-old.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiRepeatTimesModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiActiveZoneModule,\n TuiFormatNumberPipeModule,\n ],\n declarations: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n exports: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n})\nexport class TuiSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,oBAAoB;EAClC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC,EAAC,OAAO,EAAE,MAAM,0BAA0B,EAAC,EAC7C;SAEc,wBAAwB,CACpC,OAAkC;IAElC,OAAO;QACH,OAAO,EAAE,kBAAkB;QAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;KACxD,CAAC;AACN;;ICqBa,kBAAkB,G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B,qBAAqB;YACrB,mBAAmB;YACnB,yBAAyB;SAC5B;QACD,YAAY,EAAE;YACV,kBAAkB;YAClB,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;QACD,OAAO,EAAE;YACL,kBAAkB;YAClB,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;KACJ,CAAC;GACW,eAAe,CAAG;;ACvC/B;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-slider.js","sources":["ng://@taiga-ui/kit/components/slider/slider-options.ts","ng://@taiga-ui/kit/components/slider/slider.component.ts","ng://@taiga-ui/kit/components/slider/slider-key-steps.directive.ts","ng://@taiga-ui/kit/components/slider/slider-old.component.ts","ng://@taiga-ui/kit/components/slider/slider-readonly.directive.ts","ng://@taiga-ui/kit/components/slider/slider.module.ts","ng://@taiga-ui/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiSliderOptions {\n readonly size: TuiSizeS;\n readonly trackColor: string;\n}\n\nexport const TUI_SLIDER_DEFAULT_OPTIONS: TuiSliderOptions = {\n size: 'm',\n trackColor: 'var(--tui-base-03)',\n};\n\nexport const TUI_SLIDER_OPTIONS = new InjectionToken<TuiSliderOptions>(\n 'Default parameters for Slider component',\n {factory: () => TUI_SLIDER_DEFAULT_OPTIONS},\n);\n\nexport function tuiSliderOptionsProvider(\n options: Partial<TuiSliderOptions>,\n): ValueProvider {\n return {\n provide: TUI_SLIDER_OPTIONS,\n useValue: {...TUI_SLIDER_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n isEdgeOlderThan,\n tuiDefaultProp,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\nimport {take} from 'rxjs/operators';\n\nimport {TUI_SLIDER_OPTIONS, TuiSliderOptions} from './slider-options';\n\n@Component({\n /**\n * We have to call our component as `<input tuiSlider type=\"range\" ... />`\n * because otherwise built-in angular\n * {@link https://github.com/angular/angular/blob/master/packages/forms/src/directives/range_value_accessor.ts#L45 RangeValueAccessor}\n * cannot be matched by its CSS selector.\n */\n selector: 'input[type=range][tuiSlider]',\n template: ``,\n styleUrls: ['./slider.style.less'],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for {@link valuePercentage} function) when we drag thumb of the input.\n */\n '(input)': '0',\n '[style.--tui-slider-track-color]': 'options.trackColor',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSliderComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n segments = 1;\n\n get min(): number {\n return Number(this.elementRef.nativeElement.min);\n }\n\n get max(): number {\n return Number(this.elementRef.nativeElement.max || 100);\n }\n\n get step(): number {\n return Number(this.elementRef.nativeElement.step) || 1;\n }\n\n get value(): number {\n return Number(this.elementRef.nativeElement.value) || 0;\n }\n\n set value(newValue: number) {\n this.elementRef.nativeElement.value = `${newValue}`;\n }\n\n @HostBinding('style.--tui-slider-fill-percentage.%')\n get valuePercentage(): number {\n return (100 * (this.value - this.min)) / (this.max - this.min);\n }\n\n @HostBinding('style.--tui-slider-segment-width.%')\n get segmentWidth(): number {\n return 100 / Math.max(1, this.segments);\n }\n\n @HostBinding('class._old-edge')\n get isOldEdge(): boolean {\n return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_SLIDER_OPTIONS) readonly options: TuiSliderOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n control.valueChanges?.pipe(watch(changeDetectorRef), take(1)).subscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Pipe,\n PipeTransform,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n round,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {map} from 'rxjs/operators';\n\nimport {TuiSliderComponent} from './slider.component';\n\n// @dynamic\n@Directive({\n selector: 'input[tuiSlider][keySteps]',\n host: {\n '[attr.aria-valuenow]': 'controlValue',\n '[attr.aria-valuemin]': 'min',\n '[attr.aria-valuemax]': 'max',\n },\n})\nexport class TuiSliderKeyStepsDirective\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp(checkHasMinMaxPercents, 'Should contain min and max values')\n keySteps: TuiKeySteps = [];\n\n @Output()\n keyStepsInput = typedFromEvent(this.elementRef.nativeElement, 'input').pipe(\n map(() => this.controlValue),\n );\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get min(): number {\n return this.keySteps[0]?.[1] || 0;\n }\n\n get max(): number {\n return this.keySteps[this.keySteps.length - 1]?.[1] || 100;\n }\n\n get controlValue(): number {\n const {valuePercentage} = this.slider;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n\n return transformToControlValue(valuePercentage, lowerStep, upperStep);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiSliderComponent) private readonly slider: TuiSliderComponent,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostListener('change')\n updateControlValue() {\n this.updateValue(this.controlValue);\n }\n\n writeValue(controlValue: number | null) {\n if (controlValue === null) {\n return;\n }\n\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([_, keyStepValue]) => controlValue <= keyStepValue,\n );\n\n this.slider.value = this.transformToNativeValue(\n controlValue,\n lowerStep,\n upperStep,\n );\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private transformToNativeValue(\n controlValue: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n ): number {\n const {min, max} = this.slider;\n const ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);\n const newValuePercentage =\n (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n\n return (newValuePercentage * (max - min)) / 100 + min;\n }\n}\n\n/**\n * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.\n * TODO delete it in v3.0\n *\n */\n@Pipe({name: 'tuiSliderTickLabel'})\nexport class TuiSliderTickLabelPipe implements PipeTransform {\n transform(tickIndex: number, totalSegments: number, keySteps: TuiKeySteps): number {\n const percentage = (100 / totalSegments) * tickIndex;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => percentage <= keyStepPercentage,\n );\n\n return transformToControlValue(percentage, upperStep, lowerStep);\n }\n}\n\nfunction checkHasMinMaxPercents(steps: TuiKeySteps): boolean {\n return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);\n}\n\nfunction findKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((ketStep, i) => i && fn(ketStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nfunction transformToControlValue(\n valuePercentage: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n): number {\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return round(controlValue, TUI_FLOATING_PRECISION);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiSlider} from '@taiga-ui/kit/abstract';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated use {@link TuiSliderComponent} instead\n * TODO remove in 3.0\n */\n// @dynamic\n@Component({\n selector: 'tui-slider',\n templateUrl: '../../abstract/slider/slider.common.template.html',\n styleUrls: [\n '../../abstract/slider/slider.common.style.less',\n './slider-old.style.less',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiSliderOldComponent),\n },\n ],\n})\nexport class TuiSliderOldComponent\n extends AbstractTuiSlider<number>\n implements TuiFocusableElementAccessor\n{\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS) fromToTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef, documentRef, fromToTexts$);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.dotRight ? this.dotRight.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get left(): number {\n return 0;\n }\n\n get right(): number {\n return 100 - 100 * this.getFractionFromValue(this.value);\n }\n\n processValue(value: number) {\n this.updateValue(this.valueGuard(value));\n }\n\n decrement() {\n this.processStep(false);\n }\n\n increment() {\n this.processStep(true);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n protected processStep(increment: boolean) {\n const fraction = this.getFractionFromValue(this.value);\n const step = this.computedStep;\n const value = this.getValueFromFraction(\n increment ? fraction + step : fraction - step,\n );\n\n this.processValue(value);\n }\n}\n","import {Directive, HostListener, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\nconst SLIDER_INTERACTION_KEYS = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n]);\n\n/**\n * Native <input type='range' readonly> doesn't work.\n * This directive imitates this native behaviour.\n */\n@Directive({\n selector: 'input[tuiSlider][readonly]',\n})\nexport class TuiSliderReadonlyDirective {\n @Input()\n @tuiDefaultProp()\n readonly: '' | boolean = true;\n\n @HostListener('mousedown', ['$event'])\n @HostListener('touchstart', ['$event'])\n preventEvent(event: Event) {\n if (this.readonly === '' || this.readonly) {\n event.preventDefault();\n }\n }\n\n @HostListener('keydown', ['$event'])\n preventKeyboardInteraction(event: KeyboardEvent) {\n if (SLIDER_INTERACTION_KEYS.has(event.key)) {\n this.preventEvent(event);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiFormatNumberPipeModule} from '@taiga-ui/core';\n\nimport {TuiSliderComponent} from './slider.component';\nimport {\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n} from './slider-key-steps.directive';\nimport {TuiSliderOldComponent} from './slider-old.component';\nimport {TuiSliderReadonlyDirective} from './slider-readonly.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiRepeatTimesModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiActiveZoneModule,\n TuiFormatNumberPipeModule,\n ],\n declarations: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderReadonlyDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n exports: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderReadonlyDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n})\nexport class TuiSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,oBAAoB;EAClC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC,EAAC,OAAO,EAAE,MAAM,0BAA0B,EAAC,EAC7C;SAEc,wBAAwB,CACpC,OAAkC;IAElC,OAAO;QACH,OAAO,EAAE,kBA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A0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;QACD,OAAO,EAAE;YACL,kBAAkB;YAClB,0BAA0B;YAC1B,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;KACJ,CAAC;GACW,eAAe,CAAG;;AC1C/B;;;;;;"}
@@ -148,7 +148,7 @@ __decorate([
148
148
  TuiStepComponent = __decorate([
149
149
  Component({
150
150
  selector: 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',
151
- template: "<tui-svg *ngIf=\"icon\" class=\"marker marker_custom\" [src]=\"icon\"></tui-svg>\n<tui-svg src=\"tuiIconWarningLarge\" class=\"marker marker_error\"></tui-svg>\n<tui-svg src=\"tuiIconCheckLarge\" class=\"marker marker_pass\"></tui-svg>\n<div class=\"marker marker_index\"></div>\n<ng-content></ng-content>\n",
151
+ template: "<tui-svg\n *ngIf=\"icon\"\n class=\"marker marker_custom\"\n [src]=\"icon\"\n></tui-svg>\n<tui-svg\n src=\"tuiIconWarningLarge\"\n class=\"marker marker_error\"\n></tui-svg>\n<tui-svg\n src=\"tuiIconCheckLarge\"\n class=\"marker marker_pass\"\n></tui-svg>\n<div class=\"marker marker_index\"></div>\n<ng-content></ng-content>\n",
152
152
  changeDetection: ChangeDetectionStrategy.OnPush,
153
153
  providers: [TuiDestroyService, TuiRouterLinkActiveService, TuiFocusVisibleService],
154
154
  host: {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-stepper.js","sources":["ng://@taiga-ui/kit/components/stepper/stepper.component.ts","ng://@taiga-ui/kit/components/stepper/step/step.component.ts","ng://@taiga-ui/kit/components/stepper/stepper.module.ts","ng://@taiga-ui/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getOriginalArrayFromQueryList,\n itemsQueryListObservable,\n moveFocus,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiOrientationT} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {delay} from 'rxjs/operators';\n\nimport {TuiStepComponent} from './step/step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n templateUrl: './stepper.template.html',\n styleUrls: ['./stepper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiStepperComponent {\n @ContentChildren(forwardRef(() => TuiStepComponent), {read: ElementRef})\n private readonly steps: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n @HostBinding('attr.data-orientation')\n @tuiDefaultProp()\n orientation: TuiOrientationT = 'horizontal';\n\n @Input()\n @tuiDefaultProp()\n activeItemIndex = 0;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n @tuiPure\n get changes$(): Observable<unknown> {\n // Delay is required to trigger change detection after steps are rendered\n // so they can update their \"active\" status\n return itemsQueryListObservable(this.steps).pipe(delay(0));\n }\n\n @HostListener('keydown.arrowRight', ['$event', '1'])\n @HostListener('keydown.arrowLeft', ['$event', '-1'])\n onHorizontal(event: Event, step: number) {\n if (this.orientation !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n @HostListener('keydown.arrowDown', ['$event', '1'])\n @HostListener('keydown.arrowUp', ['$event', '-1'])\n onVertical(event: Event, step: number) {\n if (this.orientation !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n indexOf(step: HTMLElement): number {\n return getOriginalArrayFromQueryList(this.steps).findIndex(\n ({nativeElement}) => nativeElement === step,\n );\n }\n\n isActive(index: number): boolean {\n return index === this.activeItemIndex;\n }\n\n activate(index: number) {\n if (this.activeItemIndex === index) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n\n private moveFocus(current: EventTarget, step: number) {\n const steps = getOriginalArrayFromQueryList(this.steps).map(\n ({nativeElement}) => nativeElement,\n );\n\n moveFocus(steps.indexOf(current as HTMLElement), steps, step);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {tuiDefaultProp, TuiDestroyService, TuiFocusVisibleService} from '@taiga-ui/cdk';\nimport {TuiRouterLinkActiveService} from '@taiga-ui/core';\nimport {identity, Observable} from 'rxjs';\nimport {filter} from 'rxjs/operators';\n\nimport {TuiStepperComponent} from '../stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n templateUrl: './step.template.html',\n styleUrls: ['./step.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, TuiRouterLinkActiveService, TuiFocusVisibleService],\n host: {\n type: 'button',\n },\n})\nexport class TuiStepComponent {\n @Input()\n @HostBinding('attr.data-state')\n @tuiDefaultProp()\n state: 'normal' | 'pass' | 'error' = 'normal';\n\n @Input()\n @tuiDefaultProp()\n icon = '';\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n constructor(\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiRouterLinkActiveService) routerLinkActive$: Observable<boolean>,\n @Inject(TuiStepperComponent) private readonly stepper: TuiStepperComponent,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n routerLinkActive$.pipe(filter(identity)).subscribe(() => {\n this.activate();\n });\n\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n @HostBinding('class._active')\n get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n @HostBinding('class._vertical')\n get isVertical(): boolean {\n return this.stepper.orientation === 'vertical';\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.isActive ? 0 : -1;\n }\n\n get index(): number {\n return this.stepper.indexOf(this.elementRef.nativeElement);\n }\n\n @HostListener('click')\n activate() {\n this.stepper.activate(this.index);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiStepComponent} from './step/step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiStepperComponent, TuiStepComponent],\n exports: [TuiStepperComponent, TuiStepComponent],\n})\nexport class TuiStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAiCa,mBAAmB,GAAhC,MAAa,mBAAmB;IAAhC;QAEqB,UAAK,GAAuC,WAAW,CAAC;QAKzE,gBAAW,GAAoB,YAAY,CAAC;QAI5C,oBAAe,GAAG,CAAC,CAAC;QAGX,0BAAqB,GAAG,IAAI,YAAY,EAAU,CAAC;KAyD/D;IAtDG,IAAI,QAAQ;;;QAGR,OAAO,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9D;IAID,YAAY,CAAC,KAAY,EAAE,IAAY;QACnC,IAAI,IAAI,CAAC,WAAW,KAAK,YAAY,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpD,OAAO;SACV;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACtC;IAID,UAAU,CAAC,KAAY,EAAE,IAAY;QACjC,IAAI,IAAI,CAAC,WAAW,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YAClD,OAAO;SACV;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IA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AgB,CAAG;;ACZhC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-stepper.js","sources":["ng://@taiga-ui/kit/components/stepper/stepper.component.ts","ng://@taiga-ui/kit/components/stepper/step/step.component.ts","ng://@taiga-ui/kit/components/stepper/stepper.module.ts","ng://@taiga-ui/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getOriginalArrayFromQueryList,\n itemsQueryListObservable,\n moveFocus,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiOrientationT} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {delay} from 'rxjs/operators';\n\nimport {TuiStepComponent} from './step/step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n templateUrl: './stepper.template.html',\n styleUrls: ['./stepper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiStepperComponent {\n @ContentChildren(forwardRef(() => TuiStepComponent), {read: ElementRef})\n private readonly steps: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n @HostBinding('attr.data-orientation')\n @tuiDefaultProp()\n orientation: TuiOrientationT = 'horizontal';\n\n @Input()\n @tuiDefaultProp()\n activeItemIndex = 0;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n @tuiPure\n get changes$(): Observable<unknown> {\n // Delay is required to trigger change detection after steps are rendered\n // so they can update their \"active\" status\n return itemsQueryListObservable(this.steps).pipe(delay(0));\n }\n\n @HostListener('keydown.arrowRight', ['$event', '1'])\n @HostListener('keydown.arrowLeft', ['$event', '-1'])\n onHorizontal(event: Event, step: number) {\n if (this.orientation !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n @HostListener('keydown.arrowDown', ['$event', '1'])\n @HostListener('keydown.arrowUp', ['$event', '-1'])\n onVertical(event: Event, step: number) {\n if (this.orientation !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n indexOf(step: HTMLElement): number {\n return getOriginalArrayFromQueryList(this.steps).findIndex(\n ({nativeElement}) => nativeElement === step,\n );\n }\n\n isActive(index: number): boolean {\n return index === this.activeItemIndex;\n }\n\n activate(index: number) {\n if (this.activeItemIndex === index) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n\n private moveFocus(current: EventTarget, step: number) {\n const steps = getOriginalArrayFromQueryList(this.steps).map(\n ({nativeElement}) => nativeElement,\n );\n\n moveFocus(steps.indexOf(current as HTMLElement), steps, step);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {tuiDefaultProp, TuiDestroyService, TuiFocusVisibleService} from '@taiga-ui/cdk';\nimport {TuiRouterLinkActiveService} from '@taiga-ui/core';\nimport {identity, Observable} from 'rxjs';\nimport {filter} from 'rxjs/operators';\n\nimport {TuiStepperComponent} from '../stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n templateUrl: './step.template.html',\n styleUrls: ['./step.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, TuiRouterLinkActiveService, TuiFocusVisibleService],\n host: {\n type: 'button',\n },\n})\nexport class TuiStepComponent {\n @Input()\n @HostBinding('attr.data-state')\n @tuiDefaultProp()\n state: 'normal' | 'pass' | 'error' = 'normal';\n\n @Input()\n @tuiDefaultProp()\n icon = '';\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n constructor(\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiRouterLinkActiveService) routerLinkActive$: Observable<boolean>,\n @Inject(TuiStepperComponent) private readonly stepper: TuiStepperComponent,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n routerLinkActive$.pipe(filter(identity)).subscribe(() => {\n this.activate();\n });\n\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n @HostBinding('class._active')\n get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n @HostBinding('class._vertical')\n get isVertical(): boolean {\n return this.stepper.orientation === 'vertical';\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.isActive ? 0 : -1;\n }\n\n get index(): number {\n return this.stepper.indexOf(this.elementRef.nativeElement);\n }\n\n @HostListener('click')\n activate() {\n this.stepper.activate(this.index);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiStepComponent} from './step/step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiStepperComponent, TuiStepComponent],\n exports: [TuiStepperComponent, TuiStepComponent],\n})\nexport class TuiStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAiCa,mBAAmB,GAAhC,MAAa,mBAAmB;IAAhC;QAEqB,UAAK,GAAuC,WAAW,CAAC;QAKzE,gBAAW,GAAoB,YAAY,CAAC;QAI5C,oBAAe,GAAG,CAAC,CAAC;QAGX,0BAAqB,GAAG,IAAI,YAAY,EAAU,CAAC;KAyD/D;IAtDG,IAAI,QAAQ;;;QAGR,OAAO,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9D;IAID,YAAY,CAAC,KAAY,EAAE,IAAY;QACnC,IAAI,IAAI,CAAC,WAAW,KAAK,YAAY,IAAI,CAAC,K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AC,CAAA;IAClC,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;IAC3B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GAjBd,gBAAgB,CAmD5B;;IClEY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAL5B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;QACrD,OAAO,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;KACnD,CAAC;GACW,gBAAgB,CAAG;;ACZhC;;;;;;"}
@@ -1,13 +1,13 @@
1
1
  import { __decorate, __param } from 'tslib';
2
2
  import { TemplateRef, Inject, Directive, InjectionToken, ElementRef, Optional, HostBinding, Component, ChangeDetectionStrategy, EventEmitter, Renderer2, ChangeDetectorRef, ContentChildren, forwardRef, Input, Output, HostListener, ViewChild, NgZone, NgModule } from '@angular/core';
3
3
  import { RouterLinkActive } from '@angular/router';
4
- import { TuiDestroyService, TuiFocusVisibleService, typedFromEvent, tuiCustomEvent, isNativeFocused, setNativeFocused, TUI_IS_IOS, TUI_IS_ANDROID, EMPTY_QUERY, itemsQueryListObservable, moveFocus, TuiResizeService, tuiDefaultProp, tuiPure, getClosestFocusable, toInt, tuiZonefree, px, TuiFocusableModule } from '@taiga-ui/cdk';
4
+ import { TuiDestroyService, TuiFocusVisibleService, typedFromEvent, tuiCustomEvent, isNativeFocused, setNativeFocused, TUI_IS_IOS, TUI_IS_ANDROID, EMPTY_QUERY, moveFocus, TuiResizeService, tuiDefaultProp, getClosestFocusable, toInt, tuiZonefree, px, TuiFocusableModule } from '@taiga-ui/cdk';
5
5
  import { TuiRouterLinkActiveService, MODE_PROVIDER, TUI_MODE, TuiHostedDropdownModule, TuiSvgModule } from '@taiga-ui/core';
6
- import { TUI_MOBILE_AWARE, TUI_MORE_WORD } from '@taiga-ui/kit/tokens';
6
+ import { TUI_TAB_MARGIN, TUI_MOBILE_AWARE, TUI_MORE_WORD } from '@taiga-ui/kit/tokens';
7
7
  import { EMPTY, merge, identity, Observable, ReplaySubject, of } from 'rxjs';
8
8
  import { DOCUMENT, CommonModule } from '@angular/common';
9
9
  import { MutationObserverService, MUTATION_OBSERVER_INIT } from '@ng-web-apis/mutation-observer';
10
- import { filter, map, mapTo, tap, debounceTime, startWith, takeUntil, switchMap, share } from 'rxjs/operators';
10
+ import { filter, map, tap, debounceTime, startWith, takeUntil, switchMap, mapTo, share } from 'rxjs/operators';
11
11
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
12
12
  import { ANIMATION_FRAME } from '@ng-web-apis/common';
13
13
  import { asCallable } from '@tinkoff/ng-event-plugins';
@@ -54,11 +54,12 @@ function tabActiveFactory({ nativeElement }, documentRef, routerLinkActiveServic
54
54
  }
55
55
 
56
56
  let TuiTabComponent = class TuiTabComponent {
57
- constructor(routerLinkActive, elementRef, mode$, event$, mobileAware, isIos, isAndroid, focusVisible$) {
57
+ constructor(routerLinkActive, elementRef, mode$, event$, margin, mobileAware, isIos, isAndroid, focusVisible$) {
58
58
  this.routerLinkActive = routerLinkActive;
59
59
  this.elementRef = elementRef;
60
60
  this.mode$ = mode$;
61
61
  this.event$ = event$;
62
+ this.margin = margin;
62
63
  this.focusVisible = false;
63
64
  this.isIos = mobileAware && isIos;
64
65
  this.isAndroid = mobileAware && isAndroid;
@@ -80,6 +81,7 @@ TuiTabComponent.ctorParameters = () => [
80
81
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
81
82
  { type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
82
83
  { type: Observable, decorators: [{ type: Inject, args: [TUI_TAB_EVENT,] }] },
84
+ { type: Number, decorators: [{ type: Inject, args: [TUI_TAB_MARGIN,] }] },
83
85
  { type: Boolean, decorators: [{ type: Inject, args: [TUI_MOBILE_AWARE,] }] },
84
86
  { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
85
87
  { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_ANDROID,] }] },
@@ -100,29 +102,29 @@ __decorate([
100
102
  TuiTabComponent = __decorate([
101
103
  Component({
102
104
  selector: `a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]`,
103
- template: "<ng-container *ngIf=\"event$ | async\"></ng-container>\n<span class=\"highlight\"><ng-content></ng-content></span>\n",
105
+ template: "<ng-container *ngIf=\"event$ | async\"></ng-container>\n<span class=\"t-highlight\"><ng-content></ng-content></span>\n",
104
106
  changeDetection: ChangeDetectionStrategy.OnPush,
105
107
  providers: TUI_TAB_PROVIDERS,
106
108
  host: {
107
109
  '($.data-mode.attr)': 'mode$',
110
+ '[style.--tui-tab-margin.px]': 'margin',
108
111
  type: 'button',
109
112
  },
110
- styles: [":host-context(._underline):hover{box-shadow:inset 0 -2px var(--tui-base-03)}:host{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;position:relative;display:flex;flex-shrink:0;height:100%;box-sizing:border-box;justify-content:space-between;align-items:center;white-space:nowrap;cursor:pointer;outline:0;text-decoration:none;color:inherit;transition-property:color,box-shadow,opacity}:host:not(:last-child){margin-right:1.5rem}:host:hover{color:var(--tui-text-01)}:host:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host:not([data-mode])._active{opacity:1;color:var(--tui-text-01);box-shadow:none}:host[data-mode=onDark]{color:rgba(255,255,255,.72)}:host[data-mode=onDark]._active,:host[data-mode=onDark]:hover{color:#fff}:host[data-mode=onDark]._focus-visible .highlight{background:var(--tui-clear-inverse);color:var(--tui-text-01)}:host[data-mode=onLight]{color:var(--tui-text-02)}:host[data-mode=onLight]._active,:host[data-mode=onLight]:hover{color:var(--tui-text-01)}:host[data-mode=onLight]._focus-visible .highlight{background:var(--tui-text-01);color:#fff}:host._focus-visible .highlight{background:var(--tui-selection)}:host._android{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;height:3rem;flex:1;flex-shrink:0;justify-content:center;margin:0;text-transform:uppercase;color:var(--tui-base-09);opacity:.5;font-size:.875rem;font-weight:500;letter-spacing:-.008125rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}:host._android:hover{box-shadow:none}:host._android._active{opacity:1;color:var(--tui-base-09)}:host._android .highlight{width:auto}:host._ios{height:1.75rem;flex:1;flex-shrink:0;justify-content:center;margin:0;color:var(--tui-base-01);opacity:1;font-size:.8125rem;font-weight:500;letter-spacing:-.005rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}:host._ios:hover{box-shadow:none}:host._ios._active{font-size:.875rem;font-weight:600;color:var(--tui-link)}:host._ios .highlight{width:auto}.highlight{display:inline-flex;width:100%;align-items:center;justify-content:inherit}.highlight ::ng-deep>*{flex-shrink:0}"]
113
+ styles: [":host-context(._underline):hover{box-shadow:inset 0 -2px var(--tui-base-03)}:host{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;position:relative;display:flex;flex-shrink:0;height:100%;box-sizing:border-box;justify-content:space-between;align-items:center;white-space:nowrap;cursor:pointer;outline:0;text-decoration:none;color:inherit;transition-property:color,box-shadow,opacity;margin-right:var(--tui-tab-margin,1.5rem)}:host:hover{color:var(--tui-text-01)}:host:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host:not([data-mode])._active{opacity:1;color:var(--tui-text-01);box-shadow:none}:host[data-mode=onDark]{color:rgba(255,255,255,.72)}:host[data-mode=onDark]._active,:host[data-mode=onDark]:hover{color:#fff}:host[data-mode=onDark]._focus-visible .t-highlight{background:var(--tui-clear-inverse);color:var(--tui-text-01)}:host[data-mode=onLight]{color:var(--tui-text-02)}:host[data-mode=onLight]._active,:host[data-mode=onLight]:hover{color:var(--tui-text-01)}:host[data-mode=onLight]._focus-visible .t-highlight{background:var(--tui-text-01);color:#fff}:host._focus-visible .t-highlight{background:var(--tui-selection)}:host._android{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;height:3rem;flex:1;flex-shrink:0;justify-content:center;margin:0;text-transform:uppercase;color:var(--tui-base-09);opacity:.5;font-size:.875rem;font-weight:500;letter-spacing:-.008125rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}:host._android:hover{box-shadow:none}:host._android._active{opacity:1;color:var(--tui-base-09)}:host._android .t-highlight{width:auto}:host._ios{height:1.75rem;flex:1;flex-shrink:0;justify-content:center;margin:0;color:var(--tui-base-01);opacity:1;font-size:.8125rem;font-weight:500;letter-spacing:-.005rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}:host._ios:hover{box-shadow:none}:host._ios._active{font-size:.875rem;font-weight:600;color:var(--tui-link)}:host._ios .t-highlight{width:auto}.t-highlight{display:inline-flex;width:100%;align-items:center;justify-content:inherit}.t-highlight ::ng-deep>*{flex-shrink:0}"]
111
114
  }),
112
115
  __param(0, Optional()),
113
116
  __param(0, Inject(RouterLinkActive)),
114
117
  __param(1, Inject(ElementRef)),
115
118
  __param(2, Inject(TUI_MODE)),
116
119
  __param(3, Inject(TUI_TAB_EVENT)),
117
- __param(4, Inject(TUI_MOBILE_AWARE)),
118
- __param(5, Inject(TUI_IS_IOS)),
119
- __param(6, Inject(TUI_IS_ANDROID)),
120
- __param(7, Inject(TuiFocusVisibleService))
120
+ __param(4, Inject(TUI_TAB_MARGIN)),
121
+ __param(5, Inject(TUI_MOBILE_AWARE)),
122
+ __param(6, Inject(TUI_IS_IOS)),
123
+ __param(7, Inject(TUI_IS_ANDROID)),
124
+ __param(8, Inject(TuiFocusVisibleService))
121
125
  ], TuiTabComponent);
122
126
 
123
127
  const TAB_ACTIVE_CLASS = '_active';
124
- const TAB_MARGIN = 24;
125
-
126
128
  // TODO: remove in ivy compilation
127
129
  const OBSERVER_INIT = {
128
130
  childList: true,
@@ -146,9 +148,6 @@ let TuiTabsComponent = class TuiTabsComponent {
146
148
  this.activeItemIndex = index;
147
149
  this.scrollTo(this.tabs[index]);
148
150
  }
149
- get refresh$() {
150
- return itemsQueryListObservable(this.children).pipe(mapTo(true));
151
- }
152
151
  get tabs() {
153
152
  return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiTab]'));
154
153
  }
@@ -223,9 +222,6 @@ __decorate([
223
222
  __decorate([
224
223
  HostBinding('class._android')
225
224
  ], TuiTabsComponent.prototype, "isAndroid", void 0);
226
- __decorate([
227
- tuiPure
228
- ], TuiTabsComponent.prototype, "refresh$", null);
229
225
  __decorate([
230
226
  HostListener(`${TUI_TAB_ACTIVATE}.stop`, ['$event.target'])
231
227
  ], TuiTabsComponent.prototype, "onActivate", null);
@@ -236,7 +232,7 @@ __decorate([
236
232
  TuiTabsComponent = __decorate([
237
233
  Component({
238
234
  selector: 'tui-tabs, nav[tuiTabs]',
239
- template: "<tui-underline\n *ngIf=\"underline && (refresh$ | async)\"\n [element]=\"activeElement\"\n></tui-underline>\n<ng-content></ng-content>\n",
235
+ template: "<ng-container *ngIf=\"children.changes | async\"></ng-container>\n<tui-underline\n *ngIf=\"underline\"\n [element]=\"activeElement\"\n></tui-underline>\n<ng-content></ng-content>\n",
240
236
  changeDetection: ChangeDetectionStrategy.OnPush,
241
237
  providers: [
242
238
  TuiDestroyService,
@@ -293,13 +289,15 @@ const TABS_PROVIDERS = [
293
289
 
294
290
  // @dynamic
295
291
  let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
296
- constructor(refresh$, elementRef, changeDetectorRef, moreWord$) {
292
+ constructor(margin, refresh$, elementRef, changeDetectorRef, moreWord$) {
293
+ this.margin = margin;
297
294
  this.refresh$ = refresh$;
298
295
  this.elementRef = elementRef;
299
296
  this.changeDetectorRef = changeDetectorRef;
300
297
  this.moreWord$ = moreWord$;
301
298
  this.maxIndex = Infinity;
302
299
  this.moreContent = '';
300
+ this.dropdownContent = '';
303
301
  this.underline = true;
304
302
  this.activeItemIndex = 0;
305
303
  this.itemsLimit = Infinity;
@@ -307,6 +305,7 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
307
305
  this.items = EMPTY_QUERY;
308
306
  this.open = false;
309
307
  }
308
+ // TODO: Improve performance
310
309
  get tabs() {
311
310
  return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiTab]'));
312
311
  }
@@ -370,7 +369,7 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
370
369
  }
371
370
  }
372
371
  getMaxIndex() {
373
- const { tabs, activeItemIndex } = this;
372
+ const { tabs, activeItemIndex, margin } = this;
374
373
  if (tabs.length < 2) {
375
374
  return 0;
376
375
  }
@@ -378,18 +377,18 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
378
377
  const activeWidth = tabs[activeItemIndex] ? tabs[activeItemIndex].scrollWidth : 0;
379
378
  const moreWidth = tabs[tabs.length - 1].scrollWidth;
380
379
  let maxIndex = tabs.length - 2;
381
- let total = tabs.reduce((acc, tab) => acc + tab.scrollWidth, 0) +
382
- maxIndex * TAB_MARGIN -
380
+ let total = tabs.reduce((acc, { scrollWidth }) => acc + scrollWidth, 0) +
381
+ maxIndex * margin -
383
382
  moreWidth;
384
383
  if (total <= clientWidth) {
385
384
  return Infinity;
386
385
  }
387
386
  while (maxIndex) {
388
- total -= tabs[maxIndex].scrollWidth + TAB_MARGIN;
387
+ total -= tabs[maxIndex].scrollWidth + margin;
389
388
  maxIndex--;
390
389
  const activeDisplaced = activeItemIndex > maxIndex;
391
- const activeOffset = activeDisplaced ? activeWidth + TAB_MARGIN : 0;
392
- const currentWidth = total + activeOffset + moreWidth + TAB_MARGIN;
390
+ const activeOffset = activeDisplaced ? activeWidth + margin : 0;
391
+ const currentWidth = total + activeOffset + moreWidth + margin;
393
392
  // Needed for different rounding of visible and hidden elements scrollWidth
394
393
  const safetyOffset = toInt(this.maxIndex === maxIndex - 1);
395
394
  if (currentWidth + safetyOffset < clientWidth) {
@@ -408,6 +407,7 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
408
407
  }
409
408
  };
410
409
  TuiTabsWithMoreComponent.ctorParameters = () => [
410
+ { type: Number, decorators: [{ type: Inject, args: [TUI_TAB_MARGIN,] }] },
411
411
  { type: Observable, decorators: [{ type: Inject, args: [TABS_REFRESH,] }] },
412
412
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
413
413
  { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
@@ -420,6 +420,10 @@ __decorate([
420
420
  Input(),
421
421
  tuiDefaultProp()
422
422
  ], TuiTabsWithMoreComponent.prototype, "moreContent", void 0);
423
+ __decorate([
424
+ Input(),
425
+ tuiDefaultProp()
426
+ ], TuiTabsWithMoreComponent.prototype, "dropdownContent", void 0);
423
427
  __decorate([
424
428
  Input(),
425
429
  HostBinding('class._underline'),
@@ -442,15 +446,16 @@ __decorate([
442
446
  TuiTabsWithMoreComponent = __decorate([
443
447
  Component({
444
448
  selector: 'tui-tabs-with-more, nav[tuiTabsWithMore]',
445
- template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div class=\"wrapper\">\n <tui-tabs\n class=\"tabs\"\n [underline]=\"false\"\n [activeItemIndex]=\"activeItemIndex\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n (keydown.arrowRight)=\"onArrowRight($event.target)\"\n >\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"index <= lastVisibleIndex; else hidden\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n <ng-template #hidden>\n <div\n class=\"overflown\"\n [class.overflown_hidden]=\"index !== activeItemIndex\"\n >\n <ng-container *ngTemplateOutlet=\"item\"></ng-container>\n </div>\n </ng-template>\n </ng-container>\n </tui-tabs>\n <tui-hosted-dropdown\n class=\"more_wrapper\"\n [class.overflown_hidden]=\"!isMoreVisible\"\n [content]=\"dropdown\"\n [(open)]=\"open\"\n >\n <button\n tuiTab\n class=\"more\"\n [class._active]=\"open\"\n [tuiFocusable]=\"isMoreFocusable\"\n (keydown.arrowLeft.prevent)=\"onArrowLeft()\"\n >\n <span polymorpheus-outlet [content]=\"moreContent || more\"></span>\n </button>\n <ng-template #more>\n {{ moreWord$ | async }}\n <tui-svg\n src=\"tuiIconChevronDown\"\n class=\"icon\"\n [class.icon_rotated]=\"open\"\n ></tui-svg>\n </ng-template>\n </tui-hosted-dropdown>\n <ng-template #dropdown>\n <div\n #element\n class=\"dropdown\"\n (keydown.arrowUp.prevent)=\"onWrapperArrow($event.target, element, true)\"\n (keydown.arrowDown.prevent)=\"onWrapperArrow($event.target, element, false)\"\n >\n <div\n *ngFor=\"let item of items; let index = index\"\n (tui-tab-activate)=\"onClick(index)\"\n >\n <ng-container\n *ngIf=\"index > lastVisibleIndex && index !== activeItemIndex\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </div>\n </div>\n </ng-template>\n <tui-underline *ngIf=\"underline\" [element]=\"activeElement\"></tui-underline>\n</div>\n",
449
+ template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div class=\"t-wrapper\">\n <tui-tabs\n class=\"t-tabs\"\n [underline]=\"false\"\n [activeItemIndex]=\"activeItemIndex\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n (keydown.arrowRight)=\"onArrowRight($event.target)\"\n >\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"index <= lastVisibleIndex; else hidden\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n <ng-template #hidden>\n <div [class.t-overflown]=\"index !== activeItemIndex\">\n <ng-container *ngTemplateOutlet=\"item\"></ng-container>\n </div>\n </ng-template>\n </ng-container>\n </tui-tabs>\n <tui-hosted-dropdown\n class=\"t-more_wrapper\"\n [class.t-overflown]=\"!isMoreVisible\"\n [content]=\"dropdownContent || dropdown\"\n [(open)]=\"open\"\n >\n <button\n tuiTab\n class=\"t-more\"\n [class._active]=\"open\"\n [tuiFocusable]=\"isMoreFocusable\"\n (keydown.arrowLeft.prevent)=\"onArrowLeft()\"\n >\n <span\n polymorpheus-outlet\n [content]=\"moreContent || more\"\n ></span>\n </button>\n <ng-template #more>\n {{ moreWord$ | async }}\n <tui-svg\n src=\"tuiIconChevronDown\"\n class=\"t-icon\"\n [class.t-icon_rotated]=\"open\"\n ></tui-svg>\n </ng-template>\n </tui-hosted-dropdown>\n <ng-template #dropdown>\n <div\n #element\n class=\"t-dropdown\"\n (keydown.arrowUp.prevent)=\"onWrapperArrow($event.target, element, true)\"\n (keydown.arrowDown.prevent)=\"onWrapperArrow($event.target, element, false)\"\n >\n <div\n *ngFor=\"let item of items; let index = index\"\n (tui-tab-activate)=\"onClick(index)\"\n >\n <ng-container\n *ngIf=\"index > lastVisibleIndex && index !== activeItemIndex\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </div>\n </div>\n </ng-template>\n <tui-underline\n *ngIf=\"underline\"\n [element]=\"activeElement\"\n ></tui-underline>\n</div>\n",
446
450
  changeDetection: ChangeDetectionStrategy.OnPush,
447
451
  providers: TABS_PROVIDERS,
448
- styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);height:var(--tui-height-l);box-sizing:border-box;color:var(--tui-text-02);box-shadow:inset 0 -1px var(--tui-base-03);overflow:hidden}.wrapper{position:relative;display:flex}.tabs{height:inherit;font-size:inherit;font-weight:inherit;overflow:visible;box-shadow:none;color:inherit}.overflown{margin-right:1.5rem}.overflown_hidden{margin:0;width:0;max-width:0;overflow:hidden;visibility:hidden}.more_wrapper{height:100%}.icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-right:-.25rem;vertical-align:bottom}.icon_rotated{transform:rotate(180deg)}.dropdown{padding:.5rem 0}.dropdown ::ng-deep [tuiTab]{width:100%;height:2.75rem;justify-content:flex-start;margin:0;padding:0 1rem;color:var(--tui-text-02)}.dropdown ::ng-deep [tuiTab]:before{display:none}.dropdown ::ng-deep [tuiTab]._active,.dropdown ::ng-deep [tuiTab]:focus,.dropdown ::ng-deep [tuiTab]:hover{box-shadow:none;color:var(--tui-base-08);background:var(--tui-base-02)}"]
452
+ styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);height:var(--tui-height-l);box-sizing:border-box;color:var(--tui-text-02);box-shadow:inset 0 -1px var(--tui-base-03);overflow:hidden}.t-wrapper{position:relative;display:flex}.t-tabs{height:inherit;font-size:inherit;font-weight:inherit;overflow:visible;box-shadow:none;color:inherit}.t-overflown{display:flex;margin:0;width:0;max-width:0;overflow:hidden;visibility:hidden}.t-more_wrapper{height:100%}.t-more{margin:0}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-right:-.25rem;vertical-align:bottom}.t-icon_rotated{transform:rotate(180deg)}.t-dropdown{padding:.5rem 0}.t-dropdown ::ng-deep [tuiTab]{width:100%;height:2.75rem;justify-content:flex-start;margin:0;padding:0 1rem;color:var(--tui-text-02)}.t-dropdown ::ng-deep [tuiTab]:before{display:none}.t-dropdown ::ng-deep [tuiTab]._active,.t-dropdown ::ng-deep [tuiTab]:focus,.t-dropdown ::ng-deep [tuiTab]:hover{box-shadow:none;color:var(--tui-base-08);background:var(--tui-base-02)}"]
449
453
  }),
450
- __param(0, Inject(TABS_REFRESH)),
451
- __param(1, Inject(ElementRef)),
452
- __param(2, Inject(ChangeDetectorRef)),
453
- __param(3, Inject(TUI_MORE_WORD))
454
+ __param(0, Inject(TUI_TAB_MARGIN)),
455
+ __param(1, Inject(TABS_REFRESH)),
456
+ __param(2, Inject(ElementRef)),
457
+ __param(3, Inject(ChangeDetectorRef)),
458
+ __param(4, Inject(TUI_MORE_WORD))
454
459
  ], TuiTabsWithMoreComponent);
455
460
 
456
461
  let TuiUnderlineComponent = class TuiUnderlineComponent {
@@ -469,7 +474,7 @@ let TuiUnderlineComponent = class TuiUnderlineComponent {
469
474
  this.isAndroid = this.mobileAware && this.android;
470
475
  this.transition$ = asCallable(this.element$.pipe(map(element => element && 'all'), debounceTime(50)));
471
476
  this.transform$ = asCallable(this.refresh$.pipe(map(element => element ? `translate3d(${px(element.offsetLeft)}, 0, 0)` : null)));
472
- this.width$ = asCallable(this.refresh$.pipe(map(element => (element ? element.clientWidth : 0))));
477
+ this.width$ = asCallable(this.refresh$.pipe(map(element => (element === null || element === void 0 ? void 0 : element.clientWidth) || 0)));
473
478
  nativeElement['$.style.transitionProperty'] = this.transition$;
474
479
  nativeElement['$.style.transform'] = this.transform$;
475
480
  nativeElement['$.style.width.px'] = this.width$;
@@ -557,5 +562,5 @@ TuiTabsModule = __decorate([
557
562
  * Generated bundle index. Do not edit.
558
563
  */
559
564
 
560
- export { MUTATION_CONFIG, OBSERVER_INIT, TABS_PROVIDERS, TABS_REFRESH, TAB_ACTIVE_CLASS, TAB_MARGIN, TUI_TAB_ACTIVATE, TUI_TAB_EVENT, TUI_TAB_PROVIDERS, TuiTabComponent, TuiTabDirective, TuiTabsComponent, TuiTabsModule, TuiTabsWithMoreComponent, TuiUnderlineComponent, tabActiveFactory, tabsRefreshFactory };
565
+ export { MUTATION_CONFIG, OBSERVER_INIT, TABS_PROVIDERS, TABS_REFRESH, TUI_TAB_ACTIVATE, TUI_TAB_EVENT, TUI_TAB_PROVIDERS, TuiTabComponent, TuiTabDirective, TuiTabsComponent, TuiTabsModule, TuiTabsWithMoreComponent, TuiUnderlineComponent, tabActiveFactory, tabsRefreshFactory };
561
566
  //# sourceMappingURL=taiga-ui-kit-components-tabs.js.map