@ng-matero/extensions 16.3.2 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/_index.scss +26 -13
  2. package/alert/_alert-theme.scss +54 -24
  3. package/alert/alert-module.d.ts +3 -3
  4. package/alert/alert.d.ts +4 -7
  5. package/alert/alert.scss +3 -3
  6. package/button/_button-theme.scss +6 -4
  7. package/button/button-loading.d.ts +5 -10
  8. package/button/button-module.d.ts +5 -5
  9. package/checkbox-group/checkbox-group-module.d.ts +6 -6
  10. package/checkbox-group/checkbox-group.d.ts +5 -10
  11. package/colorpicker/_colorpicker-theme.scss +62 -34
  12. package/colorpicker/colorpicker-input.d.ts +2 -4
  13. package/colorpicker/colorpicker-module.d.ts +10 -10
  14. package/colorpicker/colorpicker-toggle.d.ts +4 -5
  15. package/colorpicker/colorpicker.d.ts +8 -9
  16. package/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  17. package/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  18. package/column-resize/column-resize-module.d.ts +1 -1
  19. package/core/color/_all-color.scss +7 -18
  20. package/core/datetime/datetime.module.d.ts +4 -1
  21. package/core/density/_all-density.scss +17 -25
  22. package/core/pipes/is-template-ref.pipe.d.ts +1 -1
  23. package/core/pipes/pipes.module.d.ts +4 -4
  24. package/core/pipes/to-observable.pipe.d.ts +1 -1
  25. package/core/style/_sass-utils.scss +13 -1
  26. package/core/theming/_all-theme.scss +32 -17
  27. package/core/tokens/_token-utils.scss +4 -5
  28. package/core/tokens/m2/mdc/_plain-tooltip.scss +21 -29
  29. package/core/tokens/m2/mtx/_alert.scss +14 -15
  30. package/core/tokens/m2/mtx/_colorpicker.scss +8 -11
  31. package/core/tokens/m2/mtx/_datetimepicker.scss +38 -47
  32. package/core/tokens/m2/mtx/_drawer.scss +9 -10
  33. package/core/tokens/m2/mtx/_grid.scss +23 -22
  34. package/core/tokens/m2/mtx/_loader.scss +6 -6
  35. package/core/tokens/m2/mtx/_popover.scss +10 -11
  36. package/core/tokens/m2/mtx/_progress.scss +18 -17
  37. package/core/tokens/m2/mtx/_select.scss +23 -24
  38. package/core/tokens/m2/mtx/_split.scss +8 -11
  39. package/core/typography/_all-typography.scss +40 -0
  40. package/core/typography/_typography.scss +1 -579
  41. package/datetimepicker/_datetimepicker-theme.scss +75 -48
  42. package/datetimepicker/calendar-body.d.ts +1 -1
  43. package/datetimepicker/calendar.d.ts +8 -15
  44. package/datetimepicker/calendar.scss +16 -4
  45. package/datetimepicker/clock.d.ts +2 -3
  46. package/datetimepicker/datetimepicker-content.scss +3 -3
  47. package/datetimepicker/datetimepicker-input.d.ts +2 -3
  48. package/datetimepicker/datetimepicker-module.d.ts +16 -16
  49. package/datetimepicker/datetimepicker-toggle.d.ts +4 -5
  50. package/datetimepicker/datetimepicker.d.ts +16 -27
  51. package/datetimepicker/month-view.d.ts +2 -2
  52. package/datetimepicker/multi-year-view.d.ts +2 -2
  53. package/datetimepicker/time.d.ts +6 -8
  54. package/datetimepicker/time.scss +2 -2
  55. package/datetimepicker/year-view.d.ts +2 -2
  56. package/dialog/dialog-container.d.ts +1 -1
  57. package/dialog/dialog-module.d.ts +7 -7
  58. package/drawer/_drawer-theme.scss +55 -22
  59. package/drawer/drawer-container.d.ts +1 -1
  60. package/drawer/drawer-container.scss +25 -4
  61. package/drawer/drawer-module.d.ts +5 -5
  62. package/esm2022/alert/alert-module.mjs +6 -7
  63. package/esm2022/alert/alert.mjs +11 -18
  64. package/esm2022/button/button-loading.mjs +13 -23
  65. package/esm2022/button/button-module.mjs +6 -7
  66. package/esm2022/checkbox-group/checkbox-group-module.mjs +6 -7
  67. package/esm2022/checkbox-group/checkbox-group.mjs +19 -31
  68. package/esm2022/colorpicker/colorpicker-input.mjs +14 -14
  69. package/esm2022/colorpicker/colorpicker-module.mjs +20 -19
  70. package/esm2022/colorpicker/colorpicker-toggle.mjs +19 -18
  71. package/esm2022/colorpicker/colorpicker.mjs +46 -44
  72. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +6 -5
  73. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +6 -5
  74. package/esm2022/column-resize/column-resize-module.mjs +6 -6
  75. package/esm2022/column-resize/column-resize-notifier.mjs +7 -7
  76. package/esm2022/column-resize/column-resize.mjs +4 -4
  77. package/esm2022/column-resize/column-size-store.mjs +3 -3
  78. package/esm2022/column-resize/event-dispatcher.mjs +5 -5
  79. package/esm2022/column-resize/overlay-handle.mjs +4 -4
  80. package/esm2022/column-resize/polyfill.mjs +1 -1
  81. package/esm2022/column-resize/resizable.mjs +4 -4
  82. package/esm2022/column-resize/resize-strategy.mjs +14 -14
  83. package/esm2022/core/datetime/datetime-adapter.mjs +1 -1
  84. package/esm2022/core/datetime/datetime.module.mjs +19 -23
  85. package/esm2022/core/datetime/native-datetime-adapter.mjs +6 -6
  86. package/esm2022/core/pipes/is-template-ref.pipe.mjs +5 -5
  87. package/esm2022/core/pipes/pipes.module.mjs +6 -7
  88. package/esm2022/core/pipes/to-observable.pipe.mjs +5 -5
  89. package/esm2022/datetimepicker/calendar-body.mjs +5 -6
  90. package/esm2022/datetimepicker/calendar.mjs +38 -48
  91. package/esm2022/datetimepicker/clock.mjs +11 -11
  92. package/esm2022/datetimepicker/datetimepicker-errors.mjs +4 -3
  93. package/esm2022/datetimepicker/datetimepicker-input.mjs +14 -14
  94. package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
  95. package/esm2022/datetimepicker/datetimepicker-module.mjs +28 -11
  96. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +19 -18
  97. package/esm2022/datetimepicker/datetimepicker.mjs +70 -89
  98. package/esm2022/datetimepicker/month-view.mjs +8 -10
  99. package/esm2022/datetimepicker/multi-year-view.mjs +10 -11
  100. package/esm2022/datetimepicker/time.mjs +19 -24
  101. package/esm2022/datetimepicker/year-view.mjs +10 -11
  102. package/esm2022/dialog/dialog-container.mjs +21 -12
  103. package/esm2022/dialog/dialog-module.mjs +23 -7
  104. package/esm2022/dialog/dialog.mjs +7 -6
  105. package/esm2022/drawer/drawer-container.mjs +7 -8
  106. package/esm2022/drawer/drawer-module.mjs +6 -7
  107. package/esm2022/drawer/drawer-ref.mjs +1 -1
  108. package/esm2022/drawer/drawer.mjs +8 -7
  109. package/esm2022/grid/cell.mjs +36 -14
  110. package/esm2022/grid/column-menu.mjs +31 -15
  111. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +6 -5
  112. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +6 -5
  113. package/esm2022/grid/column-resize/column-resize-module.mjs +14 -14
  114. package/esm2022/grid/column-resize/index.mjs +8 -0
  115. package/esm2022/grid/column-resize/overlay-handle.mjs +7 -6
  116. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +7 -6
  117. package/esm2022/grid/column-resize/resize-strategy.mjs +5 -5
  118. package/esm2022/grid/expansion-toggle.mjs +6 -5
  119. package/esm2022/grid/grid-module.mjs +39 -37
  120. package/esm2022/grid/grid-pipes.mjs +30 -30
  121. package/esm2022/grid/grid-utils.mjs +7 -6
  122. package/esm2022/grid/grid.mjs +175 -111
  123. package/esm2022/loader/loader-module.mjs +6 -7
  124. package/esm2022/loader/loader.mjs +17 -29
  125. package/esm2022/photoviewer/photoviewer-module.mjs +6 -7
  126. package/esm2022/photoviewer/photoviewer.mjs +8 -7
  127. package/esm2022/popover/popover-content.mjs +10 -9
  128. package/esm2022/popover/popover-module.mjs +22 -7
  129. package/esm2022/popover/popover-target.mjs +6 -5
  130. package/esm2022/popover/popover-trigger.mjs +15 -8
  131. package/esm2022/popover/popover.mjs +54 -139
  132. package/esm2022/progress/progress-module.mjs +6 -7
  133. package/esm2022/progress/progress.mjs +15 -26
  134. package/esm2022/select/option.mjs +12 -17
  135. package/esm2022/select/select-module.mjs +20 -9
  136. package/esm2022/select/select.mjs +19 -19
  137. package/esm2022/select/templates.mjs +56 -56
  138. package/esm2022/split/split-module.mjs +6 -7
  139. package/esm2022/split/split-pane.mjs +6 -5
  140. package/esm2022/split/split.mjs +8 -8
  141. package/esm2022/split/utils.mjs +1 -1
  142. package/esm2022/tooltip/tooltip-module.mjs +24 -7
  143. package/esm2022/tooltip/tooltip.mjs +104 -117
  144. package/fesm2022/mtxAlert.mjs +15 -23
  145. package/fesm2022/mtxAlert.mjs.map +1 -1
  146. package/fesm2022/mtxButton.mjs +17 -28
  147. package/fesm2022/mtxButton.mjs.map +1 -1
  148. package/fesm2022/mtxCheckboxGroup.mjs +22 -37
  149. package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
  150. package/fesm2022/mtxColorpicker.mjs +479 -474
  151. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  152. package/fesm2022/mtxColumnResize.mjs +51 -49
  153. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  154. package/fesm2022/mtxCore.mjs +36 -41
  155. package/fesm2022/mtxCore.mjs.map +1 -1
  156. package/fesm2022/mtxDatetimepicker.mjs +898 -905
  157. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  158. package/fesm2022/mtxDialog.mjs +47 -25
  159. package/fesm2022/mtxDialog.mjs.map +1 -1
  160. package/fesm2022/mtxDrawer.mjs +20 -21
  161. package/fesm2022/mtxDrawer.mjs.map +1 -1
  162. package/fesm2022/mtxGrid.mjs +330 -229
  163. package/fesm2022/mtxGrid.mjs.map +1 -1
  164. package/fesm2022/mtxLoader.mjs +21 -36
  165. package/fesm2022/mtxLoader.mjs.map +1 -1
  166. package/fesm2022/mtxPhotoviewer.mjs +12 -12
  167. package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
  168. package/fesm2022/mtxPopover.mjs +103 -165
  169. package/fesm2022/mtxPopover.mjs.map +1 -1
  170. package/fesm2022/mtxProgress.mjs +19 -32
  171. package/fesm2022/mtxProgress.mjs.map +1 -1
  172. package/fesm2022/mtxSelect.mjs +99 -93
  173. package/fesm2022/mtxSelect.mjs.map +1 -1
  174. package/fesm2022/mtxSplit.mjs +17 -18
  175. package/fesm2022/mtxSplit.mjs.map +1 -1
  176. package/fesm2022/mtxTooltip.mjs +128 -125
  177. package/fesm2022/mtxTooltip.mjs.map +1 -1
  178. package/grid/_grid-theme.scss +58 -29
  179. package/grid/cell.d.ts +1 -1
  180. package/grid/column-menu.d.ts +1 -1
  181. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  182. package/grid/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  183. package/grid/column-resize/column-resize-module.d.ts +7 -6
  184. package/grid/column-resize/index.d.ts +7 -0
  185. package/grid/column-resize/overlay-handle.d.ts +1 -1
  186. package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
  187. package/grid/expansion-toggle.d.ts +1 -1
  188. package/grid/grid-module.d.ts +25 -25
  189. package/grid/grid-pipes.d.ts +7 -7
  190. package/grid/grid.d.ts +57 -25
  191. package/grid/grid.scss +8 -1
  192. package/loader/_loader-theme.scss +55 -22
  193. package/loader/loader-module.d.ts +5 -5
  194. package/loader/loader.d.ts +5 -10
  195. package/loader/loader.scss +1 -1
  196. package/package.json +13 -19
  197. package/photoviewer/photoviewer-module.d.ts +1 -1
  198. package/photoviewer/photoviewer.d.ts +2 -1
  199. package/popover/_popover-theme.scss +55 -22
  200. package/popover/popover-content.d.ts +1 -1
  201. package/popover/popover-module.d.ts +8 -8
  202. package/popover/popover-target.d.ts +1 -1
  203. package/popover/popover-trigger.d.ts +1 -1
  204. package/popover/popover.d.ts +24 -55
  205. package/popover/popover.scss +1 -1
  206. package/prebuilt-themes/deeppurple-amber.css +1 -1
  207. package/prebuilt-themes/indigo-pink.css +1 -1
  208. package/prebuilt-themes/pink-bluegrey.css +1 -1
  209. package/prebuilt-themes/purple-green.css +1 -1
  210. package/progress/_progress-theme.scss +60 -22
  211. package/progress/progress-module.d.ts +3 -3
  212. package/progress/progress.d.ts +5 -10
  213. package/progress/progress.scss +3 -3
  214. package/select/_select-theme.scss +66 -34
  215. package/select/option.d.ts +3 -6
  216. package/select/select-module.d.ts +7 -7
  217. package/select/select.d.ts +2 -4
  218. package/select/select.scss +109 -109
  219. package/select/templates.d.ts +11 -11
  220. package/split/_split-theme.scss +62 -32
  221. package/split/split-module.d.ts +4 -4
  222. package/split/split-pane.d.ts +1 -1
  223. package/split/split.d.ts +1 -1
  224. package/split/split.scss +2 -4
  225. package/tooltip/_tooltip-theme.scss +66 -34
  226. package/tooltip/tooltip-module.d.ts +7 -7
  227. package/tooltip/tooltip.d.ts +30 -44
  228. package/tooltip/tooltip.scss +2 -4
  229. package/_theming.scss +0 -16
  230. package/alert/_alert-theme.import.scss +0 -2
  231. package/button/_button-theme.import.scss +0 -2
  232. package/colorpicker/_colorpicker-theme.import.scss +0 -2
  233. package/core/density/_compatibility.scss +0 -74
  234. package/core/mdc-helpers/_mdc-helpers.scss +0 -242
  235. package/core/style/_elevation.scss +0 -91
  236. package/core/style/_private.scss +0 -32
  237. package/core/style/_variables.scss +0 -44
  238. package/core/style/_vendor-prefixes.scss +0 -46
  239. package/core/theming/_palette.scss +0 -746
  240. package/core/theming/_theming.scss +0 -497
  241. package/core/typography/_typography-utils.scss +0 -101
  242. package/datetimepicker/_datetimepicker-theme.import.scss +0 -4
  243. package/drawer/_drawer-theme.import.scss +0 -2
  244. package/grid/_grid-theme.import.scss +0 -2
  245. package/loader/_loader-theme.import.scss +0 -2
  246. package/popover/_popover-theme.import.scss +0 -2
  247. package/progress/_progress-theme.import.scss +0 -2
  248. package/select/_select-density.scss +0 -68
  249. package/select/_select-theme.import.scss +0 -3
  250. package/split/_split-theme.import.scss +0 -2
  251. package/tooltip/_tooltip-theme.import.scss +0 -1
@@ -1,242 +0,0 @@
1
- // TODO(mmalerba): this file should be split into separate cohesive partials for things like
2
- // "theming", "typography", "core".
3
-
4
- @use '../theming/theming';
5
- @use '../typography/typography';
6
- @use '../typography/typography-utils';
7
- @use '@material/feature-targeting' as mdc-feature-targeting;
8
- @use '@material/typography' as mdc-typography;
9
- @use '@material/theme/theme-color' as mdc-theme-color;
10
- @use '@material/theme/css' as mdc-theme-css;
11
- @use 'sass:map';
12
- @use 'sass:meta';
13
-
14
- // A set of standard queries to use with MDC's queryable mixins.
15
- $mdc-base-styles-query: mdc-feature-targeting.without(mdc-feature-targeting.any(color, typography));
16
- $mdc-base-styles-without-animation-query:
17
- mdc-feature-targeting.all($mdc-base-styles-query, mdc-feature-targeting.without(animation));
18
- $mdc-theme-styles-query: color;
19
- $mdc-typography-styles-query: typography;
20
-
21
- // Mappings from Angular Material's typography levels to MDC's typography levels.
22
- $mat-typography-mdc-level-mappings: (
23
- headline-1: headline1,
24
- headline-2: headline2,
25
- headline-3: headline3,
26
- headline-4: headline4,
27
- headline-5: headline5,
28
- headline-6: headline6,
29
- subtitle-1: subtitle1,
30
- subtitle-2: subtitle2,
31
- body-1: body1,
32
- body-2: body2,
33
- caption: caption,
34
- button: button,
35
- overline: overline
36
- );
37
-
38
- // Converts an Angular Material typography level config to an MDC one.
39
- @function typography-level-config-to-mdc($mat-config, $mat-level) {
40
- $mdc-level: map.get($mat-typography-mdc-level-mappings, $mat-level);
41
-
42
- $result-with-nulls: map.merge(
43
- if($mdc-level,
44
- map.get(mdc-typography.$styles, $mdc-level),
45
- (
46
- text-decoration: none,
47
- -moz-osx-font-smoothing: grayscale,
48
- -webkit-font-smoothing: antialiased
49
- )),
50
- if($mat-level,
51
- (
52
- font-size: typography-utils.font-size($mat-config, $mat-level),
53
- line-height: typography-utils.line-height($mat-config, $mat-level),
54
- font-weight: typography-utils.font-weight($mat-config, $mat-level),
55
- letter-spacing: typography-utils.letter-spacing($mat-config, $mat-level),
56
- font-family: typography-utils.font-family($mat-config, $mat-level),
57
- // Angular Material doesn't use text-transform, so disable it.
58
- text-transform: none,
59
- ),
60
- ()));
61
-
62
- // We need to strip out any keys with a null value. Leaving them in will cause MDC to emit CSS
63
- // variables with no fallback value, which breaks some builds.
64
- $result: ();
65
- @each $property, $value in $result-with-nulls {
66
- @if $value != null {
67
- $result: map.merge($result, ($property: $value));
68
- }
69
- }
70
- @return $result;
71
- }
72
-
73
- // Converts an Angular Material typography config to an MDC one.
74
- @function typography-config-to-mdc($mat-config) {
75
- $mdc-config: ();
76
-
77
- @each $mat-level, $mdc-level in $mat-typography-mdc-level-mappings {
78
- $mdc-config: map.merge(
79
- $mdc-config,
80
- ($mdc-level: typography-level-config-to-mdc($mat-config, $mat-level)));
81
- }
82
-
83
- @return $mdc-config;
84
- }
85
-
86
- // Converts an MDC typography level config to an Angular Material one.
87
- @function typography-config-level-from-mdc($mdc-level) {
88
- $mdc-level-config: map.get(mdc-typography.$styles, $mdc-level);
89
-
90
- // Explicitly set the font family to null since we'll apply it globally
91
- // through the `define-typgraphy-config`/`define-legacy-typography-config`.
92
- @return typography.define-typography-level(
93
- $font-family: null,
94
- $font-size: map.get($mdc-level-config, font-size),
95
- $line-height: map.get($mdc-level-config, line-height),
96
- $font-weight: map.get($mdc-level-config, font-weight),
97
- $letter-spacing: map.get($mdc-level-config, letter-spacing)
98
- );
99
- }
100
-
101
- // MDC logs a warning if the `contrast-tone` function is called with a CSS variable.
102
- // This function falls back to determining the tone based on whether the theme is light or dark.
103
- @function _variable-safe-contrast-tone($value, $is-dark) {
104
- @if ($value == 'dark' or $value == 'light' or type-of($value) == 'color') {
105
- @return mdc-theme-color.contrast-tone($value);
106
- }
107
-
108
- @return if($is-dark, 'light', 'dark');
109
- }
110
-
111
- @function _variable-safe-ink-color-for-fill($text-style, $fill-color, $is-dark) {
112
- $contrast-tone: _variable-safe-contrast-tone($fill-color, $is-dark);
113
- @return map.get(map.get(mdc-theme-color.$text-colors, $contrast-tone), $text-style);
114
- }
115
-
116
- // Configures MDC's global variables to reflect the given theme, applies the given styles,
117
- // then resets the global variables to prevent unintended side effects.
118
- @mixin using-mdc-theme($config) {
119
- $primary: theming.get-color-from-palette(map.get($config, primary));
120
- $accent: theming.get-color-from-palette(map.get($config, accent));
121
- $warn: theming.get-color-from-palette(map.get($config, warn));
122
- $background-palette: map.get($config, background);
123
- $is-dark: map.get($config, is-dark);
124
-
125
- // Save the original values.
126
- $orig-primary: mdc-theme-color.$primary;
127
- $orig-on-primary: mdc-theme-color.$on-primary;
128
- $orig-secondary: mdc-theme-color.$secondary;
129
- $orig-on-secondary: mdc-theme-color.$on-secondary;
130
- $orig-background: mdc-theme-color.$background;
131
- $orig-surface: mdc-theme-color.$surface;
132
- $orig-on-surface: mdc-theme-color.$on-surface;
133
- $orig-error: mdc-theme-color.$error;
134
- $orig-on-error: mdc-theme-color.$on-error;
135
- $orig-property-values: mdc-theme-color.$property-values;
136
-
137
- // Set new values based on the given Angular Material theme.
138
- mdc-theme-color.$primary: $primary;
139
- mdc-theme-color.$on-primary:
140
- if(_variable-safe-contrast-tone(mdc-theme-color.$primary, $is-dark) == 'dark', #000, #fff);
141
- mdc-theme-color.$secondary: $accent;
142
- mdc-theme-color.$on-secondary:
143
- if(_variable-safe-contrast-tone(mdc-theme-color.$secondary, $is-dark) == 'dark', #000, #fff);
144
- mdc-theme-color.$background: theming.get-color-from-palette($background-palette, background);
145
- mdc-theme-color.$surface: theming.get-color-from-palette($background-palette, card);
146
- mdc-theme-color.$on-surface:
147
- if(_variable-safe-contrast-tone(mdc-theme-color.$surface, $is-dark) == 'dark', #000, #fff);
148
- mdc-theme-color.$error: $warn;
149
- mdc-theme-color.$on-error:
150
- if(_variable-safe-contrast-tone(mdc-theme-color.$error, $is-dark) == 'dark', #000, #fff);
151
- mdc-theme-color.$property-values: (
152
- // Primary
153
- primary: mdc-theme-color.$primary,
154
- // Secondary
155
- secondary: mdc-theme-color.$secondary,
156
- // Background
157
- background: mdc-theme-color.$background,
158
- // Surface
159
- surface: mdc-theme-color.$surface,
160
- // Error
161
- error: mdc-theme-color.$error,
162
- on-primary: mdc-theme-color.$on-primary,
163
- on-secondary: mdc-theme-color.$on-secondary,
164
- on-surface: mdc-theme-color.$on-surface,
165
- on-error: mdc-theme-color.$on-error,
166
- // Text-primary on "background" background
167
- text-primary-on-background:
168
- _variable-safe-ink-color-for-fill(primary, mdc-theme-color.$background, $is-dark),
169
- text-secondary-on-background:
170
- _variable-safe-ink-color-for-fill(secondary, mdc-theme-color.$background, $is-dark),
171
- text-hint-on-background:
172
- _variable-safe-ink-color-for-fill(hint, mdc-theme-color.$background, $is-dark),
173
- text-disabled-on-background:
174
- _variable-safe-ink-color-for-fill(disabled, mdc-theme-color.$background, $is-dark),
175
- text-icon-on-background:
176
- _variable-safe-ink-color-for-fill(icon, mdc-theme-color.$background, $is-dark),
177
- // Text-primary on "light" background
178
- text-primary-on-light: _variable-safe-ink-color-for-fill(primary, light, $is-dark),
179
- text-secondary-on-light: _variable-safe-ink-color-for-fill(secondary, light, $is-dark),
180
- text-hint-on-light: _variable-safe-ink-color-for-fill(hint, light, $is-dark),
181
- text-disabled-on-light: _variable-safe-ink-color-for-fill(disabled, light, $is-dark),
182
- text-icon-on-light: _variable-safe-ink-color-for-fill(icon, light, $is-dark),
183
- // Text-primary on "dark" background
184
- text-primary-on-dark: _variable-safe-ink-color-for-fill(primary, dark, $is-dark),
185
- text-secondary-on-dark: _variable-safe-ink-color-for-fill(secondary, dark, $is-dark),
186
- text-hint-on-dark: _variable-safe-ink-color-for-fill(hint, dark, $is-dark),
187
- text-disabled-on-dark: _variable-safe-ink-color-for-fill(disabled, dark, $is-dark),
188
- text-icon-on-dark: _variable-safe-ink-color-for-fill(icon, dark, $is-dark)
189
- );
190
-
191
- // Apply given rules.
192
- @include disable-mdc-fallback-declarations {
193
- @content;
194
- }
195
-
196
- // Reset the original values.
197
- mdc-theme-color.$primary: $orig-primary;
198
- mdc-theme-color.$on-primary: $orig-on-primary;
199
- mdc-theme-color.$secondary: $orig-secondary;
200
- mdc-theme-color.$on-secondary: $orig-on-secondary;
201
- mdc-theme-color.$background: $orig-background;
202
- mdc-theme-color.$surface: $orig-surface;
203
- mdc-theme-color.$on-surface: $orig-on-surface;
204
- mdc-theme-color.$error: $orig-error;
205
- mdc-theme-color.$on-error: $orig-on-error;
206
- mdc-theme-color.$property-values: $orig-property-values;
207
- }
208
-
209
- // Configures MDC's global variables to reflect the given typography config,
210
- // applies the given styles, then resets the global variables to prevent unintended side effects.
211
- @mixin using-mdc-typography($config) {
212
- // Save the original values.
213
- $orig-mdc-typography-styles: mdc-typography.$styles;
214
-
215
- // Set new values based on the given Angular Material typography configuration.
216
- @if $config {
217
- mdc-typography.$styles: typography-config-to-mdc($config);
218
- }
219
-
220
- // Apply given rules.
221
- @include disable-mdc-fallback-declarations {
222
- @content;
223
- }
224
-
225
- // Reset the original values.
226
- mdc-typography.$styles: $orig-mdc-typography-styles;
227
- }
228
-
229
- // Disables MDC's CSS custom property fallbacks for the specified mixin content.
230
- @mixin disable-mdc-fallback-declarations {
231
- $previous-value: mdc-theme-css.$enable-fallback-declarations;
232
- mdc-theme-css.$enable-fallback-declarations: false;
233
- @content;
234
- mdc-theme-css.$enable-fallback-declarations: $previous-value;
235
- }
236
-
237
- // Excludes the passed-in CSS content if the layout is too dense to supports touch targets.
238
- @mixin if-touch-targets-unsupported($scale) {
239
- @if ($scale == 'minimum' or (meta.type-of($scale) == 'number' and $scale < -1)) {
240
- @content;
241
- }
242
- }
@@ -1,91 +0,0 @@
1
- @use 'sass:map';
2
- @use 'sass:meta';
3
- @use 'variables';
4
- @use '@material/elevation/elevation-theme' as mdc-elevation;
5
-
6
- // A collection of mixins and CSS classes that can be used to apply elevation to a material
7
- // element.
8
- // See: https://material.io/design/environment/elevation.html
9
- // Examples:
10
- //
11
- //
12
- // .mat-foo {
13
- // @include $mat-elevation(2);
14
- //
15
- // &:active {
16
- // @include $mat-elevation(8);
17
- // }
18
- // }
19
- //
20
- // <div id="external-card" class="mat-elevation-z2"><p>Some content</p></div>
21
- //
22
- // For an explanation of the design behind how elevation is implemented, see the design doc at
23
- // https://goo.gl/Kq0k9Z.
24
-
25
- // The default duration value for elevation transitions.
26
- $transition-duration: 280ms !default;
27
-
28
- // The default easing value for elevation transitions.
29
- $transition-timing-function: variables.$fast-out-slow-in-timing-function;
30
-
31
- // The default color for elevation shadows.
32
- $color: black !default;
33
-
34
- // Prefix for elevation-related selectors.
35
- $prefix: 'mat-elevation-z';
36
-
37
- // Applies the correct css rules to an element to give it the elevation specified by $zValue.
38
- // The $zValue must be between 0 and 24.
39
- @mixin elevation($zValue, $color: $color, $opacity: null) {
40
- @if meta.type-of($color) == color and $opacity == null {
41
- @include mdc-elevation.elevation($zValue, $color);
42
- }
43
- @else {
44
- // Copied from @material/elevation/_elevation-theme.scss#_box-shadow
45
- // TODO(mmalerba): Add support for graceful handling of CSS var color to MDC.
46
- $shadow-color:
47
- if(meta.type-of($color) == color and $opacity != null, rgba($color, $opacity), $color);
48
- $umbra-z-value: map.get(mdc-elevation.$umbra-map, $zValue);
49
- $penumbra-z-value: map.get(mdc-elevation.$penumbra-map, $zValue);
50
- $ambient-z-value: map.get(mdc-elevation.$ambient-map, $zValue);
51
- $box-shadow: (
52
- #{'#{$umbra-z-value} #{$shadow-color}'},
53
- #{'#{$penumbra-z-value} #{$shadow-color}'},
54
- #{$ambient-z-value} $shadow-color
55
- );
56
- @include mdc-elevation.shadow($box-shadow);
57
- }
58
- }
59
-
60
- // Applies the elevation to an element in a manner that allows
61
- // consumers to override it via the Material elevation classes.
62
- @mixin overridable-elevation($zValue, $color: $color) {
63
- &:not([class*='#{$prefix}']) {
64
- @include elevation($zValue, $color);
65
- }
66
- }
67
-
68
- // Returns a string that can be used as the value for a transition property for elevation.
69
- // Calling this function directly is useful in situations where a component needs to transition
70
- // more than one property.
71
- //
72
- // .foo {
73
- // transition: mat-elevation-transition-property-value(), opacity 100ms ease;
74
- // }
75
- @function private-transition-property-value(
76
- $duration: $transition-duration,
77
- $easing: $transition-timing-function) {
78
- @return box-shadow #{$duration} #{$easing};
79
- }
80
-
81
- // Applies the correct css rules needed to have an element transition between elevations.
82
- // This mixin should be applied to elements whose elevation values will change depending on their
83
- // context (e.g. when active or disabled).
84
- //
85
- // NOTE(traviskaufman): Both this mixin and the above function use default parameters so they can
86
- // be used in the same way by clients.
87
- @mixin elevation-transition(
88
- $duration: $transition-duration,
89
- $easing: $transition-timing-function) {
90
- transition: private-transition-property-value($duration, $easing);
91
- }
@@ -1,32 +0,0 @@
1
- @use 'sass:map';
2
- @use './elevation';
3
-
4
- @mixin private-theme-elevation($zValue, $config) {
5
- $foreground: map.get($config, foreground);
6
- $elevation-color: map.get($foreground, elevation);
7
- $elevation-color-or-default: if($elevation-color == null, elevation.$color, $elevation-color);
8
-
9
- @include elevation.elevation($zValue, $elevation-color-or-default);
10
- }
11
-
12
- @mixin private-theme-overridable-elevation($zValue, $config) {
13
- $foreground: map.get($config, foreground);
14
- $elevation-color: map.get($foreground, elevation);
15
- $elevation-color-or-default: if($elevation-color == null, elevation.$color, $elevation-color);
16
-
17
- @include elevation.overridable-elevation($zValue, $elevation-color-or-default);
18
- }
19
-
20
- // If the mat-animation-noop class is present on the components root element,
21
- // prevent non css animations from running.
22
- // NOTE: Currently this mixin should only be used with components that do not
23
- // have any projected content.
24
- @mixin private-animation-noop() {
25
- &._mat-animation-noopable {
26
- // Use !important here since we don't know what context this mixin will
27
- // be included in and MDC can have some really specific selectors.
28
- transition: none !important;
29
- animation: none !important;
30
- @content;
31
- }
32
- }
@@ -1,44 +0,0 @@
1
- // Media queries
2
- // TODO(josephperrott): Change $mat-xsmall and $mat-small usages to rely on BreakpointObserver,
3
- $xsmall: 'max-width: 599px';
4
- $small: 'max-width: 959px';
5
-
6
- // TODO: Revisit all z-indices before beta
7
- // z-index main list
8
-
9
- $z-index-fab: 20 !default;
10
- $z-index-drawer: 100 !default;
11
-
12
- // Global constants
13
- $pi: 3.14159265;
14
-
15
- // Padding between input toggles and their labels
16
- $toggle-padding: 8px !default;
17
- // Width and height of input toggles
18
- $toggle-size: 20px !default;
19
-
20
- // Easing Curves
21
- // TODO(jelbourn): all of these need to be revisited
22
-
23
- // The default animation curves used by material design.
24
- $linear-out-slow-in-timing-function: cubic-bezier(0, 0, .2, .1) !default;
25
- $fast-out-slow-in-timing-function: cubic-bezier(.4, 0, .2, 1) !default;
26
- $fast-out-linear-in-timing-function: cubic-bezier(.4, 0, 1, 1) !default;
27
-
28
- $ease-in-out-curve-function: cubic-bezier(.35, 0, .25, 1) !default;
29
-
30
- $swift-ease-out-duration: 400ms !default;
31
- $swift-ease-out-timing-function: cubic-bezier(.25, .8, .25, 1) !default;
32
- $swift-ease-out: all $swift-ease-out-duration $swift-ease-out-timing-function !default;
33
-
34
- $swift-ease-in-duration: 300ms !default;
35
- $swift-ease-in-timing-function: cubic-bezier(.55, 0, .55, .2) !default;
36
- $swift-ease-in: all $swift-ease-in-duration $swift-ease-in-timing-function !default;
37
-
38
- $swift-ease-in-out-duration: 500ms !default;
39
- $swift-ease-in-out-timing-function: $ease-in-out-curve-function !default;
40
- $swift-ease-in-out: all $swift-ease-in-out-duration $swift-ease-in-out-timing-function !default;
41
-
42
- $swift-linear-duration: 80ms !default;
43
- $swift-linear-timing-function: linear !default;
44
- $swift-linear: all $swift-linear-duration $swift-linear-timing-function !default;
@@ -1,46 +0,0 @@
1
- /* stylelint-disable property-no-vendor-prefix */
2
- /* stylelint-disable selector-no-vendor-prefix */
3
- @mixin user-select($value) {
4
- -webkit-user-select: $value;
5
- user-select: $value;
6
- }
7
-
8
- @mixin input-placeholder {
9
- &::placeholder {
10
- @content;
11
- }
12
-
13
- &::-moz-placeholder {
14
- @content;
15
- }
16
-
17
- &::-webkit-input-placeholder {
18
- @content;
19
- }
20
-
21
- // Note: this isn't necessary anymore since we don't support
22
- // IE, but it caused some presubmit failures in #23416.
23
- &:-ms-input-placeholder {
24
- @content;
25
- }
26
- }
27
-
28
- @mixin backface-visibility($value) {
29
- -webkit-backface-visibility: $value;
30
- backface-visibility: $value;
31
- }
32
-
33
- @mixin color-adjust($value) {
34
- -webkit-print-color-adjust: $value;
35
- print-color-adjust: $value;
36
- }
37
-
38
- @mixin private-background-clip($value) {
39
- -webkit-background-clip: $value;
40
- background-clip: $value;
41
- }
42
-
43
- @mixin clip-path($value) {
44
- -webkit-clip-path: $value;
45
- clip-path: $value;
46
- }