@ptsecurity/mosaic 13.6.1 → 13.7.2

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 (907) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +6 -6
  3. package/_theming.scss +7238 -7141
  4. package/_visual.scss +2724 -2695
  5. package/autocomplete/autocomplete-origin.directive.d.ts +12 -12
  6. package/autocomplete/autocomplete-trigger.directive.d.ts +167 -167
  7. package/autocomplete/autocomplete.component.d.ts +73 -73
  8. package/autocomplete/autocomplete.module.d.ts +12 -12
  9. package/autocomplete/index.d.ts +1 -1
  10. package/autocomplete/ptsecurity-mosaic-autocomplete.d.ts +5 -5
  11. package/autocomplete/public-api.d.ts +4 -4
  12. package/button/button.component.d.ts +40 -40
  13. package/button/button.module.d.ts +10 -10
  14. package/button/index.d.ts +1 -1
  15. package/button/ptsecurity-mosaic-button.d.ts +5 -5
  16. package/button/public-api.d.ts +2 -2
  17. package/button-toggle/button-toggle.component.d.ts +141 -141
  18. package/button-toggle/button-toggle.module.d.ts +9 -9
  19. package/button-toggle/index.d.ts +1 -1
  20. package/button-toggle/ptsecurity-mosaic-button-toggle.d.ts +5 -5
  21. package/button-toggle/public-api.d.ts +2 -2
  22. package/card/card.component.d.ts +26 -26
  23. package/card/card.module.d.ts +10 -10
  24. package/card/index.d.ts +1 -1
  25. package/card/ptsecurity-mosaic-card.d.ts +5 -5
  26. package/card/public-api.d.ts +2 -2
  27. package/checkbox/README.md +1 -1
  28. package/checkbox/checkbox-config.d.ts +13 -13
  29. package/checkbox/checkbox-module.d.ts +9 -9
  30. package/checkbox/checkbox-required-validator.d.ts +13 -13
  31. package/checkbox/checkbox.d.ts +140 -140
  32. package/checkbox/index.d.ts +1 -1
  33. package/checkbox/ptsecurity-mosaic-checkbox.d.ts +5 -5
  34. package/checkbox/public-api.d.ts +4 -4
  35. package/core/animation/animation.d.ts +6 -6
  36. package/core/animation/fade-animations.d.ts +2 -2
  37. package/core/animation/index.d.ts +3 -3
  38. package/core/animation/select-animations.d.ts +12 -12
  39. package/core/common-behaviors/color.d.ts +19 -19
  40. package/core/common-behaviors/common-module.d.ts +25 -25
  41. package/core/common-behaviors/constructor.d.ts +9 -9
  42. package/core/common-behaviors/disabled.d.ts +8 -8
  43. package/core/common-behaviors/error-state.d.ts +25 -25
  44. package/core/common-behaviors/index.d.ts +5 -5
  45. package/core/common-behaviors/tabindex.d.ts +8 -8
  46. package/core/error/error-options.d.ts +14 -14
  47. package/core/formatters/date/formatter.d.ts +203 -203
  48. package/core/formatters/date/templates/en-US.d.ts +74 -74
  49. package/core/formatters/date/templates/ru-RU.d.ts +74 -74
  50. package/core/formatters/index.d.ts +9 -9
  51. package/core/formatters/number/formatter.d.ts +27 -27
  52. package/core/forms/forms-module.d.ts +7 -7
  53. package/core/forms/forms.directive.d.ts +22 -22
  54. package/core/forms/index.d.ts +2 -2
  55. package/core/highlight/highlight.pipe.d.ts +7 -7
  56. package/core/highlight/index.d.ts +9 -9
  57. package/core/index.d.ts +1 -1
  58. package/core/label/label-options.d.ts +13 -13
  59. package/core/line/line.d.ts +28 -28
  60. package/core/option/action.d.ts +42 -42
  61. package/core/option/index.d.ts +4 -4
  62. package/core/option/optgroup.d.ts +16 -16
  63. package/core/option/option-module.d.ts +11 -11
  64. package/core/option/option.d.ts +115 -115
  65. package/core/overlay/overlay-position-map.d.ts +34 -34
  66. package/core/pop-up/constants.d.ts +29 -29
  67. package/core/pop-up/index.d.ts +3 -3
  68. package/core/pop-up/pop-up-trigger.d.ts +70 -70
  69. package/core/pop-up/pop-up.d.ts +36 -36
  70. package/core/ptsecurity-mosaic-core.d.ts +5 -5
  71. package/core/public-api.d.ts +17 -17
  72. package/core/select/constants.d.ts +23 -23
  73. package/core/select/errors.d.ts +19 -19
  74. package/core/select/events.d.ts +1 -1
  75. package/core/select/index.d.ts +3 -3
  76. package/core/selection/constants.d.ts +4 -4
  77. package/core/selection/index.d.ts +3 -3
  78. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +30 -30
  79. package/core/selection/pseudo-checkbox/pseudo-checkbox.module.d.ts +8 -8
  80. package/core/services/measure-scrollbar.service.d.ts +11 -11
  81. package/core/utils/index.d.ts +1 -1
  82. package/core/utils/public-api.d.ts +1 -1
  83. package/core/utils/utils.d.ts +2 -2
  84. package/core/validation/index.d.ts +1 -1
  85. package/core/validation/validation.d.ts +18 -18
  86. package/core/version.d.ts +2 -2
  87. package/datepicker/calendar-body.component.d.ts +63 -63
  88. package/datepicker/calendar.component.d.ts +151 -151
  89. package/datepicker/datepicker-animations.d.ts +9 -9
  90. package/datepicker/datepicker-errors.d.ts +2 -2
  91. package/datepicker/datepicker-input.directive.d.ts +178 -178
  92. package/datepicker/datepicker-intl.d.ts +32 -32
  93. package/datepicker/datepicker-module.d.ts +20 -20
  94. package/datepicker/datepicker-toggle.component.d.ts +35 -35
  95. package/datepicker/datepicker.component.d.ts +158 -158
  96. package/datepicker/index.d.ts +1 -1
  97. package/datepicker/month-view.component.d.ts +93 -93
  98. package/datepicker/multi-year-view.component.d.ts +72 -72
  99. package/datepicker/ptsecurity-mosaic-datepicker.d.ts +5 -5
  100. package/datepicker/public-api.d.ts +11 -11
  101. package/datepicker/year-view.component.d.ts +90 -90
  102. package/design-tokens/index.d.ts +1 -1
  103. package/design-tokens/legacy-2017/tokens/components/alert.json5 +83 -83
  104. package/design-tokens/legacy-2017/tokens/components/autocomplete.json5 +11 -11
  105. package/design-tokens/legacy-2017/tokens/components/badge.json5 +174 -174
  106. package/design-tokens/legacy-2017/tokens/components/button-toggle.json5 +10 -10
  107. package/design-tokens/legacy-2017/tokens/components/button.json5 +142 -142
  108. package/design-tokens/legacy-2017/tokens/components/card.json5 +51 -51
  109. package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +97 -97
  110. package/design-tokens/legacy-2017/tokens/components/datepicker.json5 +64 -64
  111. package/design-tokens/legacy-2017/tokens/components/divider.json5 +14 -14
  112. package/design-tokens/legacy-2017/tokens/components/dl.json5 +38 -38
  113. package/design-tokens/legacy-2017/tokens/components/dropdown.json5 +48 -48
  114. package/design-tokens/legacy-2017/tokens/components/form-field.json5 +92 -92
  115. package/design-tokens/legacy-2017/tokens/components/forms.json5 +52 -52
  116. package/design-tokens/legacy-2017/tokens/components/icon.json5 +104 -104
  117. package/design-tokens/legacy-2017/tokens/components/input.json5 +12 -12
  118. package/design-tokens/legacy-2017/tokens/components/link.json5 +50 -50
  119. package/design-tokens/legacy-2017/tokens/components/list.json5 +13 -13
  120. package/design-tokens/legacy-2017/tokens/components/loader-overlay.json5 +23 -0
  121. package/design-tokens/legacy-2017/tokens/components/modal.json5 +81 -81
  122. package/design-tokens/legacy-2017/tokens/components/navbar.json5 +70 -70
  123. package/design-tokens/legacy-2017/tokens/components/optgroup.json5 +10 -10
  124. package/design-tokens/legacy-2017/tokens/components/option.json5 +12 -12
  125. package/design-tokens/legacy-2017/tokens/components/popover.json5 +68 -68
  126. package/design-tokens/legacy-2017/tokens/components/popup.json5 +16 -16
  127. package/design-tokens/legacy-2017/tokens/components/progress-bar.json5 +13 -13
  128. package/design-tokens/legacy-2017/tokens/components/progress-spinner.json5 +7 -7
  129. package/design-tokens/legacy-2017/tokens/components/radio.json5 +45 -45
  130. package/design-tokens/legacy-2017/tokens/components/select.json5 +24 -24
  131. package/design-tokens/legacy-2017/tokens/components/sidepanel.json5 +44 -44
  132. package/design-tokens/legacy-2017/tokens/components/table.json5 +15 -15
  133. package/design-tokens/legacy-2017/tokens/components/tabs.json5 +101 -101
  134. package/design-tokens/legacy-2017/tokens/components/tags.json5 +134 -134
  135. package/design-tokens/legacy-2017/tokens/components/textarea.json5 +12 -12
  136. package/design-tokens/legacy-2017/tokens/components/timepicker.json5 +7 -7
  137. package/design-tokens/legacy-2017/tokens/components/toggle.json5 +79 -79
  138. package/design-tokens/legacy-2017/tokens/components/tooltip.json5 +83 -83
  139. package/design-tokens/legacy-2017/tokens/components/tree.json5 +15 -15
  140. package/design-tokens/legacy-2017/tokens/properties/aliases.json5 +3 -3
  141. package/design-tokens/legacy-2017/tokens/properties/colors.json5 +119 -119
  142. package/design-tokens/legacy-2017/tokens/properties/font.json5 +12 -12
  143. package/design-tokens/legacy-2017/tokens/properties/globals.json5 +49 -49
  144. package/design-tokens/legacy-2017/tokens/properties/padding.json5 +3 -3
  145. package/design-tokens/legacy-2017/tokens/properties/palette.json5 +163 -163
  146. package/design-tokens/legacy-2017/tokens/properties/typography.json5 +175 -175
  147. package/design-tokens/legacy-2017/tokens.d.ts +7873 -7844
  148. package/design-tokens/pt-2022/tokens/components/alert.json5 +83 -83
  149. package/design-tokens/pt-2022/tokens/components/autocomplete.json5 +11 -11
  150. package/design-tokens/pt-2022/tokens/components/badge.json5 +174 -174
  151. package/design-tokens/pt-2022/tokens/components/button-toggle.json5 +10 -10
  152. package/design-tokens/pt-2022/tokens/components/button.json5 +142 -142
  153. package/design-tokens/pt-2022/tokens/components/card.json5 +51 -51
  154. package/design-tokens/pt-2022/tokens/components/checkbox.json5 +97 -97
  155. package/design-tokens/pt-2022/tokens/components/datepicker.json5 +64 -64
  156. package/design-tokens/pt-2022/tokens/components/divider.json5 +14 -14
  157. package/design-tokens/pt-2022/tokens/components/dl.json5 +38 -38
  158. package/design-tokens/pt-2022/tokens/components/dropdown.json5 +48 -48
  159. package/design-tokens/pt-2022/tokens/components/form-field.json5 +92 -92
  160. package/design-tokens/pt-2022/tokens/components/forms.json5 +52 -52
  161. package/design-tokens/pt-2022/tokens/components/icon.json5 +104 -104
  162. package/design-tokens/pt-2022/tokens/components/input.json5 +12 -12
  163. package/design-tokens/pt-2022/tokens/components/link.json5 +50 -50
  164. package/design-tokens/pt-2022/tokens/components/list.json5 +13 -13
  165. package/design-tokens/pt-2022/tokens/components/loader-overlay.json5 +23 -0
  166. package/design-tokens/pt-2022/tokens/components/modal.json5 +81 -81
  167. package/design-tokens/pt-2022/tokens/components/navbar.json5 +70 -70
  168. package/design-tokens/pt-2022/tokens/components/optgroup.json5 +10 -10
  169. package/design-tokens/pt-2022/tokens/components/option.json5 +12 -12
  170. package/design-tokens/pt-2022/tokens/components/popover.json5 +68 -68
  171. package/design-tokens/pt-2022/tokens/components/popup.json5 +16 -16
  172. package/design-tokens/pt-2022/tokens/components/progress-bar.json5 +13 -13
  173. package/design-tokens/pt-2022/tokens/components/progress-spinner.json5 +7 -7
  174. package/design-tokens/pt-2022/tokens/components/radio.json5 +45 -45
  175. package/design-tokens/pt-2022/tokens/components/select.json5 +24 -24
  176. package/design-tokens/pt-2022/tokens/components/sidepanel.json5 +44 -44
  177. package/design-tokens/pt-2022/tokens/components/table.json5 +15 -15
  178. package/design-tokens/pt-2022/tokens/components/tabs.json5 +101 -101
  179. package/design-tokens/pt-2022/tokens/components/tags.json5 +137 -137
  180. package/design-tokens/pt-2022/tokens/components/textarea.json5 +12 -12
  181. package/design-tokens/pt-2022/tokens/components/timepicker.json5 +7 -7
  182. package/design-tokens/pt-2022/tokens/components/toggle.json5 +79 -79
  183. package/design-tokens/pt-2022/tokens/components/tooltip.json5 +83 -83
  184. package/design-tokens/pt-2022/tokens/components/tree.json5 +15 -15
  185. package/design-tokens/pt-2022/tokens/properties/aliases.json5 +3 -3
  186. package/design-tokens/pt-2022/tokens/properties/colors.json5 +122 -122
  187. package/design-tokens/pt-2022/tokens/properties/font.json5 +15 -15
  188. package/design-tokens/pt-2022/tokens/properties/globals.json5 +49 -49
  189. package/design-tokens/pt-2022/tokens/properties/padding.json5 +3 -3
  190. package/design-tokens/pt-2022/tokens/properties/palette.json5 +232 -232
  191. package/design-tokens/pt-2022/tokens/properties/typography.json5 +175 -175
  192. package/design-tokens/pt-2022/tokens.d.ts +9205 -9176
  193. package/design-tokens/ptsecurity-mosaic-design-tokens.d.ts +5 -5
  194. package/design-tokens/public-api.d.ts +3 -3
  195. package/design-tokens/style-dictionary/build.js +76 -63
  196. package/design-tokens/style-dictionary/configs/css.js +13 -13
  197. package/design-tokens/style-dictionary/configs/figma.js +11 -0
  198. package/design-tokens/style-dictionary/configs/index.js +48 -48
  199. package/design-tokens/style-dictionary/configs/js.js +9 -9
  200. package/design-tokens/style-dictionary/configs/scss.js +23 -23
  201. package/design-tokens/style-dictionary/figma-types.js +41 -0
  202. package/design-tokens/style-dictionary/filters/color.js +7 -7
  203. package/design-tokens/style-dictionary/filters/palette.js +7 -7
  204. package/design-tokens/style-dictionary/filters/size.js +7 -7
  205. package/design-tokens/style-dictionary/filters/typography.js +7 -7
  206. package/design-tokens/style-dictionary/formats/figma.js +104 -0
  207. package/design-tokens/style-dictionary/formats/palette.js +25 -25
  208. package/design-tokens/style-dictionary/formats/typography.js +52 -52
  209. package/design-tokens/style-dictionary/transformGroups/css.js +13 -13
  210. package/design-tokens/style-dictionary/transformGroups/figma.js +21 -0
  211. package/design-tokens/style-dictionary/transformGroups/scss.js +12 -12
  212. package/design-tokens/style-dictionary/transformGroups/ts.js +11 -11
  213. package/design-tokens/style-dictionary/transforms/attribute/figma-border.js +18 -0
  214. package/design-tokens/style-dictionary/transforms/attribute/figma-color.js +25 -0
  215. package/design-tokens/style-dictionary/transforms/attribute/figma-default.js +10 -0
  216. package/design-tokens/style-dictionary/transforms/attribute/figma-font.js +31 -0
  217. package/design-tokens/style-dictionary/transforms/attribute/figma-group.js +17 -0
  218. package/design-tokens/style-dictionary/transforms/attribute/figma-opacity.js +10 -0
  219. package/design-tokens/style-dictionary/transforms/attribute/figma-shadow.js +66 -0
  220. package/design-tokens/style-dictionary/transforms/attribute/figma-sizing.js +16 -0
  221. package/design-tokens/style-dictionary/transforms/attribute/figma-spacing.js +15 -0
  222. package/design-tokens/style-dictionary/transforms/attribute/figma-typography.js +24 -0
  223. package/design-tokens/style-dictionary/transforms/attribute/palette.js +9 -9
  224. package/design-tokens/style-dictionary/transforms/attribute/prefix.js +11 -11
  225. package/design-tokens/style-dictionary/transforms/attribute/size.js +8 -8
  226. package/design-tokens/style-dictionary/transforms/attribute/typography.js +9 -9
  227. package/design-tokens/style-dictionary/transforms/value/figma-values.js +7 -0
  228. package/divider/divider.component.d.ts +11 -11
  229. package/divider/divider.module.d.ts +8 -8
  230. package/divider/index.d.ts +1 -1
  231. package/divider/ptsecurity-mosaic-divider.d.ts +5 -5
  232. package/divider/public-api.d.ts +2 -2
  233. package/dl/dl.component.d.ts +26 -26
  234. package/dl/dl.module.d.ts +10 -10
  235. package/dl/index.d.ts +1 -1
  236. package/dl/ptsecurity-mosaic-dl.d.ts +5 -5
  237. package/dl/public-api.d.ts +2 -2
  238. package/dropdown/dropdown-animations.d.ts +11 -11
  239. package/dropdown/dropdown-content.directive.d.ts +32 -32
  240. package/dropdown/dropdown-errors.d.ts +17 -17
  241. package/dropdown/dropdown-item.component.d.ts +50 -50
  242. package/dropdown/dropdown-trigger.directive.d.ts +136 -136
  243. package/dropdown/dropdown.component.d.ts +121 -121
  244. package/dropdown/dropdown.module.d.ts +13 -13
  245. package/dropdown/dropdown.types.d.ts +53 -53
  246. package/dropdown/index.d.ts +1 -1
  247. package/dropdown/ptsecurity-mosaic-dropdown.d.ts +5 -5
  248. package/dropdown/public-api.d.ts +8 -8
  249. package/esm2020/autocomplete/autocomplete-origin.directive.mjs +21 -21
  250. package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +555 -555
  251. package/esm2020/autocomplete/autocomplete.component.mjs +154 -154
  252. package/esm2020/autocomplete/autocomplete.module.mjs +34 -34
  253. package/esm2020/autocomplete/index.mjs +2 -2
  254. package/esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs +4 -4
  255. package/esm2020/autocomplete/public-api.mjs +5 -5
  256. package/esm2020/button/button.component.mjs +137 -137
  257. package/esm2020/button/button.module.mjs +38 -38
  258. package/esm2020/button/index.mjs +2 -2
  259. package/esm2020/button/ptsecurity-mosaic-button.mjs +4 -4
  260. package/esm2020/button/public-api.mjs +3 -3
  261. package/esm2020/button-toggle/button-toggle.component.mjs +362 -362
  262. package/esm2020/button-toggle/button-toggle.module.mjs +19 -19
  263. package/esm2020/button-toggle/index.mjs +2 -2
  264. package/esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs +4 -4
  265. package/esm2020/button-toggle/public-api.mjs +3 -3
  266. package/esm2020/card/card.component.mjs +80 -80
  267. package/esm2020/card/card.module.mjs +30 -30
  268. package/esm2020/card/index.mjs +2 -2
  269. package/esm2020/card/ptsecurity-mosaic-card.mjs +4 -4
  270. package/esm2020/card/public-api.mjs +3 -3
  271. package/esm2020/checkbox/checkbox-config.mjs +6 -6
  272. package/esm2020/checkbox/checkbox-module.mjs +19 -19
  273. package/esm2020/checkbox/checkbox-required-validator.mjs +27 -27
  274. package/esm2020/checkbox/checkbox.mjs +316 -316
  275. package/esm2020/checkbox/index.mjs +2 -2
  276. package/esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs +4 -4
  277. package/esm2020/checkbox/public-api.mjs +5 -5
  278. package/esm2020/core/animation/animation.mjs +8 -8
  279. package/esm2020/core/animation/fade-animations.mjs +9 -9
  280. package/esm2020/core/animation/index.mjs +4 -4
  281. package/esm2020/core/animation/select-animations.mjs +45 -45
  282. package/esm2020/core/common-behaviors/color.mjs +30 -30
  283. package/esm2020/core/common-behaviors/common-module.mjs +83 -83
  284. package/esm2020/core/common-behaviors/constructor.mjs +2 -2
  285. package/esm2020/core/common-behaviors/disabled.mjs +17 -17
  286. package/esm2020/core/common-behaviors/error-state.mjs +31 -31
  287. package/esm2020/core/common-behaviors/index.mjs +6 -6
  288. package/esm2020/core/common-behaviors/tabindex.mjs +18 -18
  289. package/esm2020/core/error/error-options.mjs +26 -26
  290. package/esm2020/core/formatters/date/formatter.mjs +359 -359
  291. package/esm2020/core/formatters/date/templates/en-US.mjs +281 -281
  292. package/esm2020/core/formatters/date/templates/ru-RU.mjs +281 -281
  293. package/esm2020/core/formatters/index.mjs +20 -20
  294. package/esm2020/core/formatters/number/formatter.mjs +105 -105
  295. package/esm2020/core/forms/forms-module.mjs +24 -24
  296. package/esm2020/core/forms/forms.directive.mjs +66 -66
  297. package/esm2020/core/forms/index.mjs +3 -3
  298. package/esm2020/core/highlight/highlight.pipe.mjs +17 -17
  299. package/esm2020/core/highlight/index.mjs +19 -19
  300. package/esm2020/core/index.mjs +2 -2
  301. package/esm2020/core/label/label-options.mjs +4 -4
  302. package/esm2020/core/line/line.mjs +70 -70
  303. package/esm2020/core/option/action.mjs +121 -121
  304. package/esm2020/core/option/index.mjs +5 -5
  305. package/esm2020/core/option/optgroup.mjs +31 -31
  306. package/esm2020/core/option/option-module.mjs +21 -21
  307. package/esm2020/core/option/option.mjs +257 -257
  308. package/esm2020/core/overlay/overlay-position-map.mjs +244 -244
  309. package/esm2020/core/pop-up/constants.mjs +34 -34
  310. package/esm2020/core/pop-up/index.mjs +4 -4
  311. package/esm2020/core/pop-up/pop-up-trigger.mjs +239 -239
  312. package/esm2020/core/pop-up/pop-up.mjs +94 -94
  313. package/esm2020/core/ptsecurity-mosaic-core.mjs +4 -4
  314. package/esm2020/core/public-api.mjs +18 -18
  315. package/esm2020/core/select/constants.mjs +27 -27
  316. package/esm2020/core/select/errors.mjs +26 -26
  317. package/esm2020/core/select/events.mjs +2 -2
  318. package/esm2020/core/select/index.mjs +4 -4
  319. package/esm2020/core/selection/constants.mjs +6 -6
  320. package/esm2020/core/selection/index.mjs +4 -4
  321. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +49 -49
  322. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +18 -18
  323. package/esm2020/core/services/measure-scrollbar.service.mjs +48 -48
  324. package/esm2020/core/utils/index.mjs +2 -2
  325. package/esm2020/core/utils/public-api.mjs +2 -2
  326. package/esm2020/core/utils/utils.mjs +5 -5
  327. package/esm2020/core/validation/index.mjs +2 -2
  328. package/esm2020/core/validation/validation.mjs +118 -118
  329. package/esm2020/core/version.mjs +3 -3
  330. package/esm2020/datepicker/calendar-body.component.mjs +106 -106
  331. package/esm2020/datepicker/calendar.component.mjs +362 -362
  332. package/esm2020/datepicker/datepicker-animations.mjs +32 -32
  333. package/esm2020/datepicker/datepicker-errors.mjs +6 -6
  334. package/esm2020/datepicker/datepicker-input.directive.mjs +938 -938
  335. package/esm2020/datepicker/datepicker-intl.mjs +40 -40
  336. package/esm2020/datepicker/datepicker-module.mjs +107 -107
  337. package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -86
  338. package/esm2020/datepicker/datepicker.component.mjs +404 -404
  339. package/esm2020/datepicker/index.mjs +2 -2
  340. package/esm2020/datepicker/month-view.component.mjs +257 -257
  341. package/esm2020/datepicker/multi-year-view.component.mjs +218 -218
  342. package/esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs +4 -4
  343. package/esm2020/datepicker/public-api.mjs +12 -12
  344. package/esm2020/datepicker/year-view.component.mjs +253 -253
  345. package/esm2020/design-tokens/index.mjs +2 -2
  346. package/esm2020/design-tokens/legacy-2017/tokens.mjs +1167 -1138
  347. package/esm2020/design-tokens/pt-2022/tokens.mjs +1237 -1208
  348. package/esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs +4 -4
  349. package/esm2020/design-tokens/public-api.mjs +4 -4
  350. package/esm2020/divider/divider.component.mjs +39 -39
  351. package/esm2020/divider/divider.module.mjs +18 -18
  352. package/esm2020/divider/index.mjs +2 -2
  353. package/esm2020/divider/ptsecurity-mosaic-divider.mjs +4 -4
  354. package/esm2020/divider/public-api.mjs +3 -3
  355. package/esm2020/dl/dl.component.mjs +78 -78
  356. package/esm2020/dl/dl.module.mjs +42 -42
  357. package/esm2020/dl/index.mjs +2 -2
  358. package/esm2020/dl/ptsecurity-mosaic-dl.mjs +4 -4
  359. package/esm2020/dl/public-api.mjs +3 -3
  360. package/esm2020/dropdown/dropdown-animations.mjs +41 -41
  361. package/esm2020/dropdown/dropdown-content.directive.mjs +64 -64
  362. package/esm2020/dropdown/dropdown-errors.mjs +29 -29
  363. package/esm2020/dropdown/dropdown-item.component.mjs +139 -139
  364. package/esm2020/dropdown/dropdown-trigger.directive.mjs +489 -489
  365. package/esm2020/dropdown/dropdown.component.mjs +292 -292
  366. package/esm2020/dropdown/dropdown.module.mjs +50 -50
  367. package/esm2020/dropdown/dropdown.types.mjs +24 -24
  368. package/esm2020/dropdown/index.mjs +2 -2
  369. package/esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs +4 -4
  370. package/esm2020/dropdown/public-api.mjs +9 -9
  371. package/esm2020/form-field/cleaner.mjs +23 -23
  372. package/esm2020/form-field/form-field-control.mjs +5 -5
  373. package/esm2020/form-field/form-field-errors.mjs +7 -7
  374. package/esm2020/form-field/form-field.mjs +225 -225
  375. package/esm2020/form-field/form-field.module.mjs +57 -57
  376. package/esm2020/form-field/hint.mjs +34 -23
  377. package/esm2020/form-field/index.mjs +2 -2
  378. package/esm2020/form-field/password-hint.mjs +139 -139
  379. package/esm2020/form-field/prefix.mjs +13 -13
  380. package/esm2020/form-field/ptsecurity-mosaic-form-field.mjs +4 -4
  381. package/esm2020/form-field/public-api.mjs +11 -11
  382. package/esm2020/form-field/stepper.mjs +55 -55
  383. package/esm2020/form-field/suffix.mjs +13 -13
  384. package/esm2020/icon/icon.component.mjs +44 -44
  385. package/esm2020/icon/icon.module.mjs +38 -38
  386. package/esm2020/icon/index.mjs +2 -2
  387. package/esm2020/icon/ptsecurity-mosaic-icon.mjs +4 -4
  388. package/esm2020/icon/public-api.mjs +3 -3
  389. package/esm2020/index.mjs +2 -2
  390. package/esm2020/input/index.mjs +2 -2
  391. package/esm2020/input/input-errors.mjs +4 -4
  392. package/esm2020/input/input-number-validators.mjs +92 -92
  393. package/esm2020/input/input-number.mjs +163 -163
  394. package/esm2020/input/input-password.mjs +372 -372
  395. package/esm2020/input/input-value-accessor.mjs +3 -3
  396. package/esm2020/input/input.mjs +334 -334
  397. package/esm2020/input/input.module.mjs +65 -65
  398. package/esm2020/input/ptsecurity-mosaic-input.mjs +4 -4
  399. package/esm2020/input/public-api.mjs +7 -7
  400. package/esm2020/link/index.mjs +2 -2
  401. package/esm2020/link/link.component.mjs +107 -107
  402. package/esm2020/link/link.module.mjs +26 -26
  403. package/esm2020/link/ptsecurity-mosaic-link.mjs +4 -4
  404. package/esm2020/link/public-api.mjs +3 -3
  405. package/esm2020/list/index.mjs +2 -2
  406. package/esm2020/list/list-selection.component.mjs +689 -686
  407. package/esm2020/list/list.component.mjs +44 -44
  408. package/esm2020/list/list.module.mjs +55 -55
  409. package/esm2020/list/ptsecurity-mosaic-list.mjs +4 -4
  410. package/esm2020/list/public-api.mjs +4 -4
  411. package/esm2020/loader-overlay/index.mjs +2 -0
  412. package/esm2020/loader-overlay/loader-overlay.component.mjs +99 -0
  413. package/esm2020/loader-overlay/loader-overlay.module.mjs +50 -0
  414. package/esm2020/loader-overlay/ptsecurity-mosaic-loader-overlay.mjs +5 -0
  415. package/esm2020/loader-overlay/public-api.mjs +3 -0
  416. package/esm2020/modal/css-unit.pipe.mjs +17 -17
  417. package/esm2020/modal/index.mjs +2 -2
  418. package/esm2020/modal/modal-control.service.mjs +85 -85
  419. package/esm2020/modal/modal-ref.class.mjs +8 -8
  420. package/esm2020/modal/modal-util.mjs +17 -17
  421. package/esm2020/modal/modal.component.mjs +509 -501
  422. package/esm2020/modal/modal.directive.mjs +52 -52
  423. package/esm2020/modal/modal.module.mjs +72 -72
  424. package/esm2020/modal/modal.service.mjs +124 -124
  425. package/esm2020/modal/modal.type.mjs +7 -7
  426. package/esm2020/modal/ptsecurity-mosaic-modal.mjs +4 -4
  427. package/esm2020/modal/public-api.mjs +7 -7
  428. package/esm2020/navbar/index.mjs +2 -2
  429. package/esm2020/navbar/navbar-item.component.mjs +582 -582
  430. package/esm2020/navbar/navbar.component.mjs +239 -237
  431. package/esm2020/navbar/navbar.module.mjs +92 -92
  432. package/esm2020/navbar/ptsecurity-mosaic-navbar.mjs +4 -4
  433. package/esm2020/navbar/public-api.mjs +5 -5
  434. package/esm2020/navbar/vertical-navbar.animation.mjs +10 -10
  435. package/esm2020/navbar/vertical-navbar.component.mjs +114 -114
  436. package/esm2020/popover/index.mjs +2 -2
  437. package/esm2020/popover/popover-animations.mjs +16 -16
  438. package/esm2020/popover/popover-confirm.component.mjs +108 -108
  439. package/esm2020/popover/popover.component.mjs +253 -253
  440. package/esm2020/popover/popover.module.mjs +24 -24
  441. package/esm2020/popover/ptsecurity-mosaic-popover.mjs +4 -4
  442. package/esm2020/popover/public-api.mjs +5 -5
  443. package/esm2020/progress-bar/index.mjs +2 -2
  444. package/esm2020/progress-bar/progress-bar.component.mjs +42 -42
  445. package/esm2020/progress-bar/progress-bar.module.mjs +30 -30
  446. package/esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs +4 -4
  447. package/esm2020/progress-bar/public-api.mjs +3 -3
  448. package/esm2020/progress-spinner/index.mjs +2 -2
  449. package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -46
  450. package/esm2020/progress-spinner/progress-spinner.module.mjs +30 -30
  451. package/esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs +4 -4
  452. package/esm2020/progress-spinner/public-api.mjs +3 -3
  453. package/esm2020/ptsecurity-mosaic.mjs +4 -4
  454. package/esm2020/public-api.mjs +2 -2
  455. package/esm2020/radio/index.mjs +2 -2
  456. package/esm2020/radio/ptsecurity-mosaic-radio.mjs +4 -4
  457. package/esm2020/radio/public-api.mjs +3 -3
  458. package/esm2020/radio/radio.component.mjs +458 -458
  459. package/esm2020/radio/radio.module.mjs +20 -20
  460. package/esm2020/select/index.mjs +2 -2
  461. package/esm2020/select/ptsecurity-mosaic-select.mjs +4 -4
  462. package/esm2020/select/public-api.mjs +4 -4
  463. package/esm2020/select/select-option.directive.mjs +65 -65
  464. package/esm2020/select/select.component.mjs +1117 -1117
  465. package/esm2020/select/select.module.mjs +73 -73
  466. package/esm2020/sidebar/index.mjs +2 -2
  467. package/esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs +4 -4
  468. package/esm2020/sidebar/public-api.mjs +3 -3
  469. package/esm2020/sidebar/sidebar-animations.mjs +23 -23
  470. package/esm2020/sidebar/sidebar.component.mjs +146 -146
  471. package/esm2020/sidebar/sidebar.module.mjs +30 -30
  472. package/esm2020/sidepanel/index.mjs +2 -2
  473. package/esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs +4 -4
  474. package/esm2020/sidepanel/public-api.mjs +7 -7
  475. package/esm2020/sidepanel/sidepanel-animations.mjs +26 -26
  476. package/esm2020/sidepanel/sidepanel-config.mjs +26 -26
  477. package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -106
  478. package/esm2020/sidepanel/sidepanel-directives.mjs +159 -159
  479. package/esm2020/sidepanel/sidepanel-ref.mjs +53 -53
  480. package/esm2020/sidepanel/sidepanel.module.mjs +74 -74
  481. package/esm2020/sidepanel/sidepanel.service.mjs +167 -167
  482. package/esm2020/splitter/index.mjs +2 -2
  483. package/esm2020/splitter/ptsecurity-mosaic-splitter.mjs +4 -4
  484. package/esm2020/splitter/public-api.mjs +3 -3
  485. package/esm2020/splitter/splitter.component.mjs +482 -482
  486. package/esm2020/splitter/splitter.module.mjs +40 -40
  487. package/esm2020/table/index.mjs +2 -2
  488. package/esm2020/table/ptsecurity-mosaic-table.mjs +4 -4
  489. package/esm2020/table/public-api.mjs +3 -3
  490. package/esm2020/table/table.component.mjs +16 -16
  491. package/esm2020/table/table.module.mjs +30 -30
  492. package/esm2020/tabs/index.mjs +2 -2
  493. package/esm2020/tabs/paginated-tab-header.mjs +479 -479
  494. package/esm2020/tabs/ptsecurity-mosaic-tabs.mjs +4 -4
  495. package/esm2020/tabs/public-api.mjs +11 -11
  496. package/esm2020/tabs/tab-body.component.mjs +178 -178
  497. package/esm2020/tabs/tab-content.directive.mjs +15 -15
  498. package/esm2020/tabs/tab-group.component.mjs +350 -350
  499. package/esm2020/tabs/tab-header.component.mjs +67 -67
  500. package/esm2020/tabs/tab-label-wrapper.directive.mjs +78 -78
  501. package/esm2020/tabs/tab-label.directive.mjs +17 -17
  502. package/esm2020/tabs/tab-nav-bar/index.mjs +2 -2
  503. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -110
  504. package/esm2020/tabs/tab.component.mjs +133 -133
  505. package/esm2020/tabs/tabs-animations.mjs +24 -24
  506. package/esm2020/tabs/tabs.module.mjs +104 -104
  507. package/esm2020/tags/index.mjs +2 -2
  508. package/esm2020/tags/ptsecurity-mosaic-tags.mjs +4 -4
  509. package/esm2020/tags/public-api.mjs +6 -6
  510. package/esm2020/tags/tag-default-options.mjs +4 -4
  511. package/esm2020/tags/tag-input.mjs +229 -229
  512. package/esm2020/tags/tag-list.component.mjs +722 -722
  513. package/esm2020/tags/tag-text-control.mjs +2 -2
  514. package/esm2020/tags/tag.component.mjs +375 -375
  515. package/esm2020/tags/tag.module.mjs +56 -56
  516. package/esm2020/textarea/index.mjs +2 -2
  517. package/esm2020/textarea/ptsecurity-mosaic-textarea.mjs +4 -4
  518. package/esm2020/textarea/public-api.mjs +3 -3
  519. package/esm2020/textarea/textarea.component.mjs +269 -269
  520. package/esm2020/textarea/textarea.module.mjs +21 -21
  521. package/esm2020/timepicker/index.mjs +2 -2
  522. package/esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs +4 -4
  523. package/esm2020/timepicker/public-api.mjs +4 -4
  524. package/esm2020/timepicker/timepicker.constants.mjs +25 -25
  525. package/esm2020/timepicker/timepicker.directive.mjs +665 -665
  526. package/esm2020/timepicker/timepicker.module.mjs +34 -34
  527. package/esm2020/toggle/index.mjs +2 -2
  528. package/esm2020/toggle/ptsecurity-mosaic-toggle.mjs +4 -4
  529. package/esm2020/toggle/public-api.mjs +3 -3
  530. package/esm2020/toggle/toggle.component.mjs +158 -158
  531. package/esm2020/toggle/toggle.module.mjs +20 -20
  532. package/esm2020/tooltip/index.mjs +2 -2
  533. package/esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs +4 -4
  534. package/esm2020/tooltip/public-api.mjs +3 -3
  535. package/esm2020/tooltip/tooltip.animations.mjs +19 -19
  536. package/esm2020/tooltip/tooltip.component.mjs +295 -295
  537. package/esm2020/tooltip/tooltip.module.mjs +43 -43
  538. package/esm2020/tree/control/base-tree-control.mjs +60 -60
  539. package/esm2020/tree/control/flat-tree-control.mjs +126 -126
  540. package/esm2020/tree/control/nested-tree-control.mjs +41 -41
  541. package/esm2020/tree/control/tree-control.mjs +2 -2
  542. package/esm2020/tree/data-source/flat-data-source.mjs +162 -162
  543. package/esm2020/tree/data-source/nested-data-source.mjs +30 -30
  544. package/esm2020/tree/index.mjs +2 -2
  545. package/esm2020/tree/node.mjs +31 -31
  546. package/esm2020/tree/outlet.mjs +15 -15
  547. package/esm2020/tree/padding.directive.mjs +113 -113
  548. package/esm2020/tree/ptsecurity-mosaic-tree.mjs +4 -4
  549. package/esm2020/tree/public-api.mjs +16 -16
  550. package/esm2020/tree/toggle.mjs +80 -80
  551. package/esm2020/tree/tree-base.mjs +243 -243
  552. package/esm2020/tree/tree-errors.mjs +36 -36
  553. package/esm2020/tree/tree-option.component.mjs +248 -248
  554. package/esm2020/tree/tree-selection.component.mjs +541 -540
  555. package/esm2020/tree/tree.mjs +15 -15
  556. package/esm2020/tree/tree.module.mjs +57 -57
  557. package/esm2020/tree-select/index.mjs +2 -2
  558. package/esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs +4 -4
  559. package/esm2020/tree-select/public-api.mjs +3 -3
  560. package/esm2020/tree-select/tree-select.component.mjs +939 -939
  561. package/esm2020/tree-select/tree-select.module.mjs +47 -47
  562. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +726 -726
  563. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  564. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +367 -367
  565. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
  566. package/fesm2015/ptsecurity-mosaic-button.mjs +160 -160
  567. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
  568. package/fesm2015/ptsecurity-mosaic-card.mjs +96 -96
  569. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -1
  570. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +348 -348
  571. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  572. package/fesm2015/ptsecurity-mosaic-core.mjs +2652 -2652
  573. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
  574. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2682 -2682
  575. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  576. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +2432 -2345
  577. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  578. package/fesm2015/ptsecurity-mosaic-divider.mjs +48 -48
  579. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -1
  580. package/fesm2015/ptsecurity-mosaic-dl.mjs +108 -108
  581. package/fesm2015/ptsecurity-mosaic-dl.mjs.map +1 -1
  582. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1069 -1069
  583. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  584. package/fesm2015/ptsecurity-mosaic-form-field.mjs +522 -512
  585. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  586. package/fesm2015/ptsecurity-mosaic-icon.mjs +73 -73
  587. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -1
  588. package/fesm2015/ptsecurity-mosaic-input.mjs +979 -979
  589. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -1
  590. package/fesm2015/ptsecurity-mosaic-link.mjs +121 -121
  591. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -1
  592. package/fesm2015/ptsecurity-mosaic-list.mjs +765 -762
  593. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
  594. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +155 -0
  595. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -0
  596. package/fesm2015/ptsecurity-mosaic-modal.mjs +833 -824
  597. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
  598. package/fesm2015/ptsecurity-mosaic-navbar.mjs +996 -994
  599. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
  600. package/fesm2015/ptsecurity-mosaic-popover.mjs +364 -364
  601. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -1
  602. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +61 -61
  603. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  604. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +65 -65
  605. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  606. package/fesm2015/ptsecurity-mosaic-radio.mjs +464 -464
  607. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
  608. package/fesm2015/ptsecurity-mosaic-select.mjs +1213 -1213
  609. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
  610. package/fesm2015/ptsecurity-mosaic-sidebar.mjs +185 -185
  611. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -1
  612. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +555 -555
  613. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  614. package/fesm2015/ptsecurity-mosaic-splitter.mjs +511 -511
  615. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -1
  616. package/fesm2015/ptsecurity-mosaic-table.mjs +36 -36
  617. package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -1
  618. package/fesm2015/ptsecurity-mosaic-tabs.mjs +1460 -1460
  619. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
  620. package/fesm2015/ptsecurity-mosaic-tags.mjs +1342 -1342
  621. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
  622. package/fesm2015/ptsecurity-mosaic-textarea.mjs +274 -274
  623. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -1
  624. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +703 -703
  625. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -1
  626. package/fesm2015/ptsecurity-mosaic-toggle.mjs +163 -163
  627. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -1
  628. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +344 -344
  629. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  630. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +954 -954
  631. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  632. package/fesm2015/ptsecurity-mosaic-tree.mjs +1689 -1688
  633. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
  634. package/fesm2015/ptsecurity-mosaic.mjs +2 -2
  635. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +722 -722
  636. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  637. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs +365 -365
  638. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
  639. package/fesm2020/ptsecurity-mosaic-button.mjs +160 -160
  640. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
  641. package/fesm2020/ptsecurity-mosaic-card.mjs +96 -96
  642. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -1
  643. package/fesm2020/ptsecurity-mosaic-checkbox.mjs +346 -346
  644. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  645. package/fesm2020/ptsecurity-mosaic-core.mjs +2681 -2681
  646. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
  647. package/fesm2020/ptsecurity-mosaic-datepicker.mjs +2667 -2667
  648. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  649. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +2432 -2345
  650. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  651. package/fesm2020/ptsecurity-mosaic-divider.mjs +48 -48
  652. package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -1
  653. package/fesm2020/ptsecurity-mosaic-dl.mjs +108 -108
  654. package/fesm2020/ptsecurity-mosaic-dl.mjs.map +1 -1
  655. package/fesm2020/ptsecurity-mosaic-dropdown.mjs +1056 -1056
  656. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  657. package/fesm2020/ptsecurity-mosaic-form-field.mjs +507 -497
  658. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  659. package/fesm2020/ptsecurity-mosaic-icon.mjs +71 -71
  660. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -1
  661. package/fesm2020/ptsecurity-mosaic-input.mjs +968 -968
  662. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -1
  663. package/fesm2020/ptsecurity-mosaic-link.mjs +120 -120
  664. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -1
  665. package/fesm2020/ptsecurity-mosaic-list.mjs +758 -755
  666. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
  667. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +153 -0
  668. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -0
  669. package/fesm2020/ptsecurity-mosaic-modal.mjs +828 -820
  670. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
  671. package/fesm2020/ptsecurity-mosaic-navbar.mjs +980 -978
  672. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
  673. package/fesm2020/ptsecurity-mosaic-popover.mjs +360 -360
  674. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -1
  675. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +61 -61
  676. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  677. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +65 -65
  678. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  679. package/fesm2020/ptsecurity-mosaic-radio.mjs +462 -462
  680. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
  681. package/fesm2020/ptsecurity-mosaic-select.mjs +1208 -1208
  682. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
  683. package/fesm2020/ptsecurity-mosaic-sidebar.mjs +185 -185
  684. package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -1
  685. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +552 -552
  686. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  687. package/fesm2020/ptsecurity-mosaic-splitter.mjs +511 -511
  688. package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -1
  689. package/fesm2020/ptsecurity-mosaic-table.mjs +36 -36
  690. package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -1
  691. package/fesm2020/ptsecurity-mosaic-tabs.mjs +1445 -1445
  692. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
  693. package/fesm2020/ptsecurity-mosaic-tags.mjs +1335 -1335
  694. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
  695. package/fesm2020/ptsecurity-mosaic-textarea.mjs +272 -272
  696. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -1
  697. package/fesm2020/ptsecurity-mosaic-timepicker.mjs +700 -700
  698. package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -1
  699. package/fesm2020/ptsecurity-mosaic-toggle.mjs +163 -163
  700. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -1
  701. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +336 -336
  702. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  703. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +951 -951
  704. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  705. package/fesm2020/ptsecurity-mosaic-tree.mjs +1676 -1675
  706. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
  707. package/fesm2020/ptsecurity-mosaic.mjs +2 -2
  708. package/form-field/cleaner.d.ts +7 -7
  709. package/form-field/form-field-control.d.ts +37 -37
  710. package/form-field/form-field-errors.d.ts +2 -2
  711. package/form-field/form-field.d.ts +69 -69
  712. package/form-field/form-field.module.d.ts +15 -15
  713. package/form-field/hint.d.ts +14 -6
  714. package/form-field/index.d.ts +1 -1
  715. package/form-field/password-hint.d.ts +40 -40
  716. package/form-field/prefix.d.ts +5 -5
  717. package/form-field/ptsecurity-mosaic-form-field.d.ts +5 -5
  718. package/form-field/public-api.d.ts +10 -10
  719. package/form-field/stepper.d.ts +11 -11
  720. package/form-field/suffix.d.ts +5 -5
  721. package/icon/icon.component.d.ts +18 -18
  722. package/icon/icon.module.d.ts +10 -10
  723. package/icon/index.d.ts +1 -1
  724. package/icon/ptsecurity-mosaic-icon.d.ts +5 -5
  725. package/icon/public-api.d.ts +2 -2
  726. package/index.d.ts +1 -1
  727. package/input/index.d.ts +1 -1
  728. package/input/input-errors.d.ts +1 -1
  729. package/input/input-number-validators.d.ts +39 -39
  730. package/input/input-number.d.ts +33 -33
  731. package/input/input-password.d.ts +123 -123
  732. package/input/input-value-accessor.d.ts +4 -4
  733. package/input/input.d.ts +116 -116
  734. package/input/input.module.d.ts +14 -14
  735. package/input/ptsecurity-mosaic-input.d.ts +5 -5
  736. package/input/public-api.d.ts +6 -6
  737. package/link/index.d.ts +1 -1
  738. package/link/link.component.d.ts +38 -38
  739. package/link/link.module.d.ts +9 -9
  740. package/link/ptsecurity-mosaic-link.d.ts +5 -5
  741. package/link/public-api.d.ts +2 -2
  742. package/list/index.d.ts +1 -1
  743. package/list/list-selection.component.d.ts +168 -168
  744. package/list/list.component.d.ts +18 -18
  745. package/list/list.module.d.ts +11 -11
  746. package/list/ptsecurity-mosaic-list.d.ts +5 -5
  747. package/list/public-api.d.ts +3 -3
  748. package/{toggle → loader-overlay}/README.md +0 -0
  749. package/loader-overlay/index.d.ts +1 -0
  750. package/loader-overlay/loader-overlay.component.d.ts +33 -0
  751. package/loader-overlay/loader-overlay.module.d.ts +11 -0
  752. package/loader-overlay/package.json +10 -0
  753. package/loader-overlay/ptsecurity-mosaic-loader-overlay.d.ts +5 -0
  754. package/loader-overlay/public-api.d.ts +2 -0
  755. package/modal/README.md +33 -33
  756. package/modal/css-unit.pipe.d.ts +7 -7
  757. package/modal/index.d.ts +1 -1
  758. package/modal/modal-control.service.d.ts +20 -20
  759. package/modal/modal-ref.class.d.ts +36 -36
  760. package/modal/modal-util.d.ts +12 -12
  761. package/modal/modal.component.d.ts +128 -126
  762. package/modal/modal.directive.d.ts +17 -17
  763. package/modal/modal.module.d.ts +14 -14
  764. package/modal/modal.service.d.ts +33 -33
  765. package/modal/modal.type.d.ts +60 -59
  766. package/modal/ptsecurity-mosaic-modal.d.ts +5 -5
  767. package/modal/public-api.d.ts +6 -6
  768. package/navbar/README.md +41 -41
  769. package/navbar/index.d.ts +1 -1
  770. package/navbar/navbar-item.component.d.ts +161 -161
  771. package/navbar/navbar.component.d.ts +58 -58
  772. package/navbar/navbar.module.d.ts +14 -14
  773. package/navbar/ptsecurity-mosaic-navbar.d.ts +5 -5
  774. package/navbar/public-api.d.ts +4 -4
  775. package/navbar/vertical-navbar.animation.d.ts +2 -2
  776. package/navbar/vertical-navbar.component.d.ts +23 -23
  777. package/package.json +12 -4
  778. package/popover/README.md +32 -32
  779. package/popover/index.d.ts +1 -1
  780. package/popover/popover-animations.d.ts +4 -4
  781. package/popover/popover-confirm.component.d.ts +33 -33
  782. package/popover/popover.component.d.ts +74 -74
  783. package/popover/popover.module.d.ts +12 -12
  784. package/popover/ptsecurity-mosaic-popover.d.ts +5 -5
  785. package/popover/public-api.d.ts +4 -4
  786. package/prebuilt-themes/dark-theme.css +1 -1
  787. package/prebuilt-themes/default-theme.css +1 -1
  788. package/progress-bar/index.d.ts +1 -1
  789. package/progress-bar/progress-bar.component.d.ts +18 -18
  790. package/progress-bar/progress-bar.module.d.ts +9 -9
  791. package/progress-bar/ptsecurity-mosaic-progress-bar.d.ts +5 -5
  792. package/progress-bar/public-api.d.ts +2 -2
  793. package/progress-spinner/index.d.ts +1 -1
  794. package/progress-spinner/progress-spinner.component.d.ts +19 -19
  795. package/progress-spinner/progress-spinner.module.d.ts +9 -9
  796. package/progress-spinner/ptsecurity-mosaic-progress-spinner.d.ts +5 -5
  797. package/progress-spinner/public-api.d.ts +2 -2
  798. package/ptsecurity-mosaic.d.ts +5 -5
  799. package/public-api.d.ts +1 -1
  800. package/radio/index.d.ts +1 -1
  801. package/radio/ptsecurity-mosaic-radio.d.ts +5 -5
  802. package/radio/public-api.d.ts +2 -2
  803. package/radio/radio.component.d.ts +207 -207
  804. package/radio/radio.module.d.ts +10 -10
  805. package/schematics/README.md +35 -35
  806. package/select/index.d.ts +1 -1
  807. package/select/ptsecurity-mosaic-select.d.ts +5 -5
  808. package/select/public-api.d.ts +3 -3
  809. package/select/select-option.directive.d.ts +20 -20
  810. package/select/select.component.d.ts +310 -310
  811. package/select/select.module.d.ts +15 -15
  812. package/sidebar/index.d.ts +1 -1
  813. package/sidebar/ptsecurity-mosaic-sidebar.d.ts +5 -5
  814. package/sidebar/public-api.d.ts +2 -2
  815. package/sidebar/sidebar-animations.d.ts +8 -8
  816. package/sidebar/sidebar.component.d.ts +53 -53
  817. package/sidebar/sidebar.module.d.ts +8 -8
  818. package/sidepanel/index.d.ts +1 -1
  819. package/sidepanel/ptsecurity-mosaic-sidepanel.d.ts +5 -5
  820. package/sidepanel/public-api.d.ts +6 -6
  821. package/sidepanel/sidepanel-animations.d.ts +14 -14
  822. package/sidepanel/sidepanel-config.d.ts +25 -25
  823. package/sidepanel/sidepanel-container.component.d.ts +45 -45
  824. package/sidepanel/sidepanel-directives.d.ts +50 -50
  825. package/sidepanel/sidepanel-ref.d.ts +24 -24
  826. package/sidepanel/sidepanel.module.d.ts +15 -15
  827. package/sidepanel/sidepanel.service.d.ts +57 -57
  828. package/splitter/index.d.ts +1 -1
  829. package/splitter/ptsecurity-mosaic-splitter.d.ts +5 -5
  830. package/splitter/public-api.d.ts +2 -2
  831. package/splitter/splitter.component.d.ts +130 -130
  832. package/splitter/splitter.module.d.ts +9 -9
  833. package/table/index.d.ts +1 -1
  834. package/table/ptsecurity-mosaic-table.d.ts +5 -5
  835. package/table/public-api.d.ts +2 -2
  836. package/table/table.component.d.ts +5 -5
  837. package/table/table.module.d.ts +10 -10
  838. package/tabs/index.d.ts +1 -1
  839. package/tabs/paginated-tab-header.d.ts +179 -179
  840. package/tabs/ptsecurity-mosaic-tabs.d.ts +5 -5
  841. package/tabs/public-api.d.ts +10 -10
  842. package/tabs/tab-body.component.d.ts +95 -95
  843. package/tabs/tab-content.directive.d.ts +9 -9
  844. package/tabs/tab-group.component.d.ts +133 -133
  845. package/tabs/tab-header.component.d.ts +35 -35
  846. package/tabs/tab-label-wrapper.directive.d.ts +30 -30
  847. package/tabs/tab-label.directive.d.ts +9 -9
  848. package/tabs/tab-nav-bar/index.d.ts +1 -1
  849. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +38 -38
  850. package/tabs/tab.component.d.ts +66 -66
  851. package/tabs/tabs-animations.d.ts +4 -4
  852. package/tabs/tabs.module.d.ts +20 -20
  853. package/tags/index.d.ts +1 -1
  854. package/tags/ptsecurity-mosaic-tags.d.ts +5 -5
  855. package/tags/public-api.d.ts +5 -5
  856. package/tags/tag-default-options.d.ts +8 -8
  857. package/tags/tag-input.d.ts +77 -77
  858. package/tags/tag-list.component.d.ts +240 -240
  859. package/tags/tag-text-control.d.ts +10 -10
  860. package/tags/tag.component.d.ts +135 -135
  861. package/tags/tag.module.d.ts +11 -11
  862. package/textarea/index.d.ts +1 -1
  863. package/textarea/ptsecurity-mosaic-textarea.d.ts +5 -5
  864. package/textarea/public-api.d.ts +2 -2
  865. package/textarea/textarea.component.d.ts +111 -111
  866. package/textarea/textarea.module.d.ts +11 -11
  867. package/timepicker/index.d.ts +1 -1
  868. package/timepicker/ptsecurity-mosaic-timepicker.d.ts +5 -5
  869. package/timepicker/public-api.d.ts +3 -3
  870. package/timepicker/timepicker.constants.d.ts +20 -20
  871. package/timepicker/timepicker.directive.d.ts +146 -146
  872. package/timepicker/timepicker.module.d.ts +11 -11
  873. package/toggle/index.d.ts +1 -1
  874. package/toggle/ptsecurity-mosaic-toggle.d.ts +5 -5
  875. package/toggle/public-api.d.ts +2 -2
  876. package/toggle/toggle.component.d.ts +54 -54
  877. package/toggle/toggle.module.d.ts +10 -10
  878. package/tooltip/index.d.ts +1 -1
  879. package/tooltip/ptsecurity-mosaic-tooltip.d.ts +5 -5
  880. package/tooltip/public-api.d.ts +2 -2
  881. package/tooltip/tooltip.animations.d.ts +8 -8
  882. package/tooltip/tooltip.component.d.ts +91 -91
  883. package/tooltip/tooltip.module.d.ts +9 -9
  884. package/tree/control/base-tree-control.d.ts +40 -40
  885. package/tree/control/flat-tree-control.d.ts +52 -52
  886. package/tree/control/nested-tree-control.d.ts +19 -19
  887. package/tree/control/tree-control.d.ts +44 -44
  888. package/tree/data-source/flat-data-source.d.ts +80 -80
  889. package/tree/data-source/nested-data-source.d.ts +15 -15
  890. package/tree/index.d.ts +1 -1
  891. package/tree/node.d.ts +34 -34
  892. package/tree/outlet.d.ts +9 -9
  893. package/tree/padding.directive.d.ts +47 -47
  894. package/tree/ptsecurity-mosaic-tree.d.ts +5 -5
  895. package/tree/public-api.d.ts +15 -15
  896. package/tree/toggle.d.ts +28 -28
  897. package/tree/tree-base.d.ts +97 -97
  898. package/tree/tree-errors.d.ts +25 -25
  899. package/tree/tree-option.component.d.ts +72 -72
  900. package/tree/tree-selection.component.d.ts +132 -132
  901. package/tree/tree.d.ts +6 -6
  902. package/tree/tree.module.d.ts +16 -16
  903. package/tree-select/index.d.ts +1 -1
  904. package/tree-select/ptsecurity-mosaic-tree-select.d.ts +5 -5
  905. package/tree-select/public-api.d.ts +2 -2
  906. package/tree-select/tree-select.component.d.ts +277 -277
  907. package/tree-select/tree-select.module.d.ts +14 -14
@@ -23,1473 +23,1473 @@ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
23
23
  import { hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';
24
24
  import { HOME, END, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW } from '@ptsecurity/cdk/keycodes';
25
25
 
26
- const mcTabsAnimations = {
27
- /** Animation translates a tab along the X axis. */
28
- translateTab: trigger('translateTab', [
29
- // Note: transitions to `none` instead of 0, because some browsers might blur the content.
30
- state('center, void, left-origin-center, right-origin-center', style({ transform: 'none' })),
31
- // If the tab is either on the left or right, we additionally add a `min-height` of 1px
32
- // in order to ensure that the element has a height before its state changes. This is
33
- // necessary because Chrome does seem to skip the transition in RTL mode if the element does
34
- // not have a static height and is not rendered. See related issue: #9465
35
- state('left', style({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
36
- state('right', style({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
37
- transition('* => left, * => right, left => center, right => center', animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),
38
- transition('void => left-origin-center', [
39
- style({ transform: 'translate3d(-100%, 0, 0)' }),
40
- animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
41
- ]),
42
- transition('void => right-origin-center', [
43
- style({ transform: 'translate3d(100%, 0, 0)' }),
44
- animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
45
- ])
46
- ])
26
+ const mcTabsAnimations = {
27
+ /** Animation translates a tab along the X axis. */
28
+ translateTab: trigger('translateTab', [
29
+ // Note: transitions to `none` instead of 0, because some browsers might blur the content.
30
+ state('center, void, left-origin-center, right-origin-center', style({ transform: 'none' })),
31
+ // If the tab is either on the left or right, we additionally add a `min-height` of 1px
32
+ // in order to ensure that the element has a height before its state changes. This is
33
+ // necessary because Chrome does seem to skip the transition in RTL mode if the element does
34
+ // not have a static height and is not rendered. See related issue: #9465
35
+ state('left', style({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
36
+ state('right', style({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
37
+ transition('* => left, * => right, left => center, right => center', animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),
38
+ transition('void => left-origin-center', [
39
+ style({ transform: 'translate3d(-100%, 0, 0)' }),
40
+ animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
41
+ ]),
42
+ transition('void => right-origin-center', [
43
+ style({ transform: 'translate3d(100%, 0, 0)' }),
44
+ animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
45
+ ])
46
+ ])
47
47
  };
48
48
 
49
- /**
50
- * Wrapper for the contents of a tab.
51
- * @docs-private
52
- */
53
- class McTabBody {
54
- constructor(elementRef, dir, changeDetectorRef) {
55
- this.elementRef = elementRef;
56
- this.dir = dir;
57
- /** Event emitted when the tab begins to animate towards the center as the active tab. */
58
- this.onCentering = new EventEmitter();
59
- /** Event emitted before the centering of the tab begins. */
60
- this.beforeCentering = new EventEmitter();
61
- /** Event emitted before the centering of the tab begins. */
62
- this.afterLeavingCenter = new EventEmitter();
63
- /** Event emitted when the tab completes its animation towards the center. */
64
- this.onCentered = new EventEmitter(true);
65
- // Note that the default value will always be overwritten by `McTabBody`, but we need one
66
- // anyway to prevent the animations module from throwing an error if the body is used on its own.
67
- /** Duration for the tab's animation. */
68
- this.animationDuration = '0ms';
69
- /** Subscription to the directionality change observable. */
70
- this.dirChangeSubscription = Subscription.EMPTY;
71
- if (this.dir && changeDetectorRef) {
72
- this.dirChangeSubscription = this.dir.change
73
- .subscribe((direction) => {
74
- this.computePositionAnimationState(direction);
75
- changeDetectorRef.markForCheck();
76
- });
77
- }
78
- }
79
- /** The shifted index position of the tab body, where zero represents the active center tab. */
80
- set position(position) {
81
- this.positionIndex = position;
82
- this.computePositionAnimationState();
83
- }
84
- /**
85
- * After initialized, check if the content is centered and has an origin. If so, set the
86
- * special position states that transition the tab from the left or right before centering.
87
- */
88
- ngOnInit() {
89
- if (this.bodyPosition === 'center' && this.origin != null) {
90
- this.bodyPosition = this.computePositionFromOrigin();
91
- }
92
- }
93
- ngOnDestroy() {
94
- this.dirChangeSubscription.unsubscribe();
95
- }
96
- onTranslateTabStarted(e) {
97
- const isCentering = this.isCenterPosition(e.toState);
98
- this.beforeCentering.emit(isCentering);
99
- if (isCentering) {
100
- this.onCentering.emit(this.elementRef.nativeElement.clientHeight);
101
- }
102
- }
103
- onTranslateTabComplete(e) {
104
- // If the transition to the center is complete, emit an event.
105
- if (this.isCenterPosition(e.toState) && this.isCenterPosition(this.bodyPosition)) {
106
- this.onCentered.emit();
107
- }
108
- if (this.isCenterPosition(e.fromState) && !this.isCenterPosition(this.bodyPosition)) {
109
- this.afterLeavingCenter.emit();
110
- }
111
- }
112
- /** The text direction of the containing app. */
113
- getLayoutDirection() {
114
- return this.dir && this.dir.value === 'rtl' ? 'rtl' : 'ltr';
115
- }
116
- /** Whether the provided position state is considered center, regardless of origin. */
117
- isCenterPosition(position) {
118
- return position === 'center' || position === 'left-origin-center' || position === 'right-origin-center';
119
- }
120
- /** Computes the position state that will be used for the tab-body animation trigger. */
121
- computePositionAnimationState(dir = this.getLayoutDirection()) {
122
- if (this.positionIndex < 0) {
123
- this.bodyPosition = dir === 'ltr' ? 'left' : 'right';
124
- }
125
- else if (this.positionIndex > 0) {
126
- this.bodyPosition = dir === 'ltr' ? 'right' : 'left';
127
- }
128
- else {
129
- this.bodyPosition = 'center';
130
- }
131
- }
132
- /**
133
- * Computes the position state based on the specified origin position. This is used if the
134
- * tab is becoming visible immediately after creation.
135
- */
136
- computePositionFromOrigin() {
137
- const dir = this.getLayoutDirection();
138
- if ((dir === 'ltr' && this.origin <= 0) || (dir === 'rtl' && this.origin > 0)) {
139
- return 'left-origin-center';
140
- }
141
- return 'right-origin-center';
142
- }
143
- }
144
- /** @nocollapse */ /** @nocollapse */ McTabBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBody, deps: [{ token: i0.ElementRef }, { token: i3.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
145
- /** @nocollapse */ /** @nocollapse */ McTabBody.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabBody, selector: "mc-tab-body", inputs: { position: "position", content: "content", origin: "origin", animationDuration: "animationDuration" }, outputs: { onCentering: "onCentering", beforeCentering: "beforeCentering", afterLeavingCenter: "afterLeavingCenter", onCentered: "onCentered" }, host: { classAttribute: "mc-tab-body" }, viewQueries: [{ propertyName: "portalHost", first: true, predicate: CdkPortalOutlet, descendants: true }], ngImport: i0, template: "<div class=\"mc-tab-body__content\"\r\n #content\r\n [@translateTab]=\"{\r\n value: bodyPosition,\r\n params: {animationDuration: animationDuration}\r\n }\"\r\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\r\n (@translateTab.done)=\"onTranslateTabComplete($event)\">\r\n <ng-template mcTabBodyHost></ng-template>\r\n</div>\r\n", styles: [".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}\n"], directives: [{ type: i0.forwardRef(function () { return McTabBodyPortal; }), selector: "[mcTabBodyHost]" }], animations: [mcTabsAnimations.translateTab], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBody, decorators: [{
147
- type: Component,
148
- args: [{ selector: 'mc-tab-body', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [mcTabsAnimations.translateTab], host: {
149
- class: 'mc-tab-body'
150
- }, template: "<div class=\"mc-tab-body__content\"\r\n #content\r\n [@translateTab]=\"{\r\n value: bodyPosition,\r\n params: {animationDuration: animationDuration}\r\n }\"\r\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\r\n (@translateTab.done)=\"onTranslateTabComplete($event)\">\r\n <ng-template mcTabBodyHost></ng-template>\r\n</div>\r\n", styles: [".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}\n"] }]
151
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3.Directionality, decorators: [{
152
- type: Optional
153
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { position: [{
154
- type: Input
155
- }], onCentering: [{
156
- type: Output
157
- }], beforeCentering: [{
158
- type: Output
159
- }], afterLeavingCenter: [{
160
- type: Output
161
- }], onCentered: [{
162
- type: Output
163
- }], portalHost: [{
164
- type: ViewChild,
165
- args: [CdkPortalOutlet, { static: false }]
166
- }], content: [{
167
- type: Input,
168
- args: ['content']
169
- }], origin: [{
170
- type: Input
171
- }], animationDuration: [{
172
- type: Input
173
- }] } });
174
- /**
175
- * The portal host directive for the contents of the tab.
176
- * @docs-private
177
- */
178
- class McTabBodyPortal extends CdkPortalOutlet {
179
- constructor(componentFactoryResolver, viewContainerRef, host) {
180
- super(componentFactoryResolver, viewContainerRef);
181
- this.host = host;
182
- /** Subscription to events for when the tab body begins centering. */
183
- this.centeringSub = Subscription.EMPTY;
184
- /** Subscription to events for when the tab body finishes leaving from center position. */
185
- this.leavingSub = Subscription.EMPTY;
186
- }
187
- /** Set initial visibility or set up subscription for changing visibility. */
188
- ngOnInit() {
189
- super.ngOnInit();
190
- this.centeringSub = this.host.beforeCentering
191
- .pipe(startWith(this.host.isCenterPosition(this.host.bodyPosition)))
192
- .subscribe((isCentering) => {
193
- if (isCentering && !this.hasAttached()) {
194
- this.attach(this.host.content);
195
- }
196
- });
197
- this.leavingSub = this.host.afterLeavingCenter
198
- .subscribe(() => { this.detach(); });
199
- }
200
- /** Clean up centering subscription. */
201
- ngOnDestroy() {
202
- super.ngOnDestroy();
203
- this.centeringSub.unsubscribe();
204
- this.leavingSub.unsubscribe();
205
- }
206
- }
207
- /** @nocollapse */ /** @nocollapse */ McTabBodyPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBodyPortal, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: forwardRef(() => McTabBody) }], target: i0.ɵɵFactoryTarget.Directive });
208
- /** @nocollapse */ /** @nocollapse */ McTabBodyPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabBodyPortal, selector: "[mcTabBodyHost]", usesInheritance: true, ngImport: i0 });
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBodyPortal, decorators: [{
210
- type: Directive,
211
- args: [{
212
- selector: '[mcTabBodyHost]'
213
- }]
214
- }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: McTabBody, decorators: [{
215
- type: Inject,
216
- args: [forwardRef(() => McTabBody)]
49
+ /**
50
+ * Wrapper for the contents of a tab.
51
+ * @docs-private
52
+ */
53
+ class McTabBody {
54
+ constructor(elementRef, dir, changeDetectorRef) {
55
+ this.elementRef = elementRef;
56
+ this.dir = dir;
57
+ /** Event emitted when the tab begins to animate towards the center as the active tab. */
58
+ this.onCentering = new EventEmitter();
59
+ /** Event emitted before the centering of the tab begins. */
60
+ this.beforeCentering = new EventEmitter();
61
+ /** Event emitted before the centering of the tab begins. */
62
+ this.afterLeavingCenter = new EventEmitter();
63
+ /** Event emitted when the tab completes its animation towards the center. */
64
+ this.onCentered = new EventEmitter(true);
65
+ // Note that the default value will always be overwritten by `McTabBody`, but we need one
66
+ // anyway to prevent the animations module from throwing an error if the body is used on its own.
67
+ /** Duration for the tab's animation. */
68
+ this.animationDuration = '0ms';
69
+ /** Subscription to the directionality change observable. */
70
+ this.dirChangeSubscription = Subscription.EMPTY;
71
+ if (this.dir && changeDetectorRef) {
72
+ this.dirChangeSubscription = this.dir.change
73
+ .subscribe((direction) => {
74
+ this.computePositionAnimationState(direction);
75
+ changeDetectorRef.markForCheck();
76
+ });
77
+ }
78
+ }
79
+ /** The shifted index position of the tab body, where zero represents the active center tab. */
80
+ set position(position) {
81
+ this.positionIndex = position;
82
+ this.computePositionAnimationState();
83
+ }
84
+ /**
85
+ * After initialized, check if the content is centered and has an origin. If so, set the
86
+ * special position states that transition the tab from the left or right before centering.
87
+ */
88
+ ngOnInit() {
89
+ if (this.bodyPosition === 'center' && this.origin != null) {
90
+ this.bodyPosition = this.computePositionFromOrigin();
91
+ }
92
+ }
93
+ ngOnDestroy() {
94
+ this.dirChangeSubscription.unsubscribe();
95
+ }
96
+ onTranslateTabStarted(e) {
97
+ const isCentering = this.isCenterPosition(e.toState);
98
+ this.beforeCentering.emit(isCentering);
99
+ if (isCentering) {
100
+ this.onCentering.emit(this.elementRef.nativeElement.clientHeight);
101
+ }
102
+ }
103
+ onTranslateTabComplete(e) {
104
+ // If the transition to the center is complete, emit an event.
105
+ if (this.isCenterPosition(e.toState) && this.isCenterPosition(this.bodyPosition)) {
106
+ this.onCentered.emit();
107
+ }
108
+ if (this.isCenterPosition(e.fromState) && !this.isCenterPosition(this.bodyPosition)) {
109
+ this.afterLeavingCenter.emit();
110
+ }
111
+ }
112
+ /** The text direction of the containing app. */
113
+ getLayoutDirection() {
114
+ return this.dir && this.dir.value === 'rtl' ? 'rtl' : 'ltr';
115
+ }
116
+ /** Whether the provided position state is considered center, regardless of origin. */
117
+ isCenterPosition(position) {
118
+ return position === 'center' || position === 'left-origin-center' || position === 'right-origin-center';
119
+ }
120
+ /** Computes the position state that will be used for the tab-body animation trigger. */
121
+ computePositionAnimationState(dir = this.getLayoutDirection()) {
122
+ if (this.positionIndex < 0) {
123
+ this.bodyPosition = dir === 'ltr' ? 'left' : 'right';
124
+ }
125
+ else if (this.positionIndex > 0) {
126
+ this.bodyPosition = dir === 'ltr' ? 'right' : 'left';
127
+ }
128
+ else {
129
+ this.bodyPosition = 'center';
130
+ }
131
+ }
132
+ /**
133
+ * Computes the position state based on the specified origin position. This is used if the
134
+ * tab is becoming visible immediately after creation.
135
+ */
136
+ computePositionFromOrigin() {
137
+ const dir = this.getLayoutDirection();
138
+ if ((dir === 'ltr' && this.origin <= 0) || (dir === 'rtl' && this.origin > 0)) {
139
+ return 'left-origin-center';
140
+ }
141
+ return 'right-origin-center';
142
+ }
143
+ }
144
+ /** @nocollapse */ /** @nocollapse */ McTabBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBody, deps: [{ token: i0.ElementRef }, { token: i3.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
145
+ /** @nocollapse */ /** @nocollapse */ McTabBody.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabBody, selector: "mc-tab-body", inputs: { position: "position", content: "content", origin: "origin", animationDuration: "animationDuration" }, outputs: { onCentering: "onCentering", beforeCentering: "beforeCentering", afterLeavingCenter: "afterLeavingCenter", onCentered: "onCentered" }, host: { classAttribute: "mc-tab-body" }, viewQueries: [{ propertyName: "portalHost", first: true, predicate: CdkPortalOutlet, descendants: true }], ngImport: i0, template: "<div class=\"mc-tab-body__content\"\n #content\n [@translateTab]=\"{\n value: bodyPosition,\n params: {animationDuration: animationDuration}\n }\"\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\n (@translateTab.done)=\"onTranslateTabComplete($event)\">\n <ng-template mcTabBodyHost></ng-template>\n</div>\n", styles: [".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}\n"], directives: [{ type: i0.forwardRef(function () { return McTabBodyPortal; }), selector: "[mcTabBodyHost]" }], animations: [mcTabsAnimations.translateTab], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBody, decorators: [{
147
+ type: Component,
148
+ args: [{ selector: 'mc-tab-body', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [mcTabsAnimations.translateTab], host: {
149
+ class: 'mc-tab-body'
150
+ }, template: "<div class=\"mc-tab-body__content\"\n #content\n [@translateTab]=\"{\n value: bodyPosition,\n params: {animationDuration: animationDuration}\n }\"\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\n (@translateTab.done)=\"onTranslateTabComplete($event)\">\n <ng-template mcTabBodyHost></ng-template>\n</div>\n", styles: [".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}\n"] }]
151
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i3.Directionality, decorators: [{
152
+ type: Optional
153
+ }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { position: [{
154
+ type: Input
155
+ }], onCentering: [{
156
+ type: Output
157
+ }], beforeCentering: [{
158
+ type: Output
159
+ }], afterLeavingCenter: [{
160
+ type: Output
161
+ }], onCentered: [{
162
+ type: Output
163
+ }], portalHost: [{
164
+ type: ViewChild,
165
+ args: [CdkPortalOutlet, { static: false }]
166
+ }], content: [{
167
+ type: Input,
168
+ args: ['content']
169
+ }], origin: [{
170
+ type: Input
171
+ }], animationDuration: [{
172
+ type: Input
173
+ }] } });
174
+ /**
175
+ * The portal host directive for the contents of the tab.
176
+ * @docs-private
177
+ */
178
+ class McTabBodyPortal extends CdkPortalOutlet {
179
+ constructor(componentFactoryResolver, viewContainerRef, host) {
180
+ super(componentFactoryResolver, viewContainerRef);
181
+ this.host = host;
182
+ /** Subscription to events for when the tab body begins centering. */
183
+ this.centeringSub = Subscription.EMPTY;
184
+ /** Subscription to events for when the tab body finishes leaving from center position. */
185
+ this.leavingSub = Subscription.EMPTY;
186
+ }
187
+ /** Set initial visibility or set up subscription for changing visibility. */
188
+ ngOnInit() {
189
+ super.ngOnInit();
190
+ this.centeringSub = this.host.beforeCentering
191
+ .pipe(startWith(this.host.isCenterPosition(this.host.bodyPosition)))
192
+ .subscribe((isCentering) => {
193
+ if (isCentering && !this.hasAttached()) {
194
+ this.attach(this.host.content);
195
+ }
196
+ });
197
+ this.leavingSub = this.host.afterLeavingCenter
198
+ .subscribe(() => { this.detach(); });
199
+ }
200
+ /** Clean up centering subscription. */
201
+ ngOnDestroy() {
202
+ super.ngOnDestroy();
203
+ this.centeringSub.unsubscribe();
204
+ this.leavingSub.unsubscribe();
205
+ }
206
+ }
207
+ /** @nocollapse */ /** @nocollapse */ McTabBodyPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBodyPortal, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: forwardRef(() => McTabBody) }], target: i0.ɵɵFactoryTarget.Directive });
208
+ /** @nocollapse */ /** @nocollapse */ McTabBodyPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabBodyPortal, selector: "[mcTabBodyHost]", usesInheritance: true, ngImport: i0 });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabBodyPortal, decorators: [{
210
+ type: Directive,
211
+ args: [{
212
+ selector: '[mcTabBodyHost]'
213
+ }]
214
+ }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: McTabBody, decorators: [{
215
+ type: Inject,
216
+ args: [forwardRef(() => McTabBody)]
217
217
  }] }]; } });
218
218
 
219
- /** Decorates the `ng-template` tags and reads out the template from it. */
220
- class McTabContent {
221
- constructor(template) {
222
- this.template = template;
223
- }
224
- }
225
- /** @nocollapse */ /** @nocollapse */ McTabContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
226
- /** @nocollapse */ /** @nocollapse */ McTabContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabContent, selector: "[mcTabContent]", ngImport: i0 });
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabContent, decorators: [{
228
- type: Directive,
229
- args: [{ selector: '[mcTabContent]' }]
219
+ /** Decorates the `ng-template` tags and reads out the template from it. */
220
+ class McTabContent {
221
+ constructor(template) {
222
+ this.template = template;
223
+ }
224
+ }
225
+ /** @nocollapse */ /** @nocollapse */ McTabContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
226
+ /** @nocollapse */ /** @nocollapse */ McTabContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabContent, selector: "[mcTabContent]", ngImport: i0 });
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabContent, decorators: [{
228
+ type: Directive,
229
+ args: [{ selector: '[mcTabContent]' }]
230
230
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
231
231
 
232
- /* tslint:disable:naming-convention */
233
- /** Config used to bind passive event listeners */
234
- const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
235
- /**
236
- * The distance in pixels that will be overshot when scrolling a tab label into view. This helps
237
- * provide a small affordance to the label next to it.
238
- */
239
- const EXAGGERATED_OVERSCROLL = 60;
240
- /**
241
- * Amount of milliseconds to wait before starting to scroll the header automatically.
242
- * Set a little conservatively in order to handle fake events dispatched on touch devices.
243
- */
244
- const HEADER_SCROLL_DELAY = 650;
245
- /**
246
- * Interval in milliseconds at which to scroll the header
247
- * while the user is holding their pointer.
248
- */
249
- const HEADER_SCROLL_INTERVAL = 100;
250
- const VIEWPORT_THROTTLE_TIME = 150;
251
- const SCROLL_DISTANCE = 0.8;
252
- /**
253
- * Base class for a tab header that supported pagination.
254
- * @docs-private
255
- */
256
- class McPaginatedTabHeader {
257
- constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode) {
258
- this.elementRef = elementRef;
259
- this.changeDetectorRef = changeDetectorRef;
260
- this.viewportRuler = viewportRuler;
261
- this.ngZone = ngZone;
262
- this.platform = platform;
263
- this.dir = dir;
264
- this.animationMode = animationMode;
265
- this._selectedIndex = 0;
266
- /** The distance in pixels that the tab labels should be translated to the left. */
267
- this._scrollDistance = 0;
268
- /** Event emitted when the option is selected. */
269
- this.selectFocusedIndex = new EventEmitter();
270
- /** Event emitted when a label is focused. */
271
- this.indexFocused = new EventEmitter();
272
- /** Whether the controls for pagination should be displayed */
273
- this.showPaginationControls = false;
274
- /** Whether the tab list can be scrolled more towards the end of the tab label list. */
275
- this.disableScrollAfter = true;
276
- /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
277
- this.disableScrollBefore = true;
278
- /**
279
- * Whether pagination should be disabled. This can be used to avoid unnecessary
280
- * layout recalculations if it's known that pagination won't be required.
281
- */
282
- this.disablePagination = false;
283
- /** Emits when the component is destroyed. */
284
- this.destroyed = new Subject();
285
- this.vertical = false;
286
- /** Stream that will stop the automated scrolling. */
287
- this.stopScrolling = new Subject();
288
- /** Whether the header should scroll to the selected index after the view has been checked. */
289
- this.selectedIndexChanged = false;
290
- // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
291
- ngZone.runOutsideAngular(() => {
292
- fromEvent(elementRef.nativeElement, 'mouseleave')
293
- .pipe(takeUntil(this.destroyed))
294
- .subscribe(() => this.stopInterval());
295
- });
296
- }
297
- /** The index of the active tab. */
298
- get selectedIndex() {
299
- return this._selectedIndex;
300
- }
301
- set selectedIndex(value) {
302
- const coercedValue = coerceNumberProperty(value);
303
- this.selectedIndexChanged = this._selectedIndex !== coercedValue;
304
- this._selectedIndex = coercedValue;
305
- this.keyManager?.updateActiveItem(coercedValue);
306
- }
307
- /** Tracks which element has focus; used for keyboard navigation */
308
- get focusIndex() {
309
- return this.keyManager ? this.keyManager.activeItemIndex : 0;
310
- }
311
- /** When the focus index is set, we must manually send focus to the correct label */
312
- set focusIndex(value) {
313
- if (!this.isValidIndex(value) || this.focusIndex === value || !this.keyManager) {
314
- return;
315
- }
316
- this.keyManager.setActiveItem(value);
317
- }
318
- /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
319
- get scrollDistance() {
320
- return this._scrollDistance;
321
- }
322
- set scrollDistance(v) {
323
- this._scrollDistance = Math.max(0, Math.min(this.getMaxScrollDistance(), v));
324
- // Mark that the scroll distance has changed so that after the view is checked, the CSS
325
- // transformation can move the header.
326
- this.scrollDistanceChanged = true;
327
- this.checkScrollingControls();
328
- }
329
- /** Called when the user has selected an item via the keyboard. */
330
- ngAfterViewInit() {
331
- // We need to handle these events manually, because we want to bind passive event listeners.
332
- fromEvent(this.previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
333
- .pipe(takeUntil(this.destroyed))
334
- .subscribe(() => this.handlePaginatorPress('before'));
335
- fromEvent(this.nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
336
- .pipe(takeUntil(this.destroyed))
337
- .subscribe(() => this.handlePaginatorPress('after'));
338
- }
339
- ngAfterContentInit() {
340
- const dirChange = this.dir ? this.dir.change : of('ltr');
341
- const resize = this.viewportRuler.change(VIEWPORT_THROTTLE_TIME);
342
- const realign = () => {
343
- this.updatePagination();
344
- };
345
- this.keyManager = new FocusKeyManager(this.items)
346
- .withHorizontalOrientation(this.getLayoutDirection());
347
- this.keyManager.updateActiveItem(this._selectedIndex);
348
- // Defer the first call in order to allow for slower browsers to lay out the elements.
349
- // This helps in cases where the user lands directly on a page with paginated tabs.
350
- typeof requestAnimationFrame !== undefined ? requestAnimationFrame(realign) : realign();
351
- // On dir change or window resize, realign the ink bar and update the orientation of
352
- // the key manager if the direction has changed.
353
- merge(dirChange, resize, this.items.changes)
354
- .pipe(takeUntil(this.destroyed))
355
- .subscribe(() => {
356
- // We need to defer this to give the browser some time to recalculate
357
- // the element dimensions. The call has to be wrapped in `NgZone.run`,
358
- // because the viewport change handler runs outside of Angular.
359
- this.ngZone.run(() => Promise.resolve().then(realign));
360
- this.keyManager.withHorizontalOrientation(this.getLayoutDirection());
361
- });
362
- // If there is a change in the focus key manager we need to emit the `indexFocused`
363
- // event in order to provide a public event that notifies about focus changes. Also we realign
364
- // the tabs container by scrolling the new focused tab into the visible section.
365
- this.keyManager.change
366
- .pipe(takeUntil(this.destroyed))
367
- .subscribe((newFocusIndex) => {
368
- this.indexFocused.emit(newFocusIndex);
369
- this.setTabFocus(newFocusIndex);
370
- });
371
- }
372
- ngAfterContentChecked() {
373
- // If the number of tab labels have changed, check if scrolling should be enabled
374
- if (this.tabLabelCount !== this.items.length) {
375
- this.updatePagination();
376
- this.tabLabelCount = this.items.length;
377
- this.changeDetectorRef.markForCheck();
378
- }
379
- // If the selected index has changed, scroll to the label and check if the scrolling controls
380
- // should be disabled.
381
- if (this.selectedIndexChanged) {
382
- this.scrollToLabel(this._selectedIndex);
383
- this.checkScrollingControls();
384
- this.selectedIndexChanged = false;
385
- this.changeDetectorRef.markForCheck();
386
- }
387
- // If the scroll distance has been changed (tab selected, focused, scroll controls activated),
388
- // then translate the header to reflect this.
389
- if (this.scrollDistanceChanged) {
390
- this.updateTabScrollPosition();
391
- this.scrollDistanceChanged = false;
392
- this.changeDetectorRef.markForCheck();
393
- }
394
- }
395
- ngOnDestroy() {
396
- this.destroyed.next();
397
- this.destroyed.complete();
398
- this.stopScrolling.complete();
399
- }
400
- handleKeydown(event) {
401
- // We don't handle any key bindings with a modifier key.
402
- if (hasModifierKey(event)) {
403
- return;
404
- }
405
- // tslint:disable-next-line: deprecation
406
- const key = event.keyCode;
407
- if (key === HOME) {
408
- this.keyManager.setFirstItemActive();
409
- }
410
- else if (key === END) {
411
- this.keyManager.setLastItemActive();
412
- }
413
- else if (key === UP_ARROW && this.vertical) {
414
- this.keyManager.setPreviousItemActive();
415
- }
416
- else if (key === DOWN_ARROW && this.vertical) {
417
- this.keyManager.setNextItemActive();
418
- }
419
- else if (key === RIGHT_ARROW && !this.vertical) {
420
- this.keyManager.setNextItemActive();
421
- }
422
- else if (key === LEFT_ARROW && !this.vertical) {
423
- this.keyManager.setPreviousItemActive();
424
- }
425
- else if ([ENTER, SPACE].includes(key)) {
426
- this.selectFocusedIndex.emit(this.focusIndex);
427
- }
428
- if ([HOME, END, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, SPACE, ENTER].includes(key)) {
429
- event.preventDefault();
430
- }
431
- }
432
- /**
433
- * Callback for when the MutationObserver detects that the content has changed.
434
- */
435
- onContentChanges() {
436
- const textContent = this.elementRef.nativeElement.textContent;
437
- // We need to diff the text content of the header, because the MutationObserver callback
438
- // will fire even if the text content didn't change which is inefficient and is prone
439
- // to infinite loops if a poorly constructed expression is passed in (see #14249).
440
- if (textContent !== this.currentTextContent) {
441
- this.currentTextContent = textContent || '';
442
- // The content observer runs outside the `NgZone` by default, which
443
- // means that we need to bring the callback back in ourselves.
444
- this.ngZone.run(() => {
445
- this.updatePagination();
446
- this.changeDetectorRef.markForCheck();
447
- });
448
- }
449
- }
450
- /**
451
- * Updates the view whether pagination should be enabled or not.
452
- *
453
- * WARNING: Calling this method can be very costly in terms of performance. It should be called
454
- * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
455
- * page.
456
- */
457
- updatePagination() {
458
- this.checkPaginationEnabled();
459
- this.checkScrollingControls();
460
- this.updateTabScrollPosition();
461
- }
462
- /**
463
- * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
464
- * providing a valid index and return true.
465
- */
466
- isValidIndex(index) {
467
- if (!this.items) {
468
- return true;
469
- }
470
- const tab = this.items ? this.items.toArray()[index] : null;
471
- return !!tab && !tab.disabled;
472
- }
473
- /**
474
- * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
475
- * scrolling is enabled.
476
- */
477
- setTabFocus(tabIndex) {
478
- if (this.showPaginationControls) {
479
- this.scrollToLabel(tabIndex);
480
- }
481
- if (this.items?.length) {
482
- this.items.toArray()[tabIndex].focus();
483
- // Do not let the browser manage scrolling to focus the element, this will be handled
484
- // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
485
- // should be the full width minus the offset width.
486
- const containerEl = this.tabListContainer.nativeElement;
487
- const dir = this.getLayoutDirection();
488
- if (dir === 'ltr') {
489
- containerEl.scrollLeft = 0;
490
- }
491
- else {
492
- containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
493
- }
494
- }
495
- }
496
- /** The layout direction of the containing app. */
497
- getLayoutDirection() {
498
- return this.dir?.value === 'rtl' ? 'rtl' : 'ltr';
499
- }
500
- /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
501
- updateTabScrollPosition() {
502
- if (this.disablePagination) {
503
- return;
504
- }
505
- const scrollDistance = this.scrollDistance;
506
- const translateX = this.getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
507
- // Don't use `translate3d` here because we don't want to create a new layer. A new layer
508
- // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar
509
- // and ripples will exceed the boundaries of the visible tab bar.
510
- // See: https://github.com/angular/components/issues/10276
511
- // We round the `transform` here, because transforms with sub-pixel precision cause some
512
- // browsers to blur the content of the element.
513
- this.tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
514
- // Setting the `transform` on IE will change the scroll offset of the parent, causing the
515
- // position to be thrown off in some cases. We have to reset it ourselves to ensure that
516
- // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
517
- // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
518
- if (this.platform.TRIDENT || this.platform.EDGE) {
519
- this.tabListContainer.nativeElement.scrollLeft = 0;
520
- }
521
- }
522
- /**
523
- * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
524
- * the end of the list, respectively). The distance to scroll is computed to be a third of the
525
- * length of the tab list view window.
526
- *
527
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
528
- * should be called sparingly.
529
- */
530
- scrollHeader(direction) {
531
- const viewLength = this.tabListContainer.nativeElement.offsetWidth;
532
- // Move the scroll distance one-third the length of the tab list's viewport.
533
- const scrollAmount = (direction === 'before' ? -1 : 1) * viewLength * SCROLL_DISTANCE;
534
- return this.scrollTo(this.scrollDistance + scrollAmount);
535
- }
536
- /** Handles click events on the pagination arrows. */
537
- handlePaginatorClick(direction) {
538
- this.stopInterval();
539
- this.scrollHeader(direction);
540
- }
541
- /**
542
- * Moves the tab list such that the desired tab label (marked by index) is moved into view.
543
- *
544
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
545
- * should be called sparingly.
546
- */
547
- scrollToLabel(labelIndex) {
548
- if (this.disablePagination) {
549
- return;
550
- }
551
- const selectedLabel = this.items ? this.items.toArray()[labelIndex] : null;
552
- if (!selectedLabel) {
553
- return;
554
- }
555
- // The view length is the visible width of the tab labels.
556
- const viewLength = this.tabListContainer.nativeElement.offsetWidth;
557
- const { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;
558
- let labelBeforePos;
559
- let labelAfterPos;
560
- if (this.getLayoutDirection() === 'ltr') {
561
- labelBeforePos = offsetLeft;
562
- labelAfterPos = labelBeforePos + offsetWidth;
563
- }
564
- else {
565
- labelAfterPos = this.tabList.nativeElement.offsetWidth - offsetLeft;
566
- labelBeforePos = labelAfterPos - offsetWidth;
567
- }
568
- const beforeVisiblePos = this.scrollDistance;
569
- const afterVisiblePos = this.scrollDistance + viewLength;
570
- if (labelBeforePos < beforeVisiblePos) {
571
- // Scroll header to move label to the before direction
572
- this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
573
- }
574
- else if (labelAfterPos > afterVisiblePos) {
575
- // Scroll header to move label to the after direction
576
- this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
577
- }
578
- }
579
- /**
580
- * Evaluate whether the pagination controls should be displayed. If the scroll width of the
581
- * tab list is wider than the size of the header container, then the pagination controls should
582
- * be shown.
583
- *
584
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
585
- * should be called sparingly.
586
- */
587
- checkPaginationEnabled() {
588
- if (this.disablePagination || this.vertical) {
589
- this.showPaginationControls = false;
590
- }
591
- else {
592
- const isEnabled = this.tabList.nativeElement.scrollWidth > this.elementRef.nativeElement.offsetWidth;
593
- if (!isEnabled) {
594
- this.scrollDistance = 0;
595
- }
596
- if (isEnabled !== this.showPaginationControls) {
597
- this.changeDetectorRef.markForCheck();
598
- }
599
- this.showPaginationControls = isEnabled;
600
- }
601
- }
602
- /**
603
- * Evaluate whether the before and after controls should be enabled or disabled.
604
- * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
605
- * before button. If the header is at the end of the list (scroll distance is equal to the
606
- * maximum distance we can scroll), then disable the after button.
607
- *
608
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
609
- * should be called sparingly.
610
- */
611
- checkScrollingControls() {
612
- if (this.disablePagination) {
613
- this.disableScrollAfter = this.disableScrollBefore = true;
614
- }
615
- else {
616
- // Check if the pagination arrows should be activated.
617
- this.disableScrollBefore = this.scrollDistance === 0;
618
- this.disableScrollAfter = this.scrollDistance === this.getMaxScrollDistance();
619
- this.changeDetectorRef.markForCheck();
620
- }
621
- }
622
- /**
623
- * Determines what is the maximum length in pixels that can be set for the scroll distance. This
624
- * is equal to the difference in width between the tab list container and tab header container.
625
- *
626
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
627
- * should be called sparingly.
628
- */
629
- getMaxScrollDistance() {
630
- const lengthOfTabList = this.tabList.nativeElement.scrollWidth;
631
- const viewLength = this.tabListContainer.nativeElement.offsetWidth;
632
- return (lengthOfTabList - viewLength) || 0;
633
- }
634
- /** Stops the currently-running paginator interval. */
635
- stopInterval() {
636
- this.stopScrolling.next();
637
- }
638
- /**
639
- * Handles the user pressing down on one of the paginators.
640
- * Starts scrolling the header after a certain amount of time.
641
- * @param direction In which direction the paginator should be scrolled.
642
- */
643
- handlePaginatorPress(direction, mouseEvent) {
644
- // Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to
645
- // null check the `button`, but we do it so we don't break tests that use fake events.
646
- if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
647
- return;
648
- }
649
- // Avoid overlapping timers.
650
- this.stopInterval();
651
- // Start a timer after the delay and keep firing based on the interval.
652
- timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
653
- // Keep the timer going until something tells it to stop or the component is destroyed.
654
- .pipe(takeUntil(merge(this.stopScrolling, this.destroyed)))
655
- .subscribe(() => {
656
- const { maxScrollDistance, distance } = this.scrollHeader(direction);
657
- // Stop the timer if we've reached the start or the end.
658
- if (distance === 0 || distance >= maxScrollDistance) {
659
- this.stopInterval();
660
- }
661
- });
662
- }
663
- /**
664
- * Scrolls the header to a given position.
665
- * @param position Position to which to scroll.
666
- * @returns Information on the current scroll distance and the maximum.
667
- */
668
- scrollTo(position) {
669
- if (this.disablePagination) {
670
- return { maxScrollDistance: 0, distance: 0 };
671
- }
672
- const maxScrollDistance = this.getMaxScrollDistance();
673
- this.scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
674
- // Mark that the scroll distance has changed so that after the view is checked, the CSS
675
- // transformation can move the header.
676
- this.scrollDistanceChanged = true;
677
- this.checkScrollingControls();
678
- return { maxScrollDistance, distance: this.scrollDistance };
679
- }
680
- }
681
- /** @nocollapse */ /** @nocollapse */ McPaginatedTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McPaginatedTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i2.Platform }, { token: i3.Directionality, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
682
- /** @nocollapse */ /** @nocollapse */ McPaginatedTabHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McPaginatedTabHeader, inputs: { disablePagination: "disablePagination" }, ngImport: i0 });
683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McPaginatedTabHeader, decorators: [{
684
- type: Directive
685
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i2.Platform }, { type: i3.Directionality, decorators: [{
686
- type: Optional
687
- }] }, { type: undefined, decorators: [{
688
- type: Optional
689
- }, {
690
- type: Inject,
691
- args: [ANIMATION_MODULE_TYPE]
692
- }] }]; }, propDecorators: { disablePagination: [{
693
- type: Input
232
+ /* tslint:disable:naming-convention */
233
+ /** Config used to bind passive event listeners */
234
+ const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
235
+ /**
236
+ * The distance in pixels that will be overshot when scrolling a tab label into view. This helps
237
+ * provide a small affordance to the label next to it.
238
+ */
239
+ const EXAGGERATED_OVERSCROLL = 60;
240
+ /**
241
+ * Amount of milliseconds to wait before starting to scroll the header automatically.
242
+ * Set a little conservatively in order to handle fake events dispatched on touch devices.
243
+ */
244
+ const HEADER_SCROLL_DELAY = 650;
245
+ /**
246
+ * Interval in milliseconds at which to scroll the header
247
+ * while the user is holding their pointer.
248
+ */
249
+ const HEADER_SCROLL_INTERVAL = 100;
250
+ const VIEWPORT_THROTTLE_TIME = 150;
251
+ const SCROLL_DISTANCE = 0.8;
252
+ /**
253
+ * Base class for a tab header that supported pagination.
254
+ * @docs-private
255
+ */
256
+ class McPaginatedTabHeader {
257
+ constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode) {
258
+ this.elementRef = elementRef;
259
+ this.changeDetectorRef = changeDetectorRef;
260
+ this.viewportRuler = viewportRuler;
261
+ this.ngZone = ngZone;
262
+ this.platform = platform;
263
+ this.dir = dir;
264
+ this.animationMode = animationMode;
265
+ this._selectedIndex = 0;
266
+ /** The distance in pixels that the tab labels should be translated to the left. */
267
+ this._scrollDistance = 0;
268
+ /** Event emitted when the option is selected. */
269
+ this.selectFocusedIndex = new EventEmitter();
270
+ /** Event emitted when a label is focused. */
271
+ this.indexFocused = new EventEmitter();
272
+ /** Whether the controls for pagination should be displayed */
273
+ this.showPaginationControls = false;
274
+ /** Whether the tab list can be scrolled more towards the end of the tab label list. */
275
+ this.disableScrollAfter = true;
276
+ /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
277
+ this.disableScrollBefore = true;
278
+ /**
279
+ * Whether pagination should be disabled. This can be used to avoid unnecessary
280
+ * layout recalculations if it's known that pagination won't be required.
281
+ */
282
+ this.disablePagination = false;
283
+ /** Emits when the component is destroyed. */
284
+ this.destroyed = new Subject();
285
+ this.vertical = false;
286
+ /** Stream that will stop the automated scrolling. */
287
+ this.stopScrolling = new Subject();
288
+ /** Whether the header should scroll to the selected index after the view has been checked. */
289
+ this.selectedIndexChanged = false;
290
+ // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
291
+ ngZone.runOutsideAngular(() => {
292
+ fromEvent(elementRef.nativeElement, 'mouseleave')
293
+ .pipe(takeUntil(this.destroyed))
294
+ .subscribe(() => this.stopInterval());
295
+ });
296
+ }
297
+ /** The index of the active tab. */
298
+ get selectedIndex() {
299
+ return this._selectedIndex;
300
+ }
301
+ set selectedIndex(value) {
302
+ const coercedValue = coerceNumberProperty(value);
303
+ this.selectedIndexChanged = this._selectedIndex !== coercedValue;
304
+ this._selectedIndex = coercedValue;
305
+ this.keyManager?.updateActiveItem(coercedValue);
306
+ }
307
+ /** Tracks which element has focus; used for keyboard navigation */
308
+ get focusIndex() {
309
+ return this.keyManager ? this.keyManager.activeItemIndex : 0;
310
+ }
311
+ /** When the focus index is set, we must manually send focus to the correct label */
312
+ set focusIndex(value) {
313
+ if (!this.isValidIndex(value) || this.focusIndex === value || !this.keyManager) {
314
+ return;
315
+ }
316
+ this.keyManager.setActiveItem(value);
317
+ }
318
+ /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
319
+ get scrollDistance() {
320
+ return this._scrollDistance;
321
+ }
322
+ set scrollDistance(v) {
323
+ this._scrollDistance = Math.max(0, Math.min(this.getMaxScrollDistance(), v));
324
+ // Mark that the scroll distance has changed so that after the view is checked, the CSS
325
+ // transformation can move the header.
326
+ this.scrollDistanceChanged = true;
327
+ this.checkScrollingControls();
328
+ }
329
+ /** Called when the user has selected an item via the keyboard. */
330
+ ngAfterViewInit() {
331
+ // We need to handle these events manually, because we want to bind passive event listeners.
332
+ fromEvent(this.previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
333
+ .pipe(takeUntil(this.destroyed))
334
+ .subscribe(() => this.handlePaginatorPress('before'));
335
+ fromEvent(this.nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
336
+ .pipe(takeUntil(this.destroyed))
337
+ .subscribe(() => this.handlePaginatorPress('after'));
338
+ }
339
+ ngAfterContentInit() {
340
+ const dirChange = this.dir ? this.dir.change : of('ltr');
341
+ const resize = this.viewportRuler.change(VIEWPORT_THROTTLE_TIME);
342
+ const realign = () => {
343
+ this.updatePagination();
344
+ };
345
+ this.keyManager = new FocusKeyManager(this.items)
346
+ .withHorizontalOrientation(this.getLayoutDirection());
347
+ this.keyManager.updateActiveItem(this._selectedIndex);
348
+ // Defer the first call in order to allow for slower browsers to lay out the elements.
349
+ // This helps in cases where the user lands directly on a page with paginated tabs.
350
+ typeof requestAnimationFrame !== undefined ? requestAnimationFrame(realign) : realign();
351
+ // On dir change or window resize, realign the ink bar and update the orientation of
352
+ // the key manager if the direction has changed.
353
+ merge(dirChange, resize, this.items.changes)
354
+ .pipe(takeUntil(this.destroyed))
355
+ .subscribe(() => {
356
+ // We need to defer this to give the browser some time to recalculate
357
+ // the element dimensions. The call has to be wrapped in `NgZone.run`,
358
+ // because the viewport change handler runs outside of Angular.
359
+ this.ngZone.run(() => Promise.resolve().then(realign));
360
+ this.keyManager.withHorizontalOrientation(this.getLayoutDirection());
361
+ });
362
+ // If there is a change in the focus key manager we need to emit the `indexFocused`
363
+ // event in order to provide a public event that notifies about focus changes. Also we realign
364
+ // the tabs container by scrolling the new focused tab into the visible section.
365
+ this.keyManager.change
366
+ .pipe(takeUntil(this.destroyed))
367
+ .subscribe((newFocusIndex) => {
368
+ this.indexFocused.emit(newFocusIndex);
369
+ this.setTabFocus(newFocusIndex);
370
+ });
371
+ }
372
+ ngAfterContentChecked() {
373
+ // If the number of tab labels have changed, check if scrolling should be enabled
374
+ if (this.tabLabelCount !== this.items.length) {
375
+ this.updatePagination();
376
+ this.tabLabelCount = this.items.length;
377
+ this.changeDetectorRef.markForCheck();
378
+ }
379
+ // If the selected index has changed, scroll to the label and check if the scrolling controls
380
+ // should be disabled.
381
+ if (this.selectedIndexChanged) {
382
+ this.scrollToLabel(this._selectedIndex);
383
+ this.checkScrollingControls();
384
+ this.selectedIndexChanged = false;
385
+ this.changeDetectorRef.markForCheck();
386
+ }
387
+ // If the scroll distance has been changed (tab selected, focused, scroll controls activated),
388
+ // then translate the header to reflect this.
389
+ if (this.scrollDistanceChanged) {
390
+ this.updateTabScrollPosition();
391
+ this.scrollDistanceChanged = false;
392
+ this.changeDetectorRef.markForCheck();
393
+ }
394
+ }
395
+ ngOnDestroy() {
396
+ this.destroyed.next();
397
+ this.destroyed.complete();
398
+ this.stopScrolling.complete();
399
+ }
400
+ handleKeydown(event) {
401
+ // We don't handle any key bindings with a modifier key.
402
+ if (hasModifierKey(event)) {
403
+ return;
404
+ }
405
+ // tslint:disable-next-line: deprecation
406
+ const key = event.keyCode;
407
+ if (key === HOME) {
408
+ this.keyManager.setFirstItemActive();
409
+ }
410
+ else if (key === END) {
411
+ this.keyManager.setLastItemActive();
412
+ }
413
+ else if (key === UP_ARROW && this.vertical) {
414
+ this.keyManager.setPreviousItemActive();
415
+ }
416
+ else if (key === DOWN_ARROW && this.vertical) {
417
+ this.keyManager.setNextItemActive();
418
+ }
419
+ else if (key === RIGHT_ARROW && !this.vertical) {
420
+ this.keyManager.setNextItemActive();
421
+ }
422
+ else if (key === LEFT_ARROW && !this.vertical) {
423
+ this.keyManager.setPreviousItemActive();
424
+ }
425
+ else if ([ENTER, SPACE].includes(key)) {
426
+ this.selectFocusedIndex.emit(this.focusIndex);
427
+ }
428
+ if ([HOME, END, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, SPACE, ENTER].includes(key)) {
429
+ event.preventDefault();
430
+ }
431
+ }
432
+ /**
433
+ * Callback for when the MutationObserver detects that the content has changed.
434
+ */
435
+ onContentChanges() {
436
+ const textContent = this.elementRef.nativeElement.textContent;
437
+ // We need to diff the text content of the header, because the MutationObserver callback
438
+ // will fire even if the text content didn't change which is inefficient and is prone
439
+ // to infinite loops if a poorly constructed expression is passed in (see #14249).
440
+ if (textContent !== this.currentTextContent) {
441
+ this.currentTextContent = textContent || '';
442
+ // The content observer runs outside the `NgZone` by default, which
443
+ // means that we need to bring the callback back in ourselves.
444
+ this.ngZone.run(() => {
445
+ this.updatePagination();
446
+ this.changeDetectorRef.markForCheck();
447
+ });
448
+ }
449
+ }
450
+ /**
451
+ * Updates the view whether pagination should be enabled or not.
452
+ *
453
+ * WARNING: Calling this method can be very costly in terms of performance. It should be called
454
+ * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
455
+ * page.
456
+ */
457
+ updatePagination() {
458
+ this.checkPaginationEnabled();
459
+ this.checkScrollingControls();
460
+ this.updateTabScrollPosition();
461
+ }
462
+ /**
463
+ * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
464
+ * providing a valid index and return true.
465
+ */
466
+ isValidIndex(index) {
467
+ if (!this.items) {
468
+ return true;
469
+ }
470
+ const tab = this.items ? this.items.toArray()[index] : null;
471
+ return !!tab && !tab.disabled;
472
+ }
473
+ /**
474
+ * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
475
+ * scrolling is enabled.
476
+ */
477
+ setTabFocus(tabIndex) {
478
+ if (this.showPaginationControls) {
479
+ this.scrollToLabel(tabIndex);
480
+ }
481
+ if (this.items?.length) {
482
+ this.items.toArray()[tabIndex].focus();
483
+ // Do not let the browser manage scrolling to focus the element, this will be handled
484
+ // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
485
+ // should be the full width minus the offset width.
486
+ const containerEl = this.tabListContainer.nativeElement;
487
+ const dir = this.getLayoutDirection();
488
+ if (dir === 'ltr') {
489
+ containerEl.scrollLeft = 0;
490
+ }
491
+ else {
492
+ containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
493
+ }
494
+ }
495
+ }
496
+ /** The layout direction of the containing app. */
497
+ getLayoutDirection() {
498
+ return this.dir?.value === 'rtl' ? 'rtl' : 'ltr';
499
+ }
500
+ /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
501
+ updateTabScrollPosition() {
502
+ if (this.disablePagination) {
503
+ return;
504
+ }
505
+ const scrollDistance = this.scrollDistance;
506
+ const translateX = this.getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
507
+ // Don't use `translate3d` here because we don't want to create a new layer. A new layer
508
+ // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar
509
+ // and ripples will exceed the boundaries of the visible tab bar.
510
+ // See: https://github.com/angular/components/issues/10276
511
+ // We round the `transform` here, because transforms with sub-pixel precision cause some
512
+ // browsers to blur the content of the element.
513
+ this.tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
514
+ // Setting the `transform` on IE will change the scroll offset of the parent, causing the
515
+ // position to be thrown off in some cases. We have to reset it ourselves to ensure that
516
+ // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
517
+ // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
518
+ if (this.platform.TRIDENT || this.platform.EDGE) {
519
+ this.tabListContainer.nativeElement.scrollLeft = 0;
520
+ }
521
+ }
522
+ /**
523
+ * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
524
+ * the end of the list, respectively). The distance to scroll is computed to be a third of the
525
+ * length of the tab list view window.
526
+ *
527
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
528
+ * should be called sparingly.
529
+ */
530
+ scrollHeader(direction) {
531
+ const viewLength = this.tabListContainer.nativeElement.offsetWidth;
532
+ // Move the scroll distance one-third the length of the tab list's viewport.
533
+ const scrollAmount = (direction === 'before' ? -1 : 1) * viewLength * SCROLL_DISTANCE;
534
+ return this.scrollTo(this.scrollDistance + scrollAmount);
535
+ }
536
+ /** Handles click events on the pagination arrows. */
537
+ handlePaginatorClick(direction) {
538
+ this.stopInterval();
539
+ this.scrollHeader(direction);
540
+ }
541
+ /**
542
+ * Moves the tab list such that the desired tab label (marked by index) is moved into view.
543
+ *
544
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
545
+ * should be called sparingly.
546
+ */
547
+ scrollToLabel(labelIndex) {
548
+ if (this.disablePagination) {
549
+ return;
550
+ }
551
+ const selectedLabel = this.items ? this.items.toArray()[labelIndex] : null;
552
+ if (!selectedLabel) {
553
+ return;
554
+ }
555
+ // The view length is the visible width of the tab labels.
556
+ const viewLength = this.tabListContainer.nativeElement.offsetWidth;
557
+ const { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;
558
+ let labelBeforePos;
559
+ let labelAfterPos;
560
+ if (this.getLayoutDirection() === 'ltr') {
561
+ labelBeforePos = offsetLeft;
562
+ labelAfterPos = labelBeforePos + offsetWidth;
563
+ }
564
+ else {
565
+ labelAfterPos = this.tabList.nativeElement.offsetWidth - offsetLeft;
566
+ labelBeforePos = labelAfterPos - offsetWidth;
567
+ }
568
+ const beforeVisiblePos = this.scrollDistance;
569
+ const afterVisiblePos = this.scrollDistance + viewLength;
570
+ if (labelBeforePos < beforeVisiblePos) {
571
+ // Scroll header to move label to the before direction
572
+ this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
573
+ }
574
+ else if (labelAfterPos > afterVisiblePos) {
575
+ // Scroll header to move label to the after direction
576
+ this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
577
+ }
578
+ }
579
+ /**
580
+ * Evaluate whether the pagination controls should be displayed. If the scroll width of the
581
+ * tab list is wider than the size of the header container, then the pagination controls should
582
+ * be shown.
583
+ *
584
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
585
+ * should be called sparingly.
586
+ */
587
+ checkPaginationEnabled() {
588
+ if (this.disablePagination || this.vertical) {
589
+ this.showPaginationControls = false;
590
+ }
591
+ else {
592
+ const isEnabled = this.tabList.nativeElement.scrollWidth > this.elementRef.nativeElement.offsetWidth;
593
+ if (!isEnabled) {
594
+ this.scrollDistance = 0;
595
+ }
596
+ if (isEnabled !== this.showPaginationControls) {
597
+ this.changeDetectorRef.markForCheck();
598
+ }
599
+ this.showPaginationControls = isEnabled;
600
+ }
601
+ }
602
+ /**
603
+ * Evaluate whether the before and after controls should be enabled or disabled.
604
+ * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
605
+ * before button. If the header is at the end of the list (scroll distance is equal to the
606
+ * maximum distance we can scroll), then disable the after button.
607
+ *
608
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
609
+ * should be called sparingly.
610
+ */
611
+ checkScrollingControls() {
612
+ if (this.disablePagination) {
613
+ this.disableScrollAfter = this.disableScrollBefore = true;
614
+ }
615
+ else {
616
+ // Check if the pagination arrows should be activated.
617
+ this.disableScrollBefore = this.scrollDistance === 0;
618
+ this.disableScrollAfter = this.scrollDistance === this.getMaxScrollDistance();
619
+ this.changeDetectorRef.markForCheck();
620
+ }
621
+ }
622
+ /**
623
+ * Determines what is the maximum length in pixels that can be set for the scroll distance. This
624
+ * is equal to the difference in width between the tab list container and tab header container.
625
+ *
626
+ * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
627
+ * should be called sparingly.
628
+ */
629
+ getMaxScrollDistance() {
630
+ const lengthOfTabList = this.tabList.nativeElement.scrollWidth;
631
+ const viewLength = this.tabListContainer.nativeElement.offsetWidth;
632
+ return (lengthOfTabList - viewLength) || 0;
633
+ }
634
+ /** Stops the currently-running paginator interval. */
635
+ stopInterval() {
636
+ this.stopScrolling.next();
637
+ }
638
+ /**
639
+ * Handles the user pressing down on one of the paginators.
640
+ * Starts scrolling the header after a certain amount of time.
641
+ * @param direction In which direction the paginator should be scrolled.
642
+ */
643
+ handlePaginatorPress(direction, mouseEvent) {
644
+ // Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to
645
+ // null check the `button`, but we do it so we don't break tests that use fake events.
646
+ if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
647
+ return;
648
+ }
649
+ // Avoid overlapping timers.
650
+ this.stopInterval();
651
+ // Start a timer after the delay and keep firing based on the interval.
652
+ timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
653
+ // Keep the timer going until something tells it to stop or the component is destroyed.
654
+ .pipe(takeUntil(merge(this.stopScrolling, this.destroyed)))
655
+ .subscribe(() => {
656
+ const { maxScrollDistance, distance } = this.scrollHeader(direction);
657
+ // Stop the timer if we've reached the start or the end.
658
+ if (distance === 0 || distance >= maxScrollDistance) {
659
+ this.stopInterval();
660
+ }
661
+ });
662
+ }
663
+ /**
664
+ * Scrolls the header to a given position.
665
+ * @param position Position to which to scroll.
666
+ * @returns Information on the current scroll distance and the maximum.
667
+ */
668
+ scrollTo(position) {
669
+ if (this.disablePagination) {
670
+ return { maxScrollDistance: 0, distance: 0 };
671
+ }
672
+ const maxScrollDistance = this.getMaxScrollDistance();
673
+ this.scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
674
+ // Mark that the scroll distance has changed so that after the view is checked, the CSS
675
+ // transformation can move the header.
676
+ this.scrollDistanceChanged = true;
677
+ this.checkScrollingControls();
678
+ return { maxScrollDistance, distance: this.scrollDistance };
679
+ }
680
+ }
681
+ /** @nocollapse */ /** @nocollapse */ McPaginatedTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McPaginatedTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i2.Platform }, { token: i3.Directionality, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
682
+ /** @nocollapse */ /** @nocollapse */ McPaginatedTabHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McPaginatedTabHeader, inputs: { disablePagination: "disablePagination" }, ngImport: i0 });
683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McPaginatedTabHeader, decorators: [{
684
+ type: Directive
685
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i2.Platform }, { type: i3.Directionality, decorators: [{
686
+ type: Optional
687
+ }] }, { type: undefined, decorators: [{
688
+ type: Optional
689
+ }, {
690
+ type: Inject,
691
+ args: [ANIMATION_MODULE_TYPE]
692
+ }] }]; }, propDecorators: { disablePagination: [{
693
+ type: Input
694
694
  }] } });
695
695
 
696
- const MC_TAB_LABEL = new InjectionToken('McTabLabel');
697
- /** Used to flag tab labels for use with the portal directive */
698
- class McTabLabel extends CdkPortal {
699
- }
700
- /** @nocollapse */ /** @nocollapse */ McTabLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive });
701
- /** @nocollapse */ /** @nocollapse */ McTabLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabLabel, selector: "[mc-tab-label], [mcTabLabel]", providers: [{ provide: MC_TAB_LABEL, useExisting: McTabLabel }], usesInheritance: true, ngImport: i0 });
702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabel, decorators: [{
703
- type: Directive,
704
- args: [{
705
- selector: '[mc-tab-label], [mcTabLabel]',
706
- providers: [{ provide: MC_TAB_LABEL, useExisting: McTabLabel }]
707
- }]
696
+ const MC_TAB_LABEL = new InjectionToken('McTabLabel');
697
+ /** Used to flag tab labels for use with the portal directive */
698
+ class McTabLabel extends CdkPortal {
699
+ }
700
+ /** @nocollapse */ /** @nocollapse */ McTabLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive });
701
+ /** @nocollapse */ /** @nocollapse */ McTabLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabLabel, selector: "[mc-tab-label], [mcTabLabel]", providers: [{ provide: MC_TAB_LABEL, useExisting: McTabLabel }], usesInheritance: true, ngImport: i0 });
702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabel, decorators: [{
703
+ type: Directive,
704
+ args: [{
705
+ selector: '[mc-tab-label], [mcTabLabel]',
706
+ providers: [{ provide: MC_TAB_LABEL, useExisting: McTabLabel }]
707
+ }]
708
708
  }] });
709
709
 
710
- class McTabBase {
711
- }
712
- // tslint:disable-next-line:naming-convention
713
- const McTabMixinBase = mixinDisabled(McTabBase);
714
- class McTab extends McTabMixinBase {
715
- constructor(viewContainerRef) {
716
- super();
717
- this.viewContainerRef = viewContainerRef;
718
- this._tooltipTitle = '';
719
- this.tooltipPlacement = PopUpPlacements.Right;
720
- /** Plain text label for the tab, used when there is no template label. */
721
- this.textLabel = '';
722
- this.empty = false;
723
- /** Emits whenever the internal state of the tab changes. */
724
- this.stateChanges = new Subject();
725
- /**
726
- * The relatively indexed position where 0 represents the center, negative is left, and positive
727
- * represents the right.
728
- */
729
- this.position = null;
730
- /**
731
- * The initial relatively index origin of the tab if it was created and selected after there
732
- * was already a selected tab. Provides context of what position the tab should originate from.
733
- */
734
- this.origin = null;
735
- /**
736
- * Whether the tab is currently active.
737
- */
738
- this.isActive = false;
739
- this._overflowTooltipTitle = '';
740
- /** Portal that will be the hosted content of the tab */
741
- this.contentPortal = null;
742
- }
743
- /** @docs-private */
744
- get content() {
745
- return this.contentPortal;
746
- }
747
- get templateLabel() {
748
- return this._templateLabel;
749
- }
750
- set templateLabel(value) {
751
- this.setTemplateLabelInput(value);
752
- }
753
- get tooltipTitle() {
754
- return this.overflowTooltipTitle + this._tooltipTitle;
755
- }
756
- set tooltipTitle(value) {
757
- this._tooltipTitle = value;
758
- }
759
- get isOverflown() {
760
- return !!this._overflowTooltipTitle;
761
- }
762
- get overflowTooltipTitle() {
763
- if (this.isOverflown) {
764
- return `${this._overflowTooltipTitle}\n`;
765
- }
766
- return '';
767
- }
768
- set overflowTooltipTitle(value) {
769
- this._overflowTooltipTitle = value;
770
- }
771
- ngOnChanges(changes) {
772
- if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {
773
- this.stateChanges.next();
774
- }
775
- }
776
- ngOnDestroy() {
777
- this.stateChanges.complete();
778
- }
779
- ngOnInit() {
780
- this.contentPortal = new TemplatePortal(this.explicitContent || this.implicitContent, this.viewContainerRef);
781
- }
782
- /**
783
- * This has been extracted to a util because of TS 4 and VE.
784
- * View Engine doesn't support property rename inheritance.
785
- * TS 4.0 doesn't allow properties to override accessors or vice-versa.
786
- * @docs-private
787
- */
788
- setTemplateLabelInput(value) {
789
- // Only update the templateLabel via query if there is actually
790
- // a McTabLabel found. This works around an issue where a user may have
791
- // manually set `templateLabel` during creation mode, which would then get clobbered
792
- // by `undefined` when this query resolves.
793
- if (value) {
794
- this._templateLabel = value;
795
- }
796
- }
797
- }
798
- /** @nocollapse */ /** @nocollapse */ McTab.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTab, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
799
- /** @nocollapse */ /** @nocollapse */ McTab.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTab, selector: "mc-tab", inputs: { disabled: "disabled", tooltipTitle: "tooltipTitle", tooltipPlacement: "tooltipPlacement", textLabel: ["label", "textLabel"], empty: "empty", tabId: "tabId" }, queries: [{ propertyName: "templateLabel", first: true, predicate: MC_TAB_LABEL, descendants: true }, { propertyName: "explicitContent", first: true, predicate: McTabContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["mcTab"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content></ng-content></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
800
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTab, decorators: [{
801
- type: Component,
802
- args: [{
803
- selector: 'mc-tab',
804
- exportAs: 'mcTab',
805
- // Create a template for the content of the <mc-tab> so that we can grab a reference to this
806
- // TemplateRef and use it in a Portal to render the tab content in the appropriate place in the
807
- // tab-group.
808
- template: '<ng-template><ng-content></ng-content></ng-template>',
809
- inputs: ['disabled'],
810
- changeDetection: ChangeDetectionStrategy.OnPush,
811
- encapsulation: ViewEncapsulation.None
812
- }]
813
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateLabel: [{
814
- type: ContentChild,
815
- args: [MC_TAB_LABEL]
816
- }], explicitContent: [{
817
- type: ContentChild,
818
- args: [McTabContent, { read: TemplateRef, static: true }]
819
- }], implicitContent: [{
820
- type: ViewChild,
821
- args: [TemplateRef, { static: true }]
822
- }], tooltipTitle: [{
823
- type: Input
824
- }], tooltipPlacement: [{
825
- type: Input
826
- }], textLabel: [{
827
- type: Input,
828
- args: ['label']
829
- }], empty: [{
830
- type: Input
831
- }], tabId: [{
832
- type: Input,
833
- args: ['tabId']
710
+ class McTabBase {
711
+ }
712
+ // tslint:disable-next-line:naming-convention
713
+ const McTabMixinBase = mixinDisabled(McTabBase);
714
+ class McTab extends McTabMixinBase {
715
+ constructor(viewContainerRef) {
716
+ super();
717
+ this.viewContainerRef = viewContainerRef;
718
+ this._tooltipTitle = '';
719
+ this.tooltipPlacement = PopUpPlacements.Right;
720
+ /** Plain text label for the tab, used when there is no template label. */
721
+ this.textLabel = '';
722
+ this.empty = false;
723
+ /** Emits whenever the internal state of the tab changes. */
724
+ this.stateChanges = new Subject();
725
+ /**
726
+ * The relatively indexed position where 0 represents the center, negative is left, and positive
727
+ * represents the right.
728
+ */
729
+ this.position = null;
730
+ /**
731
+ * The initial relatively index origin of the tab if it was created and selected after there
732
+ * was already a selected tab. Provides context of what position the tab should originate from.
733
+ */
734
+ this.origin = null;
735
+ /**
736
+ * Whether the tab is currently active.
737
+ */
738
+ this.isActive = false;
739
+ this._overflowTooltipTitle = '';
740
+ /** Portal that will be the hosted content of the tab */
741
+ this.contentPortal = null;
742
+ }
743
+ /** @docs-private */
744
+ get content() {
745
+ return this.contentPortal;
746
+ }
747
+ get templateLabel() {
748
+ return this._templateLabel;
749
+ }
750
+ set templateLabel(value) {
751
+ this.setTemplateLabelInput(value);
752
+ }
753
+ get tooltipTitle() {
754
+ return this.overflowTooltipTitle + this._tooltipTitle;
755
+ }
756
+ set tooltipTitle(value) {
757
+ this._tooltipTitle = value;
758
+ }
759
+ get isOverflown() {
760
+ return !!this._overflowTooltipTitle;
761
+ }
762
+ get overflowTooltipTitle() {
763
+ if (this.isOverflown) {
764
+ return `${this._overflowTooltipTitle}\n`;
765
+ }
766
+ return '';
767
+ }
768
+ set overflowTooltipTitle(value) {
769
+ this._overflowTooltipTitle = value;
770
+ }
771
+ ngOnChanges(changes) {
772
+ if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {
773
+ this.stateChanges.next();
774
+ }
775
+ }
776
+ ngOnDestroy() {
777
+ this.stateChanges.complete();
778
+ }
779
+ ngOnInit() {
780
+ this.contentPortal = new TemplatePortal(this.explicitContent || this.implicitContent, this.viewContainerRef);
781
+ }
782
+ /**
783
+ * This has been extracted to a util because of TS 4 and VE.
784
+ * View Engine doesn't support property rename inheritance.
785
+ * TS 4.0 doesn't allow properties to override accessors or vice-versa.
786
+ * @docs-private
787
+ */
788
+ setTemplateLabelInput(value) {
789
+ // Only update the templateLabel via query if there is actually
790
+ // a McTabLabel found. This works around an issue where a user may have
791
+ // manually set `templateLabel` during creation mode, which would then get clobbered
792
+ // by `undefined` when this query resolves.
793
+ if (value) {
794
+ this._templateLabel = value;
795
+ }
796
+ }
797
+ }
798
+ /** @nocollapse */ /** @nocollapse */ McTab.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTab, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
799
+ /** @nocollapse */ /** @nocollapse */ McTab.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTab, selector: "mc-tab", inputs: { disabled: "disabled", tooltipTitle: "tooltipTitle", tooltipPlacement: "tooltipPlacement", textLabel: ["label", "textLabel"], empty: "empty", tabId: "tabId" }, queries: [{ propertyName: "templateLabel", first: true, predicate: MC_TAB_LABEL, descendants: true }, { propertyName: "explicitContent", first: true, predicate: McTabContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["mcTab"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content></ng-content></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
800
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTab, decorators: [{
801
+ type: Component,
802
+ args: [{
803
+ selector: 'mc-tab',
804
+ exportAs: 'mcTab',
805
+ // Create a template for the content of the <mc-tab> so that we can grab a reference to this
806
+ // TemplateRef and use it in a Portal to render the tab content in the appropriate place in the
807
+ // tab-group.
808
+ template: '<ng-template><ng-content></ng-content></ng-template>',
809
+ inputs: ['disabled'],
810
+ changeDetection: ChangeDetectionStrategy.OnPush,
811
+ encapsulation: ViewEncapsulation.None
812
+ }]
813
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateLabel: [{
814
+ type: ContentChild,
815
+ args: [MC_TAB_LABEL]
816
+ }], explicitContent: [{
817
+ type: ContentChild,
818
+ args: [McTabContent, { read: TemplateRef, static: true }]
819
+ }], implicitContent: [{
820
+ type: ViewChild,
821
+ args: [TemplateRef, { static: true }]
822
+ }], tooltipTitle: [{
823
+ type: Input
824
+ }], tooltipPlacement: [{
825
+ type: Input
826
+ }], textLabel: [{
827
+ type: Input,
828
+ args: ['label']
829
+ }], empty: [{
830
+ type: Input
831
+ }], tabId: [{
832
+ type: Input,
833
+ args: ['tabId']
834
834
  }] } });
835
835
 
836
- // Boilerplate for applying mixins to McTabLabelWrapper.
837
- /** @docs-private */
838
- class McTabLabelWrapperBase {
839
- }
840
- // tslint:disable-next-line:naming-convention
841
- const McTabLabelWrapperMixinBase = mixinDisabled(McTabLabelWrapperBase);
842
- /**
843
- * Used in the `mc-tab-group` view to display tab labels.
844
- * @docs-private
845
- */
846
- class McTabLabelWrapper extends McTabLabelWrapperMixinBase {
847
- constructor(elementRef, renderer) {
848
- super();
849
- this.elementRef = elementRef;
850
- this.renderer = renderer;
851
- }
852
- ngAfterViewInit() {
853
- this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.mc-icon')));
854
- }
855
- /** Sets focus on the wrapper element */
856
- focus() {
857
- this.elementRef.nativeElement.focus();
858
- }
859
- getOffsetLeft() {
860
- return this.elementRef.nativeElement.offsetLeft;
861
- }
862
- getOffsetWidth() {
863
- return this.elementRef.nativeElement.offsetWidth;
864
- }
865
- checkOverflow() {
866
- this.tab.overflowTooltipTitle = this.isOverflown() ? this.getInnerText() : '';
867
- }
868
- isOverflown() {
869
- return this.labelContent.nativeElement.scrollWidth > this.labelContent.nativeElement.clientWidth;
870
- }
871
- getInnerText() {
872
- return this.labelContent.nativeElement.innerText;
873
- }
874
- addClassModifierForIcons(icons) {
875
- const twoIcons = 2;
876
- const [firstIconElement, secondIconElement] = icons;
877
- if (icons.length === 1) {
878
- const COMMENT_NODE = 8;
879
- if (firstIconElement.nextSibling && firstIconElement.nextSibling.nodeType !== COMMENT_NODE) {
880
- this.renderer.addClass(firstIconElement, 'mc-icon_left');
881
- }
882
- if (firstIconElement.previousSibling && firstIconElement.previousSibling.nodeType !== COMMENT_NODE) {
883
- this.renderer.addClass(firstIconElement, 'mc-icon_right');
884
- }
885
- }
886
- else if (icons.length === twoIcons) {
887
- this.renderer.addClass(firstIconElement, 'mc-icon_left');
888
- this.renderer.addClass(secondIconElement, 'mc-icon_right');
889
- }
890
- }
891
- }
892
- /** @nocollapse */ /** @nocollapse */ McTabLabelWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabelWrapper, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
893
- /** @nocollapse */ /** @nocollapse */ McTabLabelWrapper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabLabelWrapper, selector: "[mcTabLabelWrapper]", inputs: { disabled: "disabled", tab: "tab" }, host: { properties: { "attr.disabled": "disabled || null" } }, queries: [{ propertyName: "labelContent", first: true, predicate: ["labelContent"], descendants: true }], usesInheritance: true, ngImport: i0 });
894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabelWrapper, decorators: [{
895
- type: Directive,
896
- args: [{
897
- selector: '[mcTabLabelWrapper]',
898
- inputs: ['disabled'],
899
- host: {
900
- '[attr.disabled]': 'disabled || null'
901
- }
902
- }]
903
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { labelContent: [{
904
- type: ContentChild,
905
- args: ['labelContent']
906
- }], tab: [{
907
- type: Input
836
+ // Boilerplate for applying mixins to McTabLabelWrapper.
837
+ /** @docs-private */
838
+ class McTabLabelWrapperBase {
839
+ }
840
+ // tslint:disable-next-line:naming-convention
841
+ const McTabLabelWrapperMixinBase = mixinDisabled(McTabLabelWrapperBase);
842
+ /**
843
+ * Used in the `mc-tab-group` view to display tab labels.
844
+ * @docs-private
845
+ */
846
+ class McTabLabelWrapper extends McTabLabelWrapperMixinBase {
847
+ constructor(elementRef, renderer) {
848
+ super();
849
+ this.elementRef = elementRef;
850
+ this.renderer = renderer;
851
+ }
852
+ ngAfterViewInit() {
853
+ this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.mc-icon')));
854
+ }
855
+ /** Sets focus on the wrapper element */
856
+ focus() {
857
+ this.elementRef.nativeElement.focus();
858
+ }
859
+ getOffsetLeft() {
860
+ return this.elementRef.nativeElement.offsetLeft;
861
+ }
862
+ getOffsetWidth() {
863
+ return this.elementRef.nativeElement.offsetWidth;
864
+ }
865
+ checkOverflow() {
866
+ this.tab.overflowTooltipTitle = this.isOverflown() ? this.getInnerText() : '';
867
+ }
868
+ isOverflown() {
869
+ return this.labelContent.nativeElement.scrollWidth > this.labelContent.nativeElement.clientWidth;
870
+ }
871
+ getInnerText() {
872
+ return this.labelContent.nativeElement.innerText;
873
+ }
874
+ addClassModifierForIcons(icons) {
875
+ const twoIcons = 2;
876
+ const [firstIconElement, secondIconElement] = icons;
877
+ if (icons.length === 1) {
878
+ const COMMENT_NODE = 8;
879
+ if (firstIconElement.nextSibling && firstIconElement.nextSibling.nodeType !== COMMENT_NODE) {
880
+ this.renderer.addClass(firstIconElement, 'mc-icon_left');
881
+ }
882
+ if (firstIconElement.previousSibling && firstIconElement.previousSibling.nodeType !== COMMENT_NODE) {
883
+ this.renderer.addClass(firstIconElement, 'mc-icon_right');
884
+ }
885
+ }
886
+ else if (icons.length === twoIcons) {
887
+ this.renderer.addClass(firstIconElement, 'mc-icon_left');
888
+ this.renderer.addClass(secondIconElement, 'mc-icon_right');
889
+ }
890
+ }
891
+ }
892
+ /** @nocollapse */ /** @nocollapse */ McTabLabelWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabelWrapper, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
893
+ /** @nocollapse */ /** @nocollapse */ McTabLabelWrapper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McTabLabelWrapper, selector: "[mcTabLabelWrapper]", inputs: { disabled: "disabled", tab: "tab" }, host: { properties: { "attr.disabled": "disabled || null" } }, queries: [{ propertyName: "labelContent", first: true, predicate: ["labelContent"], descendants: true }], usesInheritance: true, ngImport: i0 });
894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLabelWrapper, decorators: [{
895
+ type: Directive,
896
+ args: [{
897
+ selector: '[mcTabLabelWrapper]',
898
+ inputs: ['disabled'],
899
+ host: {
900
+ '[attr.disabled]': 'disabled || null'
901
+ }
902
+ }]
903
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { labelContent: [{
904
+ type: ContentChild,
905
+ args: ['labelContent']
906
+ }], tab: [{
907
+ type: Input
908
908
  }] } });
909
909
 
910
- /**
911
- * The header of the tab group which displays a list of all the tabs in the tab group.
912
- * When the tabs list's width exceeds the width of the header container,
913
- * then arrows will be displayed to allow the user to scroll
914
- * left and right across the header.
915
- * @docs-private
916
- */
917
- class McTabHeader extends McPaginatedTabHeader {
918
- constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode) {
919
- super(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode);
920
- this.elementRef = elementRef;
921
- this.changeDetectorRef = changeDetectorRef;
922
- /** The index of the active tab. */
923
- this.vertical = false;
924
- }
925
- itemSelected(event) {
926
- event.preventDefault();
927
- }
928
- }
929
- /** @nocollapse */ /** @nocollapse */ McTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i2.Platform }, { token: i3.Directionality, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
930
- /** @nocollapse */ /** @nocollapse */ McTabHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabHeader, selector: "mc-tab-header", inputs: { selectedIndex: "selectedIndex", vertical: "vertical" }, outputs: { selectFocusedIndex: "selectFocusedIndex", indexFocused: "indexFocused" }, host: { properties: { "class.mc-tab-header_vertical": "vertical", "class.mc-tab-header__pagination-controls_enabled": "showPaginationControls", "class.mc-tab-header_rtl": "getLayoutDirection() == 'rtl'" }, classAttribute: "mc-tab-header" }, queries: [{ propertyName: "items", predicate: McTabLabelWrapper }], viewQueries: [{ propertyName: "tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-tab-header__pagination mc-tab-header__pagination_before\"\r\n #previousPaginator\r\n [class.mc-disabled]=\"disableScrollBefore\"\r\n (click)=\"handlePaginatorClick('before')\"\r\n (mousedown)=\"handlePaginatorPress('before', $event)\"\r\n (touchend)=\"stopInterval()\">\r\n\r\n <i mc-icon=\"mc-angle-left-M_16\"></i>\r\n</div>\r\n\r\n<div class=\"mc-tab-header__content\"\r\n #tabListContainer\r\n (keydown)=\"handleKeydown($event)\">\r\n\r\n <div class=\"mc-tab-list\"\r\n #tabList\r\n (cdkObserveContent)=\"onContentChanges()\">\r\n <div class=\"mc-tab-list__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mc-tab-header__pagination mc-tab-header__pagination_after\"\r\n #nextPaginator\r\n [class.mc-disabled]=\"disableScrollAfter\"\r\n (mousedown)=\"handlePaginatorPress('after', $event)\"\r\n (click)=\"handlePaginatorClick('after')\"\r\n (touchend)=\"stopInterval()\">\r\n\r\n <i mc-icon=\"mc-angle-right-M_16\"></i>\r\n</div>\r\n", styles: [".mc-tab-label.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_horizontal.cdk-keyboard-focused:after,.mc-tab-label_old.cdk-keyboard-focused:after{border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-bottom-color:transparent}.mc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-header_vertical .mc-tab-list__content{flex-direction:column}.mc-tab-header__pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none;padding-left:12px;padding-right:12px;border-bottom-style:solid;border-bottom-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_before{border-right-style:solid;border-right-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_after{border-left-style:solid;border-left-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination-controls_enabled .mc-tab-header__pagination{display:flex}.mc-tab-header__content{display:flex;flex-grow:1;z-index:1;overflow:hidden}.mc-tab-list{position:relative;width:100%;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none;-webkit-user-select:none;user-select:none}.mc-tab-label.mc-active{cursor:default}.mc-tab-label.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-label:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-label[disabled]{pointer-events:none}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-label_old{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-left:none;border-left-color:transparent;border-right:none;border-right-color:transparent}.mc-tab-label_old.mc-active{border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;padding-right:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px));padding-left:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.mc-active.cdk-keyboard-focused:after{right:calc(-2 * var(--mc-tabs-size-border-width, 1px));left:calc(-2 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.cdk-keyboard-focused:after{top:-1px}.mc-tab-label_horizontal{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid}.mc-tab-label_horizontal.mc-active:before{bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:0;right:0;height:var(--mc-tabs-size-highlight-height, 4px)}.mc-tab-label_vertical{justify-content:flex-start}.mc-tab-label_vertical.mc-active:before{top:0;bottom:0;left:calc(-1 * var(--mc-tabs-size-border-width, 1px));width:var(--mc-tabs-size-highlight-height, 5px)}.mc-tab-label_vertical.cdk-keyboard-focused:after{right:0;left:0;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-label_old{flex-basis:0;flex-grow:1}\n"], components: [{ type: i4.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i4.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
931
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabHeader, decorators: [{
932
- type: Component,
933
- args: [{ selector: 'mc-tab-header', inputs: ['selectedIndex'], outputs: ['selectFocusedIndex', 'indexFocused'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
934
- class: 'mc-tab-header',
935
- '[class.mc-tab-header_vertical]': 'vertical',
936
- '[class.mc-tab-header__pagination-controls_enabled]': 'showPaginationControls',
937
- '[class.mc-tab-header_rtl]': 'getLayoutDirection() == \'rtl\''
938
- }, template: "<div class=\"mc-tab-header__pagination mc-tab-header__pagination_before\"\r\n #previousPaginator\r\n [class.mc-disabled]=\"disableScrollBefore\"\r\n (click)=\"handlePaginatorClick('before')\"\r\n (mousedown)=\"handlePaginatorPress('before', $event)\"\r\n (touchend)=\"stopInterval()\">\r\n\r\n <i mc-icon=\"mc-angle-left-M_16\"></i>\r\n</div>\r\n\r\n<div class=\"mc-tab-header__content\"\r\n #tabListContainer\r\n (keydown)=\"handleKeydown($event)\">\r\n\r\n <div class=\"mc-tab-list\"\r\n #tabList\r\n (cdkObserveContent)=\"onContentChanges()\">\r\n <div class=\"mc-tab-list__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"mc-tab-header__pagination mc-tab-header__pagination_after\"\r\n #nextPaginator\r\n [class.mc-disabled]=\"disableScrollAfter\"\r\n (mousedown)=\"handlePaginatorPress('after', $event)\"\r\n (click)=\"handlePaginatorClick('after')\"\r\n (touchend)=\"stopInterval()\">\r\n\r\n <i mc-icon=\"mc-angle-right-M_16\"></i>\r\n</div>\r\n", styles: [".mc-tab-label.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_horizontal.cdk-keyboard-focused:after,.mc-tab-label_old.cdk-keyboard-focused:after{border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-bottom-color:transparent}.mc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-header_vertical .mc-tab-list__content{flex-direction:column}.mc-tab-header__pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none;padding-left:12px;padding-right:12px;border-bottom-style:solid;border-bottom-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_before{border-right-style:solid;border-right-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_after{border-left-style:solid;border-left-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination-controls_enabled .mc-tab-header__pagination{display:flex}.mc-tab-header__content{display:flex;flex-grow:1;z-index:1;overflow:hidden}.mc-tab-list{position:relative;width:100%;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none;-webkit-user-select:none;user-select:none}.mc-tab-label.mc-active{cursor:default}.mc-tab-label.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-label:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-label[disabled]{pointer-events:none}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-label_old{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-left:none;border-left-color:transparent;border-right:none;border-right-color:transparent}.mc-tab-label_old.mc-active{border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;padding-right:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px));padding-left:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.mc-active.cdk-keyboard-focused:after{right:calc(-2 * var(--mc-tabs-size-border-width, 1px));left:calc(-2 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.cdk-keyboard-focused:after{top:-1px}.mc-tab-label_horizontal{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid}.mc-tab-label_horizontal.mc-active:before{bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:0;right:0;height:var(--mc-tabs-size-highlight-height, 4px)}.mc-tab-label_vertical{justify-content:flex-start}.mc-tab-label_vertical.mc-active:before{top:0;bottom:0;left:calc(-1 * var(--mc-tabs-size-border-width, 1px));width:var(--mc-tabs-size-highlight-height, 5px)}.mc-tab-label_vertical.cdk-keyboard-focused:after{right:0;left:0;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-label_old{flex-basis:0;flex-grow:1}\n"] }]
939
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i2.Platform }, { type: i3.Directionality, decorators: [{
940
- type: Optional
941
- }] }, { type: undefined, decorators: [{
942
- type: Optional
943
- }, {
944
- type: Inject,
945
- args: [ANIMATION_MODULE_TYPE]
946
- }] }]; }, propDecorators: { vertical: [{
947
- type: Input
948
- }], items: [{
949
- type: ContentChildren,
950
- args: [McTabLabelWrapper, { descendants: false }]
951
- }], tabListContainer: [{
952
- type: ViewChild,
953
- args: ['tabListContainer', { static: true }]
954
- }], tabList: [{
955
- type: ViewChild,
956
- args: ['tabList', { static: true }]
957
- }], nextPaginator: [{
958
- type: ViewChild,
959
- args: ['nextPaginator']
960
- }], previousPaginator: [{
961
- type: ViewChild,
962
- args: ['previousPaginator']
910
+ /**
911
+ * The header of the tab group which displays a list of all the tabs in the tab group.
912
+ * When the tabs list's width exceeds the width of the header container,
913
+ * then arrows will be displayed to allow the user to scroll
914
+ * left and right across the header.
915
+ * @docs-private
916
+ */
917
+ class McTabHeader extends McPaginatedTabHeader {
918
+ constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode) {
919
+ super(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode);
920
+ this.elementRef = elementRef;
921
+ this.changeDetectorRef = changeDetectorRef;
922
+ /** The index of the active tab. */
923
+ this.vertical = false;
924
+ }
925
+ itemSelected(event) {
926
+ event.preventDefault();
927
+ }
928
+ }
929
+ /** @nocollapse */ /** @nocollapse */ McTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i2.Platform }, { token: i3.Directionality, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
930
+ /** @nocollapse */ /** @nocollapse */ McTabHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabHeader, selector: "mc-tab-header", inputs: { selectedIndex: "selectedIndex", vertical: "vertical" }, outputs: { selectFocusedIndex: "selectFocusedIndex", indexFocused: "indexFocused" }, host: { properties: { "class.mc-tab-header_vertical": "vertical", "class.mc-tab-header__pagination-controls_enabled": "showPaginationControls", "class.mc-tab-header_rtl": "getLayoutDirection() == 'rtl'" }, classAttribute: "mc-tab-header" }, queries: [{ propertyName: "items", predicate: McTabLabelWrapper }], viewQueries: [{ propertyName: "tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-tab-header__pagination mc-tab-header__pagination_before\"\n #previousPaginator\n [class.mc-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-left-M_16\"></i>\n</div>\n\n<div class=\"mc-tab-header__content\"\n #tabListContainer\n (keydown)=\"handleKeydown($event)\">\n\n <div class=\"mc-tab-list\"\n #tabList\n (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"mc-tab-list__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mc-tab-header__pagination mc-tab-header__pagination_after\"\n #nextPaginator\n [class.mc-disabled]=\"disableScrollAfter\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (click)=\"handlePaginatorClick('after')\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-right-M_16\"></i>\n</div>\n", styles: [".mc-tab-label.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_horizontal.cdk-keyboard-focused:after,.mc-tab-label_old.cdk-keyboard-focused:after{border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-bottom-color:transparent}.mc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-header_vertical .mc-tab-list__content{flex-direction:column}.mc-tab-header__pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none;padding-left:12px;padding-right:12px;border-bottom-style:solid;border-bottom-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_before{border-right-style:solid;border-right-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_after{border-left-style:solid;border-left-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination-controls_enabled .mc-tab-header__pagination{display:flex}.mc-tab-header__content{display:flex;flex-grow:1;z-index:1;overflow:hidden}.mc-tab-list{position:relative;width:100%;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none;-webkit-user-select:none;user-select:none}.mc-tab-label.mc-active{cursor:default}.mc-tab-label.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-label:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-label[disabled]{pointer-events:none}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-label_old{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-left:none;border-left-color:transparent;border-right:none;border-right-color:transparent}.mc-tab-label_old.mc-active{border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;padding-right:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px));padding-left:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.mc-active.cdk-keyboard-focused:after{right:calc(-2 * var(--mc-tabs-size-border-width, 1px));left:calc(-2 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.cdk-keyboard-focused:after{top:-1px}.mc-tab-label_horizontal{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid}.mc-tab-label_horizontal.mc-active:before{bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:0;right:0;height:var(--mc-tabs-size-highlight-height, 4px)}.mc-tab-label_vertical{justify-content:flex-start}.mc-tab-label_vertical.mc-active:before{top:0;bottom:0;left:calc(-1 * var(--mc-tabs-size-border-width, 1px));width:var(--mc-tabs-size-highlight-height, 5px)}.mc-tab-label_vertical.cdk-keyboard-focused:after{right:0;left:0;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-label_old{flex-basis:0;flex-grow:1}\n"], components: [{ type: i4.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i4.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabHeader, decorators: [{
932
+ type: Component,
933
+ args: [{ selector: 'mc-tab-header', inputs: ['selectedIndex'], outputs: ['selectFocusedIndex', 'indexFocused'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
934
+ class: 'mc-tab-header',
935
+ '[class.mc-tab-header_vertical]': 'vertical',
936
+ '[class.mc-tab-header__pagination-controls_enabled]': 'showPaginationControls',
937
+ '[class.mc-tab-header_rtl]': 'getLayoutDirection() == \'rtl\''
938
+ }, template: "<div class=\"mc-tab-header__pagination mc-tab-header__pagination_before\"\n #previousPaginator\n [class.mc-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-left-M_16\"></i>\n</div>\n\n<div class=\"mc-tab-header__content\"\n #tabListContainer\n (keydown)=\"handleKeydown($event)\">\n\n <div class=\"mc-tab-list\"\n #tabList\n (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"mc-tab-list__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mc-tab-header__pagination mc-tab-header__pagination_after\"\n #nextPaginator\n [class.mc-disabled]=\"disableScrollAfter\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (click)=\"handlePaginatorClick('after')\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-right-M_16\"></i>\n</div>\n", styles: [".mc-tab-label.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_horizontal.cdk-keyboard-focused:after,.mc-tab-label_old.cdk-keyboard-focused:after{border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-bottom-color:transparent}.mc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-header_vertical .mc-tab-list__content{flex-direction:column}.mc-tab-header__pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none;padding-left:12px;padding-right:12px;border-bottom-style:solid;border-bottom-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_before{border-right-style:solid;border-right-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_after{border-left-style:solid;border-left-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination-controls_enabled .mc-tab-header__pagination{display:flex}.mc-tab-header__content{display:flex;flex-grow:1;z-index:1;overflow:hidden}.mc-tab-list{position:relative;width:100%;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none;-webkit-user-select:none;user-select:none}.mc-tab-label.mc-active{cursor:default}.mc-tab-label.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-label:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-label[disabled]{pointer-events:none}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-label_old{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;border-top-left-radius:var(--mc-tabs-size-border-radius, 4px);border-top-right-radius:var(--mc-tabs-size-border-radius, 4px);border-left:none;border-left-color:transparent;border-right:none;border-right-color:transparent}.mc-tab-label_old.mc-active{border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;padding-right:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px));padding-left:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.mc-active.cdk-keyboard-focused:after{right:calc(-2 * var(--mc-tabs-size-border-width, 1px));left:calc(-2 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.cdk-keyboard-focused:after{top:-1px}.mc-tab-label_horizontal{border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid}.mc-tab-label_horizontal.mc-active:before{bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:0;right:0;height:var(--mc-tabs-size-highlight-height, 4px)}.mc-tab-label_vertical{justify-content:flex-start}.mc-tab-label_vertical.mc-active:before{top:0;bottom:0;left:calc(-1 * var(--mc-tabs-size-border-width, 1px));width:var(--mc-tabs-size-highlight-height, 5px)}.mc-tab-label_vertical.cdk-keyboard-focused:after{right:0;left:0;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-label_old{flex-basis:0;flex-grow:1}\n"] }]
939
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i2.Platform }, { type: i3.Directionality, decorators: [{
940
+ type: Optional
941
+ }] }, { type: undefined, decorators: [{
942
+ type: Optional
943
+ }, {
944
+ type: Inject,
945
+ args: [ANIMATION_MODULE_TYPE]
946
+ }] }]; }, propDecorators: { vertical: [{
947
+ type: Input
948
+ }], items: [{
949
+ type: ContentChildren,
950
+ args: [McTabLabelWrapper, { descendants: false }]
951
+ }], tabListContainer: [{
952
+ type: ViewChild,
953
+ args: ['tabListContainer', { static: true }]
954
+ }], tabList: [{
955
+ type: ViewChild,
956
+ args: ['tabList', { static: true }]
957
+ }], nextPaginator: [{
958
+ type: ViewChild,
959
+ args: ['nextPaginator']
960
+ }], previousPaginator: [{
961
+ type: ViewChild,
962
+ args: ['previousPaginator']
963
963
  }] } });
964
964
 
965
- class McOldTabsCssStyler {
966
- }
967
- /** @nocollapse */ /** @nocollapse */ McOldTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McOldTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
968
- /** @nocollapse */ /** @nocollapse */ McOldTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McOldTabsCssStyler, selector: "mc-tab-group[mc-old-tabs]", host: { classAttribute: "mc-tab-group_old" }, ngImport: i0 });
969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McOldTabsCssStyler, decorators: [{
970
- type: Directive,
971
- args: [{
972
- selector: 'mc-tab-group[mc-old-tabs]',
973
- host: { class: 'mc-tab-group_old' }
974
- }]
975
- }] });
976
- class McAlignTabsCenterCssStyler {
977
- }
978
- /** @nocollapse */ /** @nocollapse */ McAlignTabsCenterCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsCenterCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
979
- /** @nocollapse */ /** @nocollapse */ McAlignTabsCenterCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McAlignTabsCenterCssStyler, selector: "mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]", host: { classAttribute: "mc-tab-group_align-labels-center" }, ngImport: i0 });
980
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsCenterCssStyler, decorators: [{
981
- type: Directive,
982
- args: [{
983
- selector: 'mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]',
984
- host: { class: 'mc-tab-group_align-labels-center' }
985
- }]
986
- }] });
987
- class McAlignTabsEndCssStyler {
988
- }
989
- /** @nocollapse */ /** @nocollapse */ McAlignTabsEndCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsEndCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
990
- /** @nocollapse */ /** @nocollapse */ McAlignTabsEndCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McAlignTabsEndCssStyler, selector: "mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]", host: { classAttribute: "mc-tab-group_align-labels-end" }, ngImport: i0 });
991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsEndCssStyler, decorators: [{
992
- type: Directive,
993
- args: [{
994
- selector: 'mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]',
995
- host: { class: 'mc-tab-group_align-labels-end' }
996
- }]
997
- }] });
998
- class McStretchTabsCssStyler {
999
- }
1000
- /** @nocollapse */ /** @nocollapse */ McStretchTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McStretchTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1001
- /** @nocollapse */ /** @nocollapse */ McStretchTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McStretchTabsCssStyler, selector: "mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]", host: { classAttribute: "mc-tab-group_stretch-labels" }, ngImport: i0 });
1002
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McStretchTabsCssStyler, decorators: [{
1003
- type: Directive,
1004
- args: [{
1005
- selector: 'mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]',
1006
- host: { class: 'mc-tab-group_stretch-labels' }
1007
- }]
1008
- }] });
1009
- class McVerticalTabsCssStyler {
1010
- }
1011
- /** @nocollapse */ /** @nocollapse */ McVerticalTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McVerticalTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1012
- /** @nocollapse */ /** @nocollapse */ McVerticalTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McVerticalTabsCssStyler, selector: "mc-tab-group[vertical], [mc-tab-nav-bar][vertical]", host: { classAttribute: "mc-tab-group_vertical" }, ngImport: i0 });
1013
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McVerticalTabsCssStyler, decorators: [{
1014
- type: Directive,
1015
- args: [{
1016
- selector: 'mc-tab-group[vertical], [mc-tab-nav-bar][vertical]',
1017
- host: { class: 'mc-tab-group_vertical' }
1018
- }]
1019
- }] });
1020
- /** Used to generate unique ID's for each tab component */
1021
- let nextId = 0;
1022
- /** A simple change event emitted on focus or selection changes. */
1023
- class McTabChangeEvent {
1024
- }
1025
- /** Injection token that can be used to provide the default options the tabs module. */
1026
- const MC_TABS_CONFIG = new InjectionToken('MC_TABS_CONFIG');
1027
- // Boilerplate for applying mixins to McTabGroup.
1028
- /** @docs-private */
1029
- class McTabGroupBase {
1030
- // tslint:disable-next-line:naming-convention
1031
- constructor(_elementRef) {
1032
- this._elementRef = _elementRef;
1033
- }
1034
- }
1035
- // tslint:disable-next-line:naming-convention
1036
- const McTabGroupMixinBase = mixinDisabled(McTabGroupBase);
1037
- /**
1038
- * Tab-group component. Supports basic tab pairs (label + content) and includes
1039
- * keyboard navigation.
1040
- */
1041
- class McTabGroup extends McTabGroupMixinBase {
1042
- constructor(elementRef, changeDetectorRef, lightTabs, vertical, defaultConfig) {
1043
- super(elementRef);
1044
- this.changeDetectorRef = changeDetectorRef;
1045
- this.resizeStream = new Subject();
1046
- this._dynamicHeight = false;
1047
- this._selectedIndex = null;
1048
- /** Position of the tab header. */
1049
- this.headerPosition = 'above';
1050
- /** Output to enable support for two-way binding on `[(selectedIndex)]` */
1051
- this.selectedIndexChange = new EventEmitter();
1052
- /** Event emitted when focus has changed within a tab group. */
1053
- this.focusChange = new EventEmitter();
1054
- /** Event emitted when the body animation has completed */
1055
- this.animationDone = new EventEmitter();
1056
- /** Event emitted when the tab selection has changed. */
1057
- this.selectedTabChange = new EventEmitter(true);
1058
- /** The tab index that should be selected after the content has been checked. */
1059
- this.indexToSelect = 0;
1060
- /** Snapshot of the height of the tab body wrapper before another tab is activated. */
1061
- this.tabBodyWrapperHeight = 0;
1062
- /** Subscription to tabs being added/removed. */
1063
- this.tabsSubscription = Subscription.EMPTY;
1064
- /** Subscription to changes in the tab labels. */
1065
- this.tabLabelSubscription = Subscription.EMPTY;
1066
- this.resizeSubscription = Subscription.EMPTY;
1067
- this.resizeDebounceInterval = 100;
1068
- this.checkOverflow = () => {
1069
- this.tabHeader.items
1070
- .forEach((headerTab) => headerTab.checkOverflow());
1071
- };
1072
- this.oldTab = coerceBooleanProperty(lightTabs);
1073
- this.vertical = coerceBooleanProperty(vertical);
1074
- this.groupId = nextId++;
1075
- this.animationDuration = defaultConfig?.animationDuration || '0ms';
1076
- this.subscribeToResize();
1077
- }
1078
- /** Whether the tab group should grow to the size of the active tab. */
1079
- get dynamicHeight() {
1080
- return this._dynamicHeight;
1081
- }
1082
- set dynamicHeight(value) {
1083
- this._dynamicHeight = coerceBooleanProperty(value);
1084
- }
1085
- /** The index of the active tab. */
1086
- get selectedIndex() {
1087
- return this._selectedIndex;
1088
- }
1089
- set selectedIndex(value) {
1090
- this.indexToSelect = coerceNumberProperty(value, null);
1091
- }
1092
- /**
1093
- * After the content is checked, this component knows what tabs have been defined
1094
- * and what the selected index should be. This is where we can know exactly what position
1095
- * each tab should be in according to the new selected index, and additionally we know how
1096
- * a new selected tab should transition in (from the left or right).
1097
- */
1098
- ngAfterContentChecked() {
1099
- // Don't clamp the `indexToSelect` immediately in the setter because it can happen that
1100
- // the amount of tabs changes before the actual change detection runs.
1101
- const indexToSelect = this.indexToSelect = this.clampTabIndex(this.indexToSelect);
1102
- // If there is a change in selected index, emit a change event. Should not trigger if
1103
- // the selected index has not yet been initialized.
1104
- if (this._selectedIndex !== indexToSelect) {
1105
- const isFirstRun = this._selectedIndex == null;
1106
- if (!isFirstRun) {
1107
- this.selectedTabChange.emit(this.createChangeEvent(indexToSelect));
1108
- }
1109
- // Changing these values after change detection has run
1110
- // since the checked content may contain references to them.
1111
- Promise.resolve().then(() => {
1112
- this.tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);
1113
- if (!isFirstRun) {
1114
- this.selectedIndexChange.emit(indexToSelect);
1115
- }
1116
- });
1117
- }
1118
- // Setup the position for each tab and optionally setup an origin on the next selected tab.
1119
- this.tabs.forEach((tab, index) => {
1120
- tab.position = index - indexToSelect;
1121
- // If there is already a selected tab, then set up an origin for the next selected tab
1122
- // if it doesn't have one already.
1123
- if (this._selectedIndex != null && tab.position === 0 && !tab.origin) {
1124
- tab.origin = indexToSelect - this._selectedIndex;
1125
- }
1126
- });
1127
- if (this._selectedIndex !== indexToSelect) {
1128
- this._selectedIndex = indexToSelect;
1129
- this.changeDetectorRef.markForCheck();
1130
- }
1131
- }
1132
- ngAfterContentInit() {
1133
- this.subscribeToTabLabels();
1134
- // Subscribe to changes in the amount of tabs, in order to be
1135
- // able to re-render the content as new tabs are added or removed.
1136
- this.tabsSubscription = this.tabs.changes
1137
- .subscribe(() => {
1138
- const indexToSelect = this.clampTabIndex(this.indexToSelect);
1139
- // Maintain the previously-selected tab if a new tab is added or removed and there is no
1140
- // explicit change that selects a different tab.
1141
- if (indexToSelect === this._selectedIndex) {
1142
- const tabs = this.tabs.toArray();
1143
- for (let i = 0; i < tabs.length; i++) {
1144
- if (tabs[i].isActive) {
1145
- // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
1146
- // event, otherwise the consumer may end up in an infinite loop in some edge cases like
1147
- // adding a tab within the `selectedIndexChange` event.
1148
- this.indexToSelect = this._selectedIndex = i;
1149
- break;
1150
- }
1151
- }
1152
- }
1153
- this.subscribeToTabLabels();
1154
- this.changeDetectorRef.markForCheck();
1155
- });
1156
- }
1157
- ngAfterViewInit() {
1158
- this.checkOverflow();
1159
- }
1160
- ngOnDestroy() {
1161
- this.tabsSubscription.unsubscribe();
1162
- this.tabLabelSubscription.unsubscribe();
1163
- this.resizeSubscription.unsubscribe();
1164
- }
1165
- focusChanged(index) {
1166
- this.focusChange.emit(this.createChangeEvent(index));
1167
- }
1168
- /** Returns a unique id for each tab label element */
1169
- getTabLabelId(i) {
1170
- return `mc-tab-label-${this.groupId}-${i}`;
1171
- }
1172
- /** Returns a unique id for each tab content element */
1173
- getTabContentId(i) {
1174
- return `mc-tab-content-${this.groupId}-${i}`;
1175
- }
1176
- /**
1177
- * Sets the height of the body wrapper to the height of the activating tab if dynamic
1178
- * height property is true.
1179
- */
1180
- setTabBodyWrapperHeight(tabHeight) {
1181
- if (!this._dynamicHeight || !this.tabBodyWrapperHeight) {
1182
- return;
1183
- }
1184
- const wrapper = this.tabBodyWrapper.nativeElement;
1185
- wrapper.style.height = `${this.tabBodyWrapperHeight}px`;
1186
- // This conditional forces the browser to paint the height so that
1187
- // the animation to the new height can have an origin.
1188
- if (this.tabBodyWrapper.nativeElement.offsetHeight) {
1189
- wrapper.style.height = `${tabHeight}px`;
1190
- }
1191
- }
1192
- /** Removes the height of the tab body wrapper. */
1193
- removeTabBodyWrapperHeight() {
1194
- this.tabBodyWrapperHeight = this.tabBodyWrapper.nativeElement.clientHeight;
1195
- this.tabBodyWrapper.nativeElement.style.height = '';
1196
- this.animationDone.emit();
1197
- }
1198
- /** Handle click events, setting new selected index if appropriate. */
1199
- handleClick(tab, tabHeader, index) {
1200
- if (tab.disabled) {
1201
- return;
1202
- }
1203
- this.selectedIndex = tabHeader.focusIndex = index;
1204
- }
1205
- /** Retrieves the tabindex for the tab. */
1206
- getTabIndex(tab, index) {
1207
- if (tab.disabled) {
1208
- return null;
1209
- }
1210
- return this.selectedIndex === index ? 0 : -1;
1211
- }
1212
- createChangeEvent(index) {
1213
- const event = new McTabChangeEvent();
1214
- event.index = index;
1215
- if (this.tabs && this.tabs.length) {
1216
- event.tab = this.tabs.toArray()[index];
1217
- }
1218
- return event;
1219
- }
1220
- /**
1221
- * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
1222
- * on the McTab component, whereas the data binding is inside the McTabGroup. In order for the
1223
- * binding to be updated, we need to subscribe to changes in it and trigger change detection
1224
- * manually.
1225
- */
1226
- subscribeToTabLabels() {
1227
- if (this.tabLabelSubscription) {
1228
- this.tabLabelSubscription.unsubscribe();
1229
- }
1230
- this.tabLabelSubscription = merge(...this.tabs.map((tab) => tab.stateChanges))
1231
- .subscribe(() => this.changeDetectorRef.markForCheck());
1232
- }
1233
- subscribeToResize() {
1234
- if (!this.vertical) {
1235
- return;
1236
- }
1237
- if (this.resizeSubscription) {
1238
- this.resizeSubscription.unsubscribe();
1239
- }
1240
- this.resizeSubscription = this.resizeStream
1241
- .pipe(debounceTime(this.resizeDebounceInterval))
1242
- .subscribe(this.checkOverflow);
1243
- }
1244
- /** Clamps the given index to the bounds of 0 and the tabs length. */
1245
- clampTabIndex(index) {
1246
- // Note the `|| 0`, which ensures that values like NaN can't get through
1247
- // and which would otherwise throw the component into an infinite loop
1248
- // (since Mch.max(NaN, 0) === NaN).
1249
- return Math.min(this.tabs.length - 1, Math.max(index || 0, 0));
1250
- }
1251
- }
1252
- /** @nocollapse */ /** @nocollapse */ McTabGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabGroup, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: 'mc-old-tabs', attribute: true }, { token: 'vertical', attribute: true }, { token: MC_TABS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1253
- /** @nocollapse */ /** @nocollapse */ McTabGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabGroup, selector: "mc-tab-group", inputs: { disabled: "disabled", dynamicHeight: "dynamicHeight", selectedIndex: "selectedIndex", headerPosition: "headerPosition", animationDuration: "animationDuration" }, outputs: { selectedIndexChange: "selectedIndexChange", focusChange: "focusChange", animationDone: "animationDone", selectedTabChange: "selectedTabChange" }, host: { listeners: { "window:resize": "resizeStream.next()" }, properties: { "class.mc-tab-group_dynamic-height": "dynamicHeight", "class.mc-tab-group_inverted-header": "headerPosition === \"below\"" }, classAttribute: "mc-tab-group" }, queries: [{ propertyName: "tabs", predicate: McTab }], viewQueries: [{ propertyName: "tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true }, { propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true }], exportAs: ["mcTabGroup"], usesInheritance: true, ngImport: i0, template: "<mc-tab-header\r\n #tabHeader\r\n [vertical]=\"vertical\"\r\n [selectedIndex]=\"selectedIndex\"\r\n (indexFocused)=\"focusChanged($event)\"\r\n (selectFocusedIndex)=\"selectedIndex = $event\">\r\n\r\n <div class=\"mc-tab-label\"\r\n mcTabLabelWrapper\r\n cdkMonitorElementFocus\r\n [attr.tabindex]=\"getTabIndex(tab, i)\"\r\n [class.mc-tab-label_old]=\"oldTab\"\r\n [class.mc-tab-label_horizontal]=\"!vertical && !oldTab\"\r\n [class.mc-tab-label_vertical]=\"vertical && !oldTab\"\r\n [class.mc-tab-label_empty]=\"tab.empty\"\r\n [class.mc-active]=\"selectedIndex == i\"\r\n *ngFor=\"let tab of tabs; let i = index\"\r\n [tab]=\"tab\"\r\n [id]=\"getTabLabelId(i)\"\r\n [disabled]=\"tab.disabled\"\r\n (click)=\"handleClick(tab, tabHeader, i)\"\r\n\r\n [mcTooltip]=\"tab.tooltipTitle\"\r\n [mcTooltipDisabled]=\"!tab.empty && !tab.isOverflown\"\r\n [mcTrigger]=\"'hover, focus'\"\r\n [mcPlacement]=\"tab.tooltipPlacement\">\r\n\r\n <div #labelContent class=\"mc-tab-label__content\"\r\n [class.mc-tab-label__template]=\"tab.templateLabel\">\r\n <!-- If there is a label template, use it. -->\r\n <ng-template [ngIf]=\"tab.templateLabel\">\r\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\r\n </ng-template>\r\n\r\n <!-- If there is not a label template, fall back to the text label. -->\r\n <ng-template [ngIf]=\"!tab.templateLabel\">{{ tab.textLabel }}</ng-template>\r\n </div>\r\n </div>\r\n</mc-tab-header>\r\n\r\n<div class=\"mc-tab-body__wrapper\" #tabBodyWrapper>\r\n <mc-tab-body\r\n *ngFor=\"let tab of tabs; let i = index\"\r\n [id]=\"getTabContentId(i)\"\r\n [class.mc-tab-body__active]=\"selectedIndex == i\"\r\n [content]=\"tab.content!\"\r\n [position]=\"tab.position!\"\r\n [origin]=\"tab.origin!\"\r\n [animationDuration]=\"animationDuration\"\r\n (onCentered)=\"removeTabBodyWrapperHeight()\"\r\n (onCentering)=\"setTabBodyWrapperHeight($event)\">\r\n </mc-tab-body>\r\n</div>\r\n", styles: [".mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-group_vertical{flex-direction:row}.mc-tab-group_vertical .mc-tab-header__content{overflow-y:auto;padding-top:8px;padding-bottom:1px;border-right-width:var(--mc-tabs-size-border-width, 1px);border-right-style:solid}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}\n"], components: [{ type: McTabHeader, selector: "mc-tab-header", inputs: ["selectedIndex", "vertical"], outputs: ["selectFocusedIndex", "indexFocused"] }, { type: McTabBody, selector: "mc-tab-body", inputs: ["position", "content", "origin", "animationDuration"], outputs: ["onCentering", "beforeCentering", "afterLeavingCenter", "onCentered"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: McTabLabelWrapper, selector: "[mcTabLabelWrapper]", inputs: ["disabled", "tab"] }, { type: i1$1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"] }, { type: i6.McTooltipTrigger, selector: "[mcTooltip]", inputs: ["mcVisible", "mcPlacement", "mcPlacementPriority", "mcTooltip", "mcTooltipDisabled", "mcEnterDelay", "mcLeaveDelay", "mcTrigger", "mcTooltipClass"], outputs: ["mcPlacementChange", "mcVisibleChange"], exportAs: ["mcTooltip"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabGroup, decorators: [{
1255
- type: Component,
1256
- args: [{ selector: 'mc-tab-group', exportAs: 'mcTabGroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
1257
- class: 'mc-tab-group',
1258
- '[class.mc-tab-group_dynamic-height]': 'dynamicHeight',
1259
- '[class.mc-tab-group_inverted-header]': 'headerPosition === "below"',
1260
- '(window:resize)': 'resizeStream.next()'
1261
- }, template: "<mc-tab-header\r\n #tabHeader\r\n [vertical]=\"vertical\"\r\n [selectedIndex]=\"selectedIndex\"\r\n (indexFocused)=\"focusChanged($event)\"\r\n (selectFocusedIndex)=\"selectedIndex = $event\">\r\n\r\n <div class=\"mc-tab-label\"\r\n mcTabLabelWrapper\r\n cdkMonitorElementFocus\r\n [attr.tabindex]=\"getTabIndex(tab, i)\"\r\n [class.mc-tab-label_old]=\"oldTab\"\r\n [class.mc-tab-label_horizontal]=\"!vertical && !oldTab\"\r\n [class.mc-tab-label_vertical]=\"vertical && !oldTab\"\r\n [class.mc-tab-label_empty]=\"tab.empty\"\r\n [class.mc-active]=\"selectedIndex == i\"\r\n *ngFor=\"let tab of tabs; let i = index\"\r\n [tab]=\"tab\"\r\n [id]=\"getTabLabelId(i)\"\r\n [disabled]=\"tab.disabled\"\r\n (click)=\"handleClick(tab, tabHeader, i)\"\r\n\r\n [mcTooltip]=\"tab.tooltipTitle\"\r\n [mcTooltipDisabled]=\"!tab.empty && !tab.isOverflown\"\r\n [mcTrigger]=\"'hover, focus'\"\r\n [mcPlacement]=\"tab.tooltipPlacement\">\r\n\r\n <div #labelContent class=\"mc-tab-label__content\"\r\n [class.mc-tab-label__template]=\"tab.templateLabel\">\r\n <!-- If there is a label template, use it. -->\r\n <ng-template [ngIf]=\"tab.templateLabel\">\r\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\r\n </ng-template>\r\n\r\n <!-- If there is not a label template, fall back to the text label. -->\r\n <ng-template [ngIf]=\"!tab.templateLabel\">{{ tab.textLabel }}</ng-template>\r\n </div>\r\n </div>\r\n</mc-tab-header>\r\n\r\n<div class=\"mc-tab-body__wrapper\" #tabBodyWrapper>\r\n <mc-tab-body\r\n *ngFor=\"let tab of tabs; let i = index\"\r\n [id]=\"getTabContentId(i)\"\r\n [class.mc-tab-body__active]=\"selectedIndex == i\"\r\n [content]=\"tab.content!\"\r\n [position]=\"tab.position!\"\r\n [origin]=\"tab.origin!\"\r\n [animationDuration]=\"animationDuration\"\r\n (onCentered)=\"removeTabBodyWrapperHeight()\"\r\n (onCentering)=\"setTabBodyWrapperHeight($event)\">\r\n </mc-tab-body>\r\n</div>\r\n", styles: [".mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-group_vertical{flex-direction:row}.mc-tab-group_vertical .mc-tab-header__content{overflow-y:auto;padding-top:8px;padding-bottom:1px;border-right-width:var(--mc-tabs-size-border-width, 1px);border-right-style:solid}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}\n"] }]
1262
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1263
- type: Attribute,
1264
- args: ['mc-old-tabs']
1265
- }] }, { type: undefined, decorators: [{
1266
- type: Attribute,
1267
- args: ['vertical']
1268
- }] }, { type: undefined, decorators: [{
1269
- type: Inject,
1270
- args: [MC_TABS_CONFIG]
1271
- }, {
1272
- type: Optional
1273
- }] }]; }, propDecorators: { tabs: [{
1274
- type: ContentChildren,
1275
- args: [McTab]
1276
- }], tabBodyWrapper: [{
1277
- type: ViewChild,
1278
- args: ['tabBodyWrapper', { static: false }]
1279
- }], tabHeader: [{
1280
- type: ViewChild,
1281
- args: ['tabHeader', { static: false }]
1282
- }], dynamicHeight: [{
1283
- type: Input
1284
- }], selectedIndex: [{
1285
- type: Input
1286
- }], headerPosition: [{
1287
- type: Input
1288
- }], animationDuration: [{
1289
- type: Input
1290
- }], selectedIndexChange: [{
1291
- type: Output
1292
- }], focusChange: [{
1293
- type: Output
1294
- }], animationDone: [{
1295
- type: Output
1296
- }], selectedTabChange: [{
1297
- type: Output
965
+ class McOldTabsCssStyler {
966
+ }
967
+ /** @nocollapse */ /** @nocollapse */ McOldTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McOldTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
968
+ /** @nocollapse */ /** @nocollapse */ McOldTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McOldTabsCssStyler, selector: "mc-tab-group[mc-old-tabs]", host: { classAttribute: "mc-tab-group_old" }, ngImport: i0 });
969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McOldTabsCssStyler, decorators: [{
970
+ type: Directive,
971
+ args: [{
972
+ selector: 'mc-tab-group[mc-old-tabs]',
973
+ host: { class: 'mc-tab-group_old' }
974
+ }]
975
+ }] });
976
+ class McAlignTabsCenterCssStyler {
977
+ }
978
+ /** @nocollapse */ /** @nocollapse */ McAlignTabsCenterCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsCenterCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
979
+ /** @nocollapse */ /** @nocollapse */ McAlignTabsCenterCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McAlignTabsCenterCssStyler, selector: "mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]", host: { classAttribute: "mc-tab-group_align-labels-center" }, ngImport: i0 });
980
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsCenterCssStyler, decorators: [{
981
+ type: Directive,
982
+ args: [{
983
+ selector: 'mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]',
984
+ host: { class: 'mc-tab-group_align-labels-center' }
985
+ }]
986
+ }] });
987
+ class McAlignTabsEndCssStyler {
988
+ }
989
+ /** @nocollapse */ /** @nocollapse */ McAlignTabsEndCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsEndCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
990
+ /** @nocollapse */ /** @nocollapse */ McAlignTabsEndCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McAlignTabsEndCssStyler, selector: "mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]", host: { classAttribute: "mc-tab-group_align-labels-end" }, ngImport: i0 });
991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McAlignTabsEndCssStyler, decorators: [{
992
+ type: Directive,
993
+ args: [{
994
+ selector: 'mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]',
995
+ host: { class: 'mc-tab-group_align-labels-end' }
996
+ }]
997
+ }] });
998
+ class McStretchTabsCssStyler {
999
+ }
1000
+ /** @nocollapse */ /** @nocollapse */ McStretchTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McStretchTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1001
+ /** @nocollapse */ /** @nocollapse */ McStretchTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McStretchTabsCssStyler, selector: "mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]", host: { classAttribute: "mc-tab-group_stretch-labels" }, ngImport: i0 });
1002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McStretchTabsCssStyler, decorators: [{
1003
+ type: Directive,
1004
+ args: [{
1005
+ selector: 'mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]',
1006
+ host: { class: 'mc-tab-group_stretch-labels' }
1007
+ }]
1008
+ }] });
1009
+ class McVerticalTabsCssStyler {
1010
+ }
1011
+ /** @nocollapse */ /** @nocollapse */ McVerticalTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McVerticalTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1012
+ /** @nocollapse */ /** @nocollapse */ McVerticalTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: McVerticalTabsCssStyler, selector: "mc-tab-group[vertical], [mc-tab-nav-bar][vertical]", host: { classAttribute: "mc-tab-group_vertical" }, ngImport: i0 });
1013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McVerticalTabsCssStyler, decorators: [{
1014
+ type: Directive,
1015
+ args: [{
1016
+ selector: 'mc-tab-group[vertical], [mc-tab-nav-bar][vertical]',
1017
+ host: { class: 'mc-tab-group_vertical' }
1018
+ }]
1019
+ }] });
1020
+ /** Used to generate unique ID's for each tab component */
1021
+ let nextId = 0;
1022
+ /** A simple change event emitted on focus or selection changes. */
1023
+ class McTabChangeEvent {
1024
+ }
1025
+ /** Injection token that can be used to provide the default options the tabs module. */
1026
+ const MC_TABS_CONFIG = new InjectionToken('MC_TABS_CONFIG');
1027
+ // Boilerplate for applying mixins to McTabGroup.
1028
+ /** @docs-private */
1029
+ class McTabGroupBase {
1030
+ // tslint:disable-next-line:naming-convention
1031
+ constructor(_elementRef) {
1032
+ this._elementRef = _elementRef;
1033
+ }
1034
+ }
1035
+ // tslint:disable-next-line:naming-convention
1036
+ const McTabGroupMixinBase = mixinDisabled(McTabGroupBase);
1037
+ /**
1038
+ * Tab-group component. Supports basic tab pairs (label + content) and includes
1039
+ * keyboard navigation.
1040
+ */
1041
+ class McTabGroup extends McTabGroupMixinBase {
1042
+ constructor(elementRef, changeDetectorRef, lightTabs, vertical, defaultConfig) {
1043
+ super(elementRef);
1044
+ this.changeDetectorRef = changeDetectorRef;
1045
+ this.resizeStream = new Subject();
1046
+ this._dynamicHeight = false;
1047
+ this._selectedIndex = null;
1048
+ /** Position of the tab header. */
1049
+ this.headerPosition = 'above';
1050
+ /** Output to enable support for two-way binding on `[(selectedIndex)]` */
1051
+ this.selectedIndexChange = new EventEmitter();
1052
+ /** Event emitted when focus has changed within a tab group. */
1053
+ this.focusChange = new EventEmitter();
1054
+ /** Event emitted when the body animation has completed */
1055
+ this.animationDone = new EventEmitter();
1056
+ /** Event emitted when the tab selection has changed. */
1057
+ this.selectedTabChange = new EventEmitter(true);
1058
+ /** The tab index that should be selected after the content has been checked. */
1059
+ this.indexToSelect = 0;
1060
+ /** Snapshot of the height of the tab body wrapper before another tab is activated. */
1061
+ this.tabBodyWrapperHeight = 0;
1062
+ /** Subscription to tabs being added/removed. */
1063
+ this.tabsSubscription = Subscription.EMPTY;
1064
+ /** Subscription to changes in the tab labels. */
1065
+ this.tabLabelSubscription = Subscription.EMPTY;
1066
+ this.resizeSubscription = Subscription.EMPTY;
1067
+ this.resizeDebounceInterval = 100;
1068
+ this.checkOverflow = () => {
1069
+ this.tabHeader.items
1070
+ .forEach((headerTab) => headerTab.checkOverflow());
1071
+ };
1072
+ this.oldTab = coerceBooleanProperty(lightTabs);
1073
+ this.vertical = coerceBooleanProperty(vertical);
1074
+ this.groupId = nextId++;
1075
+ this.animationDuration = defaultConfig?.animationDuration || '0ms';
1076
+ this.subscribeToResize();
1077
+ }
1078
+ /** Whether the tab group should grow to the size of the active tab. */
1079
+ get dynamicHeight() {
1080
+ return this._dynamicHeight;
1081
+ }
1082
+ set dynamicHeight(value) {
1083
+ this._dynamicHeight = coerceBooleanProperty(value);
1084
+ }
1085
+ /** The index of the active tab. */
1086
+ get selectedIndex() {
1087
+ return this._selectedIndex;
1088
+ }
1089
+ set selectedIndex(value) {
1090
+ this.indexToSelect = coerceNumberProperty(value, null);
1091
+ }
1092
+ /**
1093
+ * After the content is checked, this component knows what tabs have been defined
1094
+ * and what the selected index should be. This is where we can know exactly what position
1095
+ * each tab should be in according to the new selected index, and additionally we know how
1096
+ * a new selected tab should transition in (from the left or right).
1097
+ */
1098
+ ngAfterContentChecked() {
1099
+ // Don't clamp the `indexToSelect` immediately in the setter because it can happen that
1100
+ // the amount of tabs changes before the actual change detection runs.
1101
+ const indexToSelect = this.indexToSelect = this.clampTabIndex(this.indexToSelect);
1102
+ // If there is a change in selected index, emit a change event. Should not trigger if
1103
+ // the selected index has not yet been initialized.
1104
+ if (this._selectedIndex !== indexToSelect) {
1105
+ const isFirstRun = this._selectedIndex == null;
1106
+ if (!isFirstRun) {
1107
+ this.selectedTabChange.emit(this.createChangeEvent(indexToSelect));
1108
+ }
1109
+ // Changing these values after change detection has run
1110
+ // since the checked content may contain references to them.
1111
+ Promise.resolve().then(() => {
1112
+ this.tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);
1113
+ if (!isFirstRun) {
1114
+ this.selectedIndexChange.emit(indexToSelect);
1115
+ }
1116
+ });
1117
+ }
1118
+ // Setup the position for each tab and optionally setup an origin on the next selected tab.
1119
+ this.tabs.forEach((tab, index) => {
1120
+ tab.position = index - indexToSelect;
1121
+ // If there is already a selected tab, then set up an origin for the next selected tab
1122
+ // if it doesn't have one already.
1123
+ if (this._selectedIndex != null && tab.position === 0 && !tab.origin) {
1124
+ tab.origin = indexToSelect - this._selectedIndex;
1125
+ }
1126
+ });
1127
+ if (this._selectedIndex !== indexToSelect) {
1128
+ this._selectedIndex = indexToSelect;
1129
+ this.changeDetectorRef.markForCheck();
1130
+ }
1131
+ }
1132
+ ngAfterContentInit() {
1133
+ this.subscribeToTabLabels();
1134
+ // Subscribe to changes in the amount of tabs, in order to be
1135
+ // able to re-render the content as new tabs are added or removed.
1136
+ this.tabsSubscription = this.tabs.changes
1137
+ .subscribe(() => {
1138
+ const indexToSelect = this.clampTabIndex(this.indexToSelect);
1139
+ // Maintain the previously-selected tab if a new tab is added or removed and there is no
1140
+ // explicit change that selects a different tab.
1141
+ if (indexToSelect === this._selectedIndex) {
1142
+ const tabs = this.tabs.toArray();
1143
+ for (let i = 0; i < tabs.length; i++) {
1144
+ if (tabs[i].isActive) {
1145
+ // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
1146
+ // event, otherwise the consumer may end up in an infinite loop in some edge cases like
1147
+ // adding a tab within the `selectedIndexChange` event.
1148
+ this.indexToSelect = this._selectedIndex = i;
1149
+ break;
1150
+ }
1151
+ }
1152
+ }
1153
+ this.subscribeToTabLabels();
1154
+ this.changeDetectorRef.markForCheck();
1155
+ });
1156
+ }
1157
+ ngAfterViewInit() {
1158
+ this.checkOverflow();
1159
+ }
1160
+ ngOnDestroy() {
1161
+ this.tabsSubscription.unsubscribe();
1162
+ this.tabLabelSubscription.unsubscribe();
1163
+ this.resizeSubscription.unsubscribe();
1164
+ }
1165
+ focusChanged(index) {
1166
+ this.focusChange.emit(this.createChangeEvent(index));
1167
+ }
1168
+ /** Returns a unique id for each tab label element */
1169
+ getTabLabelId(i) {
1170
+ return `mc-tab-label-${this.groupId}-${i}`;
1171
+ }
1172
+ /** Returns a unique id for each tab content element */
1173
+ getTabContentId(i) {
1174
+ return `mc-tab-content-${this.groupId}-${i}`;
1175
+ }
1176
+ /**
1177
+ * Sets the height of the body wrapper to the height of the activating tab if dynamic
1178
+ * height property is true.
1179
+ */
1180
+ setTabBodyWrapperHeight(tabHeight) {
1181
+ if (!this._dynamicHeight || !this.tabBodyWrapperHeight) {
1182
+ return;
1183
+ }
1184
+ const wrapper = this.tabBodyWrapper.nativeElement;
1185
+ wrapper.style.height = `${this.tabBodyWrapperHeight}px`;
1186
+ // This conditional forces the browser to paint the height so that
1187
+ // the animation to the new height can have an origin.
1188
+ if (this.tabBodyWrapper.nativeElement.offsetHeight) {
1189
+ wrapper.style.height = `${tabHeight}px`;
1190
+ }
1191
+ }
1192
+ /** Removes the height of the tab body wrapper. */
1193
+ removeTabBodyWrapperHeight() {
1194
+ this.tabBodyWrapperHeight = this.tabBodyWrapper.nativeElement.clientHeight;
1195
+ this.tabBodyWrapper.nativeElement.style.height = '';
1196
+ this.animationDone.emit();
1197
+ }
1198
+ /** Handle click events, setting new selected index if appropriate. */
1199
+ handleClick(tab, tabHeader, index) {
1200
+ if (tab.disabled) {
1201
+ return;
1202
+ }
1203
+ this.selectedIndex = tabHeader.focusIndex = index;
1204
+ }
1205
+ /** Retrieves the tabindex for the tab. */
1206
+ getTabIndex(tab, index) {
1207
+ if (tab.disabled) {
1208
+ return null;
1209
+ }
1210
+ return this.selectedIndex === index ? 0 : -1;
1211
+ }
1212
+ createChangeEvent(index) {
1213
+ const event = new McTabChangeEvent();
1214
+ event.index = index;
1215
+ if (this.tabs && this.tabs.length) {
1216
+ event.tab = this.tabs.toArray()[index];
1217
+ }
1218
+ return event;
1219
+ }
1220
+ /**
1221
+ * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
1222
+ * on the McTab component, whereas the data binding is inside the McTabGroup. In order for the
1223
+ * binding to be updated, we need to subscribe to changes in it and trigger change detection
1224
+ * manually.
1225
+ */
1226
+ subscribeToTabLabels() {
1227
+ if (this.tabLabelSubscription) {
1228
+ this.tabLabelSubscription.unsubscribe();
1229
+ }
1230
+ this.tabLabelSubscription = merge(...this.tabs.map((tab) => tab.stateChanges))
1231
+ .subscribe(() => this.changeDetectorRef.markForCheck());
1232
+ }
1233
+ subscribeToResize() {
1234
+ if (!this.vertical) {
1235
+ return;
1236
+ }
1237
+ if (this.resizeSubscription) {
1238
+ this.resizeSubscription.unsubscribe();
1239
+ }
1240
+ this.resizeSubscription = this.resizeStream
1241
+ .pipe(debounceTime(this.resizeDebounceInterval))
1242
+ .subscribe(this.checkOverflow);
1243
+ }
1244
+ /** Clamps the given index to the bounds of 0 and the tabs length. */
1245
+ clampTabIndex(index) {
1246
+ // Note the `|| 0`, which ensures that values like NaN can't get through
1247
+ // and which would otherwise throw the component into an infinite loop
1248
+ // (since Mch.max(NaN, 0) === NaN).
1249
+ return Math.min(this.tabs.length - 1, Math.max(index || 0, 0));
1250
+ }
1251
+ }
1252
+ /** @nocollapse */ /** @nocollapse */ McTabGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabGroup, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: 'mc-old-tabs', attribute: true }, { token: 'vertical', attribute: true }, { token: MC_TABS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1253
+ /** @nocollapse */ /** @nocollapse */ McTabGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabGroup, selector: "mc-tab-group", inputs: { disabled: "disabled", dynamicHeight: "dynamicHeight", selectedIndex: "selectedIndex", headerPosition: "headerPosition", animationDuration: "animationDuration" }, outputs: { selectedIndexChange: "selectedIndexChange", focusChange: "focusChange", animationDone: "animationDone", selectedTabChange: "selectedTabChange" }, host: { listeners: { "window:resize": "resizeStream.next()" }, properties: { "class.mc-tab-group_dynamic-height": "dynamicHeight", "class.mc-tab-group_inverted-header": "headerPosition === \"below\"" }, classAttribute: "mc-tab-group" }, queries: [{ propertyName: "tabs", predicate: McTab }], viewQueries: [{ propertyName: "tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true }, { propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true }], exportAs: ["mcTabGroup"], usesInheritance: true, ngImport: i0, template: "<mc-tab-header\n #tabHeader\n [vertical]=\"vertical\"\n [selectedIndex]=\"selectedIndex\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n <div class=\"mc-tab-label\"\n mcTabLabelWrapper\n cdkMonitorElementFocus\n [attr.tabindex]=\"getTabIndex(tab, i)\"\n [class.mc-tab-label_old]=\"oldTab\"\n [class.mc-tab-label_horizontal]=\"!vertical && !oldTab\"\n [class.mc-tab-label_vertical]=\"vertical && !oldTab\"\n [class.mc-tab-label_empty]=\"tab.empty\"\n [class.mc-active]=\"selectedIndex == i\"\n *ngFor=\"let tab of tabs; let i = index\"\n [tab]=\"tab\"\n [id]=\"getTabLabelId(i)\"\n [disabled]=\"tab.disabled\"\n (click)=\"handleClick(tab, tabHeader, i)\"\n\n [mcTooltip]=\"tab.tooltipTitle\"\n [mcTooltipDisabled]=\"!tab.empty && !tab.isOverflown\"\n [mcTrigger]=\"'hover, focus'\"\n [mcPlacement]=\"tab.tooltipPlacement\">\n\n <div #labelContent class=\"mc-tab-label__content\"\n [class.mc-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n <ng-template [ngIf]=\"tab.templateLabel\">\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n </ng-template>\n\n <!-- If there is not a label template, fall back to the text label. -->\n <ng-template [ngIf]=\"!tab.templateLabel\">{{ tab.textLabel }}</ng-template>\n </div>\n </div>\n</mc-tab-header>\n\n<div class=\"mc-tab-body__wrapper\" #tabBodyWrapper>\n <mc-tab-body\n *ngFor=\"let tab of tabs; let i = index\"\n [id]=\"getTabContentId(i)\"\n [class.mc-tab-body__active]=\"selectedIndex == i\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [origin]=\"tab.origin!\"\n [animationDuration]=\"animationDuration\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\">\n </mc-tab-body>\n</div>\n", styles: [".mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-group_vertical{flex-direction:row}.mc-tab-group_vertical .mc-tab-header__content{overflow-y:auto;padding-top:8px;padding-bottom:1px;border-right-width:var(--mc-tabs-size-border-width, 1px);border-right-style:solid}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}\n"], components: [{ type: McTabHeader, selector: "mc-tab-header", inputs: ["selectedIndex", "vertical"], outputs: ["selectFocusedIndex", "indexFocused"] }, { type: McTabBody, selector: "mc-tab-body", inputs: ["position", "content", "origin", "animationDuration"], outputs: ["onCentering", "beforeCentering", "afterLeavingCenter", "onCentered"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: McTabLabelWrapper, selector: "[mcTabLabelWrapper]", inputs: ["disabled", "tab"] }, { type: i1$1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"] }, { type: i6.McTooltipTrigger, selector: "[mcTooltip]", inputs: ["mcVisible", "mcPlacement", "mcPlacementPriority", "mcTooltip", "mcTooltipDisabled", "mcEnterDelay", "mcLeaveDelay", "mcTrigger", "mcTooltipClass"], outputs: ["mcPlacementChange", "mcVisibleChange"], exportAs: ["mcTooltip"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabGroup, decorators: [{
1255
+ type: Component,
1256
+ args: [{ selector: 'mc-tab-group', exportAs: 'mcTabGroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
1257
+ class: 'mc-tab-group',
1258
+ '[class.mc-tab-group_dynamic-height]': 'dynamicHeight',
1259
+ '[class.mc-tab-group_inverted-header]': 'headerPosition === "below"',
1260
+ '(window:resize)': 'resizeStream.next()'
1261
+ }, template: "<mc-tab-header\n #tabHeader\n [vertical]=\"vertical\"\n [selectedIndex]=\"selectedIndex\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n <div class=\"mc-tab-label\"\n mcTabLabelWrapper\n cdkMonitorElementFocus\n [attr.tabindex]=\"getTabIndex(tab, i)\"\n [class.mc-tab-label_old]=\"oldTab\"\n [class.mc-tab-label_horizontal]=\"!vertical && !oldTab\"\n [class.mc-tab-label_vertical]=\"vertical && !oldTab\"\n [class.mc-tab-label_empty]=\"tab.empty\"\n [class.mc-active]=\"selectedIndex == i\"\n *ngFor=\"let tab of tabs; let i = index\"\n [tab]=\"tab\"\n [id]=\"getTabLabelId(i)\"\n [disabled]=\"tab.disabled\"\n (click)=\"handleClick(tab, tabHeader, i)\"\n\n [mcTooltip]=\"tab.tooltipTitle\"\n [mcTooltipDisabled]=\"!tab.empty && !tab.isOverflown\"\n [mcTrigger]=\"'hover, focus'\"\n [mcPlacement]=\"tab.tooltipPlacement\">\n\n <div #labelContent class=\"mc-tab-label__content\"\n [class.mc-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n <ng-template [ngIf]=\"tab.templateLabel\">\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n </ng-template>\n\n <!-- If there is not a label template, fall back to the text label. -->\n <ng-template [ngIf]=\"!tab.templateLabel\">{{ tab.textLabel }}</ng-template>\n </div>\n </div>\n</mc-tab-header>\n\n<div class=\"mc-tab-body__wrapper\" #tabBodyWrapper>\n <mc-tab-body\n *ngFor=\"let tab of tabs; let i = index\"\n [id]=\"getTabContentId(i)\"\n [class.mc-tab-body__active]=\"selectedIndex == i\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [origin]=\"tab.origin!\"\n [animationDuration]=\"animationDuration\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\">\n </mc-tab-body>\n</div>\n", styles: [".mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-group_vertical{flex-direction:row}.mc-tab-group_vertical .mc-tab-header__content{overflow-y:auto;padding-top:8px;padding-bottom:1px;border-right-width:var(--mc-tabs-size-border-width, 1px);border-right-style:solid}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}\n"] }]
1262
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1263
+ type: Attribute,
1264
+ args: ['mc-old-tabs']
1265
+ }] }, { type: undefined, decorators: [{
1266
+ type: Attribute,
1267
+ args: ['vertical']
1268
+ }] }, { type: undefined, decorators: [{
1269
+ type: Inject,
1270
+ args: [MC_TABS_CONFIG]
1271
+ }, {
1272
+ type: Optional
1273
+ }] }]; }, propDecorators: { tabs: [{
1274
+ type: ContentChildren,
1275
+ args: [McTab]
1276
+ }], tabBodyWrapper: [{
1277
+ type: ViewChild,
1278
+ args: ['tabBodyWrapper', { static: false }]
1279
+ }], tabHeader: [{
1280
+ type: ViewChild,
1281
+ args: ['tabHeader', { static: false }]
1282
+ }], dynamicHeight: [{
1283
+ type: Input
1284
+ }], selectedIndex: [{
1285
+ type: Input
1286
+ }], headerPosition: [{
1287
+ type: Input
1288
+ }], animationDuration: [{
1289
+ type: Input
1290
+ }], selectedIndexChange: [{
1291
+ type: Output
1292
+ }], focusChange: [{
1293
+ type: Output
1294
+ }], animationDone: [{
1295
+ type: Output
1296
+ }], selectedTabChange: [{
1297
+ type: Output
1298
1298
  }] } });
1299
1299
 
1300
- // Boilerplate for applying mixins to McTabLink.
1301
- class McTabLinkBase {
1302
- }
1303
- // tslint:disable-next-line:naming-convention
1304
- const McTabLinkMixinBase = mixinTabIndex(mixinDisabled(McTabLinkBase));
1305
- /**
1306
- * Link inside of a `mc-tab-nav-bar`.
1307
- */
1308
- class McTabLink extends McTabLinkMixinBase {
1309
- constructor(elementRef, focusMonitor, renderer) {
1310
- super();
1311
- this.elementRef = elementRef;
1312
- this.focusMonitor = focusMonitor;
1313
- this.renderer = renderer;
1314
- this.vertical = false;
1315
- /** Whether the tab link is active or not. */
1316
- this.isActive = false;
1317
- this.focusMonitor.monitor(this.elementRef.nativeElement);
1318
- }
1319
- /** Whether the link is active. */
1320
- get active() {
1321
- return this.isActive;
1322
- }
1323
- set active(value) {
1324
- if (value !== this.isActive) {
1325
- this.isActive = value;
1326
- }
1327
- }
1328
- ngAfterViewInit() {
1329
- this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.mc-icon')));
1330
- }
1331
- ngOnDestroy() {
1332
- this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);
1333
- }
1334
- addClassModifierForIcons(icons) {
1335
- const twoIcons = 2;
1336
- const [firstIconElement, secondIconElement] = icons;
1337
- if (icons.length === 1) {
1338
- const COMMENT_NODE = 8;
1339
- if (firstIconElement.nextSibling && firstIconElement.nextSibling.nodeType !== COMMENT_NODE) {
1340
- this.renderer.addClass(firstIconElement, 'mc-icon_left');
1341
- }
1342
- if (firstIconElement.previousSibling && firstIconElement.previousSibling.nodeType !== COMMENT_NODE) {
1343
- this.renderer.addClass(firstIconElement, 'mc-icon_right');
1344
- }
1345
- }
1346
- else if (icons.length === twoIcons) {
1347
- this.renderer.addClass(firstIconElement, 'mc-icon_left');
1348
- this.renderer.addClass(secondIconElement, 'mc-icon_right');
1349
- }
1350
- }
1351
- }
1352
- /** @nocollapse */ /** @nocollapse */ McTabLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLink, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1353
- /** @nocollapse */ /** @nocollapse */ McTabLink.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabLink, selector: "a[mc-tab-link], a[mcTabLink]", inputs: { disabled: "disabled", tabIndex: "tabIndex", active: "active" }, host: { properties: { "class.mc-active": "active", "class.mc-tab-label_vertical": "vertical", "class.mc-tab-label_horizontal": "!vertical", "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "mc-tab-link" }, exportAs: ["mcTabLink"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
1354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLink, decorators: [{
1355
- type: Component,
1356
- args: [{
1357
- selector: 'a[mc-tab-link], a[mcTabLink]',
1358
- exportAs: 'mcTabLink',
1359
- template: '<ng-content></ng-content>',
1360
- inputs: ['disabled', 'tabIndex'],
1361
- host: {
1362
- class: 'mc-tab-link',
1363
- '[class.mc-active]': 'active',
1364
- '[class.mc-tab-label_vertical]': 'vertical',
1365
- '[class.mc-tab-label_horizontal]': '!vertical',
1366
- '[attr.tabindex]': 'tabIndex',
1367
- '[attr.disabled]': 'disabled || null'
1368
- }
1369
- }]
1370
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { active: [{
1371
- type: Input
1372
- }] } });
1373
- /**
1374
- * Navigation component matching the styles of the tab group header.
1375
- */
1376
- class McTabNav {
1377
- constructor(vertical) {
1378
- this.vertical = false;
1379
- this.vertical = coerceBooleanProperty(vertical);
1380
- }
1381
- ngAfterContentInit() {
1382
- this.links.changes
1383
- .pipe(delay(0))
1384
- .subscribe((links) => links.forEach((link) => link.vertical = this.vertical));
1385
- this.links.notifyOnChanges();
1386
- }
1387
- }
1388
- /** @nocollapse */ /** @nocollapse */ McTabNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabNav, deps: [{ token: 'vertical', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
1389
- /** @nocollapse */ /** @nocollapse */ McTabNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabNav, selector: "[mc-tab-nav-bar]", host: { classAttribute: "mc-tab-nav-bar" }, queries: [{ propertyName: "links", predicate: McTabLink }], exportAs: ["mcTabNavBar", "mcTabNav"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".mc-tab-link.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none}.mc-tab-link.mc-active{cursor:default}.mc-tab-link.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-link:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-link:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-link[disabled]{pointer-events:none}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-link .mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-nav-bar{display:flex;flex-grow:1;position:relative;padding:1px 1px 0}.mc-tab-nav-bar .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-nav-bar .mc-tab-group_align-labels-end{justify-content:flex-end}.mc-tab-nav-bar.mc-tab-group_vertical{flex-direction:column;flex-grow:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabNav, decorators: [{
1391
- type: Component,
1392
- args: [{ selector: '[mc-tab-nav-bar]', exportAs: 'mcTabNavBar, mcTabNav', template: '<ng-content></ng-content>', host: {
1393
- class: 'mc-tab-nav-bar'
1394
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mc-tab-link.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none}.mc-tab-link.mc-active{cursor:default}.mc-tab-link.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-link:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-link:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-link[disabled]{pointer-events:none}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-link .mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-nav-bar{display:flex;flex-grow:1;position:relative;padding:1px 1px 0}.mc-tab-nav-bar .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-nav-bar .mc-tab-group_align-labels-end{justify-content:flex-end}.mc-tab-nav-bar.mc-tab-group_vertical{flex-direction:column;flex-grow:0}\n"] }]
1395
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1396
- type: Attribute,
1397
- args: ['vertical']
1398
- }] }]; }, propDecorators: { links: [{
1399
- type: ContentChildren,
1400
- args: [McTabLink]
1300
+ // Boilerplate for applying mixins to McTabLink.
1301
+ class McTabLinkBase {
1302
+ }
1303
+ // tslint:disable-next-line:naming-convention
1304
+ const McTabLinkMixinBase = mixinTabIndex(mixinDisabled(McTabLinkBase));
1305
+ /**
1306
+ * Link inside of a `mc-tab-nav-bar`.
1307
+ */
1308
+ class McTabLink extends McTabLinkMixinBase {
1309
+ constructor(elementRef, focusMonitor, renderer) {
1310
+ super();
1311
+ this.elementRef = elementRef;
1312
+ this.focusMonitor = focusMonitor;
1313
+ this.renderer = renderer;
1314
+ this.vertical = false;
1315
+ /** Whether the tab link is active or not. */
1316
+ this.isActive = false;
1317
+ this.focusMonitor.monitor(this.elementRef.nativeElement);
1318
+ }
1319
+ /** Whether the link is active. */
1320
+ get active() {
1321
+ return this.isActive;
1322
+ }
1323
+ set active(value) {
1324
+ if (value !== this.isActive) {
1325
+ this.isActive = value;
1326
+ }
1327
+ }
1328
+ ngAfterViewInit() {
1329
+ this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.mc-icon')));
1330
+ }
1331
+ ngOnDestroy() {
1332
+ this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);
1333
+ }
1334
+ addClassModifierForIcons(icons) {
1335
+ const twoIcons = 2;
1336
+ const [firstIconElement, secondIconElement] = icons;
1337
+ if (icons.length === 1) {
1338
+ const COMMENT_NODE = 8;
1339
+ if (firstIconElement.nextSibling && firstIconElement.nextSibling.nodeType !== COMMENT_NODE) {
1340
+ this.renderer.addClass(firstIconElement, 'mc-icon_left');
1341
+ }
1342
+ if (firstIconElement.previousSibling && firstIconElement.previousSibling.nodeType !== COMMENT_NODE) {
1343
+ this.renderer.addClass(firstIconElement, 'mc-icon_right');
1344
+ }
1345
+ }
1346
+ else if (icons.length === twoIcons) {
1347
+ this.renderer.addClass(firstIconElement, 'mc-icon_left');
1348
+ this.renderer.addClass(secondIconElement, 'mc-icon_right');
1349
+ }
1350
+ }
1351
+ }
1352
+ /** @nocollapse */ /** @nocollapse */ McTabLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLink, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1353
+ /** @nocollapse */ /** @nocollapse */ McTabLink.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabLink, selector: "a[mc-tab-link], a[mcTabLink]", inputs: { disabled: "disabled", tabIndex: "tabIndex", active: "active" }, host: { properties: { "class.mc-active": "active", "class.mc-tab-label_vertical": "vertical", "class.mc-tab-label_horizontal": "!vertical", "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "mc-tab-link" }, exportAs: ["mcTabLink"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
1354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabLink, decorators: [{
1355
+ type: Component,
1356
+ args: [{
1357
+ selector: 'a[mc-tab-link], a[mcTabLink]',
1358
+ exportAs: 'mcTabLink',
1359
+ template: '<ng-content></ng-content>',
1360
+ inputs: ['disabled', 'tabIndex'],
1361
+ host: {
1362
+ class: 'mc-tab-link',
1363
+ '[class.mc-active]': 'active',
1364
+ '[class.mc-tab-label_vertical]': 'vertical',
1365
+ '[class.mc-tab-label_horizontal]': '!vertical',
1366
+ '[attr.tabindex]': 'tabIndex',
1367
+ '[attr.disabled]': 'disabled || null'
1368
+ }
1369
+ }]
1370
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { active: [{
1371
+ type: Input
1372
+ }] } });
1373
+ /**
1374
+ * Navigation component matching the styles of the tab group header.
1375
+ */
1376
+ class McTabNav {
1377
+ constructor(vertical) {
1378
+ this.vertical = false;
1379
+ this.vertical = coerceBooleanProperty(vertical);
1380
+ }
1381
+ ngAfterContentInit() {
1382
+ this.links.changes
1383
+ .pipe(delay(0))
1384
+ .subscribe((links) => links.forEach((link) => link.vertical = this.vertical));
1385
+ this.links.notifyOnChanges();
1386
+ }
1387
+ }
1388
+ /** @nocollapse */ /** @nocollapse */ McTabNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabNav, deps: [{ token: 'vertical', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
1389
+ /** @nocollapse */ /** @nocollapse */ McTabNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McTabNav, selector: "[mc-tab-nav-bar]", host: { classAttribute: "mc-tab-nav-bar" }, queries: [{ propertyName: "links", predicate: McTabLink }], exportAs: ["mcTabNavBar", "mcTabNav"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".mc-tab-link.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none}.mc-tab-link.mc-active{cursor:default}.mc-tab-link.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-link:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-link:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-link[disabled]{pointer-events:none}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-link .mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-nav-bar{display:flex;flex-grow:1;position:relative;padding:1px 1px 0}.mc-tab-nav-bar .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-nav-bar .mc-tab-group_align-labels-end{justify-content:flex-end}.mc-tab-nav-bar.mc-tab-group_vertical{flex-direction:column;flex-grow:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabNav, decorators: [{
1391
+ type: Component,
1392
+ args: [{ selector: '[mc-tab-nav-bar]', exportAs: 'mcTabNavBar, mcTabNav', template: '<ng-content></ng-content>', host: {
1393
+ class: 'mc-tab-nav-bar'
1394
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mc-tab-link.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none}.mc-tab-link.mc-active{cursor:default}.mc-tab-link.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-link:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-link:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-link[disabled]{pointer-events:none}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-link .mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link>.mc-icon.mc-icon_left{margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link>.mc-icon.mc-icon_right{margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-nav-bar{display:flex;flex-grow:1;position:relative;padding:1px 1px 0}.mc-tab-nav-bar .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-nav-bar .mc-tab-group_align-labels-end{justify-content:flex-end}.mc-tab-nav-bar.mc-tab-group_vertical{flex-direction:column;flex-grow:0}\n"] }]
1395
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1396
+ type: Attribute,
1397
+ args: ['vertical']
1398
+ }] }]; }, propDecorators: { links: [{
1399
+ type: ContentChildren,
1400
+ args: [McTabLink]
1401
1401
  }] } });
1402
1402
 
1403
- class McTabsModule {
1404
- }
1405
- /** @nocollapse */ /** @nocollapse */ McTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1406
- /** @nocollapse */ /** @nocollapse */ McTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, declarations: [McTabGroup,
1407
- McTabLabel,
1408
- McTab,
1409
- McTabLabelWrapper,
1410
- McTabNav,
1411
- McTabLink,
1412
- McTabBody,
1413
- McTabBodyPortal,
1414
- McTabHeader,
1415
- McTabContent,
1416
- McOldTabsCssStyler,
1417
- McAlignTabsCenterCssStyler,
1418
- McAlignTabsEndCssStyler,
1419
- McStretchTabsCssStyler,
1420
- McVerticalTabsCssStyler], imports: [CommonModule,
1421
- PortalModule,
1422
- A11yModule,
1423
- McCommonModule,
1424
- McIconModule,
1425
- McToolTipModule], exports: [McCommonModule,
1426
- McTabGroup,
1427
- McTabLabel,
1428
- McTab,
1429
- McTabNav,
1430
- McTabLink,
1431
- McTabContent,
1432
- McOldTabsCssStyler,
1433
- McAlignTabsCenterCssStyler,
1434
- McAlignTabsEndCssStyler,
1435
- McStretchTabsCssStyler,
1436
- McVerticalTabsCssStyler] });
1437
- /** @nocollapse */ /** @nocollapse */ McTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, imports: [[
1438
- CommonModule,
1439
- PortalModule,
1440
- A11yModule,
1441
- McCommonModule,
1442
- McIconModule,
1443
- McToolTipModule
1444
- ], McCommonModule] });
1445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, decorators: [{
1446
- type: NgModule,
1447
- args: [{
1448
- imports: [
1449
- CommonModule,
1450
- PortalModule,
1451
- A11yModule,
1452
- McCommonModule,
1453
- McIconModule,
1454
- McToolTipModule
1455
- ],
1456
- // Don't export all components because some are only to be used internally.
1457
- exports: [
1458
- McCommonModule,
1459
- McTabGroup,
1460
- McTabLabel,
1461
- McTab,
1462
- McTabNav,
1463
- McTabLink,
1464
- McTabContent,
1465
- McOldTabsCssStyler,
1466
- McAlignTabsCenterCssStyler,
1467
- McAlignTabsEndCssStyler,
1468
- McStretchTabsCssStyler,
1469
- McVerticalTabsCssStyler
1470
- ],
1471
- declarations: [
1472
- McTabGroup,
1473
- McTabLabel,
1474
- McTab,
1475
- McTabLabelWrapper,
1476
- McTabNav,
1477
- McTabLink,
1478
- McTabBody,
1479
- McTabBodyPortal,
1480
- McTabHeader,
1481
- McTabContent,
1482
- McOldTabsCssStyler,
1483
- McAlignTabsCenterCssStyler,
1484
- McAlignTabsEndCssStyler,
1485
- McStretchTabsCssStyler,
1486
- McVerticalTabsCssStyler
1487
- ]
1488
- }]
1403
+ class McTabsModule {
1404
+ }
1405
+ /** @nocollapse */ /** @nocollapse */ McTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1406
+ /** @nocollapse */ /** @nocollapse */ McTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, declarations: [McTabGroup,
1407
+ McTabLabel,
1408
+ McTab,
1409
+ McTabLabelWrapper,
1410
+ McTabNav,
1411
+ McTabLink,
1412
+ McTabBody,
1413
+ McTabBodyPortal,
1414
+ McTabHeader,
1415
+ McTabContent,
1416
+ McOldTabsCssStyler,
1417
+ McAlignTabsCenterCssStyler,
1418
+ McAlignTabsEndCssStyler,
1419
+ McStretchTabsCssStyler,
1420
+ McVerticalTabsCssStyler], imports: [CommonModule,
1421
+ PortalModule,
1422
+ A11yModule,
1423
+ McCommonModule,
1424
+ McIconModule,
1425
+ McToolTipModule], exports: [McCommonModule,
1426
+ McTabGroup,
1427
+ McTabLabel,
1428
+ McTab,
1429
+ McTabNav,
1430
+ McTabLink,
1431
+ McTabContent,
1432
+ McOldTabsCssStyler,
1433
+ McAlignTabsCenterCssStyler,
1434
+ McAlignTabsEndCssStyler,
1435
+ McStretchTabsCssStyler,
1436
+ McVerticalTabsCssStyler] });
1437
+ /** @nocollapse */ /** @nocollapse */ McTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, imports: [[
1438
+ CommonModule,
1439
+ PortalModule,
1440
+ A11yModule,
1441
+ McCommonModule,
1442
+ McIconModule,
1443
+ McToolTipModule
1444
+ ], McCommonModule] });
1445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McTabsModule, decorators: [{
1446
+ type: NgModule,
1447
+ args: [{
1448
+ imports: [
1449
+ CommonModule,
1450
+ PortalModule,
1451
+ A11yModule,
1452
+ McCommonModule,
1453
+ McIconModule,
1454
+ McToolTipModule
1455
+ ],
1456
+ // Don't export all components because some are only to be used internally.
1457
+ exports: [
1458
+ McCommonModule,
1459
+ McTabGroup,
1460
+ McTabLabel,
1461
+ McTab,
1462
+ McTabNav,
1463
+ McTabLink,
1464
+ McTabContent,
1465
+ McOldTabsCssStyler,
1466
+ McAlignTabsCenterCssStyler,
1467
+ McAlignTabsEndCssStyler,
1468
+ McStretchTabsCssStyler,
1469
+ McVerticalTabsCssStyler
1470
+ ],
1471
+ declarations: [
1472
+ McTabGroup,
1473
+ McTabLabel,
1474
+ McTab,
1475
+ McTabLabelWrapper,
1476
+ McTabNav,
1477
+ McTabLink,
1478
+ McTabBody,
1479
+ McTabBodyPortal,
1480
+ McTabHeader,
1481
+ McTabContent,
1482
+ McOldTabsCssStyler,
1483
+ McAlignTabsCenterCssStyler,
1484
+ McAlignTabsEndCssStyler,
1485
+ McStretchTabsCssStyler,
1486
+ McVerticalTabsCssStyler
1487
+ ]
1488
+ }]
1489
1489
  }] });
1490
1490
 
1491
- /**
1492
- * Generated bundle index. Do not edit.
1491
+ /**
1492
+ * Generated bundle index. Do not edit.
1493
1493
  */
1494
1494
 
1495
1495
  export { MC_TABS_CONFIG, McAlignTabsCenterCssStyler, McAlignTabsEndCssStyler, McOldTabsCssStyler, McStretchTabsCssStyler, McTab, McTabBody, McTabBodyPortal, McTabChangeEvent, McTabContent, McTabGroup, McTabGroupBase, McTabGroupMixinBase, McTabHeader, McTabLabel, McTabLabelWrapper, McTabLink, McTabNav, McTabsModule, McVerticalTabsCssStyler, mcTabsAnimations };