@angular/material 17.1.0-next.0 → 17.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/autocomplete/_autocomplete-theme.scss +47 -14
  2. package/autocomplete/index.d.ts +14 -10
  3. package/badge/_badge-theme.scss +67 -35
  4. package/badge/index.d.ts +5 -5
  5. package/bottom-sheet/_bottom-sheet-theme.scss +51 -18
  6. package/bottom-sheet/index.d.ts +6 -6
  7. package/button/_button-theme.scss +4 -1
  8. package/button/_fab-theme.scss +65 -32
  9. package/button/_icon-button-theme.scss +89 -56
  10. package/button/index.d.ts +13 -13
  11. package/button-toggle/_button-toggle-theme.scss +66 -32
  12. package/button-toggle/index.d.ts +5 -5
  13. package/card/index.d.ts +18 -18
  14. package/checkbox/index.d.ts +6 -6
  15. package/chips/_chips-theme.scss +64 -32
  16. package/chips/index.d.ts +46 -73
  17. package/core/_core-theme.scss +1 -3
  18. package/core/index.d.ts +50 -31
  19. package/core/option/_optgroup-theme.scss +47 -16
  20. package/core/option/_option-theme.scss +54 -23
  21. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +18 -58
  22. package/core/tokens/m2/_index.scss +38 -0
  23. package/core/tokens/m2/mat/_full-pseudo-checkbox.scss +49 -0
  24. package/core/tokens/m2/mat/_minimal-pseudo-checkbox.scss +43 -0
  25. package/datepicker/_datepicker-theme.scss +70 -38
  26. package/datepicker/index.d.ts +88 -86
  27. package/dialog/_dialog-theme.scss +48 -17
  28. package/divider/_divider-theme.scss +49 -16
  29. package/divider/index.d.ts +4 -4
  30. package/esm2022/autocomplete/autocomplete-origin.mjs +5 -4
  31. package/esm2022/autocomplete/autocomplete-trigger.mjs +27 -11
  32. package/esm2022/autocomplete/autocomplete.mjs +6 -6
  33. package/esm2022/autocomplete/module.mjs +23 -7
  34. package/esm2022/autocomplete/public-api.mjs +3 -1
  35. package/esm2022/badge/badge-module.mjs +6 -7
  36. package/esm2022/badge/badge.mjs +5 -4
  37. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -6
  38. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +8 -7
  39. package/esm2022/bottom-sheet/bottom-sheet.mjs +5 -6
  40. package/esm2022/button/button-base.mjs +6 -6
  41. package/esm2022/button/button.mjs +9 -9
  42. package/esm2022/button/fab.mjs +17 -17
  43. package/esm2022/button/icon-button.mjs +9 -9
  44. package/esm2022/button/module.mjs +16 -12
  45. package/esm2022/button-toggle/button-toggle-module.mjs +6 -7
  46. package/esm2022/button-toggle/button-toggle.mjs +10 -9
  47. package/esm2022/card/card.mjs +57 -46
  48. package/esm2022/card/module.mjs +7 -8
  49. package/esm2022/checkbox/checkbox-required-validator.mjs +6 -4
  50. package/esm2022/checkbox/checkbox.mjs +5 -6
  51. package/esm2022/checkbox/module.mjs +11 -12
  52. package/esm2022/chips/chip-action.mjs +5 -4
  53. package/esm2022/chips/chip-edit-input.mjs +5 -4
  54. package/esm2022/chips/chip-grid.mjs +39 -51
  55. package/esm2022/chips/chip-icons.mjs +13 -10
  56. package/esm2022/chips/chip-input.mjs +5 -4
  57. package/esm2022/chips/chip-listbox.mjs +5 -5
  58. package/esm2022/chips/chip-option.mjs +7 -7
  59. package/esm2022/chips/chip-row.mjs +7 -8
  60. package/esm2022/chips/chip-set.mjs +5 -5
  61. package/esm2022/chips/chip.mjs +5 -6
  62. package/esm2022/chips/module.mjs +7 -8
  63. package/esm2022/chips/tokens.mjs +8 -2
  64. package/esm2022/core/common-behaviors/common-module.mjs +4 -4
  65. package/esm2022/core/common-behaviors/error-state.mjs +50 -11
  66. package/esm2022/core/common-behaviors/index.mjs +2 -2
  67. package/esm2022/core/datetime/index.mjs +8 -8
  68. package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
  69. package/esm2022/core/error/error-options.mjs +6 -6
  70. package/esm2022/core/line/line.mjs +10 -10
  71. package/esm2022/core/option/index.mjs +6 -7
  72. package/esm2022/core/option/optgroup.mjs +5 -5
  73. package/esm2022/core/option/option.mjs +9 -9
  74. package/esm2022/core/private/ripple-loader.mjs +3 -3
  75. package/esm2022/core/ripple/index.mjs +6 -7
  76. package/esm2022/core/ripple/ripple.mjs +5 -4
  77. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +6 -7
  78. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
  79. package/esm2022/core/version.mjs +1 -1
  80. package/esm2022/datepicker/calendar-body.mjs +6 -6
  81. package/esm2022/datepicker/calendar.mjs +12 -16
  82. package/esm2022/datepicker/date-range-input-parts.mjs +41 -20
  83. package/esm2022/datepicker/date-range-input.mjs +7 -7
  84. package/esm2022/datepicker/date-range-picker.mjs +5 -4
  85. package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
  86. package/esm2022/datepicker/date-selection-model.mjs +9 -9
  87. package/esm2022/datepicker/datepicker-actions.mjs +13 -11
  88. package/esm2022/datepicker/datepicker-base.mjs +23 -20
  89. package/esm2022/datepicker/datepicker-input-base.mjs +6 -5
  90. package/esm2022/datepicker/datepicker-input.mjs +5 -4
  91. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  92. package/esm2022/datepicker/datepicker-module.mjs +18 -16
  93. package/esm2022/datepicker/datepicker-toggle.mjs +10 -10
  94. package/esm2022/datepicker/datepicker.mjs +5 -4
  95. package/esm2022/datepicker/month-view.mjs +5 -6
  96. package/esm2022/datepicker/multi-year-view.mjs +5 -6
  97. package/esm2022/datepicker/year-view.mjs +5 -6
  98. package/esm2022/dialog/dialog-container.mjs +7 -8
  99. package/esm2022/dialog/dialog-content-directives.mjs +12 -12
  100. package/esm2022/dialog/dialog.mjs +3 -3
  101. package/esm2022/dialog/module.mjs +5 -5
  102. package/esm2022/dialog/testing/dialog-opener.mjs +3 -3
  103. package/esm2022/divider/divider-module.mjs +6 -7
  104. package/esm2022/divider/divider.mjs +5 -5
  105. package/esm2022/expansion/accordion.mjs +5 -4
  106. package/esm2022/expansion/expansion-module.mjs +16 -9
  107. package/esm2022/expansion/expansion-panel-content.mjs +5 -4
  108. package/esm2022/expansion/expansion-panel-header.mjs +13 -11
  109. package/esm2022/expansion/expansion-panel.mjs +11 -11
  110. package/esm2022/form-field/directives/error.mjs +5 -4
  111. package/esm2022/form-field/directives/floating-label.mjs +5 -4
  112. package/esm2022/form-field/directives/hint.mjs +5 -4
  113. package/esm2022/form-field/directives/label.mjs +5 -4
  114. package/esm2022/form-field/directives/line-ripple.mjs +5 -4
  115. package/esm2022/form-field/directives/notched-outline.mjs +5 -5
  116. package/esm2022/form-field/directives/prefix.mjs +5 -4
  117. package/esm2022/form-field/directives/suffix.mjs +5 -4
  118. package/esm2022/form-field/form-field-control.mjs +3 -3
  119. package/esm2022/form-field/form-field.mjs +14 -13
  120. package/esm2022/form-field/module.mjs +16 -18
  121. package/esm2022/grid-list/grid-list-module.mjs +15 -11
  122. package/esm2022/grid-list/grid-list.mjs +5 -5
  123. package/esm2022/grid-list/grid-tile.mjs +21 -18
  124. package/esm2022/grid-list/tile-coordinator.mjs +1 -1
  125. package/esm2022/icon/icon-module.mjs +6 -7
  126. package/esm2022/icon/icon-registry.mjs +3 -3
  127. package/esm2022/icon/icon.mjs +5 -5
  128. package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
  129. package/esm2022/input/input.mjs +28 -30
  130. package/esm2022/input/module.mjs +6 -7
  131. package/esm2022/input/public-api.mjs +3 -1
  132. package/esm2022/list/action-list.mjs +5 -5
  133. package/esm2022/list/list-base.mjs +9 -7
  134. package/esm2022/list/list-item-sections.mjs +25 -19
  135. package/esm2022/list/list-module.mjs +15 -16
  136. package/esm2022/list/list-option.mjs +8 -8
  137. package/esm2022/list/list.mjs +10 -10
  138. package/esm2022/list/nav-list.mjs +5 -5
  139. package/esm2022/list/selection-list.mjs +5 -5
  140. package/esm2022/list/subheader.mjs +5 -4
  141. package/esm2022/menu/menu-content.mjs +5 -4
  142. package/esm2022/menu/menu-item.mjs +6 -6
  143. package/esm2022/menu/menu-trigger.mjs +12 -5
  144. package/esm2022/menu/menu.mjs +6 -6
  145. package/esm2022/menu/module.mjs +25 -7
  146. package/esm2022/paginator/module.mjs +6 -7
  147. package/esm2022/paginator/paginator-intl.mjs +3 -3
  148. package/esm2022/paginator/paginator.mjs +10 -11
  149. package/esm2022/progress-bar/module.mjs +6 -6
  150. package/esm2022/progress-bar/progress-bar.mjs +5 -5
  151. package/esm2022/progress-spinner/module.mjs +6 -7
  152. package/esm2022/progress-spinner/progress-spinner.mjs +6 -6
  153. package/esm2022/radio/module.mjs +6 -7
  154. package/esm2022/radio/radio.mjs +10 -9
  155. package/esm2022/select/module.mjs +21 -7
  156. package/esm2022/select/public-api.mjs +5 -1
  157. package/esm2022/select/select.mjs +51 -42
  158. package/esm2022/sidenav/drawer.mjs +13 -12
  159. package/esm2022/sidenav/sidenav-module.mjs +14 -10
  160. package/esm2022/sidenav/sidenav.mjs +13 -12
  161. package/esm2022/slide-toggle/module.mjs +20 -12
  162. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +5 -4
  163. package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
  164. package/esm2022/slider/module.mjs +19 -7
  165. package/esm2022/slider/slider-input.mjs +9 -7
  166. package/esm2022/slider/slider-thumb.mjs +5 -6
  167. package/esm2022/slider/slider.mjs +6 -6
  168. package/esm2022/snack-bar/module.mjs +6 -6
  169. package/esm2022/snack-bar/simple-snack-bar.mjs +6 -8
  170. package/esm2022/snack-bar/snack-bar-container.mjs +7 -8
  171. package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
  172. package/esm2022/snack-bar/snack-bar-ref.mjs +1 -1
  173. package/esm2022/snack-bar/snack-bar.mjs +3 -3
  174. package/esm2022/sort/sort-header-intl.mjs +3 -3
  175. package/esm2022/sort/sort-header.mjs +5 -5
  176. package/esm2022/sort/sort-module.mjs +6 -7
  177. package/esm2022/sort/sort.mjs +5 -4
  178. package/esm2022/stepper/step-content.mjs +5 -4
  179. package/esm2022/stepper/step-header.mjs +8 -8
  180. package/esm2022/stepper/step-label.mjs +5 -4
  181. package/esm2022/stepper/stepper-button.mjs +9 -7
  182. package/esm2022/stepper/stepper-icon.mjs +5 -4
  183. package/esm2022/stepper/stepper-intl.mjs +3 -3
  184. package/esm2022/stepper/stepper-module.mjs +17 -16
  185. package/esm2022/stepper/stepper.mjs +14 -16
  186. package/esm2022/table/cell.mjs +29 -22
  187. package/esm2022/table/module.mjs +7 -8
  188. package/esm2022/table/row.mjs +33 -24
  189. package/esm2022/table/table.mjs +11 -11
  190. package/esm2022/table/text-column.mjs +8 -6
  191. package/esm2022/tabs/module.mjs +10 -43
  192. package/esm2022/tabs/paginated-tab-header.mjs +3 -3
  193. package/esm2022/tabs/tab-body.mjs +10 -8
  194. package/esm2022/tabs/tab-content.mjs +5 -4
  195. package/esm2022/tabs/tab-group.mjs +20 -13
  196. package/esm2022/tabs/tab-header.mjs +7 -7
  197. package/esm2022/tabs/tab-label-wrapper.mjs +5 -4
  198. package/esm2022/tabs/tab-label.mjs +5 -4
  199. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +17 -17
  200. package/esm2022/tabs/tab.mjs +5 -5
  201. package/esm2022/toolbar/toolbar-module.mjs +6 -7
  202. package/esm2022/toolbar/toolbar.mjs +9 -8
  203. package/esm2022/tooltip/module.mjs +6 -7
  204. package/esm2022/tooltip/tooltip.mjs +18 -12
  205. package/esm2022/tree/node.mjs +13 -10
  206. package/esm2022/tree/outlet.mjs +5 -4
  207. package/esm2022/tree/padding.mjs +5 -4
  208. package/esm2022/tree/toggle.mjs +5 -4
  209. package/esm2022/tree/tree-module.mjs +7 -8
  210. package/esm2022/tree/tree.mjs +5 -6
  211. package/expansion/_expansion-theme.scss +56 -22
  212. package/expansion/index.d.ts +15 -15
  213. package/fesm2022/autocomplete.mjs +60 -27
  214. package/fesm2022/autocomplete.mjs.map +1 -1
  215. package/fesm2022/badge.mjs +9 -9
  216. package/fesm2022/badge.mjs.map +1 -1
  217. package/fesm2022/bottom-sheet.mjs +25 -26
  218. package/fesm2022/bottom-sheet.mjs.map +1 -1
  219. package/fesm2022/button-toggle.mjs +14 -15
  220. package/fesm2022/button-toggle.mjs.map +1 -1
  221. package/fesm2022/button.mjs +53 -49
  222. package/fesm2022/button.mjs.map +1 -1
  223. package/fesm2022/card.mjs +62 -52
  224. package/fesm2022/card.mjs.map +1 -1
  225. package/fesm2022/checkbox.mjs +19 -19
  226. package/fesm2022/checkbox.mjs.map +1 -1
  227. package/fesm2022/chips.mjs +94 -96
  228. package/fesm2022/chips.mjs.map +1 -1
  229. package/fesm2022/core.mjs +115 -78
  230. package/fesm2022/core.mjs.map +1 -1
  231. package/fesm2022/datepicker.mjs +178 -146
  232. package/fesm2022/datepicker.mjs.map +1 -1
  233. package/fesm2022/dialog/testing.mjs +2 -2
  234. package/fesm2022/dialog/testing.mjs.map +1 -1
  235. package/fesm2022/dialog.mjs +25 -26
  236. package/fesm2022/dialog.mjs.map +1 -1
  237. package/fesm2022/divider.mjs +9 -10
  238. package/fesm2022/divider.mjs.map +1 -1
  239. package/fesm2022/expansion.mjs +47 -36
  240. package/fesm2022/expansion.mjs.map +1 -1
  241. package/fesm2022/form-field.mjs +61 -48
  242. package/fesm2022/form-field.mjs.map +1 -1
  243. package/fesm2022/grid-list.mjs +38 -31
  244. package/fesm2022/grid-list.mjs.map +1 -1
  245. package/fesm2022/icon/testing.mjs +7 -7
  246. package/fesm2022/icon.mjs +12 -13
  247. package/fesm2022/icon.mjs.map +1 -1
  248. package/fesm2022/input.mjs +33 -35
  249. package/fesm2022/input.mjs.map +1 -1
  250. package/fesm2022/list.mjs +77 -71
  251. package/fesm2022/list.mjs.map +1 -1
  252. package/fesm2022/menu.mjs +51 -27
  253. package/fesm2022/menu.mjs.map +1 -1
  254. package/fesm2022/paginator.mjs +17 -22
  255. package/fesm2022/paginator.mjs.map +1 -1
  256. package/fesm2022/progress-bar.mjs +9 -9
  257. package/fesm2022/progress-bar.mjs.map +1 -1
  258. package/fesm2022/progress-spinner.mjs +10 -12
  259. package/fesm2022/progress-spinner.mjs.map +1 -1
  260. package/fesm2022/radio.mjs +14 -15
  261. package/fesm2022/radio.mjs.map +1 -1
  262. package/fesm2022/select.mjs +72 -48
  263. package/fesm2022/select.mjs.map +1 -1
  264. package/fesm2022/sidenav.mjs +37 -31
  265. package/fesm2022/sidenav.mjs.map +1 -1
  266. package/fesm2022/slide-toggle.mjs +28 -20
  267. package/fesm2022/slide-toggle.mjs.map +1 -1
  268. package/fesm2022/slider.mjs +36 -23
  269. package/fesm2022/slider.mjs.map +1 -1
  270. package/fesm2022/snack-bar.mjs +32 -34
  271. package/fesm2022/snack-bar.mjs.map +1 -1
  272. package/fesm2022/sort.mjs +16 -16
  273. package/fesm2022/sort.mjs.map +1 -1
  274. package/fesm2022/stepper.mjs +58 -55
  275. package/fesm2022/stepper.mjs.map +1 -1
  276. package/fesm2022/table.mjs +81 -63
  277. package/fesm2022/table.mjs.map +1 -1
  278. package/fesm2022/tabs.mjs +408 -424
  279. package/fesm2022/tabs.mjs.map +1 -1
  280. package/fesm2022/toolbar.mjs +13 -13
  281. package/fesm2022/toolbar.mjs.map +1 -1
  282. package/fesm2022/tooltip.mjs +22 -17
  283. package/fesm2022/tooltip.mjs.map +1 -1
  284. package/fesm2022/tree.mjs +34 -29
  285. package/fesm2022/tree.mjs.map +1 -1
  286. package/form-field/index.d.ts +33 -45
  287. package/grid-list/index.d.ts +10 -10
  288. package/icon/_icon-theme.scss +55 -23
  289. package/icon/index.d.ts +4 -4
  290. package/input/index.d.ts +33 -32
  291. package/list/index.d.ts +36 -36
  292. package/menu/_menu-theme.scss +50 -18
  293. package/menu/index.d.ts +12 -12
  294. package/package.json +2 -2
  295. package/paginator/_paginator-theme.scss +62 -29
  296. package/paginator/index.d.ts +6 -6
  297. package/prebuilt-themes/deeppurple-amber.css +1 -1
  298. package/prebuilt-themes/indigo-pink.css +1 -1
  299. package/prebuilt-themes/pink-bluegrey.css +1 -1
  300. package/prebuilt-themes/purple-green.css +1 -1
  301. package/progress-bar/index.d.ts +2 -2
  302. package/progress-spinner/index.d.ts +4 -4
  303. package/radio/index.d.ts +6 -6
  304. package/schematics/ng-add/index.js +1 -1
  305. package/schematics/ng-add/index.mjs +1 -1
  306. package/schematics/ng-generate/mdc-migration/index_bundled.js +427 -201
  307. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  308. package/schematics/ng-update/index_bundled.js +41 -37
  309. package/schematics/ng-update/index_bundled.js.map +2 -2
  310. package/select/_select-theme.scss +71 -38
  311. package/select/index.d.ts +47 -35
  312. package/sidenav/_sidenav-theme.scss +49 -16
  313. package/sidenav/index.d.ts +11 -11
  314. package/slide-toggle/index.d.ts +6 -6
  315. package/slider/index.d.ts +9 -9
  316. package/sort/index.d.ts +6 -6
  317. package/stepper/index.d.ts +29 -29
  318. package/table/index.d.ts +24 -24
  319. package/tabs/index.d.ts +18 -43
  320. package/toolbar/index.d.ts +5 -5
  321. package/tooltip/index.d.ts +8 -8
  322. package/tree/index.d.ts +15 -15
@@ -1,3 +1,4 @@
1
+ @use 'sass:map';
1
2
  @use '../core/theming/theming';
2
3
  @use '../core/theming/inspection';
3
4
  @use '../core/typography/typography';
@@ -5,30 +6,62 @@
5
6
  @use '../core/tokens/token-utils';
6
7
  @use '../core/tokens/m2/mat/autocomplete' as tokens-mat-autocomplete;
7
8
 
8
- @mixin base($theme) {}
9
+ @mixin base($theme) {
10
+ @if inspection.get-theme-version($theme) == 1 {
11
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
+ }
13
+ @else {}
14
+ }
9
15
 
10
16
  @mixin color($theme) {
11
- @include sass-utils.current-selector-or-root() {
12
- @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix,
13
- tokens-mat-autocomplete.get-color-tokens($theme));
17
+ @if inspection.get-theme-version($theme) == 1 {
18
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
19
+ }
20
+ @else {
21
+ @include sass-utils.current-selector-or-root() {
22
+ @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix,
23
+ tokens-mat-autocomplete.get-color-tokens($theme));
24
+ }
14
25
  }
15
26
  }
16
27
 
17
- @mixin typography($theme) {}
28
+ @mixin typography($theme) {
29
+ @if inspection.get-theme-version($theme) == 1 {
30
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
31
+ }
32
+ @else {}
33
+ }
18
34
 
19
- @mixin density($theme) {}
35
+ @mixin density($theme) {
36
+ @if inspection.get-theme-version($theme) == 1 {
37
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
38
+ }
39
+ @else {}
40
+ }
20
41
 
21
42
  @mixin theme($theme) {
22
43
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
23
- @include base($theme);
24
- @if inspection.theme-has($theme, color) {
25
- @include color($theme);
26
- }
27
- @if inspection.theme-has($theme, density) {
28
- @include density($theme);
44
+ @if inspection.get-theme-version($theme) == 1 {
45
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
29
46
  }
30
- @if inspection.theme-has($theme, typography) {
31
- @include typography($theme);
47
+ @else {
48
+ @include base($theme);
49
+ @if inspection.theme-has($theme, color) {
50
+ @include color($theme);
51
+ }
52
+ @if inspection.theme-has($theme, density) {
53
+ @include density($theme);
54
+ }
55
+ @if inspection.theme-has($theme, typography) {
56
+ @include typography($theme);
57
+ }
32
58
  }
33
59
  }
34
60
  }
61
+
62
+ @mixin _theme-from-tokens($tokens) {
63
+ @if ($tokens != ()) {
64
+ @include token-utils.create-token-values(
65
+ tokens-mat-autocomplete.$prefix, map.get($tokens, tokens-mat-autocomplete.$prefix));
66
+ }
67
+ }
@@ -8,9 +8,9 @@ import { Directionality } from '@angular/cdk/bidi';
8
8
  import { ElementRef } from '@angular/core';
9
9
  import { EventEmitter } from '@angular/core';
10
10
  import * as i0 from '@angular/core';
11
- import * as i4 from '@angular/cdk/overlay';
12
- import * as i5 from '@angular/material/core';
13
- import * as i6 from '@angular/common';
11
+ import * as i1 from '@angular/cdk/overlay';
12
+ import * as i2 from '@angular/material/core';
13
+ import * as i3 from '@angular/common';
14
14
  import * as i7 from '@angular/cdk/scrolling';
15
15
  import { InjectionToken } from '@angular/core';
16
16
  import { MatFormField } from '@angular/material/form-field';
@@ -37,7 +37,7 @@ import { ViewportRuler } from '@angular/cdk/scrolling';
37
37
  */
38
38
  export declare function getMatAutocompleteMissingPanelError(): Error;
39
39
 
40
- declare namespace i1 {
40
+ declare namespace i4 {
41
41
  export {
42
42
  MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,
43
43
  MatAutocompleteSelectedEvent,
@@ -48,7 +48,7 @@ declare namespace i1 {
48
48
  }
49
49
  }
50
50
 
51
- declare namespace i2 {
51
+ declare namespace i5 {
52
52
  export {
53
53
  getMatAutocompleteMissingPanelError,
54
54
  MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,
@@ -59,7 +59,7 @@ declare namespace i2 {
59
59
  }
60
60
  }
61
61
 
62
- declare namespace i3 {
62
+ declare namespace i6 {
63
63
  export {
64
64
  MatAutocompleteOrigin
65
65
  }
@@ -199,7 +199,7 @@ export declare class MatAutocomplete implements AfterContentInit, OnDestroy {
199
199
  private _setThemeClasses;
200
200
  protected _skipPredicate(): boolean;
201
201
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocomplete, never>;
202
- static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocomplete, "mat-autocomplete", ["matAutocomplete"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "autoSelectActiveOption": { "alias": "autoSelectActiveOption"; "required": false; }; "requireSelection": { "alias": "requireSelection"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; "optionActivated": "optionActivated"; }, ["options", "optionGroups"], ["*"], false, never>;
202
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocomplete, "mat-autocomplete", ["matAutocomplete"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "autoSelectActiveOption": { "alias": "autoSelectActiveOption"; "required": false; }; "requireSelection": { "alias": "requireSelection"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; "optionActivated": "optionActivated"; }, ["options", "optionGroups"], ["*"], true, never>;
203
203
  static ngAcceptInputType_autoActiveFirstOption: unknown;
204
204
  static ngAcceptInputType_autoSelectActiveOption: unknown;
205
205
  static ngAcceptInputType_requireSelection: unknown;
@@ -234,7 +234,7 @@ export declare interface MatAutocompleteDefaultOptions {
234
234
 
235
235
  export declare class MatAutocompleteModule {
236
236
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteModule, never>;
237
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatAutocompleteModule, [typeof i1.MatAutocomplete, typeof i2.MatAutocompleteTrigger, typeof i3.MatAutocompleteOrigin], [typeof i4.OverlayModule, typeof i5.MatOptionModule, typeof i5.MatCommonModule, typeof i6.CommonModule], [typeof i7.CdkScrollableModule, typeof i1.MatAutocomplete, typeof i5.MatOptionModule, typeof i5.MatCommonModule, typeof i2.MatAutocompleteTrigger, typeof i3.MatAutocompleteOrigin]>;
237
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatAutocompleteModule, never, [typeof i1.OverlayModule, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i3.CommonModule, typeof i4.MatAutocomplete, typeof i5.MatAutocompleteTrigger, typeof i6.MatAutocompleteOrigin], [typeof i7.CdkScrollableModule, typeof i4.MatAutocomplete, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i5.MatAutocompleteTrigger, typeof i6.MatAutocompleteOrigin]>;
238
238
  static ɵinj: i0.ɵɵInjectorDeclaration<MatAutocompleteModule>;
239
239
  }
240
240
 
@@ -249,7 +249,7 @@ export declare class MatAutocompleteOrigin {
249
249
  /** Reference to the element on which the directive is applied. */
250
250
  elementRef: ElementRef<HTMLElement>);
251
251
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteOrigin, never>;
252
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatAutocompleteOrigin, "[matAutocompleteOrigin]", ["matAutocompleteOrigin"], {}, {}, never, never, false, never>;
252
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatAutocompleteOrigin, "[matAutocompleteOrigin]", ["matAutocompleteOrigin"], {}, {}, never, never, true, never>;
253
253
  }
254
254
 
255
255
  /** Event object that is emitted when an autocomplete option is selected. */
@@ -470,8 +470,12 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft
470
470
  /** Clears the references to the listbox overlay element from the modal it was added to. */
471
471
  private _clearFromModal;
472
472
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteTrigger, [null, null, null, null, null, null, { optional: true; }, { optional: true; host: true; }, { optional: true; }, null, { optional: true; }]>;
473
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatAutocompleteTrigger, "input[matAutocomplete], textarea[matAutocomplete]", ["matAutocompleteTrigger"], { "autocomplete": { "alias": "matAutocomplete"; "required": false; }; "position": { "alias": "matAutocompletePosition"; "required": false; }; "connectedTo": { "alias": "matAutocompleteConnectedTo"; "required": false; }; "autocompleteAttribute": { "alias": "autocomplete"; "required": false; }; "autocompleteDisabled": { "alias": "matAutocompleteDisabled"; "required": false; }; }, {}, never, never, false, never>;
473
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatAutocompleteTrigger, "input[matAutocomplete], textarea[matAutocomplete]", ["matAutocompleteTrigger"], { "autocomplete": { "alias": "matAutocomplete"; "required": false; }; "position": { "alias": "matAutocompletePosition"; "required": false; }; "connectedTo": { "alias": "matAutocompleteConnectedTo"; "required": false; }; "autocompleteAttribute": { "alias": "autocomplete"; "required": false; }; "autocompleteDisabled": { "alias": "matAutocompleteDisabled"; "required": false; }; }, {}, never, never, true, never>;
474
474
  static ngAcceptInputType_autocompleteDisabled: unknown;
475
475
  }
476
476
 
477
+ export { MatOptgroup }
478
+
479
+ export { MatOption }
480
+
477
481
  export { }
@@ -1,7 +1,7 @@
1
1
  @use 'sass:color';
2
+ @use 'sass:map';
2
3
  @use 'sass:math';
3
4
  @use '@angular/cdk';
4
-
5
5
  @use '../core/theming/theming';
6
6
  @use '../core/theming/inspection';
7
7
  @use '../core/typography/typography';
@@ -164,57 +164,89 @@ $_emit-fallback-vars: true;
164
164
  }
165
165
  }
166
166
 
167
- @mixin base($theme) {}
167
+ @mixin base($theme) {
168
+ @if inspection.get-theme-version($theme) == 1 {
169
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
170
+ }
171
+ @else {}
172
+ }
168
173
 
169
174
  @mixin color($theme) {
170
- @include sass-utils.current-selector-or-root() {
171
- @include token-utils.create-token-values(tokens-mat-badge.$prefix,
172
- tokens-mat-badge.get-color-tokens($theme));
175
+ @if inspection.get-theme-version($theme) == 1 {
176
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
173
177
  }
178
+ @else {
179
+ @include sass-utils.current-selector-or-root() {
180
+ @include token-utils.create-token-values(tokens-mat-badge.$prefix,
181
+ tokens-mat-badge.get-color-tokens($theme));
182
+ }
174
183
 
175
- .mat-badge-accent {
176
- @include token-utils.create-token-values(tokens-mat-badge.$prefix,
177
- tokens-mat-badge.private-get-color-palette-color-tokens($theme, accent));
178
- }
184
+ .mat-badge-accent {
185
+ @include token-utils.create-token-values(tokens-mat-badge.$prefix,
186
+ tokens-mat-badge.private-get-color-palette-color-tokens($theme, accent));
187
+ }
179
188
 
180
- .mat-badge-warn {
181
- @include token-utils.create-token-values(tokens-mat-badge.$prefix,
182
- tokens-mat-badge.private-get-color-palette-color-tokens($theme, warn));
189
+ .mat-badge-warn {
190
+ @include token-utils.create-token-values(tokens-mat-badge.$prefix,
191
+ tokens-mat-badge.private-get-color-palette-color-tokens($theme, warn));
192
+ }
183
193
  }
184
194
  }
185
195
 
186
196
  @mixin typography($theme) {
187
- @include sass-utils.current-selector-or-root() {
188
- @include token-utils.create-token-values(tokens-mat-badge.$prefix,
189
- tokens-mat-badge.get-typography-tokens($theme));
197
+ @if inspection.get-theme-version($theme) == 1 {
198
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
199
+ }
200
+ @else {
201
+ @include sass-utils.current-selector-or-root() {
202
+ @include token-utils.create-token-values(tokens-mat-badge.$prefix,
203
+ tokens-mat-badge.get-typography-tokens($theme));
204
+ }
190
205
  }
191
206
  }
192
207
 
193
- @mixin density($theme) {}
208
+ @mixin density($theme) {
209
+ @if inspection.get-theme-version($theme) == 1 {
210
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
211
+ }
212
+ @else {}
213
+ }
194
214
 
195
215
  @mixin theme($theme) {
196
216
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-badge') {
197
- // Try to reduce the number of times that the structural styles are emitted.
198
- @if not $_badge-structure-emitted {
199
- @include _badge-structure;
200
-
201
- // Only flip the flag if the mixin is included at the top level. Otherwise the first
202
- // inclusion might be inside of a theme class which will exclude the structural styles
203
- // from all other themes.
204
- @if not & {
205
- $_badge-structure-emitted: true !global;
206
- }
217
+ @if inspection.get-theme-version($theme) == 1 {
218
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
207
219
  }
220
+ @else {
221
+ // Try to reduce the number of times that the structural styles are emitted.
222
+ @if not $_badge-structure-emitted {
223
+ @include _badge-structure;
224
+
225
+ // Only flip the flag if the mixin is included at the top level. Otherwise the first
226
+ // inclusion might be inside of a theme class which will exclude the structural styles
227
+ // from all other themes.
228
+ @if not & {
229
+ $_badge-structure-emitted: true !global;
230
+ }
231
+ }
208
232
 
209
- @include base($theme);
210
- @if inspection.theme-has($theme, color) {
211
- @include color($theme);
212
- }
213
- @if inspection.theme-has($theme, density) {
214
- @include density($theme);
215
- }
216
- @if inspection.theme-has($theme, typography) {
217
- @include typography($theme);
233
+ @include base($theme);
234
+ @if inspection.theme-has($theme, color) {
235
+ @include color($theme);
236
+ }
237
+ @if inspection.theme-has($theme, density) {
238
+ @include density($theme);
239
+ }
240
+ @if inspection.theme-has($theme, typography) {
241
+ @include typography($theme);
242
+ }
218
243
  }
219
244
  }
220
245
  }
246
+
247
+ @mixin _theme-from-tokens($tokens) {
248
+ @if ($tokens != ()) {
249
+ @include token-utils.create-token-values(
250
+ tokens-mat-badge.$prefix, map.get($tokens, tokens-mat-badge.$prefix));
251
+ }
252
+ }
package/badge/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { AriaDescriber } from '@angular/cdk/a11y';
2
2
  import { ElementRef } from '@angular/core';
3
3
  import * as i0 from '@angular/core';
4
- import * as i2 from '@angular/cdk/a11y';
5
- import * as i3 from '@angular/material/core';
4
+ import * as i1 from '@angular/cdk/a11y';
5
+ import * as i2 from '@angular/material/core';
6
6
  import { NgZone } from '@angular/core';
7
7
  import { OnDestroy } from '@angular/core';
8
8
  import { OnInit } from '@angular/core';
9
9
  import { Renderer2 } from '@angular/core';
10
10
  import { ThemePalette } from '@angular/material/core';
11
11
 
12
- declare namespace i1 {
12
+ declare namespace i3 {
13
13
  export {
14
14
  MatBadgePosition,
15
15
  MatBadgeSize,
@@ -87,7 +87,7 @@ export declare class MatBadge implements OnInit, OnDestroy {
87
87
  /** Clears any existing badges that might be left over from server-side rendering. */
88
88
  private _clearExistingBadges;
89
89
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBadge, [null, null, null, null, { optional: true; }]>;
90
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatBadge, "[matBadge]", never, { "color": { "alias": "matBadgeColor"; "required": false; }; "overlap": { "alias": "matBadgeOverlap"; "required": false; }; "disabled": { "alias": "matBadgeDisabled"; "required": false; }; "position": { "alias": "matBadgePosition"; "required": false; }; "content": { "alias": "matBadge"; "required": false; }; "description": { "alias": "matBadgeDescription"; "required": false; }; "size": { "alias": "matBadgeSize"; "required": false; }; "hidden": { "alias": "matBadgeHidden"; "required": false; }; }, {}, never, never, false, never>;
90
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatBadge, "[matBadge]", never, { "color": { "alias": "matBadgeColor"; "required": false; }; "overlap": { "alias": "matBadgeOverlap"; "required": false; }; "disabled": { "alias": "matBadgeDisabled"; "required": false; }; "position": { "alias": "matBadgePosition"; "required": false; }; "content": { "alias": "matBadge"; "required": false; }; "description": { "alias": "matBadgeDescription"; "required": false; }; "size": { "alias": "matBadgeSize"; "required": false; }; "hidden": { "alias": "matBadgeHidden"; "required": false; }; }, {}, never, never, true, never>;
91
91
  static ngAcceptInputType_overlap: unknown;
92
92
  static ngAcceptInputType_disabled: unknown;
93
93
  static ngAcceptInputType_hidden: unknown;
@@ -95,7 +95,7 @@ export declare class MatBadge implements OnInit, OnDestroy {
95
95
 
96
96
  export declare class MatBadgeModule {
97
97
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBadgeModule, never>;
98
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatBadgeModule, [typeof i1.MatBadge], [typeof i2.A11yModule, typeof i3.MatCommonModule], [typeof i1.MatBadge, typeof i3.MatCommonModule]>;
98
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatBadgeModule, never, [typeof i1.A11yModule, typeof i2.MatCommonModule, typeof i3.MatBadge], [typeof i3.MatBadge, typeof i2.MatCommonModule]>;
99
99
  static ɵinj: i0.ɵɵInjectorDeclaration<MatBadgeModule>;
100
100
  }
101
101
 
@@ -1,3 +1,4 @@
1
+ @use 'sass:map';
1
2
  @use '../core/typography/typography';
2
3
  @use '../core/theming/theming';
3
4
  @use '../core/theming/inspection';
@@ -6,39 +7,71 @@
6
7
  @use '../core/tokens/m2/mat/bottom-sheet' as tokens-mat-bottom-sheet;
7
8
 
8
9
  @mixin base($theme) {
9
- @include sass-utils.current-selector-or-root() {
10
- @include token-utils.create-token-values(
11
- tokens-mat-bottom-sheet.$prefix, tokens-mat-bottom-sheet.get-unthemable-tokens());
10
+ @if inspection.get-theme-version($theme) == 1 {
11
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
+ }
13
+ @else {
14
+ @include sass-utils.current-selector-or-root() {
15
+ @include token-utils.create-token-values(
16
+ tokens-mat-bottom-sheet.$prefix, tokens-mat-bottom-sheet.get-unthemable-tokens());
17
+ }
12
18
  }
13
19
  }
14
20
 
15
21
  @mixin color($theme) {
16
- @include sass-utils.current-selector-or-root() {
17
- @include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
18
- tokens-mat-bottom-sheet.get-color-tokens($theme));
22
+ @if inspection.get-theme-version($theme) == 1 {
23
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
24
+ }
25
+ @else {
26
+ @include sass-utils.current-selector-or-root() {
27
+ @include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
28
+ tokens-mat-bottom-sheet.get-color-tokens($theme));
29
+ }
19
30
  }
20
31
  }
21
32
 
22
33
  @mixin typography($theme) {
23
- @include sass-utils.current-selector-or-root() {
24
- @include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
25
- tokens-mat-bottom-sheet.get-typography-tokens($theme));
34
+ @if inspection.get-theme-version($theme) == 1 {
35
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
36
+ }
37
+ @else {
38
+ @include sass-utils.current-selector-or-root() {
39
+ @include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
40
+ tokens-mat-bottom-sheet.get-typography-tokens($theme));
41
+ }
26
42
  }
27
43
  }
28
44
 
29
- @mixin density($theme) {}
45
+ @mixin density($theme) {
46
+ @if inspection.get-theme-version($theme) == 1 {
47
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
48
+ }
49
+ @else {}
50
+ }
30
51
 
31
52
  @mixin theme($theme) {
32
53
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
33
- @include base($theme);
34
- @if inspection.theme-has($theme, color) {
35
- @include color($theme);
54
+ @if inspection.get-theme-version($theme) == 1 {
55
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
36
56
  }
37
- @if inspection.theme-has($theme, density) {
38
- @include density($theme);
39
- }
40
- @if inspection.theme-has($theme, typography) {
41
- @include typography($theme);
57
+ @else {
58
+ @include base($theme);
59
+ @if inspection.theme-has($theme, color) {
60
+ @include color($theme);
61
+ }
62
+ @if inspection.theme-has($theme, density) {
63
+ @include density($theme);
64
+ }
65
+ @if inspection.theme-has($theme, typography) {
66
+ @include typography($theme);
67
+ }
42
68
  }
43
69
  }
44
70
  }
71
+
72
+ @mixin _theme-from-tokens($tokens) {
73
+ @if ($tokens != ()) {
74
+ @include token-utils.create-token-values(
75
+ tokens-mat-bottom-sheet.$prefix, map.get($tokens, tokens-mat-bottom-sheet.$prefix));
76
+ }
77
+ }
@@ -13,9 +13,9 @@ import { EventEmitter } from '@angular/core';
13
13
  import { FocusMonitor } from '@angular/cdk/a11y';
14
14
  import { FocusTrapFactory } from '@angular/cdk/a11y';
15
15
  import * as i0 from '@angular/core';
16
- import * as i2 from '@angular/cdk/dialog';
17
- import * as i3 from '@angular/material/core';
18
- import * as i4 from '@angular/cdk/portal';
16
+ import * as i1 from '@angular/cdk/dialog';
17
+ import * as i2 from '@angular/material/core';
18
+ import * as i3 from '@angular/cdk/portal';
19
19
  import { InjectionToken } from '@angular/core';
20
20
  import { Injector } from '@angular/core';
21
21
  import { InteractivityChecker } from '@angular/cdk/a11y';
@@ -31,7 +31,7 @@ import { ViewContainerRef } from '@angular/core';
31
31
  /** Options for where to set focus to automatically on dialog open */
32
32
  export declare type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
33
33
 
34
- declare namespace i1 {
34
+ declare namespace i4 {
35
35
  export {
36
36
  MatBottomSheetContainer
37
37
  }
@@ -152,12 +152,12 @@ export declare class MatBottomSheetContainer extends CdkDialogContainer implemen
152
152
  protected _captureInitialFocus(): void;
153
153
  private _toggleClass;
154
154
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetContainer, [null, null, { optional: true; }, null, null, null, null, null, null, null]>;
155
- static ɵcmp: i0.ɵɵComponentDeclaration<MatBottomSheetContainer, "mat-bottom-sheet-container", never, {}, {}, never, never, false, never>;
155
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatBottomSheetContainer, "mat-bottom-sheet-container", never, {}, {}, never, never, true, never>;
156
156
  }
157
157
 
158
158
  export declare class MatBottomSheetModule {
159
159
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetModule, never>;
160
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatBottomSheetModule, [typeof i1.MatBottomSheetContainer], [typeof i2.DialogModule, typeof i3.MatCommonModule, typeof i4.PortalModule], [typeof i1.MatBottomSheetContainer, typeof i3.MatCommonModule]>;
160
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatBottomSheetModule, never, [typeof i1.DialogModule, typeof i2.MatCommonModule, typeof i3.PortalModule, typeof i4.MatBottomSheetContainer], [typeof i4.MatBottomSheetContainer, typeof i2.MatCommonModule]>;
161
161
  static ɵinj: i0.ɵɵInjectorDeclaration<MatBottomSheetModule>;
162
162
  }
163
163
 
@@ -169,7 +169,10 @@
169
169
  @include mdc-button.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
170
170
  }
171
171
 
172
- .mat-mdc-raised-button {
172
+ .mat-mdc-button,
173
+ .mat-mdc-raised-button,
174
+ .mat-mdc-outlined-button,
175
+ .mat-mdc-unelevated-button {
173
176
  line-height: inherit;
174
177
  }
175
178
  }
@@ -1,7 +1,7 @@
1
+ @use 'sass:map';
1
2
  @use '@material/fab/fab' as mdc-fab;
2
3
  @use '@material/fab/fab-theme' as mdc-fab-theme;
3
4
  @use '@material/fab/extended-fab-theme' as mdc-extended-fab-theme;
4
-
5
5
  @use '../core/mdc-helpers/mdc-helpers';
6
6
  @use '../core/style/sass-utils';
7
7
  @use '../core/theming/theming';
@@ -13,12 +13,17 @@
13
13
  @use '../core/typography/typography';
14
14
 
15
15
  @mixin base($theme) {
16
- // Add default values for tokens not related to color, typography, or density.
17
- @include sass-utils.current-selector-or-root() {
18
- @include mdc-fab-theme.theme(tokens-mdc-fab.get-unthemable-tokens());
19
- @include mdc-extended-fab-theme.theme(
20
- tokens-mdc-extended-fab.get-unthemable-tokens()
21
- );
16
+ @if inspection.get-theme-version($theme) == 1 {
17
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
18
+ }
19
+ @else {
20
+ // Add default values for tokens not related to color, typography, or density.
21
+ @include sass-utils.current-selector-or-root() {
22
+ @include mdc-fab-theme.theme(tokens-mdc-fab.get-unthemable-tokens());
23
+ @include mdc-extended-fab-theme.theme(
24
+ tokens-mdc-extended-fab.get-unthemable-tokens()
25
+ );
26
+ }
22
27
  }
23
28
  }
24
29
 
@@ -38,51 +43,79 @@
38
43
  }
39
44
 
40
45
  @mixin color($theme) {
41
- @include sass-utils.current-selector-or-root() {
42
- @include _fab-variant($theme, null);
46
+ @if inspection.get-theme-version($theme) == 1 {
47
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
48
+ }
49
+ @else {
50
+ @include sass-utils.current-selector-or-root() {
51
+ @include _fab-variant($theme, null);
43
52
 
44
- .mat-mdc-fab,
45
- .mat-mdc-mini-fab {
46
- &.mat-primary {
47
- @include _fab-variant($theme, primary);
48
- }
53
+ .mat-mdc-fab,
54
+ .mat-mdc-mini-fab {
55
+ &.mat-primary {
56
+ @include _fab-variant($theme, primary);
57
+ }
49
58
 
50
- &.mat-accent {
51
- @include _fab-variant($theme, accent);
52
- }
59
+ &.mat-accent {
60
+ @include _fab-variant($theme, accent);
61
+ }
53
62
 
54
- &.mat-warn {
55
- @include _fab-variant($theme, warn);
63
+ &.mat-warn {
64
+ @include _fab-variant($theme, warn);
65
+ }
56
66
  }
57
67
  }
58
68
  }
59
69
  }
60
70
 
61
71
  @mixin typography($theme) {
62
- @include mdc-helpers.using-mdc-typography($theme) {
63
- @include mdc-fab.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
72
+ @if inspection.get-theme-version($theme) == 1 {
73
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
64
74
  }
75
+ @else {
76
+ @include mdc-helpers.using-mdc-typography($theme) {
77
+ @include mdc-fab.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
78
+ }
65
79
 
66
- $typography-tokens: tokens-mdc-extended-fab.get-typography-tokens($theme);
67
- @include sass-utils.current-selector-or-root() {
68
- @include mdc-extended-fab-theme.theme($typography-tokens);
80
+ $typography-tokens: tokens-mdc-extended-fab.get-typography-tokens($theme);
81
+ @include sass-utils.current-selector-or-root() {
82
+ @include mdc-extended-fab-theme.theme($typography-tokens);
83
+ }
69
84
  }
70
85
  }
71
86
 
72
87
  @mixin density($theme) {
88
+ @if inspection.get-theme-version($theme) == 1 {
89
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
90
+ }
91
+ @else {}
73
92
  }
74
93
 
75
94
  @mixin theme($theme) {
76
95
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-fab') {
77
- @include base($theme);
78
- @if inspection.theme-has($theme, color) {
79
- @include color($theme);
80
- }
81
- @if inspection.theme-has($theme, density) {
82
- @include density($theme);
96
+ @if inspection.get-theme-version($theme) == 1 {
97
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
83
98
  }
84
- @if inspection.theme-has($theme, typography) {
85
- @include typography($theme);
99
+ @else {
100
+ @include base($theme);
101
+ @if inspection.theme-has($theme, color) {
102
+ @include color($theme);
103
+ }
104
+ @if inspection.theme-has($theme, density) {
105
+ @include density($theme);
106
+ }
107
+ @if inspection.theme-has($theme, typography) {
108
+ @include typography($theme);
109
+ }
86
110
  }
87
111
  }
88
112
  }
113
+
114
+ @mixin _theme-from-tokens($tokens) {
115
+ @if ($tokens != ()) {
116
+ @include mdc-extended-fab-theme.theme(map.get($tokens, tokens-mdc-extended-fab.$prefix));
117
+ @include mdc-fab-theme.theme(map.get($tokens, tokens-mdc-fab.$prefix));
118
+ @include token-utils.create-token-values(
119
+ tokens-mat-fab.$prefix, map.get($tokens, tokens-mat-fab.$prefix));
120
+ }
121
+ }