@angular/material 15.0.0-rc.0 → 15.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/chips/_chips-theme.scss +11 -19
  2. package/esm2020/autocomplete/autocomplete-origin.mjs +6 -6
  3. package/esm2020/autocomplete/autocomplete-trigger.mjs +6 -6
  4. package/esm2020/autocomplete/autocomplete.mjs +6 -6
  5. package/esm2020/autocomplete/module.mjs +4 -4
  6. package/esm2020/badge/badge-module.mjs +4 -4
  7. package/esm2020/badge/badge.mjs +3 -3
  8. package/esm2020/bottom-sheet/bottom-sheet-container.mjs +3 -3
  9. package/esm2020/bottom-sheet/bottom-sheet-module.mjs +4 -4
  10. package/esm2020/bottom-sheet/bottom-sheet.mjs +3 -3
  11. package/esm2020/button/button-base.mjs +6 -6
  12. package/esm2020/button/button.mjs +8 -8
  13. package/esm2020/button/fab.mjs +16 -16
  14. package/esm2020/button/icon-button.mjs +6 -6
  15. package/esm2020/button/module.mjs +4 -4
  16. package/esm2020/button-toggle/button-toggle-module.mjs +4 -4
  17. package/esm2020/button-toggle/button-toggle.mjs +6 -6
  18. package/esm2020/card/card.mjs +42 -42
  19. package/esm2020/card/module.mjs +4 -4
  20. package/esm2020/checkbox/checkbox-required-validator.mjs +3 -3
  21. package/esm2020/checkbox/checkbox.mjs +6 -6
  22. package/esm2020/checkbox/module.mjs +8 -8
  23. package/esm2020/chips/chip-action.mjs +3 -3
  24. package/esm2020/chips/chip-edit-input.mjs +3 -3
  25. package/esm2020/chips/chip-grid.mjs +3 -3
  26. package/esm2020/chips/chip-icons.mjs +9 -9
  27. package/esm2020/chips/chip-input.mjs +3 -3
  28. package/esm2020/chips/chip-listbox.mjs +3 -3
  29. package/esm2020/chips/chip-option.mjs +5 -5
  30. package/esm2020/chips/chip-row.mjs +5 -5
  31. package/esm2020/chips/chip-set.mjs +3 -3
  32. package/esm2020/chips/chip.mjs +4 -4
  33. package/esm2020/chips/module.mjs +4 -4
  34. package/esm2020/core/common-behaviors/common-module.mjs +4 -4
  35. package/esm2020/core/datetime/index.mjs +8 -8
  36. package/esm2020/core/datetime/native-date-adapter.mjs +3 -3
  37. package/esm2020/core/error/error-options.mjs +6 -6
  38. package/esm2020/core/line/line.mjs +7 -7
  39. package/esm2020/core/option/index.mjs +4 -4
  40. package/esm2020/core/option/optgroup.mjs +6 -6
  41. package/esm2020/core/option/option.mjs +6 -6
  42. package/esm2020/core/ripple/index.mjs +4 -4
  43. package/esm2020/core/ripple/ripple.mjs +3 -3
  44. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
  45. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  46. package/esm2020/core/version.mjs +1 -1
  47. package/esm2020/datepicker/calendar-body.mjs +3 -3
  48. package/esm2020/datepicker/calendar.mjs +6 -6
  49. package/esm2020/datepicker/date-range-input-parts.mjs +12 -12
  50. package/esm2020/datepicker/date-range-input.mjs +3 -3
  51. package/esm2020/datepicker/date-range-picker.mjs +3 -3
  52. package/esm2020/datepicker/date-range-selection-strategy.mjs +3 -3
  53. package/esm2020/datepicker/date-selection-model.mjs +9 -9
  54. package/esm2020/datepicker/datepicker-actions.mjs +9 -9
  55. package/esm2020/datepicker/datepicker-base.mjs +6 -6
  56. package/esm2020/datepicker/datepicker-input-base.mjs +3 -3
  57. package/esm2020/datepicker/datepicker-input.mjs +3 -3
  58. package/esm2020/datepicker/datepicker-intl.mjs +3 -3
  59. package/esm2020/datepicker/datepicker-module.mjs +4 -4
  60. package/esm2020/datepicker/datepicker-toggle.mjs +6 -6
  61. package/esm2020/datepicker/datepicker.mjs +3 -3
  62. package/esm2020/datepicker/month-view.mjs +3 -3
  63. package/esm2020/datepicker/multi-year-view.mjs +3 -3
  64. package/esm2020/datepicker/year-view.mjs +3 -3
  65. package/esm2020/dialog/dialog-container.mjs +7 -7
  66. package/esm2020/dialog/dialog-content-directives.mjs +12 -12
  67. package/esm2020/dialog/dialog.mjs +6 -6
  68. package/esm2020/dialog/module.mjs +4 -4
  69. package/esm2020/divider/divider-module.mjs +4 -4
  70. package/esm2020/divider/divider.mjs +3 -3
  71. package/esm2020/expansion/accordion.mjs +3 -3
  72. package/esm2020/expansion/expansion-module.mjs +4 -4
  73. package/esm2020/expansion/expansion-panel-content.mjs +3 -3
  74. package/esm2020/expansion/expansion-panel-header.mjs +9 -9
  75. package/esm2020/expansion/expansion-panel.mjs +6 -6
  76. package/esm2020/form-field/directives/error.mjs +3 -3
  77. package/esm2020/form-field/directives/floating-label.mjs +3 -3
  78. package/esm2020/form-field/directives/hint.mjs +3 -3
  79. package/esm2020/form-field/directives/label.mjs +3 -3
  80. package/esm2020/form-field/directives/line-ripple.mjs +3 -3
  81. package/esm2020/form-field/directives/notched-outline.mjs +3 -3
  82. package/esm2020/form-field/directives/prefix.mjs +3 -3
  83. package/esm2020/form-field/directives/suffix.mjs +3 -3
  84. package/esm2020/form-field/form-field-control.mjs +3 -3
  85. package/esm2020/form-field/form-field.mjs +3 -3
  86. package/esm2020/form-field/module.mjs +4 -4
  87. package/esm2020/grid-list/grid-list-module.mjs +4 -4
  88. package/esm2020/grid-list/grid-list.mjs +3 -3
  89. package/esm2020/grid-list/grid-tile.mjs +15 -15
  90. package/esm2020/icon/icon-module.mjs +4 -4
  91. package/esm2020/icon/icon-registry.mjs +3 -3
  92. package/esm2020/icon/icon.mjs +3 -3
  93. package/esm2020/icon/testing/fake-icon-registry.mjs +7 -7
  94. package/esm2020/input/input.mjs +3 -3
  95. package/esm2020/input/module.mjs +4 -4
  96. package/esm2020/legacy-autocomplete/autocomplete-module.mjs +4 -4
  97. package/esm2020/legacy-autocomplete/autocomplete-origin.mjs +3 -3
  98. package/esm2020/legacy-autocomplete/autocomplete-trigger.mjs +3 -3
  99. package/esm2020/legacy-autocomplete/autocomplete.mjs +3 -3
  100. package/esm2020/legacy-button/button-module.mjs +4 -4
  101. package/esm2020/legacy-button/button.mjs +6 -6
  102. package/esm2020/legacy-card/card-module.mjs +4 -4
  103. package/esm2020/legacy-card/card.mjs +42 -42
  104. package/esm2020/legacy-checkbox/checkbox-module.mjs +4 -4
  105. package/esm2020/legacy-checkbox/checkbox.mjs +3 -3
  106. package/esm2020/legacy-chips/chip-input.mjs +3 -3
  107. package/esm2020/legacy-chips/chip-list.mjs +3 -3
  108. package/esm2020/legacy-chips/chip.mjs +12 -12
  109. package/esm2020/legacy-chips/chips-module.mjs +4 -4
  110. package/esm2020/legacy-core/option/index.mjs +4 -4
  111. package/esm2020/legacy-core/option/optgroup.mjs +3 -3
  112. package/esm2020/legacy-core/option/option.mjs +3 -3
  113. package/esm2020/legacy-dialog/dialog-container.mjs +3 -3
  114. package/esm2020/legacy-dialog/dialog-content-directives.mjs +12 -12
  115. package/esm2020/legacy-dialog/dialog-module.mjs +4 -4
  116. package/esm2020/legacy-dialog/dialog.mjs +3 -3
  117. package/esm2020/legacy-form-field/error.mjs +3 -3
  118. package/esm2020/legacy-form-field/form-field-module.mjs +4 -4
  119. package/esm2020/legacy-form-field/form-field.mjs +3 -3
  120. package/esm2020/legacy-form-field/hint.mjs +3 -3
  121. package/esm2020/legacy-form-field/label.mjs +3 -3
  122. package/esm2020/legacy-form-field/placeholder.mjs +3 -3
  123. package/esm2020/legacy-form-field/prefix.mjs +3 -3
  124. package/esm2020/legacy-form-field/suffix.mjs +3 -3
  125. package/esm2020/legacy-input/input-module.mjs +4 -4
  126. package/esm2020/legacy-input/input.mjs +3 -3
  127. package/esm2020/legacy-list/list-module.mjs +4 -4
  128. package/esm2020/legacy-list/list.mjs +18 -18
  129. package/esm2020/legacy-list/selection-list.mjs +6 -6
  130. package/esm2020/legacy-menu/menu-content.mjs +3 -3
  131. package/esm2020/legacy-menu/menu-item.mjs +3 -3
  132. package/esm2020/legacy-menu/menu-module.mjs +4 -4
  133. package/esm2020/legacy-menu/menu-trigger.mjs +3 -3
  134. package/esm2020/legacy-menu/menu.mjs +3 -3
  135. package/esm2020/legacy-paginator/paginator-module.mjs +4 -4
  136. package/esm2020/legacy-paginator/paginator.mjs +3 -3
  137. package/esm2020/legacy-progress-bar/progress-bar-module.mjs +4 -4
  138. package/esm2020/legacy-progress-bar/progress-bar.mjs +3 -3
  139. package/esm2020/legacy-progress-spinner/progress-spinner-module.mjs +4 -4
  140. package/esm2020/legacy-progress-spinner/progress-spinner.mjs +3 -3
  141. package/esm2020/legacy-radio/radio-module.mjs +4 -4
  142. package/esm2020/legacy-radio/radio.mjs +6 -6
  143. package/esm2020/legacy-select/select-module.mjs +4 -4
  144. package/esm2020/legacy-select/select.mjs +6 -6
  145. package/esm2020/legacy-slide-toggle/slide-toggle-module.mjs +4 -4
  146. package/esm2020/legacy-slide-toggle/slide-toggle.mjs +3 -3
  147. package/esm2020/legacy-slider/slider-module.mjs +4 -4
  148. package/esm2020/legacy-slider/slider.mjs +3 -3
  149. package/esm2020/legacy-snack-bar/simple-snack-bar.mjs +3 -3
  150. package/esm2020/legacy-snack-bar/snack-bar-container.mjs +3 -3
  151. package/esm2020/legacy-snack-bar/snack-bar-module.mjs +4 -4
  152. package/esm2020/legacy-snack-bar/snack-bar.mjs +3 -3
  153. package/esm2020/legacy-table/cell.mjs +21 -21
  154. package/esm2020/legacy-table/row.mjs +21 -21
  155. package/esm2020/legacy-table/table-module.mjs +4 -4
  156. package/esm2020/legacy-table/table.mjs +6 -6
  157. package/esm2020/legacy-table/text-column.mjs +3 -3
  158. package/esm2020/legacy-tabs/ink-bar.mjs +3 -3
  159. package/esm2020/legacy-tabs/tab-body.mjs +6 -6
  160. package/esm2020/legacy-tabs/tab-content.mjs +3 -3
  161. package/esm2020/legacy-tabs/tab-group.mjs +3 -3
  162. package/esm2020/legacy-tabs/tab-header.mjs +3 -3
  163. package/esm2020/legacy-tabs/tab-label-wrapper.mjs +3 -3
  164. package/esm2020/legacy-tabs/tab-label.mjs +3 -3
  165. package/esm2020/legacy-tabs/tab-nav-bar/tab-nav-bar.mjs +9 -9
  166. package/esm2020/legacy-tabs/tab.mjs +3 -3
  167. package/esm2020/legacy-tabs/tabs-module.mjs +4 -4
  168. package/esm2020/legacy-tooltip/tooltip-module.mjs +4 -4
  169. package/esm2020/legacy-tooltip/tooltip.mjs +6 -6
  170. package/esm2020/list/action-list.mjs +3 -3
  171. package/esm2020/list/list-base.mjs +6 -6
  172. package/esm2020/list/list-item-sections.mjs +18 -18
  173. package/esm2020/list/list-module.mjs +4 -4
  174. package/esm2020/list/list-option.mjs +3 -3
  175. package/esm2020/list/list.mjs +6 -6
  176. package/esm2020/list/nav-list.mjs +3 -3
  177. package/esm2020/list/selection-list.mjs +16 -6
  178. package/esm2020/list/subheader.mjs +3 -3
  179. package/esm2020/menu/menu-content.mjs +6 -6
  180. package/esm2020/menu/menu-item.mjs +3 -3
  181. package/esm2020/menu/menu-trigger.mjs +6 -6
  182. package/esm2020/menu/menu.mjs +6 -6
  183. package/esm2020/menu/module.mjs +4 -4
  184. package/esm2020/paginator/module.mjs +4 -4
  185. package/esm2020/paginator/paginator-intl.mjs +3 -3
  186. package/esm2020/paginator/paginator.mjs +6 -6
  187. package/esm2020/progress-bar/module.mjs +4 -4
  188. package/esm2020/progress-bar/progress-bar.mjs +3 -3
  189. package/esm2020/progress-spinner/module.mjs +4 -4
  190. package/esm2020/progress-spinner/progress-spinner.mjs +3 -3
  191. package/esm2020/radio/module.mjs +4 -4
  192. package/esm2020/radio/radio.mjs +12 -12
  193. package/esm2020/select/module.mjs +4 -4
  194. package/esm2020/select/select.mjs +9 -9
  195. package/esm2020/sidenav/drawer.mjs +9 -9
  196. package/esm2020/sidenav/sidenav-module.mjs +4 -4
  197. package/esm2020/sidenav/sidenav.mjs +9 -9
  198. package/esm2020/slide-toggle/module.mjs +8 -8
  199. package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +3 -3
  200. package/esm2020/slide-toggle/slide-toggle.mjs +7 -7
  201. package/esm2020/slider/module.mjs +10 -8
  202. package/esm2020/slider/public-api.mjs +4 -2
  203. package/esm2020/slider/slider-input.mjs +611 -0
  204. package/esm2020/slider/slider-interface.mjs +34 -0
  205. package/esm2020/slider/slider-thumb.mjs +229 -0
  206. package/esm2020/slider/slider.mjs +523 -925
  207. package/esm2020/snack-bar/module.mjs +4 -4
  208. package/esm2020/snack-bar/simple-snack-bar.mjs +3 -3
  209. package/esm2020/snack-bar/snack-bar-container.mjs +8 -8
  210. package/esm2020/snack-bar/snack-bar-content.mjs +9 -9
  211. package/esm2020/snack-bar/snack-bar.mjs +6 -6
  212. package/esm2020/sort/sort-header-intl.mjs +3 -3
  213. package/esm2020/sort/sort-header.mjs +3 -3
  214. package/esm2020/sort/sort-module.mjs +4 -4
  215. package/esm2020/sort/sort.mjs +3 -3
  216. package/esm2020/stepper/step-content.mjs +3 -3
  217. package/esm2020/stepper/step-header.mjs +3 -3
  218. package/esm2020/stepper/step-label.mjs +3 -3
  219. package/esm2020/stepper/stepper-button.mjs +6 -6
  220. package/esm2020/stepper/stepper-icon.mjs +3 -3
  221. package/esm2020/stepper/stepper-intl.mjs +3 -3
  222. package/esm2020/stepper/stepper-module.mjs +4 -4
  223. package/esm2020/stepper/stepper.mjs +6 -6
  224. package/esm2020/table/cell.mjs +21 -21
  225. package/esm2020/table/module.mjs +4 -4
  226. package/esm2020/table/row.mjs +21 -21
  227. package/esm2020/table/table.mjs +8 -8
  228. package/esm2020/table/text-column.mjs +3 -3
  229. package/esm2020/tabs/module.mjs +4 -4
  230. package/esm2020/tabs/paginated-tab-header.mjs +3 -3
  231. package/esm2020/tabs/tab-body.mjs +9 -9
  232. package/esm2020/tabs/tab-content.mjs +3 -3
  233. package/esm2020/tabs/tab-group.mjs +6 -6
  234. package/esm2020/tabs/tab-header.mjs +6 -6
  235. package/esm2020/tabs/tab-label-wrapper.mjs +6 -6
  236. package/esm2020/tabs/tab-label.mjs +3 -3
  237. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +15 -15
  238. package/esm2020/tabs/tab.mjs +6 -6
  239. package/esm2020/toolbar/toolbar-module.mjs +4 -4
  240. package/esm2020/toolbar/toolbar.mjs +6 -6
  241. package/esm2020/tooltip/module.mjs +4 -4
  242. package/esm2020/tooltip/tooltip.mjs +12 -12
  243. package/esm2020/tree/node.mjs +9 -9
  244. package/esm2020/tree/outlet.mjs +3 -3
  245. package/esm2020/tree/padding.mjs +3 -3
  246. package/esm2020/tree/toggle.mjs +3 -3
  247. package/esm2020/tree/tree-module.mjs +4 -4
  248. package/esm2020/tree/tree.mjs +3 -3
  249. package/fesm2015/autocomplete.mjs +22 -22
  250. package/fesm2015/badge.mjs +7 -7
  251. package/fesm2015/bottom-sheet.mjs +10 -10
  252. package/fesm2015/button-toggle.mjs +10 -10
  253. package/fesm2015/button.mjs +40 -40
  254. package/fesm2015/button.mjs.map +1 -1
  255. package/fesm2015/card.mjs +46 -46
  256. package/fesm2015/checkbox.mjs +17 -17
  257. package/fesm2015/chips.mjs +45 -45
  258. package/fesm2015/chips.mjs.map +1 -1
  259. package/fesm2015/core.mjs +59 -59
  260. package/fesm2015/core.mjs.map +1 -1
  261. package/fesm2015/datepicker.mjs +84 -84
  262. package/fesm2015/datepicker.mjs.map +1 -1
  263. package/fesm2015/dialog.mjs +29 -29
  264. package/fesm2015/dialog.mjs.map +1 -1
  265. package/fesm2015/divider.mjs +7 -7
  266. package/fesm2015/expansion.mjs +25 -25
  267. package/fesm2015/form-field.mjs +34 -34
  268. package/fesm2015/grid-list.mjs +22 -22
  269. package/fesm2015/icon/testing.mjs +7 -7
  270. package/fesm2015/icon.mjs +10 -10
  271. package/fesm2015/input.mjs +7 -7
  272. package/fesm2015/legacy-autocomplete.mjs +13 -13
  273. package/fesm2015/legacy-button.mjs +10 -10
  274. package/fesm2015/legacy-card.mjs +46 -46
  275. package/fesm2015/legacy-checkbox.mjs +7 -7
  276. package/fesm2015/legacy-chips.mjs +22 -22
  277. package/fesm2015/legacy-core.mjs +10 -10
  278. package/fesm2015/legacy-dialog.mjs +22 -22
  279. package/fesm2015/legacy-form-field.mjs +25 -25
  280. package/fesm2015/legacy-input.mjs +7 -7
  281. package/fesm2015/legacy-list.mjs +28 -28
  282. package/fesm2015/legacy-menu.mjs +16 -16
  283. package/fesm2015/legacy-paginator.mjs +7 -7
  284. package/fesm2015/legacy-progress-bar.mjs +7 -7
  285. package/fesm2015/legacy-progress-spinner.mjs +7 -7
  286. package/fesm2015/legacy-radio.mjs +10 -10
  287. package/fesm2015/legacy-select.mjs +10 -10
  288. package/fesm2015/legacy-slide-toggle.mjs +7 -7
  289. package/fesm2015/legacy-slider.mjs +7 -7
  290. package/fesm2015/legacy-snack-bar.mjs +13 -13
  291. package/fesm2015/legacy-table.mjs +55 -55
  292. package/fesm2015/legacy-tabs.mjs +40 -40
  293. package/fesm2015/legacy-tooltip.mjs +10 -10
  294. package/fesm2015/list.mjs +61 -51
  295. package/fesm2015/list.mjs.map +1 -1
  296. package/fesm2015/menu.mjs +25 -25
  297. package/fesm2015/paginator.mjs +13 -13
  298. package/fesm2015/progress-bar.mjs +7 -7
  299. package/fesm2015/progress-spinner.mjs +7 -7
  300. package/fesm2015/radio.mjs +16 -16
  301. package/fesm2015/select.mjs +13 -13
  302. package/fesm2015/sidenav.mjs +22 -22
  303. package/fesm2015/slide-toggle.mjs +18 -18
  304. package/fesm2015/slide-toggle.mjs.map +1 -1
  305. package/fesm2015/slider.mjs +1300 -902
  306. package/fesm2015/slider.mjs.map +1 -1
  307. package/fesm2015/snack-bar.mjs +29 -29
  308. package/fesm2015/snack-bar.mjs.map +1 -1
  309. package/fesm2015/sort.mjs +13 -13
  310. package/fesm2015/stepper.mjs +31 -31
  311. package/fesm2015/table.mjs +57 -57
  312. package/fesm2015/table.mjs.map +1 -1
  313. package/fesm2015/tabs.mjs +61 -61
  314. package/fesm2015/toolbar.mjs +10 -10
  315. package/fesm2015/tooltip.mjs +16 -16
  316. package/fesm2015/tree.mjs +25 -25
  317. package/fesm2020/autocomplete.mjs +22 -22
  318. package/fesm2020/badge.mjs +7 -7
  319. package/fesm2020/bottom-sheet.mjs +10 -10
  320. package/fesm2020/button-toggle.mjs +10 -10
  321. package/fesm2020/button.mjs +40 -40
  322. package/fesm2020/button.mjs.map +1 -1
  323. package/fesm2020/card.mjs +46 -46
  324. package/fesm2020/checkbox.mjs +17 -17
  325. package/fesm2020/chips.mjs +45 -45
  326. package/fesm2020/chips.mjs.map +1 -1
  327. package/fesm2020/core.mjs +59 -59
  328. package/fesm2020/core.mjs.map +1 -1
  329. package/fesm2020/datepicker.mjs +84 -84
  330. package/fesm2020/datepicker.mjs.map +1 -1
  331. package/fesm2020/dialog.mjs +29 -29
  332. package/fesm2020/dialog.mjs.map +1 -1
  333. package/fesm2020/divider.mjs +7 -7
  334. package/fesm2020/expansion.mjs +25 -25
  335. package/fesm2020/form-field.mjs +34 -34
  336. package/fesm2020/grid-list.mjs +22 -22
  337. package/fesm2020/icon/testing.mjs +7 -7
  338. package/fesm2020/icon.mjs +10 -10
  339. package/fesm2020/input.mjs +7 -7
  340. package/fesm2020/legacy-autocomplete.mjs +13 -13
  341. package/fesm2020/legacy-button.mjs +10 -10
  342. package/fesm2020/legacy-card.mjs +46 -46
  343. package/fesm2020/legacy-checkbox.mjs +7 -7
  344. package/fesm2020/legacy-chips.mjs +22 -22
  345. package/fesm2020/legacy-core.mjs +10 -10
  346. package/fesm2020/legacy-dialog.mjs +22 -22
  347. package/fesm2020/legacy-form-field.mjs +25 -25
  348. package/fesm2020/legacy-input.mjs +7 -7
  349. package/fesm2020/legacy-list.mjs +28 -28
  350. package/fesm2020/legacy-menu.mjs +16 -16
  351. package/fesm2020/legacy-paginator.mjs +7 -7
  352. package/fesm2020/legacy-progress-bar.mjs +7 -7
  353. package/fesm2020/legacy-progress-spinner.mjs +7 -7
  354. package/fesm2020/legacy-radio.mjs +10 -10
  355. package/fesm2020/legacy-select.mjs +10 -10
  356. package/fesm2020/legacy-slide-toggle.mjs +7 -7
  357. package/fesm2020/legacy-slider.mjs +7 -7
  358. package/fesm2020/legacy-snack-bar.mjs +13 -13
  359. package/fesm2020/legacy-table.mjs +55 -55
  360. package/fesm2020/legacy-tabs.mjs +40 -40
  361. package/fesm2020/legacy-tooltip.mjs +10 -10
  362. package/fesm2020/list.mjs +61 -51
  363. package/fesm2020/list.mjs.map +1 -1
  364. package/fesm2020/menu.mjs +25 -25
  365. package/fesm2020/paginator.mjs +13 -13
  366. package/fesm2020/progress-bar.mjs +7 -7
  367. package/fesm2020/progress-spinner.mjs +7 -7
  368. package/fesm2020/radio.mjs +16 -16
  369. package/fesm2020/select.mjs +13 -13
  370. package/fesm2020/sidenav.mjs +22 -22
  371. package/fesm2020/slide-toggle.mjs +18 -18
  372. package/fesm2020/slide-toggle.mjs.map +1 -1
  373. package/fesm2020/slider.mjs +1289 -882
  374. package/fesm2020/slider.mjs.map +1 -1
  375. package/fesm2020/snack-bar.mjs +29 -29
  376. package/fesm2020/snack-bar.mjs.map +1 -1
  377. package/fesm2020/sort.mjs +13 -13
  378. package/fesm2020/stepper.mjs +31 -31
  379. package/fesm2020/table.mjs +57 -57
  380. package/fesm2020/table.mjs.map +1 -1
  381. package/fesm2020/tabs.mjs +61 -61
  382. package/fesm2020/toolbar.mjs +10 -10
  383. package/fesm2020/tooltip.mjs +16 -16
  384. package/fesm2020/tree.mjs +25 -25
  385. package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
  386. package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
  387. package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
  388. package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
  389. package/list/index.d.ts +4 -1
  390. package/package.json +49 -49
  391. package/prebuilt-themes/deeppurple-amber.css +1 -1
  392. package/prebuilt-themes/indigo-pink.css +1 -1
  393. package/prebuilt-themes/pink-bluegrey.css +1 -1
  394. package/prebuilt-themes/purple-green.css +1 -1
  395. package/schematics/ng-add/index.js +1 -1
  396. package/schematics/ng-add/index.mjs +1 -1
  397. package/schematics/ng-generate/mdc-migration/index_bundled.js +94 -10
  398. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +3 -3
  399. package/schematics/ng-generate/mdc-migration/mdc_migration_bundle_metadata.json +1 -1
  400. package/slider/index.d.ts +443 -235
  401. package/esm2020/slider/global-change-and-input-listener.mjs +0 -59
@@ -1,19 +1,15 @@
1
- import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
2
- import * as i3 from '@angular/cdk/platform';
3
- import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
4
- import * as i1 from '@angular/common';
5
- import { DOCUMENT, CommonModule } from '@angular/common';
1
+ import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
6
2
  import * as i0 from '@angular/core';
7
- import { Injectable, Inject, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, EventEmitter, Directive, Output, Optional, ViewChildren, ContentChildren, NgModule } from '@angular/core';
8
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Input, ViewChild, Optional, ViewChildren, ContentChild, ContentChildren, forwardRef, EventEmitter, Directive, Output, NgModule } from '@angular/core';
9
4
  import * as i2 from '@angular/material/core';
10
5
  import { MatRipple, mixinColor, mixinDisableRipple, MAT_RIPPLE_GLOBAL_OPTIONS, MatCommonModule, MatRippleModule } from '@angular/material/core';
11
6
  import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
12
- import { MDCSliderFoundation } from '@material/slider/foundation';
13
- import { Thumb, TickMark } from '@material/slider/types';
14
- import { Subject, fromEvent, Subscription } from 'rxjs';
15
- import { takeUntil, finalize, share } from 'rxjs/operators';
16
- import * as i5 from '@angular/cdk/bidi';
7
+ import * as i1 from '@angular/cdk/platform';
8
+ import * as i2$1 from '@angular/cdk/bidi';
9
+ import * as i3 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
12
+ import { Subject } from 'rxjs';
17
13
 
18
14
  /**
19
15
  * @license
@@ -23,56 +19,38 @@ import * as i5 from '@angular/cdk/bidi';
23
19
  * found in the LICENSE file at https://angular.io/license
24
20
  */
25
21
  /**
26
- * Handles listening for all change and input events that occur on the document.
27
- *
28
- * This service exposes a single method #listen to allow users to subscribe to change and input
29
- * events that occur on the document. Since listening for these events can be expensive, we use
30
- * #fromEvent which will lazily attach a listener when the first subscription is made and remove the
31
- * listener once the last observer unsubscribes.
22
+ * Injection token that can be used for a `MatSlider` to provide itself as a
23
+ * parent to the `MatSliderThumb` and `MatSliderRangeThumb`.
24
+ * Used primarily to avoid circular imports.
25
+ * @docs-private
32
26
  */
33
- class GlobalChangeAndInputListener {
34
- constructor(document, _ngZone) {
35
- this._ngZone = _ngZone;
36
- /** Stores the subjects that emit the events that occur on the global document. */
37
- this._observables = new Map();
38
- /** The notifier that triggers the global event observables to stop emitting and complete. */
39
- this._destroyed = new Subject();
40
- this._document = document;
41
- }
42
- ngOnDestroy() {
43
- this._destroyed.next();
44
- this._destroyed.complete();
45
- this._observables.clear();
46
- }
47
- /** Returns a subscription to global change or input events. */
48
- listen(type, callback) {
49
- // If this is the first time we are listening to this event, create the observable for it.
50
- if (!this._observables.has(type)) {
51
- this._observables.set(type, this._createGlobalEventObservable(type));
52
- }
53
- return this._ngZone.runOutsideAngular(() => this._observables
54
- .get(type)
55
- .subscribe((event) => this._ngZone.run(() => callback(event))));
56
- }
57
- /** Creates an observable that emits all events of the given type. */
58
- _createGlobalEventObservable(type) {
59
- return fromEvent(this._document, type, { capture: true, passive: true }).pipe(takeUntil(this._destroyed), finalize(() => this._observables.delete(type)), share());
60
- }
61
- }
62
- GlobalChangeAndInputListener.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: GlobalChangeAndInputListener, deps: [{ token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
63
- GlobalChangeAndInputListener.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: GlobalChangeAndInputListener, providedIn: 'root' });
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: GlobalChangeAndInputListener, decorators: [{
65
- type: Injectable,
66
- args: [{ providedIn: 'root' }]
67
- }], ctorParameters: function () {
68
- return [{ type: undefined, decorators: [{
69
- type: Inject,
70
- args: [DOCUMENT]
71
- }] }, { type: i0.NgZone }];
72
- } });
27
+ const MAT_SLIDER = new InjectionToken('_MatSlider');
28
+ /**
29
+ * Injection token that can be used to query for a `MatSliderThumb`.
30
+ * Used primarily to avoid circular imports.
31
+ * @docs-private
32
+ */
33
+ const MAT_SLIDER_THUMB = new InjectionToken('_MatSliderThumb');
34
+ /**
35
+ * Injection token that can be used to query for a `MatSliderRangeThumb`.
36
+ * Used primarily to avoid circular imports.
37
+ * @docs-private
38
+ */
39
+ const MAT_SLIDER_RANGE_THUMB = new InjectionToken('_MatSliderRangeThumb');
40
+ /**
41
+ * Injection token that can be used to query for a `MatSliderVisualThumb`.
42
+ * Used primarily to avoid circular imports.
43
+ * @docs-private
44
+ */
45
+ const MAT_SLIDER_VISUAL_THUMB = new InjectionToken('_MatSliderVisualThumb');
73
46
 
74
- /** Options used to bind passive event listeners. */
75
- const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
47
+ /**
48
+ * @license
49
+ * Copyright Google LLC All Rights Reserved.
50
+ *
51
+ * Use of this source code is governed by an MIT-style license that can be
52
+ * found in the LICENSE file at https://angular.io/license
53
+ */
76
54
  /**
77
55
  * The visual slider thumb.
78
56
  *
@@ -81,88 +59,90 @@ const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: t
81
59
  * @docs-private
82
60
  */
83
61
  class MatSliderVisualThumb {
84
- constructor(_ngZone, _slider, _elementRef) {
62
+ constructor(_cdr, _ngZone, _elementRef, _slider) {
63
+ this._cdr = _cdr;
85
64
  this._ngZone = _ngZone;
86
65
  this._slider = _slider;
87
- this._elementRef = _elementRef;
88
- /** Whether ripples on the slider thumb should be disabled. */
89
- this.disableRipple = false;
90
- /** Whether the slider thumb is currently being pressed. */
91
- this._isActive = false;
92
66
  /** Whether the slider thumb is currently being hovered. */
93
67
  this._isHovered = false;
94
- this._onMouseEnter = () => {
95
- this._isHovered = true;
96
- // We don't want to show the hover ripple on top of the focus ripple.
97
- // This can happen if the user tabs to a thumb and then the user moves their cursor over it.
98
- if (!this._isShowingRipple(this._focusRippleRef)) {
68
+ /** Whether the slider thumb is currently being pressed. */
69
+ this._isActive = false;
70
+ /** Whether the value indicator tooltip is visible. */
71
+ this._isValueIndicatorVisible = false;
72
+ this._onPointerMove = (event) => {
73
+ if (this._sliderInput._isFocused) {
74
+ return;
75
+ }
76
+ const rect = this._hostElement.getBoundingClientRect();
77
+ const isHovered = this._isSliderThumbHovered(event, rect);
78
+ this._isHovered = isHovered;
79
+ if (isHovered) {
99
80
  this._showHoverRipple();
100
81
  }
82
+ else {
83
+ this._hideRipple(this._hoverRippleRef);
84
+ }
101
85
  };
102
86
  this._onMouseLeave = () => {
103
- var _a;
104
87
  this._isHovered = false;
105
- (_a = this._hoverRippleRef) === null || _a === void 0 ? void 0 : _a.fadeOut();
88
+ this._hideRipple(this._hoverRippleRef);
89
+ };
90
+ this._onFocus = () => {
91
+ // We don't want to show the hover ripple on top of the focus ripple.
92
+ // Happen when the users cursor is over a thumb and then the user tabs to it.
93
+ this._hideRipple(this._hoverRippleRef);
94
+ this._showFocusRipple();
95
+ this._hostElement.classList.add('mdc-slider__thumb--focused');
96
+ };
97
+ this._onBlur = () => {
98
+ // Happens when the user tabs away while still dragging a thumb.
99
+ if (!this._isActive) {
100
+ this._hideRipple(this._focusRippleRef);
101
+ }
102
+ // Happens when the user tabs away from a thumb but their cursor is still over it.
103
+ if (this._isHovered) {
104
+ this._showHoverRipple();
105
+ }
106
+ this._hostElement.classList.remove('mdc-slider__thumb--focused');
107
+ };
108
+ this._onDragStart = () => {
109
+ this._isActive = true;
110
+ this._showActiveRipple();
111
+ };
112
+ this._onDragEnd = () => {
113
+ this._isActive = false;
114
+ this._hideRipple(this._activeRippleRef);
115
+ // Happens when the user starts dragging a thumb, tabs away, and then stops dragging.
116
+ if (!this._sliderInput._isFocused) {
117
+ this._hideRipple(this._focusRippleRef);
118
+ }
106
119
  };
120
+ this._hostElement = _elementRef.nativeElement;
107
121
  }
108
122
  ngAfterViewInit() {
109
123
  this._ripple.radius = 24;
110
124
  this._sliderInput = this._slider._getInput(this.thumbPosition);
111
- // Note that we don't unsubscribe from these, because they're complete on destroy.
112
- this._sliderInput.dragStart.subscribe(event => this._onDragStart(event));
113
- this._sliderInput.dragEnd.subscribe(event => this._onDragEnd(event));
114
- this._sliderInput._focus.subscribe(() => this._onFocus());
115
- this._sliderInput._blur.subscribe(() => this._onBlur());
116
- // These two listeners don't update any data bindings so we bind them
117
- // outside of the NgZone to prevent Angular from needlessly running change detection.
125
+ this._sliderInputEl = this._sliderInput._hostElement;
126
+ const input = this._sliderInputEl;
127
+ // These listeners don't update any data bindings so we bind them outside
128
+ // of the NgZone to prevent Angular from needlessly running change detection.
118
129
  this._ngZone.runOutsideAngular(() => {
119
- this._elementRef.nativeElement.addEventListener('mouseenter', this._onMouseEnter);
120
- this._elementRef.nativeElement.addEventListener('mouseleave', this._onMouseLeave);
130
+ input.addEventListener('pointermove', this._onPointerMove);
131
+ input.addEventListener('pointerdown', this._onDragStart);
132
+ input.addEventListener('pointerup', this._onDragEnd);
133
+ input.addEventListener('pointerleave', this._onMouseLeave);
134
+ input.addEventListener('focus', this._onFocus);
135
+ input.addEventListener('blur', this._onBlur);
121
136
  });
122
137
  }
123
138
  ngOnDestroy() {
124
- this._elementRef.nativeElement.removeEventListener('mouseenter', this._onMouseEnter);
125
- this._elementRef.nativeElement.removeEventListener('mouseleave', this._onMouseLeave);
126
- }
127
- /** Used to append a class to indicate when the value indicator text is short. */
128
- _isShortValue() {
129
- var _a;
130
- return ((_a = this.valueIndicatorText) === null || _a === void 0 ? void 0 : _a.length) <= 2;
131
- }
132
- _onFocus() {
133
- var _a;
134
- // We don't want to show the hover ripple on top of the focus ripple.
135
- // Happen when the users cursor is over a thumb and then the user tabs to it.
136
- (_a = this._hoverRippleRef) === null || _a === void 0 ? void 0 : _a.fadeOut();
137
- this._showFocusRipple();
138
- }
139
- _onBlur() {
140
- var _a;
141
- // Happens when the user tabs away while still dragging a thumb.
142
- if (!this._isActive) {
143
- (_a = this._focusRippleRef) === null || _a === void 0 ? void 0 : _a.fadeOut();
144
- }
145
- // Happens when the user tabs away from a thumb but their cursor is still over it.
146
- if (this._isHovered) {
147
- this._showHoverRipple();
148
- }
149
- }
150
- _onDragStart(event) {
151
- if (event.source._thumbPosition === this.thumbPosition) {
152
- this._isActive = true;
153
- this._showActiveRipple();
154
- }
155
- }
156
- _onDragEnd(event) {
157
- var _a, _b;
158
- if (event.source._thumbPosition === this.thumbPosition) {
159
- this._isActive = false;
160
- (_a = this._activeRippleRef) === null || _a === void 0 ? void 0 : _a.fadeOut();
161
- // Happens when the user starts dragging a thumb, tabs away, and then stops dragging.
162
- if (!this._sliderInput._isFocused()) {
163
- (_b = this._focusRippleRef) === null || _b === void 0 ? void 0 : _b.fadeOut();
164
- }
165
- }
139
+ const input = this._sliderInputEl;
140
+ input.removeEventListener('pointermove', this._onPointerMove);
141
+ input.removeEventListener('pointerdown', this._onDragStart);
142
+ input.removeEventListener('pointerup', this._onDragEnd);
143
+ input.removeEventListener('pointerleave', this._onMouseLeave);
144
+ input.removeEventListener('focus', this._onFocus);
145
+ input.removeEventListener('blur', this._onBlur);
166
146
  }
167
147
  /** Handles displaying the hover ripple. */
168
148
  _showHoverRipple() {
@@ -177,7 +157,7 @@ class MatSliderVisualThumb {
177
157
  var _a;
178
158
  // Show the focus ripple event if noop animations are enabled.
179
159
  if (!this._isShowingRipple(this._focusRippleRef)) {
180
- this._focusRippleRef = this._showRipple({ enterDuration: 0, exitDuration: 0 });
160
+ this._focusRippleRef = this._showRipple({ enterDuration: 0, exitDuration: 0 }, true);
181
161
  (_a = this._focusRippleRef) === null || _a === void 0 ? void 0 : _a.element.classList.add('mat-mdc-slider-focus-ripple');
182
162
  }
183
163
  }
@@ -194,8 +174,17 @@ class MatSliderVisualThumb {
194
174
  return (rippleRef === null || rippleRef === void 0 ? void 0 : rippleRef.state) === 0 /* RippleState.FADING_IN */ || (rippleRef === null || rippleRef === void 0 ? void 0 : rippleRef.state) === 1 /* RippleState.VISIBLE */;
195
175
  }
196
176
  /** Manually launches the slider thumb ripple using the specified ripple animation config. */
197
- _showRipple(animation) {
198
- if (this.disableRipple) {
177
+ _showRipple(animation, ignoreGlobalRippleConfig) {
178
+ var _a;
179
+ if (this._slider.disabled) {
180
+ return;
181
+ }
182
+ this._showValueIndicator();
183
+ if (this._slider._isRange) {
184
+ const sibling = this._slider._getThumb(this.thumbPosition === 1 /* _MatThumb.START */ ? 2 /* _MatThumb.END */ : 1 /* _MatThumb.START */);
185
+ sibling._showValueIndicator();
186
+ }
187
+ if (((_a = this._slider._globalRippleOptions) === null || _a === void 0 ? void 0 : _a.disabled) && !ignoreGlobalRippleConfig) {
199
188
  return;
200
189
  }
201
190
  return this._ripple.launch({
@@ -204,45 +193,76 @@ class MatSliderVisualThumb {
204
193
  persistent: true,
205
194
  });
206
195
  }
207
- /** Gets the hosts native HTML element. */
208
- _getHostElement() {
209
- return this._elementRef.nativeElement;
196
+ /**
197
+ * Fades out the given ripple.
198
+ * Also hides the value indicator if no ripple is showing.
199
+ */
200
+ _hideRipple(rippleRef) {
201
+ rippleRef === null || rippleRef === void 0 ? void 0 : rippleRef.fadeOut();
202
+ if (this._isShowingAnyRipple()) {
203
+ return;
204
+ }
205
+ if (!this._slider._isRange) {
206
+ this._hideValueIndicator();
207
+ }
208
+ const sibling = this._getSibling();
209
+ if (!sibling._isShowingAnyRipple()) {
210
+ this._hideValueIndicator();
211
+ sibling._hideValueIndicator();
212
+ }
213
+ }
214
+ /** Shows the value indicator ui. */
215
+ _showValueIndicator() {
216
+ this._hostElement.classList.add('mdc-slider__thumb--with-indicator');
217
+ }
218
+ /** Hides the value indicator ui. */
219
+ _hideValueIndicator() {
220
+ this._hostElement.classList.remove('mdc-slider__thumb--with-indicator');
221
+ }
222
+ _getSibling() {
223
+ return this._slider._getThumb(this.thumbPosition === 1 /* _MatThumb.START */ ? 2 /* _MatThumb.END */ : 1 /* _MatThumb.START */);
224
+ }
225
+ /** Gets the value indicator container's native HTML element. */
226
+ _getValueIndicatorContainer() {
227
+ var _a;
228
+ return (_a = this._valueIndicatorContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
210
229
  }
211
230
  /** Gets the native HTML element of the slider thumb knob. */
212
231
  _getKnob() {
213
232
  return this._knob.nativeElement;
214
233
  }
215
- /**
216
- * Gets the native HTML element of the slider thumb value indicator
217
- * container.
218
- */
219
- _getValueIndicatorContainer() {
220
- return this._valueIndicatorContainer.nativeElement;
234
+ _isShowingAnyRipple() {
235
+ return (this._isShowingRipple(this._hoverRippleRef) ||
236
+ this._isShowingRipple(this._focusRippleRef) ||
237
+ this._isShowingRipple(this._activeRippleRef));
238
+ }
239
+ _isSliderThumbHovered(event, rect) {
240
+ const radius = rect.width / 2;
241
+ const centerX = rect.x + radius;
242
+ const centerY = rect.y + radius;
243
+ const dx = event.clientX - centerX;
244
+ const dy = event.clientY - centerY;
245
+ return Math.pow(dx, 2) + Math.pow(dy, 2) < Math.pow(radius, 2);
221
246
  }
222
247
  }
223
- MatSliderVisualThumb.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderVisualThumb, deps: [{ token: i0.NgZone }, { token: forwardRef(() => MatSlider) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
224
- MatSliderVisualThumb.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: MatSliderVisualThumb, selector: "mat-slider-visual-thumb", inputs: { discrete: "discrete", thumbPosition: "thumbPosition", valueIndicatorText: "valueIndicatorText", disableRipple: "disableRipple" }, host: { properties: { "class.mdc-slider__thumb--short-value": "_isShortValue()" }, classAttribute: "mdc-slider__thumb mat-mdc-slider-visual-thumb" }, viewQueries: [{ propertyName: "_ripple", first: true, predicate: MatRipple, descendants: true }, { propertyName: "_knob", first: true, predicate: ["knob"], descendants: true }, { propertyName: "_valueIndicatorContainer", first: true, predicate: ["valueIndicatorContainer"], descendants: true }], ngImport: i0, template: "<div class=\"mdc-slider__value-indicator-container\" *ngIf=\"discrete\" #valueIndicatorContainer>\n <div class=\"mdc-slider__value-indicator\">\n <span class=\"mdc-slider__value-indicator-text\">{{valueIndicatorText}}</span>\n </div>\n</div>\n<div class=\"mdc-slider__thumb-knob\" #knob></div>\n<div\n matRipple\n class=\"mat-mdc-focus-indicator\"\n [matRippleDisabled]=\"true\"></div>\n", styles: [".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderVisualThumb, decorators: [{
248
+ MatSliderVisualThumb.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderVisualThumb, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: MAT_SLIDER }], target: i0.ɵɵFactoryTarget.Component });
249
+ MatSliderVisualThumb.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-rc.1", type: MatSliderVisualThumb, selector: "mat-slider-visual-thumb", inputs: { discrete: "discrete", thumbPosition: "thumbPosition", valueIndicatorText: "valueIndicatorText" }, host: { classAttribute: "mdc-slider__thumb mat-mdc-slider-visual-thumb" }, providers: [{ provide: MAT_SLIDER_VISUAL_THUMB, useExisting: MatSliderVisualThumb }], viewQueries: [{ propertyName: "_ripple", first: true, predicate: MatRipple, descendants: true }, { propertyName: "_knob", first: true, predicate: ["knob"], descendants: true }, { propertyName: "_valueIndicatorContainer", first: true, predicate: ["valueIndicatorContainer"], descendants: true }], ngImport: i0, template: "<div class=\"mdc-slider__value-indicator-container\" *ngIf=\"discrete\" #valueIndicatorContainer>\n <div class=\"mdc-slider__value-indicator\">\n <span class=\"mdc-slider__value-indicator-text\">{{valueIndicatorText}}</span>\n </div>\n</div>\n<div class=\"mdc-slider__thumb-knob\" #knob></div>\n<div matRipple class=\"mat-mdc-focus-indicator\" [matRippleDisabled]=\"true\"></div>\n", styles: [".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderVisualThumb, decorators: [{
226
251
  type: Component,
227
252
  args: [{ selector: 'mat-slider-visual-thumb', host: {
228
253
  'class': 'mdc-slider__thumb mat-mdc-slider-visual-thumb',
229
- // NOTE: This class is used internally.
230
- // TODO(wagnermaciel): Remove this once it is handled by the mdc foundation (cl/388828896).
231
- '[class.mdc-slider__thumb--short-value]': '_isShortValue()',
232
- }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"mdc-slider__value-indicator-container\" *ngIf=\"discrete\" #valueIndicatorContainer>\n <div class=\"mdc-slider__value-indicator\">\n <span class=\"mdc-slider__value-indicator-text\">{{valueIndicatorText}}</span>\n </div>\n</div>\n<div class=\"mdc-slider__thumb-knob\" #knob></div>\n<div\n matRipple\n class=\"mat-mdc-focus-indicator\"\n [matRippleDisabled]=\"true\"></div>\n", styles: [".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}"] }]
254
+ }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MAT_SLIDER_VISUAL_THUMB, useExisting: MatSliderVisualThumb }], template: "<div class=\"mdc-slider__value-indicator-container\" *ngIf=\"discrete\" #valueIndicatorContainer>\n <div class=\"mdc-slider__value-indicator\">\n <span class=\"mdc-slider__value-indicator-text\">{{valueIndicatorText}}</span>\n </div>\n</div>\n<div class=\"mdc-slider__thumb-knob\" #knob></div>\n<div matRipple class=\"mat-mdc-focus-indicator\" [matRippleDisabled]=\"true\"></div>\n", styles: [".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}"] }]
233
255
  }], ctorParameters: function () {
234
- return [{ type: i0.NgZone }, { type: MatSlider, decorators: [{
256
+ return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{
235
257
  type: Inject,
236
- args: [forwardRef(() => MatSlider)]
237
- }] }, { type: i0.ElementRef }];
258
+ args: [MAT_SLIDER]
259
+ }] }];
238
260
  }, propDecorators: { discrete: [{
239
261
  type: Input
240
262
  }], thumbPosition: [{
241
263
  type: Input
242
264
  }], valueIndicatorText: [{
243
265
  type: Input
244
- }], disableRipple: [{
245
- type: Input
246
266
  }], _ripple: [{
247
267
  type: ViewChild,
248
268
  args: [MatRipple]
@@ -253,260 +273,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ng
253
273
  type: ViewChild,
254
274
  args: ['valueIndicatorContainer']
255
275
  }] } });
256
- /**
257
- * Directive that adds slider-specific behaviors to an input element inside `<mat-slider>`.
258
- * Up to two may be placed inside of a `<mat-slider>`.
259
- *
260
- * If one is used, the selector `matSliderThumb` must be used, and the outcome will be a normal
261
- * slider. If two are used, the selectors `matSliderStartThumb` and `matSliderEndThumb` must be
262
- * used, and the outcome will be a range slider with two slider thumbs.
263
- */
264
- class MatSliderThumb {
265
- constructor(document, _slider, _elementRef) {
266
- this._slider = _slider;
267
- this._elementRef = _elementRef;
268
- /**
269
- * Emits when the raw value of the slider changes. This is here primarily
270
- * to facilitate the two-way binding for the `value` input.
271
- * @docs-private
272
- */
273
- this.valueChange = new EventEmitter();
274
- /** Event emitted when the slider thumb starts being dragged. */
275
- this.dragStart = new EventEmitter();
276
- /** Event emitted when the slider thumb stops being dragged. */
277
- this.dragEnd = new EventEmitter();
278
- /** Event emitted every time the MatSliderThumb is blurred. */
279
- this._blur = new EventEmitter();
280
- /** Event emitted every time the MatSliderThumb is focused. */
281
- this._focus = new EventEmitter();
282
- /**
283
- * Used to determine the disabled state of the MatSlider (ControlValueAccessor).
284
- * For ranged sliders, the disabled state of the MatSlider depends on the combined state of the
285
- * start and end inputs. See MatSlider._updateDisabled.
286
- */
287
- this._disabled = false;
288
- /**
289
- * A callback function that is called when the
290
- * control's value changes in the UI (ControlValueAccessor).
291
- */
292
- this._onChange = () => { };
293
- /**
294
- * A callback function that is called by the forms API on
295
- * initialization to update the form model on blur (ControlValueAccessor).
296
- */
297
- this._onTouched = () => { };
298
- /** Indicates which slider thumb this input corresponds to. */
299
- this._thumbPosition = this._elementRef.nativeElement.hasAttribute('matSliderStartThumb')
300
- ? Thumb.START
301
- : Thumb.END;
302
- this._document = document;
303
- this._hostElement = _elementRef.nativeElement;
304
- }
305
- // ** IMPORTANT NOTE **
306
- //
307
- // The way `value` is implemented for MatSliderThumb doesn't follow typical Angular conventions.
308
- // Normally we would define a private variable `_value` as the source of truth for the value of
309
- // the slider thumb input. The source of truth for the value of the slider inputs has already
310
- // been decided for us by MDC to be the value attribute on the slider thumb inputs. This is
311
- // because the MDC foundation and adapter expect that the value attribute is the source of truth
312
- // for the slider inputs.
313
- //
314
- // Also, note that the value attribute is completely disconnected from the value property.
315
- /** The current value of this slider input. */
316
- get value() {
317
- return coerceNumberProperty(this._hostElement.getAttribute('value'));
318
- }
319
- set value(v) {
320
- const value = coerceNumberProperty(v);
321
- // If the foundation has already been initialized, we need to
322
- // relay any value updates to it so that it can update the UI.
323
- if (this._slider._initialized) {
324
- this._slider._setValue(value, this._thumbPosition);
325
- }
326
- else {
327
- // Setup for the MDC foundation.
328
- this._hostElement.setAttribute('value', `${value}`);
329
- }
330
- }
331
- ngOnInit() {
332
- // By calling this in ngOnInit() we guarantee that the sibling sliders initial value by
333
- // has already been set by the time we reach ngAfterViewInit().
334
- this._initializeInputValueAttribute();
335
- this._initializeAriaValueText();
336
- }
337
- ngAfterViewInit() {
338
- this._initializeInputState();
339
- this._initializeInputValueProperty();
340
- // Setup for the MDC foundation.
341
- if (this._slider.disabled) {
342
- this._hostElement.disabled = true;
343
- }
344
- }
345
- ngOnDestroy() {
346
- this.dragStart.complete();
347
- this.dragEnd.complete();
348
- this._focus.complete();
349
- this._blur.complete();
350
- this.valueChange.complete();
351
- }
352
- _onBlur() {
353
- this._onTouched();
354
- this._blur.emit();
355
- }
356
- _emitFakeEvent(type) {
357
- const event = new Event(type);
358
- event._matIsHandled = true;
359
- this._hostElement.dispatchEvent(event);
360
- }
361
- /**
362
- * Sets the model value. Implemented as part of ControlValueAccessor.
363
- * @param value
364
- */
365
- writeValue(value) {
366
- this.value = value;
367
- }
368
- /**
369
- * Registers a callback to be triggered when the value has changed.
370
- * Implemented as part of ControlValueAccessor.
371
- * @param fn Callback to be registered.
372
- */
373
- registerOnChange(fn) {
374
- this._onChange = fn;
375
- }
376
- /**
377
- * Registers a callback to be triggered when the component is touched.
378
- * Implemented as part of ControlValueAccessor.
379
- * @param fn Callback to be registered.
380
- */
381
- registerOnTouched(fn) {
382
- this._onTouched = fn;
383
- }
384
- /**
385
- * Sets whether the component should be disabled.
386
- * Implemented as part of ControlValueAccessor.
387
- * @param isDisabled
388
- */
389
- setDisabledState(isDisabled) {
390
- this._disabled = isDisabled;
391
- this._slider._updateDisabled();
392
- }
393
- focus() {
394
- this._hostElement.focus();
395
- }
396
- blur() {
397
- this._hostElement.blur();
398
- }
399
- /** Returns true if this slider input currently has focus. */
400
- _isFocused() {
401
- return this._document.activeElement === this._hostElement;
402
- }
403
- /**
404
- * Sets the min, max, and step properties on the slider thumb input.
405
- *
406
- * Must be called AFTER the sibling slider thumb input is guaranteed to have had its value
407
- * attribute value set. For a range slider, the min and max of the slider thumb input depends on
408
- * the value of its sibling slider thumb inputs value.
409
- *
410
- * Must be called BEFORE the value property is set. In the case where the min and max have not
411
- * yet been set and we are setting the input value property to a value outside of the native
412
- * inputs default min or max. The value property would not be set to our desired value, but
413
- * instead be capped at either the default min or max.
414
- *
415
- */
416
- _initializeInputState() {
417
- const min = this._hostElement.hasAttribute('matSliderEndThumb')
418
- ? this._slider._getInput(Thumb.START).value
419
- : this._slider.min;
420
- const max = this._hostElement.hasAttribute('matSliderStartThumb')
421
- ? this._slider._getInput(Thumb.END).value
422
- : this._slider.max;
423
- this._hostElement.min = `${min}`;
424
- this._hostElement.max = `${max}`;
425
- this._hostElement.step = `${this._slider.step}`;
426
- }
427
- /**
428
- * Sets the value property on the slider thumb input.
429
- *
430
- * Must be called AFTER the min and max have been set. In the case where the min and max have not
431
- * yet been set and we are setting the input value property to a value outside of the native
432
- * inputs default min or max. The value property would not be set to our desired value, but
433
- * instead be capped at either the default min or max.
434
- */
435
- _initializeInputValueProperty() {
436
- this._hostElement.value = `${this.value}`;
437
- }
438
- /**
439
- * Ensures the value attribute is initialized.
440
- *
441
- * Must be called BEFORE the min and max are set. For a range slider, the min and max of the
442
- * slider thumb input depends on the value of its sibling slider thumb inputs value.
443
- */
444
- _initializeInputValueAttribute() {
445
- // Only set the default value if an initial value has not already been provided.
446
- if (!this._hostElement.hasAttribute('value')) {
447
- this.value = this._hostElement.hasAttribute('matSliderEndThumb')
448
- ? this._slider.max
449
- : this._slider.min;
450
- }
451
- }
452
- /**
453
- * Initializes the aria-valuetext attribute.
454
- *
455
- * Must be called AFTER the value attribute is set. This is because the slider's parent
456
- * `displayWith` function is used to set the `aria-valuetext` attribute.
457
- */
458
- _initializeAriaValueText() {
459
- this._hostElement.setAttribute('aria-valuetext', this._slider.displayWith(this.value));
460
- }
461
- }
462
- MatSliderThumb.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderThumb, deps: [{ token: DOCUMENT }, { token: forwardRef(() => MatSlider) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
463
- MatSliderThumb.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: MatSliderThumb, selector: "input[matSliderThumb], input[matSliderStartThumb], input[matSliderEndThumb]", inputs: { value: "value" }, outputs: { valueChange: "valueChange", dragStart: "dragStart", dragEnd: "dragEnd", _blur: "_blur", _focus: "_focus" }, host: { attributes: { "type": "range" }, listeners: { "blur": "_onBlur()", "focus": "_focus.emit()" }, classAttribute: "mdc-slider__input" }, providers: [
464
- {
465
- provide: NG_VALUE_ACCESSOR,
466
- useExisting: MatSliderThumb,
467
- multi: true,
468
- },
469
- ], exportAs: ["matSliderThumb"], ngImport: i0 });
470
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderThumb, decorators: [{
471
- type: Directive,
472
- args: [{
473
- selector: 'input[matSliderThumb], input[matSliderStartThumb], input[matSliderEndThumb]',
474
- exportAs: 'matSliderThumb',
475
- host: {
476
- 'class': 'mdc-slider__input',
477
- 'type': 'range',
478
- '(blur)': '_onBlur()',
479
- '(focus)': '_focus.emit()',
480
- },
481
- providers: [
482
- {
483
- provide: NG_VALUE_ACCESSOR,
484
- useExisting: MatSliderThumb,
485
- multi: true,
486
- },
487
- ],
488
- }]
489
- }], ctorParameters: function () {
490
- return [{ type: undefined, decorators: [{
491
- type: Inject,
492
- args: [DOCUMENT]
493
- }] }, { type: MatSlider, decorators: [{
494
- type: Inject,
495
- args: [forwardRef(() => MatSlider)]
496
- }] }, { type: i0.ElementRef }];
497
- }, propDecorators: { value: [{
498
- type: Input
499
- }], valueChange: [{
500
- type: Output
501
- }], dragStart: [{
502
- type: Output
503
- }], dragEnd: [{
504
- type: Output
505
- }], _blur: [{
506
- type: Output
507
- }], _focus: [{
508
- type: Output
509
- }] } });
276
+
277
+ // TODO(wagnermaciel): maybe handle the following edge case:
278
+ // 1. start dragging discrete slider
279
+ // 2. tab to disable checkbox
280
+ // 3. without ending drag, disable the slider
510
281
  // Boilerplate for applying mixins to MatSlider.
511
282
  const _MatSliderMixinBase = mixinColor(mixinDisableRipple(class {
512
283
  constructor(_elementRef) {
@@ -518,12 +289,11 @@ const _MatSliderMixinBase = mixinColor(mixinDisableRipple(class {
518
289
  * behavior to the native `<input type="range">` element.
519
290
  */
520
291
  class MatSlider extends _MatSliderMixinBase {
521
- constructor(_ngZone, _cdr, elementRef, _platform, _globalChangeAndInputListener, document, _dir, _globalRippleOptions, animationMode) {
292
+ constructor(_ngZone, _cdr, _platform, elementRef, _dir, _globalRippleOptions, animationMode) {
522
293
  super(elementRef);
523
294
  this._ngZone = _ngZone;
524
295
  this._cdr = _cdr;
525
296
  this._platform = _platform;
526
- this._globalChangeAndInputListener = _globalChangeAndInputListener;
527
297
  this._dir = _dir;
528
298
  this._globalRippleOptions = _globalRippleOptions;
529
299
  this._disabled = false;
@@ -531,39 +301,49 @@ class MatSlider extends _MatSliderMixinBase {
531
301
  this._showTickMarks = false;
532
302
  this._min = 0;
533
303
  this._max = 100;
534
- this._step = 1;
304
+ this._step = 0;
535
305
  /**
536
306
  * Function that will be used to format the value before it is displayed
537
307
  * in the thumb label. Can be used to format very large number in order
538
308
  * for them to fit into the slider thumb.
539
309
  */
540
310
  this.displayWith = (value) => `${value}`;
541
- /** Instance of the MDC slider foundation for this slider. */
542
- this._foundation = new MDCSliderFoundation(new SliderAdapter(this));
543
- /** Whether the foundation has been initialized. */
544
- this._initialized = false;
311
+ this._rippleRadius = 24;
312
+ // The value indicator tooltip text for the visual slider thumb(s).
313
+ this.startValueIndicatorText = '';
314
+ this.endValueIndicatorText = '';
315
+ this._isRange = false;
316
+ /** Whether the slider is rtl. */
317
+ this._isRtl = false;
545
318
  /**
546
- * Whether the browser supports pointer events.
547
- *
548
- * We exclude iOS to mirror the MDC Foundation. The MDC Foundation cannot use pointer events on
549
- * iOS because of this open bug - https://bugs.webkit.org/show_bug.cgi?id=220196.
319
+ * The width of the tick mark track.
320
+ * The tick mark track width is different from full track width
550
321
  */
551
- this._SUPPORTS_POINTER_EVENTS = typeof PointerEvent !== 'undefined' && !!PointerEvent && !this._platform.IOS;
552
- /** Wrapper function for calling layout (needed for adding & removing an event listener). */
553
- this._layout = () => this._foundation.layout();
554
- this._document = document;
555
- this._window = this._document.defaultView || window;
322
+ this._tickMarkTrackWidth = 0;
323
+ this._hasAnimation = false;
324
+ this._resizeTimer = null;
325
+ /** The radius of the native slider's knob. AFAIK there is no way to avoid hardcoding this. */
326
+ this._knobRadius = 8;
327
+ /** Whether or not the slider thumbs overlap. */
328
+ this._thumbsOverlap = false;
556
329
  this._noopAnimations = animationMode === 'NoopAnimations';
557
330
  this._dirChangeSubscription = this._dir.change.subscribe(() => this._onDirChange());
558
- this._attachUISyncEventListener();
331
+ this._isRtl = this._dir.value === 'rtl';
559
332
  }
560
333
  /** Whether the slider is disabled. */
561
334
  get disabled() {
562
335
  return this._disabled;
563
336
  }
564
337
  set disabled(v) {
565
- this._setDisabled(coerceBooleanProperty(v));
566
- this._updateInputsDisabledState();
338
+ this._disabled = coerceBooleanProperty(v);
339
+ const endInput = this._getInput(2 /* _MatThumb.END */);
340
+ const startInput = this._getInput(1 /* _MatThumb.START */);
341
+ if (endInput) {
342
+ endInput.disabled = this._disabled;
343
+ }
344
+ if (startInput) {
345
+ startInput.disabled = this._disabled;
346
+ }
567
347
  }
568
348
  /** Whether the slider displays a numeric value label upon pressing the thumb. */
569
349
  get discrete() {
@@ -584,271 +364,531 @@ class MatSlider extends _MatSliderMixinBase {
584
364
  return this._min;
585
365
  }
586
366
  set min(v) {
587
- this._min = coerceNumberProperty(v, this._min);
588
- this._reinitialize();
367
+ const min = coerceNumberProperty(v, this._min);
368
+ if (this._min !== min) {
369
+ this._updateMin(min);
370
+ }
371
+ }
372
+ _updateMin(min) {
373
+ const prevMin = this._min;
374
+ this._min = min;
375
+ this._isRange ? this._updateMinRange({ old: prevMin, new: min }) : this._updateMinNonRange(min);
376
+ this._onMinMaxOrStepChange();
377
+ }
378
+ _updateMinRange(min) {
379
+ const endInput = this._getInput(2 /* _MatThumb.END */);
380
+ const startInput = this._getInput(1 /* _MatThumb.START */);
381
+ const oldEndValue = endInput.value;
382
+ const oldStartValue = startInput.value;
383
+ startInput.min = min.new;
384
+ endInput.min = Math.max(min.new, startInput.value);
385
+ startInput.max = Math.min(endInput.max, endInput.value);
386
+ startInput._updateWidthInactive();
387
+ endInput._updateWidthInactive();
388
+ min.new < min.old
389
+ ? this._onTranslateXChangeBySideEffect(endInput, startInput)
390
+ : this._onTranslateXChangeBySideEffect(startInput, endInput);
391
+ if (oldEndValue !== endInput.value) {
392
+ this._onValueChange(endInput);
393
+ }
394
+ if (oldStartValue !== startInput.value) {
395
+ this._onValueChange(startInput);
396
+ }
397
+ }
398
+ _updateMinNonRange(min) {
399
+ const input = this._getInput(2 /* _MatThumb.END */);
400
+ if (input) {
401
+ const oldValue = input.value;
402
+ input.min = min;
403
+ input._updateThumbUIByValue();
404
+ this._updateTrackUI(input);
405
+ if (oldValue !== input.value) {
406
+ this._onValueChange(input);
407
+ }
408
+ }
589
409
  }
590
410
  /** The maximum value that the slider can have. */
591
411
  get max() {
592
412
  return this._max;
593
413
  }
594
414
  set max(v) {
595
- this._max = coerceNumberProperty(v, this._max);
596
- this._reinitialize();
415
+ const max = coerceNumberProperty(v, this._max);
416
+ if (this._max !== max) {
417
+ this._updateMax(max);
418
+ }
419
+ }
420
+ _updateMax(max) {
421
+ const prevMax = this._max;
422
+ this._max = max;
423
+ this._isRange ? this._updateMaxRange({ old: prevMax, new: max }) : this._updateMaxNonRange(max);
424
+ this._onMinMaxOrStepChange();
425
+ }
426
+ _updateMaxRange(max) {
427
+ const endInput = this._getInput(2 /* _MatThumb.END */);
428
+ const startInput = this._getInput(1 /* _MatThumb.START */);
429
+ const oldEndValue = endInput.value;
430
+ const oldStartValue = startInput.value;
431
+ endInput.max = max.new;
432
+ startInput.max = Math.min(max.new, endInput.value);
433
+ endInput.min = startInput.value;
434
+ endInput._updateWidthInactive();
435
+ startInput._updateWidthInactive();
436
+ max.new > max.old
437
+ ? this._onTranslateXChangeBySideEffect(startInput, endInput)
438
+ : this._onTranslateXChangeBySideEffect(endInput, startInput);
439
+ if (oldEndValue !== endInput.value) {
440
+ this._onValueChange(endInput);
441
+ }
442
+ if (oldStartValue !== startInput.value) {
443
+ this._onValueChange(startInput);
444
+ }
445
+ }
446
+ _updateMaxNonRange(max) {
447
+ const input = this._getInput(2 /* _MatThumb.END */);
448
+ if (input) {
449
+ const oldValue = input.value;
450
+ input.max = max;
451
+ input._updateThumbUIByValue();
452
+ this._updateTrackUI(input);
453
+ if (oldValue !== input.value) {
454
+ this._onValueChange(input);
455
+ }
456
+ }
597
457
  }
598
458
  /** The values at which the thumb will snap. */
599
459
  get step() {
600
460
  return this._step;
601
461
  }
602
462
  set step(v) {
603
- this._step = coerceNumberProperty(v, this._step);
604
- this._reinitialize();
463
+ const step = coerceNumberProperty(v, this._step);
464
+ if (this._step !== step) {
465
+ this._updateStep(step);
466
+ }
467
+ }
468
+ _updateStep(step) {
469
+ this._step = step;
470
+ this._isRange ? this._updateStepRange() : this._updateStepNonRange();
471
+ this._onMinMaxOrStepChange();
472
+ }
473
+ _updateStepRange() {
474
+ const endInput = this._getInput(2 /* _MatThumb.END */);
475
+ const startInput = this._getInput(1 /* _MatThumb.START */);
476
+ const oldEndValue = endInput.value;
477
+ const oldStartValue = startInput.value;
478
+ const prevStartValue = startInput.value;
479
+ endInput.min = this._min;
480
+ startInput.max = this._max;
481
+ endInput.step = this._step;
482
+ startInput.step = this._step;
483
+ if (this._platform.SAFARI) {
484
+ endInput.value = endInput.value;
485
+ startInput.value = startInput.value;
486
+ }
487
+ endInput.min = Math.max(this._min, startInput.value);
488
+ startInput.max = Math.min(this._max, endInput.value);
489
+ startInput._updateWidthInactive();
490
+ endInput._updateWidthInactive();
491
+ endInput.value < prevStartValue
492
+ ? this._onTranslateXChangeBySideEffect(startInput, endInput)
493
+ : this._onTranslateXChangeBySideEffect(endInput, startInput);
494
+ if (oldEndValue !== endInput.value) {
495
+ this._onValueChange(endInput);
496
+ }
497
+ if (oldStartValue !== startInput.value) {
498
+ this._onValueChange(startInput);
499
+ }
500
+ }
501
+ _updateStepNonRange() {
502
+ const input = this._getInput(2 /* _MatThumb.END */);
503
+ if (input) {
504
+ const oldValue = input.value;
505
+ input.step = this._step;
506
+ if (this._platform.SAFARI) {
507
+ input.value = input.value;
508
+ }
509
+ input._updateThumbUIByValue();
510
+ if (oldValue !== input.value) {
511
+ this._onValueChange(input);
512
+ }
513
+ }
605
514
  }
606
515
  ngAfterViewInit() {
516
+ if (this._platform.isBrowser) {
517
+ this._updateDimensions();
518
+ }
519
+ const eInput = this._getInput(2 /* _MatThumb.END */);
520
+ const sInput = this._getInput(1 /* _MatThumb.START */);
521
+ this._isRange = !!eInput && !!sInput;
607
522
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
608
- _validateThumbs(this._isRange(), this._getThumb(Thumb.START), this._getThumb(Thumb.END));
609
- _validateInputs(this._isRange(), this._getInputElement(Thumb.START), this._getInputElement(Thumb.END));
523
+ _validateInputs(this._isRange, this._getInput(2 /* _MatThumb.END */), this._getInput(1 /* _MatThumb.START */));
610
524
  }
611
- if (this._platform.isBrowser) {
612
- this._foundation.init();
613
- this._foundation.layout();
614
- this._initialized = true;
615
- this._observeHostResize();
616
- }
617
- // The MDC foundation requires access to the view and content children of the MatSlider. In
618
- // order to access the view and content children of MatSlider we need to wait until change
619
- // detection runs and materializes them. That is why we call init() and layout() in
620
- // ngAfterViewInit().
621
- //
622
- // The MDC foundation then uses the information it gathers from the DOM to compute an initial
623
- // value for the tickMarks array. It then tries to update the component data, but because it is
624
- // updating the component data AFTER change detection already ran, we will get a changed after
625
- // checked error. Because of this, we need to force change detection to update the UI with the
626
- // new state.
525
+ const thumb = this._getThumb(2 /* _MatThumb.END */);
526
+ this._rippleRadius = thumb._ripple.radius;
527
+ this._inputPadding = this._rippleRadius - this._knobRadius;
528
+ this._inputOffset = this._knobRadius;
529
+ if (eInput) {
530
+ eInput.initProps();
531
+ eInput.initUI();
532
+ }
533
+ if (sInput) {
534
+ sInput.initProps();
535
+ sInput.initUI();
536
+ }
537
+ if (this._isRange) {
538
+ eInput._updateMinMax();
539
+ sInput._updateMinMax();
540
+ }
541
+ this._updateTrackUI(eInput);
542
+ this._updateTickMarkUI();
543
+ this._updateTickMarkTrackUI();
544
+ this._observeHostResize();
627
545
  this._cdr.detectChanges();
628
546
  }
629
547
  ngOnDestroy() {
630
548
  var _a;
631
- if (this._platform.isBrowser) {
632
- this._foundation.destroy();
633
- }
634
549
  this._dirChangeSubscription.unsubscribe();
635
550
  (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
636
551
  this._resizeObserver = null;
637
- clearTimeout(this._resizeTimer);
638
- this._removeUISyncEventListener();
639
552
  }
640
- /** Returns true if the language direction for this slider element is right to left. */
641
- _isRTL() {
642
- return this._dir && this._dir.value === 'rtl';
553
+ /** Handles updating the slider ui after a dir change. */
554
+ _onDirChange() {
555
+ this._isRtl = this._dir.value === 'rtl';
556
+ this._isRange ? this._onDirChangeRange() : this._onDirChangeNonRange();
557
+ this._updateTickMarkUI();
558
+ }
559
+ _onDirChangeRange() {
560
+ const endInput = this._getInput(2 /* _MatThumb.END */);
561
+ const startInput = this._getInput(1 /* _MatThumb.START */);
562
+ endInput._setIsLeftThumb();
563
+ startInput._setIsLeftThumb();
564
+ endInput.translateX = endInput._calcTranslateXByValue();
565
+ startInput.translateX = startInput._calcTranslateXByValue();
566
+ endInput._updateStaticStyles();
567
+ startInput._updateStaticStyles();
568
+ endInput._updateWidthInactive();
569
+ startInput._updateWidthInactive();
570
+ endInput._updateThumbUIByValue();
571
+ startInput._updateThumbUIByValue();
572
+ }
573
+ _onDirChangeNonRange() {
574
+ const input = this._getInput(2 /* _MatThumb.END */);
575
+ input._updateThumbUIByValue();
643
576
  }
644
- /**
645
- * Attaches an event listener that keeps sync the slider UI and the foundation in sync.
646
- *
647
- * Because the MDC Foundation stores the value of the bounding client rect when layout is called,
648
- * we need to keep calling layout to avoid the position of the slider getting out of sync with
649
- * what the foundation has stored. If we don't do this, the foundation will not be able to
650
- * correctly calculate the slider value on click/slide.
651
- */
652
- _attachUISyncEventListener() {
653
- // Implementation detail: It may seem weird that we are using "mouseenter" instead of
654
- // "mousedown" as the default for when a browser does not support pointer events. While we
655
- // would prefer to use "mousedown" as the default, for some reason it does not work (the
656
- // callback is never triggered).
657
- if (this._SUPPORTS_POINTER_EVENTS) {
658
- this._elementRef.nativeElement.addEventListener('pointerdown', this._layout);
577
+ /** Starts observing and updating the slider if the host changes its size. */
578
+ _observeHostResize() {
579
+ if (typeof ResizeObserver === 'undefined' || !ResizeObserver) {
580
+ return;
659
581
  }
660
- else {
661
- this._elementRef.nativeElement.addEventListener('mouseenter', this._layout);
662
- this._elementRef.nativeElement.addEventListener('touchstart', this._layout, passiveEventListenerOptions);
582
+ this._ngZone.runOutsideAngular(() => {
583
+ this._resizeObserver = new ResizeObserver(() => {
584
+ if (this._isActive()) {
585
+ return;
586
+ }
587
+ if (this._resizeTimer) {
588
+ clearTimeout(this._resizeTimer);
589
+ }
590
+ this._onResize();
591
+ });
592
+ this._resizeObserver.observe(this._elementRef.nativeElement);
593
+ });
594
+ }
595
+ /** Whether any of the thumbs are currently active. */
596
+ _isActive() {
597
+ return this._getThumb(1 /* _MatThumb.START */)._isActive || this._getThumb(2 /* _MatThumb.END */)._isActive;
598
+ }
599
+ _getValue(thumbPosition = 2 /* _MatThumb.END */) {
600
+ const input = this._getInput(thumbPosition);
601
+ if (!input) {
602
+ return this.min;
663
603
  }
604
+ return input.value;
605
+ }
606
+ _skipUpdate() {
607
+ var _a, _b;
608
+ return !!(((_a = this._getInput(1 /* _MatThumb.START */)) === null || _a === void 0 ? void 0 : _a._skipUIUpdate) || ((_b = this._getInput(2 /* _MatThumb.END */)) === null || _b === void 0 ? void 0 : _b._skipUIUpdate));
609
+ }
610
+ /** Stores the slider dimensions. */
611
+ _updateDimensions() {
612
+ const rect = this._elementRef.nativeElement.getBoundingClientRect();
613
+ this._cachedWidth = rect.width;
614
+ this._cachedLeft = rect.left;
615
+ }
616
+ /** Sets the styles for the active portion of the track. */
617
+ _setTrackActiveStyles(styles) {
618
+ const trackStyle = this._trackActive.nativeElement.style;
619
+ trackStyle.left = styles.left;
620
+ trackStyle.right = styles.right;
621
+ trackStyle.transform = styles.transform;
622
+ trackStyle.transformOrigin = styles.transformOrigin;
623
+ }
624
+ /** Returns the translateX positioning for a tick mark based on it's index. */
625
+ _calcTickMarkTransform(index) {
626
+ // TODO(wagnermaciel): See if we can avoid doing this and just using flex to position these.
627
+ const translateX = index * (this._tickMarkTrackWidth / (this._tickMarks.length - 1));
628
+ return `translateX(${translateX}px`;
629
+ }
630
+ // Handlers for updating the slider ui.
631
+ _onTranslateXChange(source) {
632
+ this._updateThumbUI(source);
633
+ this._updateTrackUI(source);
634
+ this._updateOverlappingThumbUI(source);
635
+ }
636
+ _onTranslateXChangeBySideEffect(input1, input2) {
637
+ input1._updateThumbUIByValue();
638
+ input2._updateThumbUIByValue();
639
+ }
640
+ _onValueChange(source) {
641
+ this._updateValueIndicatorUI(source);
642
+ this._updateTickMarkUI();
643
+ this._cdr.detectChanges();
644
+ }
645
+ _onMinMaxOrStepChange() {
646
+ this._updateTickMarkUI();
647
+ this._updateTickMarkTrackUI();
648
+ this._cdr.markForCheck();
664
649
  }
665
- /** Removes the event listener that keeps sync the slider UI and the foundation in sync. */
666
- _removeUISyncEventListener() {
667
- if (this._SUPPORTS_POINTER_EVENTS) {
668
- this._elementRef.nativeElement.removeEventListener('pointerdown', this._layout);
650
+ _onResize() {
651
+ this._updateDimensions();
652
+ if (this._isRange) {
653
+ const eInput = this._getInput(2 /* _MatThumb.END */);
654
+ const sInput = this._getInput(1 /* _MatThumb.START */);
655
+ eInput._updateThumbUIByValue();
656
+ sInput._updateThumbUIByValue();
657
+ eInput._updateStaticStyles();
658
+ sInput._updateStaticStyles();
659
+ eInput._updateMinMax();
660
+ sInput._updateMinMax();
661
+ eInput._updateWidthInactive();
662
+ sInput._updateWidthInactive();
669
663
  }
670
664
  else {
671
- this._elementRef.nativeElement.removeEventListener('mouseenter', this._layout);
672
- this._elementRef.nativeElement.removeEventListener('touchstart', this._layout, passiveEventListenerOptions);
665
+ const eInput = this._getInput(2 /* _MatThumb.END */);
666
+ if (eInput) {
667
+ eInput._updateThumbUIByValue();
668
+ }
669
+ }
670
+ this._updateTickMarkUI();
671
+ this._updateTickMarkTrackUI();
672
+ this._cdr.detectChanges();
673
+ }
674
+ /** Returns true if the slider knobs are overlapping one another. */
675
+ _areThumbsOverlapping() {
676
+ const startInput = this._getInput(1 /* _MatThumb.START */);
677
+ const endInput = this._getInput(2 /* _MatThumb.END */);
678
+ if (!startInput || !endInput) {
679
+ return false;
673
680
  }
681
+ return endInput.translateX - startInput.translateX < 20;
674
682
  }
675
683
  /**
676
- * Reinitializes the slider foundation and input state(s).
677
- *
678
- * The MDC Foundation does not support changing some slider attributes after it has been
679
- * initialized (e.g. min, max, and step). To continue supporting this feature, we need to
680
- * destroy the foundation and re-initialize everything whenever we make these changes.
684
+ * Updates the class names of overlapping slider thumbs so
685
+ * that the current active thumb is styled to be on "top".
681
686
  */
682
- _reinitialize() {
683
- if (this._initialized) {
684
- this._foundation.destroy();
685
- if (this._isRange()) {
686
- this._getInput(Thumb.START)._initializeInputState();
687
- }
688
- this._getInput(Thumb.END)._initializeInputState();
689
- this._foundation.init();
690
- this._foundation.layout();
687
+ _updateOverlappingThumbClassNames(source) {
688
+ const sibling = source.getSibling();
689
+ const sourceThumb = this._getThumb(source.thumbPosition);
690
+ const siblingThumb = this._getThumb(sibling.thumbPosition);
691
+ siblingThumb._hostElement.classList.remove('mdc-slider__thumb--top');
692
+ sourceThumb._hostElement.classList.toggle('mdc-slider__thumb--top', this._thumbsOverlap);
693
+ }
694
+ /** Updates the UI of slider thumbs when they begin or stop overlapping. */
695
+ _updateOverlappingThumbUI(source) {
696
+ if (!this._isRange || this._skipUpdate()) {
697
+ return;
691
698
  }
692
- }
693
- /** Handles updating the slider foundation after a dir change. */
694
- _onDirChange() {
695
- this._ngZone.runOutsideAngular(() => {
696
- // We need to call layout() a few milliseconds after the dir change callback
697
- // because we need to wait until the bounding client rect of the slider has updated.
698
- setTimeout(() => this._foundation.layout(), 10);
699
- });
700
- }
701
- /** Sets the value of a slider thumb. */
702
- _setValue(value, thumbPosition) {
703
- thumbPosition === Thumb.START
704
- ? this._foundation.setValueStart(value)
705
- : this._foundation.setValue(value);
706
- }
707
- /** Sets the disabled state of the MatSlider. */
708
- _setDisabled(value) {
709
- this._disabled = value;
710
- // If we want to disable the slider after the foundation has been initialized,
711
- // we need to inform the foundation by calling `setDisabled`. Also, we can't call
712
- // this before initializing the foundation because it will throw errors.
713
- if (this._initialized) {
714
- this._foundation.setDisabled(value);
715
- }
716
- }
717
- /** Sets the disabled state of the individual slider thumb(s) (ControlValueAccessor). */
718
- _updateInputsDisabledState() {
719
- if (this._initialized) {
720
- this._getInput(Thumb.END)._disabled = true;
721
- if (this._isRange()) {
722
- this._getInput(Thumb.START)._disabled = true;
723
- }
699
+ if (this._thumbsOverlap !== this._areThumbsOverlapping()) {
700
+ this._thumbsOverlap = !this._thumbsOverlap;
701
+ this._updateOverlappingThumbClassNames(source);
724
702
  }
725
703
  }
726
- /** Whether this is a ranged slider. */
727
- _isRange() {
728
- return this._inputs.length === 2;
729
- }
730
- /** Sets the disabled state based on the disabled state of the inputs (ControlValueAccessor). */
731
- _updateDisabled() {
732
- var _a;
733
- const disabled = ((_a = this._inputs) === null || _a === void 0 ? void 0 : _a.some(input => input._disabled)) || false;
734
- this._setDisabled(disabled);
735
- }
736
- /** Gets the slider thumb input of the given thumb position. */
737
- _getInput(thumbPosition) {
738
- var _a, _b;
739
- return thumbPosition === Thumb.END ? (_a = this._inputs) === null || _a === void 0 ? void 0 : _a.last : (_b = this._inputs) === null || _b === void 0 ? void 0 : _b.first;
740
- }
741
- /** Gets the slider thumb HTML input element of the given thumb position. */
742
- _getInputElement(thumbPosition) {
743
- var _a;
744
- return (_a = this._getInput(thumbPosition)) === null || _a === void 0 ? void 0 : _a._hostElement;
704
+ // _MatThumb styles update conditions
705
+ //
706
+ // 1. TranslateX, resize, or dir change
707
+ // - Reason: The thumb styles need to be updated according to the new translateX.
708
+ // 2. Min, max, or step
709
+ // - Reason: The value may have silently changed.
710
+ /** Updates the translateX of the given thumb. */
711
+ _updateThumbUI(source) {
712
+ if (this._skipUpdate()) {
713
+ return;
714
+ }
715
+ const thumb = this._getThumb(source.thumbPosition === 2 /* _MatThumb.END */ ? 2 /* _MatThumb.END */ : 1 /* _MatThumb.START */);
716
+ thumb._hostElement.style.transform = `translateX(${source.translateX}px)`;
745
717
  }
746
- _getThumb(thumbPosition) {
747
- var _a, _b;
748
- return thumbPosition === Thumb.END ? (_a = this._thumbs) === null || _a === void 0 ? void 0 : _a.last : (_b = this._thumbs) === null || _b === void 0 ? void 0 : _b.first;
718
+ // Value indicator text update conditions
719
+ //
720
+ // 1. Value
721
+ // - Reason: The value displayed needs to be updated.
722
+ // 2. Min, max, or step
723
+ // - Reason: The value may have silently changed.
724
+ /** Updates the value indicator tooltip ui for the given thumb. */
725
+ _updateValueIndicatorUI(source) {
726
+ if (this._skipUpdate()) {
727
+ return;
728
+ }
729
+ const valuetext = this.displayWith(source.value);
730
+ source._valuetext = valuetext;
731
+ if (this.discrete) {
732
+ source.thumbPosition === 1 /* _MatThumb.START */
733
+ ? (this.startValueIndicatorText = valuetext)
734
+ : (this.endValueIndicatorText = valuetext);
735
+ const visualThumb = this._getThumb(source.thumbPosition);
736
+ valuetext.length < 3
737
+ ? visualThumb._hostElement.classList.add('mdc-slider__thumb--short-value')
738
+ : visualThumb._hostElement.classList.remove('mdc-slider__thumb--short-value');
739
+ }
749
740
  }
750
- /** Gets the slider thumb HTML element of the given thumb position. */
751
- _getThumbElement(thumbPosition) {
752
- var _a;
753
- return (_a = this._getThumb(thumbPosition)) === null || _a === void 0 ? void 0 : _a._getHostElement();
741
+ // Update Tick Mark Track Width
742
+ //
743
+ // 1. Min, max, or step
744
+ // - Reason: The maximum reachable value may have changed.
745
+ // - Side note: The maximum reachable value is different from the maximum value set by the
746
+ // user. For example, a slider with [min: 5, max: 100, step: 10] would have a maximum
747
+ // reachable value of 95.
748
+ // 2. Resize
749
+ // - Reason: The position for the maximum reachable value needs to be recalculated.
750
+ /** Updates the width of the tick mark track. */
751
+ _updateTickMarkTrackUI() {
752
+ if (this._skipUpdate()) {
753
+ return;
754
+ }
755
+ const step = this._step && this._step > 0 ? this._step : 1;
756
+ const maxValue = Math.floor(this.max / step) * step;
757
+ const percentage = (maxValue - this.min) / (this.max - this.min);
758
+ this._tickMarkTrackWidth = this._cachedWidth * percentage - 6;
754
759
  }
755
- /** Gets the slider knob HTML element of the given thumb position. */
756
- _getKnobElement(thumbPosition) {
757
- var _a;
758
- return (_a = this._getThumb(thumbPosition)) === null || _a === void 0 ? void 0 : _a._getKnob();
760
+ // Track active update conditions
761
+ //
762
+ // 1. TranslateX
763
+ // - Reason: The track active should line up with the new thumb position.
764
+ // 2. Min or max
765
+ // - Reason #1: The 'active' percentage needs to be recalculated.
766
+ // - Reason #2: The value may have silently changed.
767
+ // 3. Step
768
+ // - Reason: The value may have silently changed causing the thumb(s) to shift.
769
+ // 4. Dir change
770
+ // - Reason: The track active will need to be updated according to the new thumb position(s).
771
+ // 5. Resize
772
+ // - Reason: The total width the 'active' tracks translateX is based on has changed.
773
+ /** Updates the scale on the active portion of the track. */
774
+ _updateTrackUI(source) {
775
+ if (this._skipUpdate()) {
776
+ return;
777
+ }
778
+ this._isRange
779
+ ? this._updateTrackUIRange(source)
780
+ : this._updateTrackUINonRange(source);
759
781
  }
760
- /**
761
- * Gets the slider value indicator container HTML element of the given thumb
762
- * position.
763
- */
764
- _getValueIndicatorContainerElement(thumbPosition) {
765
- return this._getThumb(thumbPosition)._getValueIndicatorContainer();
782
+ _updateTrackUIRange(source) {
783
+ const sibling = source.getSibling();
784
+ if (!sibling || !this._cachedWidth) {
785
+ return;
786
+ }
787
+ const activePercentage = Math.abs(sibling.translateX - source.translateX) / this._cachedWidth;
788
+ if (source._isLeftThumb && this._cachedWidth) {
789
+ this._setTrackActiveStyles({
790
+ left: 'auto',
791
+ right: `${this._cachedWidth - sibling.translateX}px`,
792
+ transformOrigin: 'right',
793
+ transform: `scaleX(${activePercentage})`,
794
+ });
795
+ }
796
+ else {
797
+ this._setTrackActiveStyles({
798
+ left: `${sibling.translateX}px`,
799
+ right: 'auto',
800
+ transformOrigin: 'left',
801
+ transform: `scaleX(${activePercentage})`,
802
+ });
803
+ }
766
804
  }
767
- /**
768
- * Sets the value indicator text of the given thumb position using the given value.
769
- *
770
- * Uses the `displayWith` function if one has been provided. Otherwise, it just uses the
771
- * numeric value as a string.
772
- */
773
- _setValueIndicatorText(value, thumbPosition) {
774
- thumbPosition === Thumb.START
775
- ? (this._startValueIndicatorText = this.displayWith(value))
776
- : (this._endValueIndicatorText = this.displayWith(value));
777
- this._cdr.markForCheck();
805
+ _updateTrackUINonRange(source) {
806
+ this._isRtl
807
+ ? this._setTrackActiveStyles({
808
+ left: 'auto',
809
+ right: '0px',
810
+ transformOrigin: 'right',
811
+ transform: `scaleX(${1 - source.fillPercentage})`,
812
+ })
813
+ : this._setTrackActiveStyles({
814
+ left: '0px',
815
+ right: 'auto',
816
+ transformOrigin: 'left',
817
+ transform: `scaleX(${source.fillPercentage})`,
818
+ });
778
819
  }
779
- /** Gets the value indicator text for the given thumb position. */
780
- _getValueIndicatorText(thumbPosition) {
781
- return thumbPosition === Thumb.START
782
- ? this._startValueIndicatorText
783
- : this._endValueIndicatorText;
820
+ // Tick mark update conditions
821
+ //
822
+ // 1. Value
823
+ // - Reason: a tick mark which was once active might now be inactive or vice versa.
824
+ // 2. Min, max, or step
825
+ // - Reason #1: the number of tick marks may have changed.
826
+ // - Reason #2: The value may have silently changed.
827
+ /** Updates the dots along the slider track. */
828
+ _updateTickMarkUI() {
829
+ if (this.step === undefined || this.min === undefined || this.max === undefined) {
830
+ return;
831
+ }
832
+ const step = this.step > 0 ? this.step : 1;
833
+ this._isRange ? this._updateTickMarkUIRange(step) : this._updateTickMarkUINonRange(step);
834
+ if (this._isRtl) {
835
+ this._tickMarks.reverse();
836
+ }
784
837
  }
785
- /** Determines the class name for a HTML element. */
786
- _getTickMarkClass(tickMark) {
787
- return tickMark === TickMark.ACTIVE
788
- ? 'mdc-slider__tick-mark--active'
789
- : 'mdc-slider__tick-mark--inactive';
838
+ _updateTickMarkUINonRange(step) {
839
+ const value = this._getValue();
840
+ let numActive = Math.max(Math.round((value - this.min) / step), 0);
841
+ let numInactive = Math.max(Math.round((this.max - value) / step), 0);
842
+ this._isRtl ? numActive++ : numInactive++;
843
+ this._tickMarks = Array(numActive)
844
+ .fill(0 /* _MatTickMark.ACTIVE */)
845
+ .concat(Array(numInactive).fill(1 /* _MatTickMark.INACTIVE */));
846
+ }
847
+ _updateTickMarkUIRange(step) {
848
+ const endValue = this._getValue();
849
+ const startValue = this._getValue(1 /* _MatThumb.START */);
850
+ const numInactiveBeforeStartThumb = Math.max(Math.floor((startValue - this.min) / step), 0);
851
+ const numActive = Math.max(Math.floor((endValue - startValue) / step) + 1, 0);
852
+ const numInactiveAfterEndThumb = Math.max(Math.floor((this.max - endValue) / step), 0);
853
+ this._tickMarks = Array(numInactiveBeforeStartThumb)
854
+ .fill(1 /* _MatTickMark.INACTIVE */)
855
+ .concat(Array(numActive).fill(0 /* _MatTickMark.ACTIVE */), Array(numInactiveAfterEndThumb).fill(1 /* _MatTickMark.INACTIVE */));
790
856
  }
791
- /** Whether the slider thumb ripples should be disabled. */
792
- _isRippleDisabled() {
857
+ /** Gets the slider thumb input of the given thumb position. */
858
+ _getInput(thumbPosition) {
793
859
  var _a;
794
- return this.disabled || this.disableRipple || !!((_a = this._globalRippleOptions) === null || _a === void 0 ? void 0 : _a.disabled);
795
- }
796
- /** Gets the dimensions of the host element. */
797
- _getHostDimensions() {
798
- return this._cachedHostRect || this._elementRef.nativeElement.getBoundingClientRect();
799
- }
800
- /** Starts observing and updating the slider if the host changes its size. */
801
- _observeHostResize() {
802
- if (typeof ResizeObserver === 'undefined' || !ResizeObserver) {
803
- return;
860
+ if (thumbPosition === 2 /* _MatThumb.END */ && this._input) {
861
+ return this._input;
804
862
  }
805
- // MDC only updates the slider when the window is resized which
806
- // doesn't capture changes of the container itself. We use a resize
807
- // observer to ensure that the layout is correct (see #24590 and #25286).
808
- this._ngZone.runOutsideAngular(() => {
809
- this._resizeObserver = new ResizeObserver(entries => {
810
- // Triggering a layout while the user is dragging can throw off the alignment.
811
- if (this._isActive()) {
812
- return;
813
- }
814
- clearTimeout(this._resizeTimer);
815
- this._resizeTimer = setTimeout(() => {
816
- var _a;
817
- // The `layout` call is going to call `getBoundingClientRect` to update the dimensions
818
- // of the host. Since the `ResizeObserver` already calculated them, we can save some
819
- // work by returning them instead of having to check the DOM again.
820
- if (!this._isActive()) {
821
- this._cachedHostRect = (_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect;
822
- this._layout();
823
- this._cachedHostRect = null;
824
- }
825
- }, 50);
826
- });
827
- this._resizeObserver.observe(this._elementRef.nativeElement);
828
- });
863
+ if ((_a = this._inputs) === null || _a === void 0 ? void 0 : _a.length) {
864
+ return thumbPosition === 1 /* _MatThumb.START */ ? this._inputs.first : this._inputs.last;
865
+ }
866
+ return;
829
867
  }
830
- /** Whether any of the thumbs are currently active. */
831
- _isActive() {
832
- return this._getThumb(Thumb.START)._isActive || this._getThumb(Thumb.END)._isActive;
868
+ /** Gets the slider thumb HTML input element of the given thumb position. */
869
+ _getThumb(thumbPosition) {
870
+ var _a, _b;
871
+ return thumbPosition === 2 /* _MatThumb.END */ ? (_a = this._thumbs) === null || _a === void 0 ? void 0 : _a.last : (_b = this._thumbs) === null || _b === void 0 ? void 0 : _b.first;
872
+ }
873
+ _setTransition(withAnimation) {
874
+ this._hasAnimation = withAnimation && !this._noopAnimations;
875
+ this._elementRef.nativeElement.classList.toggle('mat-mdc-slider-with-animation', this._hasAnimation);
833
876
  }
834
877
  }
835
- MatSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSlider, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i3.Platform }, { token: GlobalChangeAndInputListener }, { token: DOCUMENT }, { token: i5.Directionality, optional: true }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
836
- MatSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: MatSlider, selector: "mat-slider", inputs: { color: "color", disableRipple: "disableRipple", disabled: "disabled", discrete: "discrete", showTickMarks: "showTickMarks", min: "min", max: "max", step: "step", displayWith: "displayWith" }, host: { properties: { "class.mdc-slider--range": "_isRange()", "class.mdc-slider--disabled": "disabled", "class.mdc-slider--discrete": "discrete", "class.mdc-slider--tick-marks": "showTickMarks", "class._mat-animation-noopable": "_noopAnimations" }, classAttribute: "mat-mdc-slider mdc-slider" }, queries: [{ propertyName: "_inputs", predicate: MatSliderThumb }], viewQueries: [{ propertyName: "_trackActive", first: true, predicate: ["trackActive"], descendants: true }, { propertyName: "_thumbs", predicate: MatSliderVisualThumb, descendants: true }], exportAs: ["matSlider"], usesInheritance: true, ngImport: i0, template: "<!-- Inputs -->\n<ng-content></ng-content>\n\n<!-- Track -->\n<div class=\"mdc-slider__track\">\n <div class=\"mdc-slider__track--inactive\"></div>\n <div class=\"mdc-slider__track--active\">\n <div class=\"mdc-slider__track--active_fill\" #trackActive></div>\n </div>\n <div *ngIf=\"showTickMarks\" class=\"mdc-slider__tick-marks\" #tickMarkContainer>\n <div *ngFor=\"let tickMark of _tickMarks\" [class]=\"_getTickMarkClass(tickMark)\"></div>\n </div>\n</div>\n\n<!-- Thumbs -->\n<mat-slider-visual-thumb\n *ngFor=\"let thumb of _inputs\"\n [discrete]=\"discrete\"\n [disableRipple]=\"_isRippleDisabled()\"\n [thumbPosition]=\"thumb._thumbPosition\"\n [valueIndicatorText]=\"_getValueIndicatorText(thumb._thumbPosition)\">\n</mat-slider-visual-thumb>\n", styles: [".mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:\"\";height:0;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__thumb{display:flex;left:-24px;outline:none;position:absolute;user-select:none;height:48px;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-sizing:border-box;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;margin-left:8px;margin-right:8px;width:auto;min-width:112px}.mat-mdc-slider .mdc-slider__thumb-knob{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000));border-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb::before,.mat-mdc-slider .mdc-slider__thumb::after{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover::before,.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__track--active_fill{border-color:var(--mdc-slider-active-track-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider .mdc-slider__track--inactive{background-color:var(--mdc-slider-inactive-track-color, var(--mdc-theme-primary, #6200ee));opacity:.24}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mdc-theme-on-surface, #000));opacity:.24}.mat-mdc-slider .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mdc-theme-primary, #6200ee));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mdc-theme-on-surface, #000));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__value-indicator{background-color:var(--mdc-slider-label-container-color, #666666);opacity:1}.mat-mdc-slider .mdc-slider__value-indicator::before{border-top-color:var(--mdc-slider-label-container-color, #666666)}.mat-mdc-slider .mdc-slider__value-indicator{color:var(--mdc-slider-label-label-text-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slider .mdc-slider__track{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__track--active{height:var(--mdc-slider-active-track-height, 6px)}.mat-mdc-slider .mdc-slider__track--inactive{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{height:var(--mdc-slider-with-tick-marks-container-size, 2px);width:var(--mdc-slider-with-tick-marks-container-size, 2px)}.mat-mdc-slider.mdc-slider--disabled{opacity:0.38}.mat-mdc-slider .mdc-slider__value-indicator-text{letter-spacing:var(--mdc-slider-label-label-text-tracking, 0.0071428571em);font-size:var(--mdc-slider-label-label-text-font-size, 0.875rem);font-family:var(--mdc-slider-label-label-text-font, Roboto, sans-serif);font-weight:var(--mdc-slider-label-label-text-weight, 500);line-height:var(--mdc-slider-label-label-text-line-height, 1.375rem)}.mat-mdc-slider .mdc-slider__track--active{border-radius:var(--mdc-slider-active-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__track--inactive{border-radius:var(--mdc-slider-inactive-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__thumb-knob{border-radius:var(--mdc-slider-handle-shape, 50%);width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-style:solid;border-width:calc(var(--mdc-slider-handle-height, 20px) / 2) calc(var(--mdc-slider-handle-width, 20px) / 2)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{border-radius:var(--mdc-slider-with-tick-marks-container-shape, 50%)}.mat-mdc-slider .mdc-slider__thumb-knob{--mdc-elevation-box-shadow-for-gss:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-slider-handle-elevation, var(--mdc-elevation-box-shadow-for-gss))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:var(--mdc-slider-with-overlap-handle-outline-color, #fff);border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mat-mdc-slider .mdc-slider__value-indicator{opacity:var(--mat-mdc-slider-value-indicator-opacity, 1)}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-mdc-slider-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-mdc-slider-hover-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-mdc-slider-focus-ripple-color, transparent)}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-mdc-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-mdc-focus-indicator::before{content:\"\"}"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatSliderVisualThumb, selector: "mat-slider-visual-thumb", inputs: ["discrete", "thumbPosition", "valueIndicatorText", "disableRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
837
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSlider, decorators: [{
878
+ MatSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSlider, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }, { token: i0.ElementRef }, { token: i2$1.Directionality, optional: true }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
879
+ MatSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0-rc.1", type: MatSlider, selector: "mat-slider", inputs: { color: "color", disableRipple: "disableRipple", disabled: "disabled", discrete: "discrete", showTickMarks: "showTickMarks", min: "min", max: "max", step: "step", displayWith: "displayWith" }, host: { properties: { "class.mdc-slider--range": "_isRange", "class.mdc-slider--disabled": "disabled", "class.mdc-slider--discrete": "discrete", "class.mdc-slider--tick-marks": "showTickMarks", "class._mat-animation-noopable": "_noopAnimations" }, classAttribute: "mat-mdc-slider mdc-slider" }, providers: [{ provide: MAT_SLIDER, useExisting: MatSlider }], queries: [{ propertyName: "_input", first: true, predicate: MAT_SLIDER_THUMB, descendants: true }, { propertyName: "_inputs", predicate: MAT_SLIDER_RANGE_THUMB }], viewQueries: [{ propertyName: "_trackActive", first: true, predicate: ["trackActive"], descendants: true }, { propertyName: "_thumbs", predicate: MAT_SLIDER_VISUAL_THUMB, descendants: true }], exportAs: ["matSlider"], usesInheritance: true, ngImport: i0, template: "<!-- Inputs -->\n<ng-content></ng-content>\n\n<!-- Track -->\n<div class=\"mdc-slider__track\">\n <div class=\"mdc-slider__track--inactive\"></div>\n <div class=\"mdc-slider__track--active\">\n <div #trackActive class=\"mdc-slider__track--active_fill\"></div>\n </div>\n <div *ngIf=\"showTickMarks\" class=\"mdc-slider__tick-marks\" #tickMarkContainer>\n <ng-container *ngIf=\"_cachedWidth\">\n <div\n *ngFor=\"let tickMark of _tickMarks; let i = index\"\n [class]=\"tickMark === 0 ? 'mdc-slider__tick-mark--active' : 'mdc-slider__tick-mark--inactive'\"\n [style.transform]=\"_calcTickMarkTransform(i)\"></div>\n </ng-container>\n </div>\n</div>\n\n<!-- Thumbs -->\n<mat-slider-visual-thumb\n *ngIf=\"_isRange\"\n [discrete]=\"discrete\"\n [thumbPosition]=\"1\"\n [valueIndicatorText]=\"startValueIndicatorText\">\n</mat-slider-visual-thumb>\n\n<mat-slider-visual-thumb\n [discrete]=\"discrete\"\n [thumbPosition]=\"2\"\n [valueIndicatorText]=\"endValueIndicatorText\">\n</mat-slider-visual-thumb>\n", styles: [".mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:\"\";height:0;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__thumb{display:flex;left:-24px;outline:none;position:absolute;user-select:none;height:48px;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-sizing:border-box;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;margin-left:8px;margin-right:8px;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider .mdc-slider__thumb-knob{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000));border-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb::before,.mat-mdc-slider .mdc-slider__thumb::after{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover::before,.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__track--active_fill{border-color:var(--mdc-slider-active-track-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider .mdc-slider__track--inactive{background-color:var(--mdc-slider-inactive-track-color, var(--mdc-theme-primary, #6200ee));opacity:.24}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mdc-theme-on-surface, #000));opacity:.24}.mat-mdc-slider .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mdc-theme-primary, #6200ee));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mdc-theme-on-surface, #000));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__value-indicator{background-color:var(--mdc-slider-label-container-color, #666666);opacity:1}.mat-mdc-slider .mdc-slider__value-indicator::before{border-top-color:var(--mdc-slider-label-container-color, #666666)}.mat-mdc-slider .mdc-slider__value-indicator{color:var(--mdc-slider-label-label-text-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slider .mdc-slider__track{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__track--active{height:var(--mdc-slider-active-track-height, 6px)}.mat-mdc-slider .mdc-slider__track--inactive{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{height:var(--mdc-slider-with-tick-marks-container-size, 2px);width:var(--mdc-slider-with-tick-marks-container-size, 2px)}.mat-mdc-slider.mdc-slider--disabled{opacity:0.38}.mat-mdc-slider .mdc-slider__value-indicator-text{letter-spacing:var(--mdc-slider-label-label-text-tracking, 0.0071428571em);font-size:var(--mdc-slider-label-label-text-font-size, 0.875rem);font-family:var(--mdc-slider-label-label-text-font, Roboto, sans-serif);font-weight:var(--mdc-slider-label-label-text-weight, 500);line-height:var(--mdc-slider-label-label-text-line-height, 1.375rem)}.mat-mdc-slider .mdc-slider__track--active{border-radius:var(--mdc-slider-active-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__track--inactive{border-radius:var(--mdc-slider-inactive-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__thumb-knob{border-radius:var(--mdc-slider-handle-shape, 50%);width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-style:solid;border-width:calc(var(--mdc-slider-handle-height, 20px) / 2) calc(var(--mdc-slider-handle-width, 20px) / 2)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{border-radius:var(--mdc-slider-with-tick-marks-container-shape, 50%)}.mat-mdc-slider .mdc-slider__thumb-knob{box-shadow:var(--mdc-slider-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:var(--mdc-slider-with-overlap-handle-outline-color, #fff);border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mat-mdc-slider .mdc-slider__input{pointer-events:auto}.mat-mdc-slider .mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mat-mdc-slider .mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mdc-slider__track,.mat-mdc-slider .mdc-slider__thumb{pointer-events:none}.mat-mdc-slider .mdc-slider__value-indicator{opacity:var(--mat-mdc-slider-value-indicator-opacity, 1)}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-mdc-slider-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-mdc-slider-hover-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-mdc-slider-focus-ripple-color, transparent)}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-mdc-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-mdc-focus-indicator::before{content:\"\"}"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatSliderVisualThumb, selector: "mat-slider-visual-thumb", inputs: ["discrete", "thumbPosition", "valueIndicatorText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSlider, decorators: [{
838
881
  type: Component,
839
882
  args: [{ selector: 'mat-slider', host: {
840
883
  'class': 'mat-mdc-slider mdc-slider',
841
- '[class.mdc-slider--range]': '_isRange()',
884
+ '[class.mdc-slider--range]': '_isRange',
842
885
  '[class.mdc-slider--disabled]': 'disabled',
843
886
  '[class.mdc-slider--discrete]': 'discrete',
844
887
  '[class.mdc-slider--tick-marks]': 'showTickMarks',
845
888
  '[class._mat-animation-noopable]': '_noopAnimations',
846
- }, exportAs: 'matSlider', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: ['color', 'disableRipple'], template: "<!-- Inputs -->\n<ng-content></ng-content>\n\n<!-- Track -->\n<div class=\"mdc-slider__track\">\n <div class=\"mdc-slider__track--inactive\"></div>\n <div class=\"mdc-slider__track--active\">\n <div class=\"mdc-slider__track--active_fill\" #trackActive></div>\n </div>\n <div *ngIf=\"showTickMarks\" class=\"mdc-slider__tick-marks\" #tickMarkContainer>\n <div *ngFor=\"let tickMark of _tickMarks\" [class]=\"_getTickMarkClass(tickMark)\"></div>\n </div>\n</div>\n\n<!-- Thumbs -->\n<mat-slider-visual-thumb\n *ngFor=\"let thumb of _inputs\"\n [discrete]=\"discrete\"\n [disableRipple]=\"_isRippleDisabled()\"\n [thumbPosition]=\"thumb._thumbPosition\"\n [valueIndicatorText]=\"_getValueIndicatorText(thumb._thumbPosition)\">\n</mat-slider-visual-thumb>\n", styles: [".mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:\"\";height:0;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__thumb{display:flex;left:-24px;outline:none;position:absolute;user-select:none;height:48px;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-sizing:border-box;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;margin-left:8px;margin-right:8px;width:auto;min-width:112px}.mat-mdc-slider .mdc-slider__thumb-knob{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000));border-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb::before,.mat-mdc-slider .mdc-slider__thumb::after{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover::before,.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__track--active_fill{border-color:var(--mdc-slider-active-track-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider .mdc-slider__track--inactive{background-color:var(--mdc-slider-inactive-track-color, var(--mdc-theme-primary, #6200ee));opacity:.24}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mdc-theme-on-surface, #000));opacity:.24}.mat-mdc-slider .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mdc-theme-primary, #6200ee));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mdc-theme-on-surface, #000));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__value-indicator{background-color:var(--mdc-slider-label-container-color, #666666);opacity:1}.mat-mdc-slider .mdc-slider__value-indicator::before{border-top-color:var(--mdc-slider-label-container-color, #666666)}.mat-mdc-slider .mdc-slider__value-indicator{color:var(--mdc-slider-label-label-text-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slider .mdc-slider__track{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__track--active{height:var(--mdc-slider-active-track-height, 6px)}.mat-mdc-slider .mdc-slider__track--inactive{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{height:var(--mdc-slider-with-tick-marks-container-size, 2px);width:var(--mdc-slider-with-tick-marks-container-size, 2px)}.mat-mdc-slider.mdc-slider--disabled{opacity:0.38}.mat-mdc-slider .mdc-slider__value-indicator-text{letter-spacing:var(--mdc-slider-label-label-text-tracking, 0.0071428571em);font-size:var(--mdc-slider-label-label-text-font-size, 0.875rem);font-family:var(--mdc-slider-label-label-text-font, Roboto, sans-serif);font-weight:var(--mdc-slider-label-label-text-weight, 500);line-height:var(--mdc-slider-label-label-text-line-height, 1.375rem)}.mat-mdc-slider .mdc-slider__track--active{border-radius:var(--mdc-slider-active-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__track--inactive{border-radius:var(--mdc-slider-inactive-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__thumb-knob{border-radius:var(--mdc-slider-handle-shape, 50%);width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-style:solid;border-width:calc(var(--mdc-slider-handle-height, 20px) / 2) calc(var(--mdc-slider-handle-width, 20px) / 2)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{border-radius:var(--mdc-slider-with-tick-marks-container-shape, 50%)}.mat-mdc-slider .mdc-slider__thumb-knob{--mdc-elevation-box-shadow-for-gss:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-slider-handle-elevation, var(--mdc-elevation-box-shadow-for-gss))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:var(--mdc-slider-with-overlap-handle-outline-color, #fff);border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mat-mdc-slider .mdc-slider__value-indicator{opacity:var(--mat-mdc-slider-value-indicator-opacity, 1)}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-mdc-slider-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-mdc-slider-hover-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-mdc-slider-focus-ripple-color, transparent)}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-mdc-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-mdc-focus-indicator::before{content:\"\"}"] }]
889
+ }, exportAs: 'matSlider', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: ['color', 'disableRipple'], providers: [{ provide: MAT_SLIDER, useExisting: MatSlider }], template: "<!-- Inputs -->\n<ng-content></ng-content>\n\n<!-- Track -->\n<div class=\"mdc-slider__track\">\n <div class=\"mdc-slider__track--inactive\"></div>\n <div class=\"mdc-slider__track--active\">\n <div #trackActive class=\"mdc-slider__track--active_fill\"></div>\n </div>\n <div *ngIf=\"showTickMarks\" class=\"mdc-slider__tick-marks\" #tickMarkContainer>\n <ng-container *ngIf=\"_cachedWidth\">\n <div\n *ngFor=\"let tickMark of _tickMarks; let i = index\"\n [class]=\"tickMark === 0 ? 'mdc-slider__tick-mark--active' : 'mdc-slider__tick-mark--inactive'\"\n [style.transform]=\"_calcTickMarkTransform(i)\"></div>\n </ng-container>\n </div>\n</div>\n\n<!-- Thumbs -->\n<mat-slider-visual-thumb\n *ngIf=\"_isRange\"\n [discrete]=\"discrete\"\n [thumbPosition]=\"1\"\n [valueIndicatorText]=\"startValueIndicatorText\">\n</mat-slider-visual-thumb>\n\n<mat-slider-visual-thumb\n [discrete]=\"discrete\"\n [thumbPosition]=\"2\"\n [valueIndicatorText]=\"endValueIndicatorText\">\n</mat-slider-visual-thumb>\n", styles: [".mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:\"\";height:0;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__thumb{display:flex;left:-24px;outline:none;position:absolute;user-select:none;height:48px;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-sizing:border-box;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;margin-left:8px;margin-right:8px;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider .mdc-slider__thumb-knob{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000));border-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb::before,.mat-mdc-slider .mdc-slider__thumb::after{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover::before,.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__track--active_fill{border-color:var(--mdc-slider-active-track-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider .mdc-slider__track--inactive{background-color:var(--mdc-slider-inactive-track-color, var(--mdc-theme-primary, #6200ee));opacity:.24}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mdc-theme-on-surface, #000));opacity:.24}.mat-mdc-slider .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mdc-theme-primary, #6200ee));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mdc-theme-on-surface, #000));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__value-indicator{background-color:var(--mdc-slider-label-container-color, #666666);opacity:1}.mat-mdc-slider .mdc-slider__value-indicator::before{border-top-color:var(--mdc-slider-label-container-color, #666666)}.mat-mdc-slider .mdc-slider__value-indicator{color:var(--mdc-slider-label-label-text-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slider .mdc-slider__track{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__track--active{height:var(--mdc-slider-active-track-height, 6px)}.mat-mdc-slider .mdc-slider__track--inactive{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{height:var(--mdc-slider-with-tick-marks-container-size, 2px);width:var(--mdc-slider-with-tick-marks-container-size, 2px)}.mat-mdc-slider.mdc-slider--disabled{opacity:0.38}.mat-mdc-slider .mdc-slider__value-indicator-text{letter-spacing:var(--mdc-slider-label-label-text-tracking, 0.0071428571em);font-size:var(--mdc-slider-label-label-text-font-size, 0.875rem);font-family:var(--mdc-slider-label-label-text-font, Roboto, sans-serif);font-weight:var(--mdc-slider-label-label-text-weight, 500);line-height:var(--mdc-slider-label-label-text-line-height, 1.375rem)}.mat-mdc-slider .mdc-slider__track--active{border-radius:var(--mdc-slider-active-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__track--inactive{border-radius:var(--mdc-slider-inactive-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__thumb-knob{border-radius:var(--mdc-slider-handle-shape, 50%);width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-style:solid;border-width:calc(var(--mdc-slider-handle-height, 20px) / 2) calc(var(--mdc-slider-handle-width, 20px) / 2)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{border-radius:var(--mdc-slider-with-tick-marks-container-shape, 50%)}.mat-mdc-slider .mdc-slider__thumb-knob{box-shadow:var(--mdc-slider-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:var(--mdc-slider-with-overlap-handle-outline-color, #fff);border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mat-mdc-slider .mdc-slider__input{pointer-events:auto}.mat-mdc-slider .mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mat-mdc-slider .mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mdc-slider__track,.mat-mdc-slider .mdc-slider__thumb{pointer-events:none}.mat-mdc-slider .mdc-slider__value-indicator{opacity:var(--mat-mdc-slider-value-indicator-opacity, 1)}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-mdc-slider-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-mdc-slider-hover-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-mdc-slider-focus-ripple-color, transparent)}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-mdc-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-mdc-focus-indicator::before{content:\"\"}"] }]
847
890
  }], ctorParameters: function () {
848
- return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i3.Platform }, { type: GlobalChangeAndInputListener }, { type: undefined, decorators: [{
849
- type: Inject,
850
- args: [DOCUMENT]
851
- }] }, { type: i5.Directionality, decorators: [{
891
+ return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1.Platform }, { type: i0.ElementRef }, { type: i2$1.Directionality, decorators: [{
852
892
  type: Optional
853
893
  }] }, { type: undefined, decorators: [{
854
894
  type: Optional
@@ -861,15 +901,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ng
861
901
  type: Inject,
862
902
  args: [ANIMATION_MODULE_TYPE]
863
903
  }] }];
864
- }, propDecorators: { _thumbs: [{
865
- type: ViewChildren,
866
- args: [MatSliderVisualThumb]
867
- }], _trackActive: [{
904
+ }, propDecorators: { _trackActive: [{
868
905
  type: ViewChild,
869
906
  args: ['trackActive']
907
+ }], _thumbs: [{
908
+ type: ViewChildren,
909
+ args: [MAT_SLIDER_VISUAL_THUMB]
910
+ }], _input: [{
911
+ type: ContentChild,
912
+ args: [MAT_SLIDER_THUMB]
870
913
  }], _inputs: [{
871
914
  type: ContentChildren,
872
- args: [MatSliderThumb, { descendants: false }]
915
+ args: [MAT_SLIDER_RANGE_THUMB, { descendants: false }]
873
916
  }], disabled: [{
874
917
  type: Input
875
918
  }], discrete: [{
@@ -885,287 +928,642 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ng
885
928
  }], displayWith: [{
886
929
  type: Input
887
930
  }] } });
888
- /** The MDCSliderAdapter implementation. */
889
- class SliderAdapter {
890
- constructor(_delegate) {
891
- this._delegate = _delegate;
892
- /** The global event listener subscription used to handle events on the slider inputs. */
893
- this._globalEventSubscriptions = new Subscription();
894
- // We manually assign functions instead of using prototype methods because
895
- // MDC clobbers the values otherwise.
896
- // See https://github.com/material-components/material-components-web/pull/6256
897
- this.hasClass = (className) => {
898
- return this._delegate._elementRef.nativeElement.classList.contains(className);
899
- };
900
- this.addClass = (className) => {
901
- this._delegate._elementRef.nativeElement.classList.add(className);
902
- };
903
- this.removeClass = (className) => {
904
- this._delegate._elementRef.nativeElement.classList.remove(className);
905
- };
906
- this.getAttribute = (attribute) => {
907
- return this._delegate._elementRef.nativeElement.getAttribute(attribute);
908
- };
909
- this.addThumbClass = (className, thumbPosition) => {
910
- this._delegate._getThumbElement(thumbPosition).classList.add(className);
911
- };
912
- this.removeThumbClass = (className, thumbPosition) => {
913
- this._delegate._getThumbElement(thumbPosition).classList.remove(className);
914
- };
915
- this.getInputValue = (thumbPosition) => {
916
- return this._delegate._getInputElement(thumbPosition).value;
917
- };
918
- this.setInputValue = (value, thumbPosition) => {
919
- this._delegate._getInputElement(thumbPosition).value = value;
920
- };
921
- this.getInputAttribute = (attribute, thumbPosition) => {
922
- return this._delegate._getInputElement(thumbPosition).getAttribute(attribute);
923
- };
924
- this.setInputAttribute = (attribute, value, thumbPosition) => {
925
- const input = this._delegate._getInputElement(thumbPosition);
926
- // TODO(wagnermaciel): remove this check once this component is
927
- // added to the internal allowlist for calling setAttribute.
928
- // Explicitly check the attribute we are setting to prevent xss.
929
- switch (attribute) {
930
- case 'aria-valuetext':
931
- input.setAttribute('aria-valuetext', value);
932
- break;
933
- case 'disabled':
934
- input.setAttribute('disabled', value);
935
- break;
936
- case 'min':
937
- input.setAttribute('min', value);
938
- break;
939
- case 'max':
940
- input.setAttribute('max', value);
941
- break;
942
- case 'value':
943
- input.setAttribute('value', value);
944
- break;
945
- case 'step':
946
- input.setAttribute('step', value);
947
- break;
948
- default:
949
- throw Error(`Tried to set invalid attribute ${attribute} on the mdc-slider.`);
950
- }
951
- };
952
- this.removeInputAttribute = (attribute, thumbPosition) => {
953
- this._delegate._getInputElement(thumbPosition).removeAttribute(attribute);
954
- };
955
- this.focusInput = (thumbPosition) => {
956
- this._delegate._getInputElement(thumbPosition).focus();
957
- };
958
- this.isInputFocused = (thumbPosition) => {
959
- return this._delegate._getInput(thumbPosition)._isFocused();
960
- };
961
- this.getThumbKnobWidth = (thumbPosition) => {
962
- return this._delegate._getKnobElement(thumbPosition).getBoundingClientRect().width;
963
- };
964
- this.getThumbBoundingClientRect = (thumbPosition) => {
965
- return this._delegate._getThumbElement(thumbPosition).getBoundingClientRect();
966
- };
967
- this.getBoundingClientRect = () => {
968
- return this._delegate._getHostDimensions();
969
- };
970
- this.getValueIndicatorContainerWidth = (thumbPosition) => {
971
- return this._delegate._getValueIndicatorContainerElement(thumbPosition).getBoundingClientRect()
972
- .width;
973
- };
974
- this.isRTL = () => {
975
- return this._delegate._isRTL();
976
- };
977
- this.setThumbStyleProperty = (propertyName, value, thumbPosition) => {
978
- this._delegate._getThumbElement(thumbPosition).style.setProperty(propertyName, value);
979
- };
980
- this.removeThumbStyleProperty = (propertyName, thumbPosition) => {
981
- this._delegate._getThumbElement(thumbPosition).style.removeProperty(propertyName);
982
- };
983
- this.setTrackActiveStyleProperty = (propertyName, value) => {
984
- this._delegate._trackActive.nativeElement.style.setProperty(propertyName, value);
985
- };
986
- this.removeTrackActiveStyleProperty = (propertyName) => {
987
- this._delegate._trackActive.nativeElement.style.removeProperty(propertyName);
988
- };
989
- this.setValueIndicatorText = (value, thumbPosition) => {
990
- this._delegate._setValueIndicatorText(value, thumbPosition);
991
- };
992
- this.getValueToAriaValueTextFn = () => {
993
- return this._delegate.displayWith;
994
- };
995
- this.updateTickMarks = (tickMarks) => {
996
- this._delegate._tickMarks = tickMarks;
997
- this._delegate._cdr.markForCheck();
998
- };
999
- this.setPointerCapture = (pointerId) => {
1000
- this._delegate._elementRef.nativeElement.setPointerCapture(pointerId);
1001
- };
1002
- this.emitChangeEvent = (value, thumbPosition) => {
1003
- // We block all real slider input change events and emit fake change events from here, instead.
1004
- // We do this because the mdc implementation of the slider does not trigger real change events
1005
- // on pointer up (only on left or right arrow key down).
1006
- //
1007
- // By stopping real change events from reaching users, and dispatching fake change events
1008
- // (which we allow to reach the user) the slider inputs change events are triggered at the
1009
- // appropriate times. This allows users to listen for change events directly on the slider
1010
- // input as they would with a native range input.
1011
- const input = this._delegate._getInput(thumbPosition);
1012
- input._emitFakeEvent('change');
1013
- input._onChange(value);
1014
- input.valueChange.emit(value);
1015
- };
1016
- this.emitInputEvent = (value, thumbPosition) => {
1017
- this._delegate._getInput(thumbPosition)._emitFakeEvent('input');
1018
- };
1019
- this.emitDragStartEvent = (value, thumbPosition) => {
1020
- const input = this._delegate._getInput(thumbPosition);
1021
- input.dragStart.emit({ source: input, parent: this._delegate, value });
1022
- };
1023
- this.emitDragEndEvent = (value, thumbPosition) => {
1024
- const input = this._delegate._getInput(thumbPosition);
1025
- input.dragEnd.emit({ source: input, parent: this._delegate, value });
1026
- };
1027
- this.registerEventHandler = (evtType, handler) => {
1028
- this._delegate._elementRef.nativeElement.addEventListener(evtType, handler);
1029
- };
1030
- this.deregisterEventHandler = (evtType, handler) => {
1031
- this._delegate._elementRef.nativeElement.removeEventListener(evtType, handler);
1032
- };
1033
- this.registerThumbEventHandler = (thumbPosition, evtType, handler) => {
1034
- this._delegate._getThumbElement(thumbPosition).addEventListener(evtType, handler);
1035
- };
1036
- this.deregisterThumbEventHandler = (thumbPosition, evtType, handler) => {
1037
- var _a;
1038
- (_a = this._delegate._getThumbElement(thumbPosition)) === null || _a === void 0 ? void 0 : _a.removeEventListener(evtType, handler);
1039
- };
1040
- this.registerInputEventHandler = (thumbPosition, evtType, handler) => {
1041
- var _a;
1042
- if (evtType === 'change') {
1043
- this._saveChangeEventHandler(thumbPosition, handler);
1044
- }
1045
- else {
1046
- (_a = this._delegate._getInputElement(thumbPosition)) === null || _a === void 0 ? void 0 : _a.addEventListener(evtType, handler);
1047
- }
1048
- };
1049
- this.deregisterInputEventHandler = (thumbPosition, evtType, handler) => {
1050
- var _a;
1051
- if (evtType === 'change') {
1052
- this._globalEventSubscriptions.unsubscribe();
1053
- }
1054
- else {
1055
- (_a = this._delegate._getInputElement(thumbPosition)) === null || _a === void 0 ? void 0 : _a.removeEventListener(evtType, handler);
1056
- }
1057
- };
1058
- this.registerBodyEventHandler = (evtType, handler) => {
1059
- this._delegate._document.body.addEventListener(evtType, handler);
1060
- };
1061
- this.deregisterBodyEventHandler = (evtType, handler) => {
1062
- this._delegate._document.body.removeEventListener(evtType, handler);
1063
- };
1064
- this.registerWindowEventHandler = (evtType, handler) => {
1065
- this._delegate._window.addEventListener(evtType, handler);
1066
- };
1067
- this.deregisterWindowEventHandler = (evtType, handler) => {
1068
- this._delegate._window.removeEventListener(evtType, handler);
1069
- };
1070
- this._globalEventSubscriptions.add(this._subscribeToSliderInputEvents('change'));
1071
- this._globalEventSubscriptions.add(this._subscribeToSliderInputEvents('input'));
931
+ /** Ensures that there is not an invalid configuration for the slider thumb inputs. */
932
+ function _validateInputs(isRange, endInputElement, startInputElement) {
933
+ const startValid = !isRange || (startInputElement === null || startInputElement === void 0 ? void 0 : startInputElement._hostElement.hasAttribute('matSliderStartThumb'));
934
+ const endValid = endInputElement._hostElement.hasAttribute(isRange ? 'matSliderEndThumb' : 'matSliderThumb');
935
+ if (!startValid || !endValid) {
936
+ _throwInvalidInputConfigurationError();
1072
937
  }
1073
- /**
1074
- * Handles "change" and "input" events on the slider inputs.
1075
- *
1076
- * Exposes a callback to allow the MDC Foundations "change" event handler to be called for "real"
1077
- * events.
1078
- *
1079
- * ** IMPORTANT NOTE **
1080
- *
1081
- * We block all "real" change and input events and emit fake events from #emitChangeEvent and
1082
- * #emitInputEvent, instead. We do this because interacting with the MDC slider won't trigger all
1083
- * of the correct change and input events, but it will call #emitChangeEvent and #emitInputEvent
1084
- * at the correct times. This allows users to listen for these events directly on the slider
1085
- * input as they would with a native range input.
1086
- */
1087
- _subscribeToSliderInputEvents(type) {
1088
- return this._delegate._globalChangeAndInputListener.listen(type, (event) => {
1089
- const thumbPosition = this._getInputThumbPosition(event.target);
1090
- // Do nothing if the event isn't from a thumb input.
1091
- if (thumbPosition === null) {
1092
- return;
1093
- }
1094
- // Do nothing if the event is "fake".
1095
- if (event._matIsHandled) {
1096
- return;
1097
- }
1098
- // Prevent "real" events from reaching end users.
1099
- event.stopImmediatePropagation();
1100
- // Relay "real" change events to the MDC Foundation.
1101
- if (type === 'change') {
1102
- this._callChangeEventHandler(event, thumbPosition);
1103
- }
938
+ }
939
+ function _throwInvalidInputConfigurationError() {
940
+ throw Error(`Invalid slider thumb input configuration!
941
+
942
+ Valid configurations are as follows:
943
+
944
+ <mat-slider>
945
+ <input matSliderThumb>
946
+ </mat-slider>
947
+
948
+ or
949
+
950
+ <mat-slider>
951
+ <input matSliderStartThumb>
952
+ <input matSliderEndThumb>
953
+ </mat-slider>
954
+ `);
955
+ }
956
+
957
+ /**
958
+ * @license
959
+ * Copyright Google LLC All Rights Reserved.
960
+ *
961
+ * Use of this source code is governed by an MIT-style license that can be
962
+ * found in the LICENSE file at https://angular.io/license
963
+ */
964
+ /**
965
+ * Provider that allows the slider thumb to register as a ControlValueAccessor.
966
+ * @docs-private
967
+ */
968
+ const MAT_SLIDER_THUMB_VALUE_ACCESSOR = {
969
+ provide: NG_VALUE_ACCESSOR,
970
+ useExisting: forwardRef(() => MatSliderThumb),
971
+ multi: true,
972
+ };
973
+ /**
974
+ * Provider that allows the range slider thumb to register as a ControlValueAccessor.
975
+ * @docs-private
976
+ */
977
+ const MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR = {
978
+ provide: NG_VALUE_ACCESSOR,
979
+ useExisting: forwardRef(() => MatSliderRangeThumb),
980
+ multi: true,
981
+ };
982
+ /**
983
+ * Directive that adds slider-specific behaviors to an input element inside `<mat-slider>`.
984
+ * Up to two may be placed inside of a `<mat-slider>`.
985
+ *
986
+ * If one is used, the selector `matSliderThumb` must be used, and the outcome will be a normal
987
+ * slider. If two are used, the selectors `matSliderStartThumb` and `matSliderEndThumb` must be
988
+ * used, and the outcome will be a range slider with two slider thumbs.
989
+ */
990
+ class MatSliderThumb {
991
+ constructor(_ngZone, _elementRef, _cdr, _slider) {
992
+ this._ngZone = _ngZone;
993
+ this._elementRef = _elementRef;
994
+ this._cdr = _cdr;
995
+ this._slider = _slider;
996
+ this.valueChange = new EventEmitter();
997
+ /** Event emitted when the slider thumb starts being dragged. */
998
+ this.dragStart = new EventEmitter();
999
+ /** Event emitted when the slider thumb stops being dragged. */
1000
+ this.dragEnd = new EventEmitter();
1001
+ /** Indicates whether this thumb is the start or end thumb. */
1002
+ this.thumbPosition = 2 /* _MatThumb.END */;
1003
+ /** The radius of a native html slider's knob. */
1004
+ this._knobRadius = 8;
1005
+ /** Whether user's cursor is currently in a mouse down state on the input. */
1006
+ this._isActive = false;
1007
+ /** Whether the input is currently focused (either by tab or after clicking). */
1008
+ this._isFocused = false;
1009
+ /**
1010
+ * Whether the initial value has been set.
1011
+ * This exists because the initial value cannot be immediately set because the min and max
1012
+ * must first be relayed from the parent MatSlider component, which can only happen later
1013
+ * in the component lifecycle.
1014
+ */
1015
+ this._hasSetInitialValue = false;
1016
+ /** Emits when the component is destroyed. */
1017
+ this._destroyed = new Subject();
1018
+ /**
1019
+ * Indicates whether UI updates should be skipped.
1020
+ *
1021
+ * This flag is used to avoid flickering
1022
+ * when correcting values on pointer up/down.
1023
+ */
1024
+ this._skipUIUpdate = false;
1025
+ /** Callback called when the slider input value changes. */
1026
+ this._onChangeFn = () => { };
1027
+ /** Callback called when the slider input has been touched. */
1028
+ this._onTouchedFn = () => { };
1029
+ this._hostElement = _elementRef.nativeElement;
1030
+ this._ngZone.runOutsideAngular(() => {
1031
+ this._hostElement.addEventListener('pointerdown', this._onPointerDown.bind(this));
1032
+ this._hostElement.addEventListener('pointermove', this._onPointerMove.bind(this));
1033
+ this._hostElement.addEventListener('pointerup', this._onPointerUp.bind(this));
1104
1034
  });
1105
1035
  }
1106
- /** Calls the MDC Foundations change event handler for the specified thumb position. */
1107
- _callChangeEventHandler(event, thumbPosition) {
1108
- if (thumbPosition === Thumb.START) {
1109
- this._startInputChangeEventHandler(event);
1036
+ get value() {
1037
+ return coerceNumberProperty(this._hostElement.value);
1038
+ }
1039
+ set value(v) {
1040
+ const val = coerceNumberProperty(v).toString();
1041
+ if (!this._hasSetInitialValue) {
1042
+ this._initialValue = val;
1043
+ return;
1110
1044
  }
1111
- else {
1112
- this._endInputChangeEventHandler(event);
1045
+ if (this._isActive) {
1046
+ return;
1047
+ }
1048
+ this._hostElement.value = val;
1049
+ this._updateThumbUIByValue();
1050
+ this._slider._onValueChange(this);
1051
+ this._cdr.detectChanges();
1052
+ }
1053
+ /** The current translateX in px of the slider visual thumb. */
1054
+ get translateX() {
1055
+ if (this._slider.min >= this._slider.max) {
1056
+ this._translateX = 0;
1057
+ return this._translateX;
1058
+ }
1059
+ if (this._translateX === undefined) {
1060
+ this._translateX = this._calcTranslateXByValue();
1061
+ }
1062
+ return this._translateX;
1063
+ }
1064
+ set translateX(v) {
1065
+ this._translateX = v;
1066
+ }
1067
+ get min() {
1068
+ return coerceNumberProperty(this._hostElement.min);
1069
+ }
1070
+ set min(v) {
1071
+ this._hostElement.min = coerceNumberProperty(v).toString();
1072
+ this._cdr.detectChanges();
1073
+ }
1074
+ get max() {
1075
+ return coerceNumberProperty(this._hostElement.max);
1076
+ }
1077
+ set max(v) {
1078
+ this._hostElement.max = coerceNumberProperty(v).toString();
1079
+ this._cdr.detectChanges();
1080
+ }
1081
+ get step() {
1082
+ return coerceNumberProperty(this._hostElement.step);
1083
+ }
1084
+ set step(v) {
1085
+ this._hostElement.step = coerceNumberProperty(v).toString();
1086
+ this._cdr.detectChanges();
1087
+ }
1088
+ get disabled() {
1089
+ return coerceBooleanProperty(this._hostElement.disabled);
1090
+ }
1091
+ set disabled(v) {
1092
+ this._hostElement.disabled = coerceBooleanProperty(v);
1093
+ this._cdr.detectChanges();
1094
+ if (this._slider.disabled !== this.disabled) {
1095
+ this._slider.disabled = this.disabled;
1096
+ }
1097
+ }
1098
+ get percentage() {
1099
+ if (this._slider.min >= this._slider.max) {
1100
+ return this._slider._isRtl ? 1 : 0;
1113
1101
  }
1102
+ return (this.value - this._slider.min) / (this._slider.max - this._slider.min);
1114
1103
  }
1115
- /** Save the event handler so it can be used in our global change event listener subscription. */
1116
- _saveChangeEventHandler(thumbPosition, handler) {
1117
- if (thumbPosition === Thumb.START) {
1118
- this._startInputChangeEventHandler = handler;
1104
+ get fillPercentage() {
1105
+ if (!this._slider._cachedWidth) {
1106
+ return this._slider._isRtl ? 1 : 0;
1107
+ }
1108
+ if (this._translateX === 0) {
1109
+ return 0;
1110
+ }
1111
+ return this.translateX / this._slider._cachedWidth;
1112
+ }
1113
+ /** Used to relay updates to _isFocused to the slider visual thumbs. */
1114
+ _setIsFocused(v) {
1115
+ this._isFocused = v;
1116
+ }
1117
+ ngOnDestroy() {
1118
+ this._hostElement.removeEventListener('pointerdown', this._onPointerDown);
1119
+ this._hostElement.removeEventListener('pointermove', this._onPointerMove);
1120
+ this._hostElement.removeEventListener('pointerup', this._onPointerUp);
1121
+ this._destroyed.next();
1122
+ this._destroyed.complete();
1123
+ this.dragStart.complete();
1124
+ this.dragEnd.complete();
1125
+ }
1126
+ initProps() {
1127
+ this._updateWidthInactive();
1128
+ this.disabled = this._slider.disabled;
1129
+ this.step = this._slider.step;
1130
+ this.min = this._slider.min;
1131
+ this.max = this._slider.max;
1132
+ this._initValue();
1133
+ }
1134
+ initUI() {
1135
+ this._updateThumbUIByValue();
1136
+ }
1137
+ _initValue() {
1138
+ this._hasSetInitialValue = true;
1139
+ if (this._initialValue === undefined) {
1140
+ this.value = this._getDefaultValue();
1119
1141
  }
1120
1142
  else {
1121
- this._endInputChangeEventHandler = handler;
1143
+ this._hostElement.value = this._initialValue;
1144
+ this._updateThumbUIByValue();
1145
+ this._slider._onValueChange(this);
1146
+ this._cdr.detectChanges();
1147
+ }
1148
+ }
1149
+ _getDefaultValue() {
1150
+ return this.min;
1151
+ }
1152
+ _onBlur() {
1153
+ this._setIsFocused(false);
1154
+ this._onTouchedFn();
1155
+ }
1156
+ _onFocus() {
1157
+ this._setIsFocused(true);
1158
+ }
1159
+ _onChange() {
1160
+ // only used to handle the edge case where user
1161
+ // mousedown on the slider then uses arrow keys.
1162
+ if (this._isActive) {
1163
+ this._updateThumbUIByValue({ withAnimation: true });
1164
+ }
1165
+ }
1166
+ _onInput() {
1167
+ this.valueChange.emit(this.value);
1168
+ this._onChangeFn(this.value);
1169
+ // handles arrowing and updating the value when
1170
+ // a step is defined.
1171
+ if (this._slider.step || !this._isActive) {
1172
+ this._updateThumbUIByValue({ withAnimation: true });
1173
+ }
1174
+ this._slider._onValueChange(this);
1175
+ }
1176
+ _onNgControlValueChange() {
1177
+ // only used to handle when the value change
1178
+ // originates outside of the slider.
1179
+ if (!this._isActive || !this._isFocused) {
1180
+ this._slider._onValueChange(this);
1181
+ this._updateThumbUIByValue();
1182
+ }
1183
+ this._slider.disabled = this._formControl.disabled;
1184
+ }
1185
+ _onPointerDown(event) {
1186
+ if (this.disabled || event.button !== 0) {
1187
+ return;
1188
+ }
1189
+ this._isActive = true;
1190
+ this._setIsFocused(true);
1191
+ this._updateWidthActive();
1192
+ this._slider._updateDimensions();
1193
+ // Does nothing if a step is defined because we
1194
+ // want the value to snap to the values on input.
1195
+ if (!this._slider.step) {
1196
+ this._updateThumbUIByPointerEvent(event, { withAnimation: true });
1197
+ }
1198
+ if (!this.disabled) {
1199
+ this._handleValueCorrection(event);
1122
1200
  }
1123
1201
  }
1124
1202
  /**
1125
- * Returns the thumb position of the given event target.
1126
- * Returns null if the given event target does not correspond to a slider thumb input.
1203
+ * Corrects the value of the slider on pointer up/down.
1204
+ *
1205
+ * Called on pointer down and up because the value is set based
1206
+ * on the inactive width instead of the active width.
1127
1207
  */
1128
- _getInputThumbPosition(target) {
1129
- if (target === this._delegate._getInputElement(Thumb.END)) {
1130
- return Thumb.END;
1208
+ _handleValueCorrection(event) {
1209
+ // Don't update the UI with the current value! The value on pointerdown
1210
+ // and pointerup is calculated in the split second before the input(s)
1211
+ // resize. See _updateWidthInactive() and _updateWidthActive() for more
1212
+ // details.
1213
+ this._skipUIUpdate = true;
1214
+ // Note that this function gets triggered before the actual value of the
1215
+ // slider is updated. This means if we were to set the value here, it
1216
+ // would immediately be overwritten. Using setTimeout ensures the setting
1217
+ // of the value happens after the value has been updated by the
1218
+ // pointerdown event.
1219
+ setTimeout(() => {
1220
+ this._skipUIUpdate = false;
1221
+ this._fixValue(event);
1222
+ }, 0);
1223
+ }
1224
+ /** Corrects the value of the slider based on the pointer event's position. */
1225
+ _fixValue(event) {
1226
+ const xPos = event.clientX - this._slider._cachedLeft;
1227
+ const width = this._slider._cachedWidth;
1228
+ const step = this._slider.step === 0 ? 1 : this._slider.step;
1229
+ const numSteps = Math.floor((this._slider.max - this._slider.min) / step);
1230
+ const percentage = this._slider._isRtl ? 1 - xPos / width : xPos / width;
1231
+ // To ensure the percentage is rounded to the necessary number of decimals.
1232
+ const fixedPercentage = Math.round(percentage * numSteps) / numSteps;
1233
+ const impreciseValue = fixedPercentage * (this._slider.max - this._slider.min) + this._slider.min;
1234
+ const value = Math.round(impreciseValue / step) * step;
1235
+ const prevValue = this.value;
1236
+ const dragEvent = { source: this, parent: this._slider, value: value };
1237
+ this._isActive ? this.dragStart.emit(dragEvent) : this.dragEnd.emit(dragEvent);
1238
+ if (value === prevValue) {
1239
+ // Because we prevented UI updates, if it turns out that the race
1240
+ // condition didn't happen and the value is already correct, we
1241
+ // have to apply the ui updates now.
1242
+ this._slider._onValueChange(this);
1243
+ this._slider.step > 0
1244
+ ? this._updateThumbUIByValue()
1245
+ : this._updateThumbUIByPointerEvent(event, { withAnimation: this._slider._hasAnimation });
1246
+ return;
1131
1247
  }
1132
- if (this._delegate._isRange() && target === this._delegate._getInputElement(Thumb.START)) {
1133
- return Thumb.START;
1248
+ this.value = value;
1249
+ this.valueChange.emit(this.value);
1250
+ this._onChangeFn(this.value);
1251
+ this._slider._onValueChange(this);
1252
+ this._slider.step > 0
1253
+ ? this._updateThumbUIByValue()
1254
+ : this._updateThumbUIByPointerEvent(event, { withAnimation: this._slider._hasAnimation });
1255
+ }
1256
+ _onPointerMove(event) {
1257
+ // Again, does nothing if a step is defined because
1258
+ // we want the value to snap to the values on input.
1259
+ if (!this._slider.step && this._isActive) {
1260
+ this._updateThumbUIByPointerEvent(event);
1134
1261
  }
1135
- return null;
1136
1262
  }
1137
- }
1138
- /** Ensures that there is not an invalid configuration for the slider thumb inputs. */
1139
- function _validateInputs(isRange, startInputElement, endInputElement) {
1140
- const startValid = !isRange || startInputElement.hasAttribute('matSliderStartThumb');
1141
- const endValid = endInputElement.hasAttribute(isRange ? 'matSliderEndThumb' : 'matSliderThumb');
1142
- if (!startValid || !endValid) {
1143
- _throwInvalidInputConfigurationError();
1263
+ _onPointerUp(event) {
1264
+ this._isActive = false;
1265
+ this._updateWidthInactive();
1266
+ if (!this.disabled) {
1267
+ this._handleValueCorrection(event);
1268
+ }
1144
1269
  }
1145
- }
1146
- /** Validates that the slider has the correct set of thumbs. */
1147
- function _validateThumbs(isRange, start, end) {
1148
- if (!end && (!isRange || !start)) {
1149
- _throwInvalidInputConfigurationError();
1270
+ _clamp(v) {
1271
+ return Math.max(Math.min(v, this._slider._cachedWidth), 0);
1272
+ }
1273
+ _calcTranslateXByValue() {
1274
+ if (this._slider._isRtl) {
1275
+ return (1 - this.percentage) * this._slider._cachedWidth;
1276
+ }
1277
+ return this.percentage * this._slider._cachedWidth;
1278
+ }
1279
+ _calcTranslateXByPointerEvent(event) {
1280
+ return event.clientX - this._slider._cachedLeft;
1281
+ }
1282
+ /**
1283
+ * Used to set the slider width to the correct
1284
+ * dimensions while the user is dragging.
1285
+ */
1286
+ _updateWidthActive() {
1287
+ this._hostElement.style.padding = `0 ${this._slider._inputPadding}px`;
1288
+ this._hostElement.style.width = `calc(100% + ${this._slider._inputPadding}px)`;
1289
+ }
1290
+ /**
1291
+ * Sets the slider input to disproportionate dimensions to allow for touch
1292
+ * events to be captured on touch devices.
1293
+ */
1294
+ _updateWidthInactive() {
1295
+ this._hostElement.style.padding = '0px';
1296
+ this._hostElement.style.width = 'calc(100% + 48px)';
1297
+ this._hostElement.style.left = '-24px';
1298
+ }
1299
+ _updateThumbUIByValue(options) {
1300
+ this.translateX = this._clamp(this._calcTranslateXByValue());
1301
+ this._updateThumbUI(options);
1302
+ }
1303
+ _updateThumbUIByPointerEvent(event, options) {
1304
+ this.translateX = this._clamp(this._calcTranslateXByPointerEvent(event));
1305
+ this._updateThumbUI(options);
1306
+ }
1307
+ _updateThumbUI(options) {
1308
+ this._slider._setTransition(!!(options === null || options === void 0 ? void 0 : options.withAnimation));
1309
+ this._slider._onTranslateXChange(this);
1310
+ }
1311
+ /**
1312
+ * Sets the input's value.
1313
+ * @param value The new value of the input
1314
+ * @docs-private
1315
+ */
1316
+ writeValue(value) {
1317
+ this.value = value;
1318
+ }
1319
+ /**
1320
+ * Registers a callback to be invoked when the input's value changes from user input.
1321
+ * @param fn The callback to register
1322
+ * @docs-private
1323
+ */
1324
+ registerOnChange(fn) {
1325
+ this._onChangeFn = fn;
1326
+ }
1327
+ /**
1328
+ * Registers a callback to be invoked when the input is blurred by the user.
1329
+ * @param fn The callback to register
1330
+ * @docs-private
1331
+ */
1332
+ registerOnTouched(fn) {
1333
+ this._onTouchedFn = fn;
1334
+ }
1335
+ /**
1336
+ * Sets the disabled state of the slider.
1337
+ * @param isDisabled The new disabled state
1338
+ * @docs-private
1339
+ */
1340
+ setDisabledState(isDisabled) {
1341
+ this.disabled = isDisabled;
1342
+ }
1343
+ focus() {
1344
+ this._hostElement.focus();
1345
+ }
1346
+ blur() {
1347
+ this._hostElement.blur();
1150
1348
  }
1151
1349
  }
1152
- function _throwInvalidInputConfigurationError() {
1153
- throw Error(`Invalid slider thumb input configuration!
1154
-
1155
- Valid configurations are as follows:
1156
-
1157
- <mat-slider>
1158
- <input matSliderThumb>
1159
- </mat-slider>
1160
-
1161
- or
1162
-
1163
- <mat-slider>
1164
- <input matSliderStartThumb>
1165
- <input matSliderEndThumb>
1166
- </mat-slider>
1167
- `);
1350
+ MatSliderThumb.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderThumb, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MAT_SLIDER }], target: i0.ɵɵFactoryTarget.Directive });
1351
+ MatSliderThumb.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.1", type: MatSliderThumb, selector: "input[matSliderThumb]", inputs: { value: "value" }, outputs: { valueChange: "valueChange", dragStart: "dragStart", dragEnd: "dragEnd" }, host: { attributes: { "type": "range" }, listeners: { "change": "_onChange()", "input": "_onInput()", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "attr.aria-valuetext": "_valuetext" }, classAttribute: "mdc-slider__input" }, providers: [
1352
+ MAT_SLIDER_THUMB_VALUE_ACCESSOR,
1353
+ { provide: MAT_SLIDER_THUMB, useExisting: MatSliderThumb },
1354
+ ], exportAs: ["matSliderThumb"], ngImport: i0 });
1355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderThumb, decorators: [{
1356
+ type: Directive,
1357
+ args: [{
1358
+ selector: 'input[matSliderThumb]',
1359
+ exportAs: 'matSliderThumb',
1360
+ host: {
1361
+ 'class': 'mdc-slider__input',
1362
+ 'type': 'range',
1363
+ '[attr.aria-valuetext]': '_valuetext',
1364
+ '(change)': '_onChange()',
1365
+ '(input)': '_onInput()',
1366
+ // TODO(wagnermaciel): Consider using a global event listener instead.
1367
+ // Reason: I have found a semi-consistent way to mouse up without triggering this event.
1368
+ '(blur)': '_onBlur()',
1369
+ '(focus)': '_onFocus()',
1370
+ },
1371
+ providers: [
1372
+ MAT_SLIDER_THUMB_VALUE_ACCESSOR,
1373
+ { provide: MAT_SLIDER_THUMB, useExisting: MatSliderThumb },
1374
+ ],
1375
+ }]
1376
+ }], ctorParameters: function () {
1377
+ return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1378
+ type: Inject,
1379
+ args: [MAT_SLIDER]
1380
+ }] }];
1381
+ }, propDecorators: { value: [{
1382
+ type: Input
1383
+ }], valueChange: [{
1384
+ type: Output
1385
+ }], dragStart: [{
1386
+ type: Output
1387
+ }], dragEnd: [{
1388
+ type: Output
1389
+ }] } });
1390
+ class MatSliderRangeThumb extends MatSliderThumb {
1391
+ constructor(_ngZone, _slider, _elementRef, _cdr) {
1392
+ super(_ngZone, _elementRef, _cdr, _slider);
1393
+ this._cdr = _cdr;
1394
+ this._isEndThumb = this._hostElement.hasAttribute('matSliderEndThumb');
1395
+ this._setIsLeftThumb();
1396
+ this.thumbPosition = this._isEndThumb ? 2 /* _MatThumb.END */ : 1 /* _MatThumb.START */;
1397
+ }
1398
+ getSibling() {
1399
+ if (!this._sibling) {
1400
+ this._sibling = this._slider._getInput(this._isEndThumb ? 1 /* _MatThumb.START */ : 2 /* _MatThumb.END */);
1401
+ }
1402
+ return this._sibling;
1403
+ }
1404
+ /** Returns the minimum translateX position allowed for this slider input's visual thumb. */
1405
+ getMinPos() {
1406
+ const sibling = this.getSibling();
1407
+ if (!this._isLeftThumb && sibling) {
1408
+ return sibling.translateX;
1409
+ }
1410
+ return 0;
1411
+ }
1412
+ /** Returns the maximum translateX position allowed for this slider input's visual thumb. */
1413
+ getMaxPos() {
1414
+ const sibling = this.getSibling();
1415
+ if (this._isLeftThumb && sibling) {
1416
+ return sibling.translateX;
1417
+ }
1418
+ return this._slider._cachedWidth;
1419
+ }
1420
+ _setIsLeftThumb() {
1421
+ this._isLeftThumb =
1422
+ (this._isEndThumb && this._slider._isRtl) || (!this._isEndThumb && !this._slider._isRtl);
1423
+ }
1424
+ _getDefaultValue() {
1425
+ return this._isEndThumb && this._slider._isRange ? this.max : this.min;
1426
+ }
1427
+ _onInput() {
1428
+ super._onInput();
1429
+ this._updateSibling();
1430
+ if (!this._isActive) {
1431
+ this._updateWidthInactive();
1432
+ }
1433
+ }
1434
+ _onNgControlValueChange() {
1435
+ var _a;
1436
+ super._onNgControlValueChange();
1437
+ (_a = this.getSibling()) === null || _a === void 0 ? void 0 : _a._updateMinMax();
1438
+ }
1439
+ _onPointerDown(event) {
1440
+ if (this.disabled) {
1441
+ return;
1442
+ }
1443
+ if (this._sibling) {
1444
+ this._sibling._updateWidthActive();
1445
+ this._sibling._hostElement.classList.add('mat-mdc-slider-input-no-pointer-events');
1446
+ }
1447
+ super._onPointerDown(event);
1448
+ }
1449
+ _onPointerUp(event) {
1450
+ super._onPointerUp(event);
1451
+ if (this._sibling) {
1452
+ this._sibling._updateWidthInactive();
1453
+ this._sibling._hostElement.classList.remove('mat-mdc-slider-input-no-pointer-events');
1454
+ }
1455
+ }
1456
+ _onPointerMove(event) {
1457
+ super._onPointerMove(event);
1458
+ if (!this._slider.step && this._isActive) {
1459
+ this._updateSibling();
1460
+ }
1461
+ }
1462
+ _fixValue(event) {
1463
+ var _a;
1464
+ super._fixValue(event);
1465
+ (_a = this._sibling) === null || _a === void 0 ? void 0 : _a._updateMinMax();
1466
+ }
1467
+ _clamp(v) {
1468
+ return Math.max(Math.min(v, this.getMaxPos()), this.getMinPos());
1469
+ }
1470
+ _updateMinMax() {
1471
+ const sibling = this.getSibling();
1472
+ if (!sibling) {
1473
+ return;
1474
+ }
1475
+ if (this._isEndThumb) {
1476
+ this.min = Math.max(this._slider.min, sibling.value);
1477
+ this.max = this._slider.max;
1478
+ }
1479
+ else {
1480
+ this.min = this._slider.min;
1481
+ this.max = Math.min(this._slider.max, sibling.value);
1482
+ }
1483
+ }
1484
+ _updateWidthActive() {
1485
+ const minWidth = this._slider._rippleRadius * 2 - this._slider._inputPadding * 2;
1486
+ const maxWidth = this._slider._cachedWidth + this._slider._inputPadding - minWidth;
1487
+ const percentage = this._slider.min < this._slider.max
1488
+ ? (this.max - this.min) / (this._slider.max - this._slider.min)
1489
+ : 1;
1490
+ const width = maxWidth * percentage + minWidth;
1491
+ this._hostElement.style.width = `${width}px`;
1492
+ this._hostElement.style.padding = `0 ${this._slider._inputPadding}px`;
1493
+ }
1494
+ _updateWidthInactive() {
1495
+ const sibling = this.getSibling();
1496
+ if (!sibling) {
1497
+ return;
1498
+ }
1499
+ const maxWidth = this._slider._cachedWidth;
1500
+ const midValue = this._isEndThumb
1501
+ ? this.value - (this.value - sibling.value) / 2
1502
+ : this.value + (sibling.value - this.value) / 2;
1503
+ const _percentage = this._isEndThumb
1504
+ ? (this.max - midValue) / (this._slider.max - this._slider.min)
1505
+ : (midValue - this.min) / (this._slider.max - this._slider.min);
1506
+ const percentage = this._slider.min < this._slider.max ? _percentage : 1;
1507
+ const width = maxWidth * percentage + 24;
1508
+ this._hostElement.style.width = `${width}px`;
1509
+ this._hostElement.style.padding = '0px';
1510
+ if (this._isLeftThumb) {
1511
+ this._hostElement.style.left = '-24px';
1512
+ this._hostElement.style.right = 'auto';
1513
+ }
1514
+ else {
1515
+ this._hostElement.style.left = 'auto';
1516
+ this._hostElement.style.right = '-24px';
1517
+ }
1518
+ }
1519
+ _updateStaticStyles() {
1520
+ this._hostElement.classList.toggle('mat-slider__right-input', !this._isLeftThumb);
1521
+ }
1522
+ _updateSibling() {
1523
+ const sibling = this.getSibling();
1524
+ if (!sibling) {
1525
+ return;
1526
+ }
1527
+ sibling._updateMinMax();
1528
+ if (this._isActive) {
1529
+ sibling._updateWidthActive();
1530
+ }
1531
+ else {
1532
+ sibling._updateWidthInactive();
1533
+ }
1534
+ }
1535
+ /**
1536
+ * Sets the input's value.
1537
+ * @param value The new value of the input
1538
+ * @docs-private
1539
+ */
1540
+ writeValue(value) {
1541
+ this.value = value;
1542
+ this._updateWidthInactive();
1543
+ this._updateSibling();
1544
+ }
1168
1545
  }
1546
+ MatSliderRangeThumb.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderRangeThumb, deps: [{ token: i0.NgZone }, { token: MAT_SLIDER }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1547
+ MatSliderRangeThumb.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.1", type: MatSliderRangeThumb, selector: "input[matSliderStartThumb], input[matSliderEndThumb]", providers: [
1548
+ MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR,
1549
+ { provide: MAT_SLIDER_RANGE_THUMB, useExisting: MatSliderRangeThumb },
1550
+ ], exportAs: ["matSliderRangeThumb"], usesInheritance: true, ngImport: i0 });
1551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderRangeThumb, decorators: [{
1552
+ type: Directive,
1553
+ args: [{
1554
+ selector: 'input[matSliderStartThumb], input[matSliderEndThumb]',
1555
+ exportAs: 'matSliderRangeThumb',
1556
+ providers: [
1557
+ MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR,
1558
+ { provide: MAT_SLIDER_RANGE_THUMB, useExisting: MatSliderRangeThumb },
1559
+ ],
1560
+ }]
1561
+ }], ctorParameters: function () {
1562
+ return [{ type: i0.NgZone }, { type: undefined, decorators: [{
1563
+ type: Inject,
1564
+ args: [MAT_SLIDER]
1565
+ }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }];
1566
+ } });
1169
1567
 
1170
1568
  /**
1171
1569
  * @license
@@ -1176,15 +1574,15 @@ function _throwInvalidInputConfigurationError() {
1176
1574
  */
1177
1575
  class MatSliderModule {
1178
1576
  }
1179
- MatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1180
- MatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderModule, declarations: [MatSlider, MatSliderThumb, MatSliderVisualThumb], imports: [MatCommonModule, CommonModule, MatRippleModule], exports: [MatSlider, MatSliderThumb] });
1181
- MatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderModule, imports: [MatCommonModule, CommonModule, MatRippleModule] });
1182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: MatSliderModule, decorators: [{
1577
+ MatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1578
+ MatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderModule, declarations: [MatSlider, MatSliderThumb, MatSliderRangeThumb, MatSliderVisualThumb], imports: [MatCommonModule, CommonModule, MatRippleModule], exports: [MatSlider, MatSliderThumb, MatSliderRangeThumb] });
1579
+ MatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderModule, imports: [MatCommonModule, CommonModule, MatRippleModule] });
1580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.1", ngImport: i0, type: MatSliderModule, decorators: [{
1183
1581
  type: NgModule,
1184
1582
  args: [{
1185
1583
  imports: [MatCommonModule, CommonModule, MatRippleModule],
1186
- exports: [MatSlider, MatSliderThumb],
1187
- declarations: [MatSlider, MatSliderThumb, MatSliderVisualThumb],
1584
+ exports: [MatSlider, MatSliderThumb, MatSliderRangeThumb],
1585
+ declarations: [MatSlider, MatSliderThumb, MatSliderRangeThumb, MatSliderVisualThumb],
1188
1586
  }]
1189
1587
  }] });
1190
1588
 
@@ -1208,5 +1606,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ng
1208
1606
  * Generated bundle index. Do not edit.
1209
1607
  */
1210
1608
 
1211
- export { MatSlider, MatSliderModule, MatSliderThumb };
1609
+ export { MatSlider, MatSliderModule, MatSliderRangeThumb, MatSliderThumb, MatSliderVisualThumb };
1212
1610
  //# sourceMappingURL=slider.mjs.map