@ng-matero/extensions 20.1.1 → 20.2.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.
- package/_index.scss +0 -1
- package/alert/_alert-theme.scss +18 -27
- package/alert/_m2-alert.scss +34 -51
- package/colorpicker/_colorpicker-theme.scss +23 -30
- package/colorpicker/_m2-colorpicker.scss +12 -35
- package/column-resize/index.d.ts +0 -1
- package/core/index.d.ts +1 -2
- package/core/tokens/_m2-utils.scss +17 -100
- package/core/tokens/_m3-system.scss +11 -9
- package/core/tokens/_token-utils.scss +7 -27
- package/datetimepicker/_datetimepicker-theme.scss +23 -47
- package/datetimepicker/_m2-datetimepicker.scss +81 -131
- package/datetimepicker/_m3-datetimepicker.scss +18 -15
- package/datetimepicker/index.d.ts +10 -28
- package/drawer/_drawer-theme.scss +17 -26
- package/drawer/_m2-drawer.scss +12 -34
- package/fesm2022/mtxButton.mjs +13 -2
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +1 -1
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs.map +1 -1
- package/fesm2022/mtxDatetimepicker.mjs +4 -4
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +17 -26
- package/grid/_m2-grid.scss +37 -56
- package/loader/_loader-theme.scss +17 -26
- package/loader/_m2-loader.scss +9 -32
- package/package.json +18 -18
- package/popover/_m2-popover.scss +15 -37
- package/popover/_popover-theme.scss +16 -24
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress/_m2-progress.scss +29 -44
- package/progress/_progress-theme.scss +17 -26
- package/select/_m2-select.scss +40 -67
- package/select/_m3-select.scss +2 -1
- package/select/_select-theme.scss +22 -29
- package/split/_m2-split.scss +13 -34
- package/split/_split-theme.scss +21 -30
- package/tooltip/_m2-tooltip.scss +18 -43
- package/tooltip/_tooltip-theme.scss +16 -21
- package/tooltip/index.d.ts +2 -2
- package/core/tokens/_m2-tokens.scss +0 -71
package/tooltip/_m2-tooltip.scss
CHANGED
|
@@ -1,50 +1,25 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use 'sass:map';
|
|
2
2
|
@use '../core/tokens/m2-utils';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
// Tokens that are available in MDC, but not used in Angular Material should be mapped to `null`.
|
|
8
|
-
// `null` indicates that we are intentionally choosing not to emit a slot or value for the token in
|
|
9
|
-
// our CSS.
|
|
10
|
-
@function get-unthemable-tokens() {
|
|
11
|
-
@return (
|
|
12
|
-
tooltip-container-shape: 4px,
|
|
13
|
-
tooltip-supporting-text-line-height: 16px,
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
18
|
-
@function get-color-tokens($theme) {
|
|
19
|
-
|
|
20
|
-
@return (
|
|
21
|
-
tooltip-container-color: mat.get-theme-color($theme, background, tooltip),
|
|
22
|
-
tooltip-supporting-text-color: #fff,
|
|
23
|
-
);
|
|
24
|
-
}
|
|
4
|
+
@function get-tokens($theme) {
|
|
5
|
+
$system: m2-utils.get-system($theme);
|
|
25
6
|
|
|
26
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
27
|
-
@function get-typography-tokens($theme) {
|
|
28
7
|
@return (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
8
|
+
base: (
|
|
9
|
+
tooltip-container-shape: 4px,
|
|
10
|
+
tooltip-supporting-text-line-height: 16px,
|
|
11
|
+
),
|
|
12
|
+
color: (
|
|
13
|
+
tooltip-container-color: map.get($system, inverse-surface),
|
|
14
|
+
tooltip-supporting-text-color: map.get($system, inverse-on-surface),
|
|
15
|
+
),
|
|
16
|
+
typography: (
|
|
17
|
+
tooltip-supporting-text-font: map.get($system, body-small-font),
|
|
18
|
+
tooltip-supporting-text-size: map.get($system, body-small-size),
|
|
19
|
+
tooltip-supporting-text-weight: map.get($system, body-small-weight),
|
|
20
|
+
tooltip-supporting-text-tracking: map.get($system, body-small-tracking),
|
|
21
|
+
),
|
|
22
|
+
density: (),
|
|
33
23
|
);
|
|
34
24
|
}
|
|
35
25
|
|
|
36
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
37
|
-
@function get-density-tokens($theme) {
|
|
38
|
-
@return ();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
42
|
-
// This is used to create token slots.
|
|
43
|
-
@function get-token-slots() {
|
|
44
|
-
@return mat.private-deep-merge-all(
|
|
45
|
-
get-unthemable-tokens(),
|
|
46
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
47
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
48
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -5,44 +5,39 @@
|
|
|
5
5
|
@use './m3-tooltip';
|
|
6
6
|
|
|
7
7
|
@mixin base($theme) {
|
|
8
|
+
$tokens: map.get(m2-tooltip.get-tokens($theme), base);
|
|
8
9
|
@if mat.get-theme-version($theme) == 1 {
|
|
9
|
-
|
|
10
|
-
} @else {
|
|
11
|
-
// Add default values for tokens not related to color, typography, or density.
|
|
12
|
-
@include mat.private-current-selector-or-root() {
|
|
13
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-unthemable-tokens());
|
|
14
|
-
}
|
|
10
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), base);
|
|
15
11
|
}
|
|
12
|
+
|
|
13
|
+
@include token-utils.values($tokens);
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
@mixin color($theme) {
|
|
17
|
+
$tokens: map.get(m2-tooltip.get-tokens($theme), color);
|
|
19
18
|
@if mat.get-theme-version($theme) == 1 {
|
|
20
|
-
|
|
21
|
-
} @else {
|
|
22
|
-
@include mat.private-current-selector-or-root() {
|
|
23
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-color-tokens($theme));
|
|
24
|
-
}
|
|
19
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), color);
|
|
25
20
|
}
|
|
21
|
+
|
|
22
|
+
@include token-utils.values($tokens);
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
@mixin typography($theme) {
|
|
26
|
+
$tokens: map.get(m2-tooltip.get-tokens($theme), typography);
|
|
29
27
|
@if mat.get-theme-version($theme) == 1 {
|
|
30
|
-
|
|
31
|
-
} @else {
|
|
32
|
-
@include mat.private-current-selector-or-root() {
|
|
33
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-typography-tokens($theme));
|
|
34
|
-
}
|
|
28
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), typography);
|
|
35
29
|
}
|
|
30
|
+
|
|
31
|
+
@include token-utils.values($tokens);
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
@mixin density($theme) {
|
|
35
|
+
$tokens: map.get(m2-tooltip.get-tokens($theme), density);
|
|
39
36
|
@if mat.get-theme-version($theme) == 1 {
|
|
40
|
-
|
|
41
|
-
} @else {
|
|
42
|
-
@include mat.private-current-selector-or-root() {
|
|
43
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-density-tokens($theme));
|
|
44
|
-
}
|
|
37
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), density);
|
|
45
38
|
}
|
|
39
|
+
|
|
40
|
+
@include token-utils.values($tokens);
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
package/tooltip/index.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ declare class MtxTooltip implements OnDestroy, AfterViewInit {
|
|
|
175
175
|
private readonly _destroyed;
|
|
176
176
|
/** Whether ngOnDestroyed has been called. */
|
|
177
177
|
private _isDestroyed;
|
|
178
|
-
constructor(
|
|
178
|
+
constructor();
|
|
179
179
|
ngAfterViewInit(): void;
|
|
180
180
|
/**
|
|
181
181
|
* Dispose the tooltip when destroyed.
|
|
@@ -278,7 +278,7 @@ declare class TooltipComponent implements OnDestroy {
|
|
|
278
278
|
private readonly _showAnimation;
|
|
279
279
|
/** Name of the hide animation and the class that toggles it. */
|
|
280
280
|
private readonly _hideAnimation;
|
|
281
|
-
constructor(
|
|
281
|
+
constructor();
|
|
282
282
|
/**
|
|
283
283
|
* Shows the tooltip with an animation originating from the provided origin
|
|
284
284
|
* @param delay Amount of milliseconds to the delay showing the tooltip.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'sass:meta';
|
|
3
|
-
@use '@angular/material' as mat;
|
|
4
|
-
@use '../../alert/m2-alert';
|
|
5
|
-
@use '../../colorpicker/m2-colorpicker';
|
|
6
|
-
@use '../../datetimepicker/m2-datetimepicker';
|
|
7
|
-
@use '../../drawer/m2-drawer';
|
|
8
|
-
@use '../../grid/m2-grid';
|
|
9
|
-
@use '../../loader/m2-loader';
|
|
10
|
-
@use '../../popover/m2-popover';
|
|
11
|
-
@use '../../progress/m2-progress';
|
|
12
|
-
@use '../../select/m2-select';
|
|
13
|
-
@use '../../split/m2-split';
|
|
14
|
-
@use '../../tooltip/m2-tooltip';
|
|
15
|
-
|
|
16
|
-
/// Gets the tokens for the given theme, m2 tokens module, and theming system.
|
|
17
|
-
/// @param {Map} $theme The Angular Material theme object to generate token values from.
|
|
18
|
-
/// @param {String} $module The Sass module containing the token getter functions.
|
|
19
|
-
/// @param {String} $system The theming system to get tokens for. Valid values are: unthemable,
|
|
20
|
-
/// color, typography, density.
|
|
21
|
-
/// @return {Map} The token map by calling the token getter for the given system in the given module
|
|
22
|
-
/// with the given Angular Material theme. Token names are not fully-qualified.
|
|
23
|
-
@function _get-tokens-for-module-and-system($theme, $module, $system) {
|
|
24
|
-
@if $system == unthemable {
|
|
25
|
-
@return meta.call(
|
|
26
|
-
meta.get-function(get-#{$system}-tokens, $module: $module));
|
|
27
|
-
}
|
|
28
|
-
@if not mat.theme-has($theme, $system) {
|
|
29
|
-
@return ();
|
|
30
|
-
}
|
|
31
|
-
@return meta.call(
|
|
32
|
-
meta.get-function(get-#{$system}-tokens, $module: $module), $theme);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/// Gets the fully qualified tokens map for the given theme and m2 tokens module.
|
|
36
|
-
/// @param {Map} $theme The Angular Material theme object to generate token values from.
|
|
37
|
-
/// @param {String} $module The Sass module containing the token getter functions.
|
|
38
|
-
/// @return {Map} The token map by calling the token getters in the given module with the given
|
|
39
|
-
/// Angular Material theme. Token names are fully-qualified.
|
|
40
|
-
@function _get-tokens-for-module($theme, $module) {
|
|
41
|
-
$tokens: mat.private-deep-merge-all(
|
|
42
|
-
_get-tokens-for-module-and-system($theme, $module, unthemable),
|
|
43
|
-
_get-tokens-for-module-and-system($theme, $module, color),
|
|
44
|
-
_get-tokens-for-module-and-system($theme, $module, typography),
|
|
45
|
-
_get-tokens-for-module-and-system($theme, $module, density));
|
|
46
|
-
@return map.set((), map.get(meta.module-variables($module), prefix), $tokens);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/// Gets the full set of M2 tokens for the given theme object.
|
|
50
|
-
/// @param {Map} $theme The Angular Material theme object to generate token values from.
|
|
51
|
-
/// @return {Map} The token map for the given Angular Material theme. Returned format:
|
|
52
|
-
/// (
|
|
53
|
-
/// (fully, qualified, namespace): (
|
|
54
|
-
/// token: value
|
|
55
|
-
/// )
|
|
56
|
-
/// )
|
|
57
|
-
@function m2-tokens-from-theme($theme) {
|
|
58
|
-
@return mat.private-deep-merge-all(
|
|
59
|
-
_get-tokens-for-module($theme, m2-alert),
|
|
60
|
-
_get-tokens-for-module($theme, m2-colorpicker),
|
|
61
|
-
_get-tokens-for-module($theme, m2-datetimepicker),
|
|
62
|
-
_get-tokens-for-module($theme, m2-drawer),
|
|
63
|
-
_get-tokens-for-module($theme, m2-grid),
|
|
64
|
-
_get-tokens-for-module($theme, m2-loader),
|
|
65
|
-
_get-tokens-for-module($theme, m2-popover),
|
|
66
|
-
_get-tokens-for-module($theme, m2-progress),
|
|
67
|
-
_get-tokens-for-module($theme, m2-select),
|
|
68
|
-
_get-tokens-for-module($theme, m2-split),
|
|
69
|
-
_get-tokens-for-module($theme, m2-tooltip),
|
|
70
|
-
);
|
|
71
|
-
}
|