@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.
- package/_index.scss +26 -13
- package/alert/_alert-theme.scss +54 -24
- package/alert/alert-module.d.ts +3 -3
- package/alert/alert.d.ts +4 -7
- package/alert/alert.scss +3 -3
- package/button/_button-theme.scss +6 -4
- package/button/button-loading.d.ts +5 -10
- package/button/button-module.d.ts +5 -5
- package/checkbox-group/checkbox-group-module.d.ts +6 -6
- package/checkbox-group/checkbox-group.d.ts +5 -10
- package/colorpicker/_colorpicker-theme.scss +62 -34
- package/colorpicker/colorpicker-input.d.ts +2 -4
- package/colorpicker/colorpicker-module.d.ts +10 -10
- package/colorpicker/colorpicker-toggle.d.ts +4 -5
- package/colorpicker/colorpicker.d.ts +8 -9
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
- package/column-resize/column-resize-directives/column-resize.d.ts +1 -1
- package/column-resize/column-resize-module.d.ts +1 -1
- package/core/color/_all-color.scss +7 -18
- package/core/datetime/datetime.module.d.ts +4 -1
- package/core/density/_all-density.scss +17 -25
- package/core/pipes/is-template-ref.pipe.d.ts +1 -1
- package/core/pipes/pipes.module.d.ts +4 -4
- package/core/pipes/to-observable.pipe.d.ts +1 -1
- package/core/style/_sass-utils.scss +13 -1
- package/core/theming/_all-theme.scss +32 -17
- package/core/tokens/_token-utils.scss +4 -5
- package/core/tokens/m2/mdc/_plain-tooltip.scss +21 -29
- package/core/tokens/m2/mtx/_alert.scss +14 -15
- package/core/tokens/m2/mtx/_colorpicker.scss +8 -11
- package/core/tokens/m2/mtx/_datetimepicker.scss +38 -47
- package/core/tokens/m2/mtx/_drawer.scss +9 -10
- package/core/tokens/m2/mtx/_grid.scss +23 -22
- package/core/tokens/m2/mtx/_loader.scss +6 -6
- package/core/tokens/m2/mtx/_popover.scss +10 -11
- package/core/tokens/m2/mtx/_progress.scss +18 -17
- package/core/tokens/m2/mtx/_select.scss +23 -24
- package/core/tokens/m2/mtx/_split.scss +8 -11
- package/core/typography/_all-typography.scss +40 -0
- package/core/typography/_typography.scss +1 -579
- package/datetimepicker/_datetimepicker-theme.scss +75 -48
- package/datetimepicker/calendar-body.d.ts +1 -1
- package/datetimepicker/calendar.d.ts +8 -15
- package/datetimepicker/calendar.scss +16 -4
- package/datetimepicker/clock.d.ts +2 -3
- package/datetimepicker/datetimepicker-content.scss +3 -3
- package/datetimepicker/datetimepicker-input.d.ts +2 -3
- package/datetimepicker/datetimepicker-module.d.ts +16 -16
- package/datetimepicker/datetimepicker-toggle.d.ts +4 -5
- package/datetimepicker/datetimepicker.d.ts +16 -27
- package/datetimepicker/month-view.d.ts +2 -2
- package/datetimepicker/multi-year-view.d.ts +2 -2
- package/datetimepicker/time.d.ts +6 -8
- package/datetimepicker/time.scss +2 -2
- package/datetimepicker/year-view.d.ts +2 -2
- package/dialog/dialog-container.d.ts +1 -1
- package/dialog/dialog-module.d.ts +7 -7
- package/drawer/_drawer-theme.scss +55 -22
- package/drawer/drawer-container.d.ts +1 -1
- package/drawer/drawer-container.scss +25 -4
- package/drawer/drawer-module.d.ts +5 -5
- package/esm2022/alert/alert-module.mjs +6 -7
- package/esm2022/alert/alert.mjs +11 -18
- package/esm2022/button/button-loading.mjs +13 -23
- package/esm2022/button/button-module.mjs +6 -7
- package/esm2022/checkbox-group/checkbox-group-module.mjs +6 -7
- package/esm2022/checkbox-group/checkbox-group.mjs +19 -31
- package/esm2022/colorpicker/colorpicker-input.mjs +14 -14
- package/esm2022/colorpicker/colorpicker-module.mjs +20 -19
- package/esm2022/colorpicker/colorpicker-toggle.mjs +19 -18
- package/esm2022/colorpicker/colorpicker.mjs +46 -44
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +6 -5
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +6 -5
- package/esm2022/column-resize/column-resize-module.mjs +6 -6
- package/esm2022/column-resize/column-resize-notifier.mjs +7 -7
- package/esm2022/column-resize/column-resize.mjs +4 -4
- package/esm2022/column-resize/column-size-store.mjs +3 -3
- package/esm2022/column-resize/event-dispatcher.mjs +5 -5
- package/esm2022/column-resize/overlay-handle.mjs +4 -4
- package/esm2022/column-resize/polyfill.mjs +1 -1
- package/esm2022/column-resize/resizable.mjs +4 -4
- package/esm2022/column-resize/resize-strategy.mjs +14 -14
- package/esm2022/core/datetime/datetime-adapter.mjs +1 -1
- package/esm2022/core/datetime/datetime.module.mjs +19 -23
- package/esm2022/core/datetime/native-datetime-adapter.mjs +6 -6
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +5 -5
- package/esm2022/core/pipes/pipes.module.mjs +6 -7
- package/esm2022/core/pipes/to-observable.pipe.mjs +5 -5
- package/esm2022/datetimepicker/calendar-body.mjs +5 -6
- package/esm2022/datetimepicker/calendar.mjs +38 -48
- package/esm2022/datetimepicker/clock.mjs +11 -11
- package/esm2022/datetimepicker/datetimepicker-errors.mjs +4 -3
- package/esm2022/datetimepicker/datetimepicker-input.mjs +14 -14
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-module.mjs +28 -11
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +19 -18
- package/esm2022/datetimepicker/datetimepicker.mjs +70 -89
- package/esm2022/datetimepicker/month-view.mjs +8 -10
- package/esm2022/datetimepicker/multi-year-view.mjs +10 -11
- package/esm2022/datetimepicker/time.mjs +19 -24
- package/esm2022/datetimepicker/year-view.mjs +10 -11
- package/esm2022/dialog/dialog-container.mjs +21 -12
- package/esm2022/dialog/dialog-module.mjs +23 -7
- package/esm2022/dialog/dialog.mjs +7 -6
- package/esm2022/drawer/drawer-container.mjs +7 -8
- package/esm2022/drawer/drawer-module.mjs +6 -7
- package/esm2022/drawer/drawer-ref.mjs +1 -1
- package/esm2022/drawer/drawer.mjs +8 -7
- package/esm2022/grid/cell.mjs +36 -14
- package/esm2022/grid/column-menu.mjs +31 -15
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +6 -5
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +6 -5
- package/esm2022/grid/column-resize/column-resize-module.mjs +14 -14
- package/esm2022/grid/column-resize/index.mjs +8 -0
- package/esm2022/grid/column-resize/overlay-handle.mjs +7 -6
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +7 -6
- package/esm2022/grid/column-resize/resize-strategy.mjs +5 -5
- package/esm2022/grid/expansion-toggle.mjs +6 -5
- package/esm2022/grid/grid-module.mjs +39 -37
- package/esm2022/grid/grid-pipes.mjs +30 -30
- package/esm2022/grid/grid-utils.mjs +7 -6
- package/esm2022/grid/grid.mjs +175 -111
- package/esm2022/loader/loader-module.mjs +6 -7
- package/esm2022/loader/loader.mjs +17 -29
- package/esm2022/photoviewer/photoviewer-module.mjs +6 -7
- package/esm2022/photoviewer/photoviewer.mjs +8 -7
- package/esm2022/popover/popover-content.mjs +10 -9
- package/esm2022/popover/popover-module.mjs +22 -7
- package/esm2022/popover/popover-target.mjs +6 -5
- package/esm2022/popover/popover-trigger.mjs +15 -8
- package/esm2022/popover/popover.mjs +54 -139
- package/esm2022/progress/progress-module.mjs +6 -7
- package/esm2022/progress/progress.mjs +15 -26
- package/esm2022/select/option.mjs +12 -17
- package/esm2022/select/select-module.mjs +20 -9
- package/esm2022/select/select.mjs +19 -19
- package/esm2022/select/templates.mjs +56 -56
- package/esm2022/split/split-module.mjs +6 -7
- package/esm2022/split/split-pane.mjs +6 -5
- package/esm2022/split/split.mjs +8 -8
- package/esm2022/split/utils.mjs +1 -1
- package/esm2022/tooltip/tooltip-module.mjs +24 -7
- package/esm2022/tooltip/tooltip.mjs +104 -117
- package/fesm2022/mtxAlert.mjs +15 -23
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +17 -28
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +22 -37
- package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +479 -474
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +51 -49
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs +36 -41
- package/fesm2022/mtxCore.mjs.map +1 -1
- package/fesm2022/mtxDatetimepicker.mjs +898 -905
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +47 -25
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +20 -21
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +330 -229
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +21 -36
- package/fesm2022/mtxLoader.mjs.map +1 -1
- package/fesm2022/mtxPhotoviewer.mjs +12 -12
- package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
- package/fesm2022/mtxPopover.mjs +103 -165
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +19 -32
- package/fesm2022/mtxProgress.mjs.map +1 -1
- package/fesm2022/mtxSelect.mjs +99 -93
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +17 -18
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +128 -125
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +58 -29
- package/grid/cell.d.ts +1 -1
- package/grid/column-menu.d.ts +1 -1
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +1 -1
- package/grid/column-resize/column-resize-module.d.ts +7 -6
- package/grid/column-resize/index.d.ts +7 -0
- package/grid/column-resize/overlay-handle.d.ts +1 -1
- package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
- package/grid/expansion-toggle.d.ts +1 -1
- package/grid/grid-module.d.ts +25 -25
- package/grid/grid-pipes.d.ts +7 -7
- package/grid/grid.d.ts +57 -25
- package/grid/grid.scss +8 -1
- package/loader/_loader-theme.scss +55 -22
- package/loader/loader-module.d.ts +5 -5
- package/loader/loader.d.ts +5 -10
- package/loader/loader.scss +1 -1
- package/package.json +13 -19
- package/photoviewer/photoviewer-module.d.ts +1 -1
- package/photoviewer/photoviewer.d.ts +2 -1
- package/popover/_popover-theme.scss +55 -22
- package/popover/popover-content.d.ts +1 -1
- package/popover/popover-module.d.ts +8 -8
- package/popover/popover-target.d.ts +1 -1
- package/popover/popover-trigger.d.ts +1 -1
- package/popover/popover.d.ts +24 -55
- package/popover/popover.scss +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress/_progress-theme.scss +60 -22
- package/progress/progress-module.d.ts +3 -3
- package/progress/progress.d.ts +5 -10
- package/progress/progress.scss +3 -3
- package/select/_select-theme.scss +66 -34
- package/select/option.d.ts +3 -6
- package/select/select-module.d.ts +7 -7
- package/select/select.d.ts +2 -4
- package/select/select.scss +109 -109
- package/select/templates.d.ts +11 -11
- package/split/_split-theme.scss +62 -32
- package/split/split-module.d.ts +4 -4
- package/split/split-pane.d.ts +1 -1
- package/split/split.d.ts +1 -1
- package/split/split.scss +2 -4
- package/tooltip/_tooltip-theme.scss +66 -34
- package/tooltip/tooltip-module.d.ts +7 -7
- package/tooltip/tooltip.d.ts +30 -44
- package/tooltip/tooltip.scss +2 -4
- package/_theming.scss +0 -16
- package/alert/_alert-theme.import.scss +0 -2
- package/button/_button-theme.import.scss +0 -2
- package/colorpicker/_colorpicker-theme.import.scss +0 -2
- package/core/density/_compatibility.scss +0 -74
- package/core/mdc-helpers/_mdc-helpers.scss +0 -242
- package/core/style/_elevation.scss +0 -91
- package/core/style/_private.scss +0 -32
- package/core/style/_variables.scss +0 -44
- package/core/style/_vendor-prefixes.scss +0 -46
- package/core/theming/_palette.scss +0 -746
- package/core/theming/_theming.scss +0 -497
- package/core/typography/_typography-utils.scss +0 -101
- package/datetimepicker/_datetimepicker-theme.import.scss +0 -4
- package/drawer/_drawer-theme.import.scss +0 -2
- package/grid/_grid-theme.import.scss +0 -2
- package/loader/_loader-theme.import.scss +0 -2
- package/popover/_popover-theme.import.scss +0 -2
- package/progress/_progress-theme.import.scss +0 -2
- package/select/_select-density.scss +0 -68
- package/select/_select-theme.import.scss +0 -3
- package/split/_split-theme.import.scss +0 -2
- package/tooltip/_tooltip-theme.import.scss +0 -1
package/split/_split-theme.scss
CHANGED
|
@@ -1,51 +1,81 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
@use '../core/tokens/token-utils';
|
|
4
4
|
@use '../core/tokens/m2/mtx/split' as tokens-mtx-split;
|
|
5
5
|
|
|
6
|
-
@mixin
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@include sass-utils.current-selector-or-root() {
|
|
10
|
-
@include token-utils.create-token-values(tokens-mtx-split.$prefix,
|
|
11
|
-
tokens-mtx-split.get-color-tokens($config));
|
|
6
|
+
@mixin base($theme) {
|
|
7
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
8
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, base));
|
|
12
9
|
}
|
|
10
|
+
@else {
|
|
11
|
+
@include sass-utils.current-selector-or-root() {
|
|
12
|
+
@include token-utils.create-token-values(tokens-mtx-split.$prefix,
|
|
13
|
+
tokens-mtx-split.get-unthemable-tokens());
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
@mixin color($theme) {
|
|
19
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
20
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, color));
|
|
21
|
+
}
|
|
22
|
+
@else {
|
|
23
|
+
@include sass-utils.current-selector-or-root() {
|
|
24
|
+
@include token-utils.create-token-values(tokens-mtx-split.$prefix,
|
|
25
|
+
tokens-mtx-split.get-color-tokens($theme));
|
|
18
26
|
}
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
.mtx-split>.mtx-split-gutter {
|
|
29
|
+
&.mat-accent:hover {
|
|
30
|
+
$accent-tokens: tokens-mtx-split.private-get-color-palette-color-tokens($theme, accent);
|
|
31
|
+
@include token-utils.create-token-values(tokens-mtx-split.$prefix, $accent-tokens);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.mat-warn:hover {
|
|
35
|
+
$warn-tokens: tokens-mtx-split.private-get-color-palette-color-tokens($theme, warn);
|
|
36
|
+
@include token-utils.create-token-values(tokens-mtx-split.$prefix, $warn-tokens);
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
}
|
|
25
40
|
}
|
|
26
41
|
|
|
27
|
-
@mixin typography($
|
|
28
|
-
|
|
29
|
-
@
|
|
30
|
-
|
|
31
|
-
@
|
|
32
|
-
|
|
42
|
+
@mixin typography($theme) {
|
|
43
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
44
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, typography));
|
|
45
|
+
}
|
|
46
|
+
@else {}
|
|
47
|
+
}
|
|
33
48
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
@mixin density($theme) {
|
|
50
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
51
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, density));
|
|
52
|
+
}
|
|
53
|
+
@else {}
|
|
54
|
+
}
|
|
38
55
|
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
@mixin theme($theme) {
|
|
57
|
+
@include mat.private-check-duplicate-theme-styles($theme, 'mtx-split') {
|
|
58
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
59
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme));
|
|
41
60
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@
|
|
61
|
+
@else {
|
|
62
|
+
@include base($theme);
|
|
63
|
+
@if mat.theme-has($theme, color) {
|
|
64
|
+
@include color($theme);
|
|
65
|
+
}
|
|
66
|
+
@if mat.theme-has($theme, density) {
|
|
67
|
+
@include density($theme);
|
|
68
|
+
}
|
|
69
|
+
@if mat.theme-has($theme, typography) {
|
|
70
|
+
@include typography($theme);
|
|
71
|
+
}
|
|
45
72
|
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
46
75
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
76
|
+
@mixin _theme-from-tokens($tokens) {
|
|
77
|
+
@if ($tokens != ()) {
|
|
78
|
+
@include token-utils.create-token-values(tokens-mtx-split.$prefix,
|
|
79
|
+
map.get($tokens, tokens-mtx-split.$prefix));
|
|
50
80
|
}
|
|
51
81
|
}
|
package/split/split-module.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
3
|
-
import * as i2 from "./split
|
|
4
|
-
import * as i3 from "
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "./split";
|
|
4
|
+
import * as i3 from "./split-pane";
|
|
5
5
|
export declare class MtxSplitModule {
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxSplitModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxSplitModule, [typeof i1.
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxSplitModule, never, [typeof i1.CommonModule, typeof i2.MtxSplit, typeof i3.MtxSplitPane], [typeof i2.MtxSplit, typeof i3.MtxSplitPane]>;
|
|
8
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<MtxSplitModule>;
|
|
9
9
|
}
|
package/split/split-pane.d.ts
CHANGED
|
@@ -34,5 +34,5 @@ export declare class MtxSplitPane implements OnInit, OnDestroy {
|
|
|
34
34
|
unlockEvents(): void;
|
|
35
35
|
ngOnDestroy(): void;
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxSplitPane, never>;
|
|
37
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxSplitPane, "mtx-split-pane, [mtx-split-pane]", ["mtxSplitPane"], { "order": { "alias": "order"; "required": false; }; "size": { "alias": "size"; "required": false; }; "minSize": { "alias": "minSize"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "lockSize": { "alias": "lockSize"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, {}, never, never,
|
|
37
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxSplitPane, "mtx-split-pane, [mtx-split-pane]", ["mtxSplitPane"], { "order": { "alias": "order"; "required": false; }; "size": { "alias": "size"; "required": false; }; "minSize": { "alias": "minSize"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "lockSize": { "alias": "lockSize"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
38
|
}
|
package/split/split.d.ts
CHANGED
|
@@ -110,6 +110,6 @@ export declare class MtxSplit extends _MtxSplitBase implements AfterViewInit, On
|
|
|
110
110
|
notify(type: 'start' | 'progress' | 'end' | 'click' | 'dblclick' | 'transitionEnd', gutterNum: number): void;
|
|
111
111
|
ngOnDestroy(): void;
|
|
112
112
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxSplit, [null, null, null, null, { optional: true; }]>;
|
|
113
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MtxSplit, "mtx-split", ["mtxSplit"], { "color": { "alias": "color"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "gutterSize": { "alias": "gutterSize"; "required": false; }; "gutterStep": { "alias": "gutterStep"; "required": false; }; "restrictMove": { "alias": "restrictMove"; "required": false; }; "useTransition": { "alias": "useTransition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "gutterDblClickDuration": { "alias": "gutterDblClickDuration"; "required": false; }; }, { "dragStart": "dragStart"; "dragEnd": "dragEnd"; "gutterClick": "gutterClick"; "gutterDblClick": "gutterDblClick"; "transitionEnd": "transitionEnd"; }, never, ["*"],
|
|
113
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxSplit, "mtx-split", ["mtxSplit"], { "color": { "alias": "color"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "gutterSize": { "alias": "gutterSize"; "required": false; }; "gutterStep": { "alias": "gutterStep"; "required": false; }; "restrictMove": { "alias": "restrictMove"; "required": false; }; "useTransition": { "alias": "useTransition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "gutterDblClickDuration": { "alias": "gutterDblClickDuration"; "required": false; }; }, { "dragStart": "dragStart"; "dragEnd": "dragEnd"; "gutterClick": "gutterClick"; "gutterDblClick": "gutterDblClick"; "transitionEnd": "transitionEnd"; }, never, ["*"], true, never>;
|
|
114
114
|
}
|
|
115
115
|
export {};
|
package/split/split.scss
CHANGED
|
@@ -41,15 +41,13 @@ $_tokens: tokens-mtx-split.$prefix, tokens-mtx-split.get-token-slots();
|
|
|
41
41
|
> .mtx-split-pane {
|
|
42
42
|
flex-grow: 0;
|
|
43
43
|
flex-shrink: 0;
|
|
44
|
-
overflow
|
|
45
|
-
overflow-y: auto;
|
|
44
|
+
overflow: hidden auto;
|
|
46
45
|
|
|
47
46
|
/* When <mtx-split-pane [visible]="false"> force size to 0. */
|
|
48
47
|
|
|
49
48
|
&.mtx-split-pane-hidden {
|
|
50
49
|
flex: 0 1 0 !important;
|
|
51
|
-
overflow
|
|
52
|
-
overflow-y: hidden;
|
|
50
|
+
overflow: hidden hidden;
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
|
|
@@ -1,53 +1,85 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '@material/tooltip/plain-tooltip-theme' as mdc-plain-tooltip-theme;
|
|
2
|
-
@use '
|
|
3
|
-
@use '../core/
|
|
4
|
-
@use '../core/tokens/m2/mdc/plain-tooltip' as
|
|
3
|
+
@use '@angular/material' as mat;
|
|
4
|
+
@use '../core/style/sass-utils';
|
|
5
|
+
@use '../core/tokens/m2/mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
|
|
5
6
|
|
|
6
|
-
@mixin
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@include
|
|
7
|
+
@mixin base($theme) {
|
|
8
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
9
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, base));
|
|
10
|
+
}
|
|
11
|
+
@else {
|
|
12
|
+
// Add default values for tokens not related to color, typography, or density.
|
|
13
|
+
@include sass-utils.current-selector-or-root() {
|
|
14
|
+
@include mdc-plain-tooltip-theme.theme(tokens-mdc-plain-tooltip.get-unthemable-tokens());
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
@mixin
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
@mixin color($theme) {
|
|
20
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
21
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, color));
|
|
22
|
+
}
|
|
23
|
+
@else {
|
|
24
|
+
$mdc-tooltip-color-tokens: tokens-mdc-plain-tooltip.get-color-tokens($theme);
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
// Add values for MDC tooltip tokens.
|
|
27
|
+
@include sass-utils.current-selector-or-root() {
|
|
28
|
+
@include mdc-plain-tooltip-theme.theme($mdc-tooltip-color-tokens);
|
|
29
|
+
}
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
@mixin
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
@mixin typography($theme) {
|
|
34
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
35
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, typography));
|
|
36
|
+
}
|
|
37
|
+
@else {
|
|
38
|
+
$mdc-tooltip-typography-tokens: tokens-mdc-plain-tooltip.get-typography-tokens($theme);
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
// Add values for MDC tooltip tokens.
|
|
41
|
+
@include sass-utils.current-selector-or-root() {
|
|
42
|
+
@include mdc-plain-tooltip-theme.theme($mdc-tooltip-typography-tokens);
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
|
|
36
|
-
@mixin
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
$
|
|
47
|
+
@mixin density($theme) {
|
|
48
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
49
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme, density));
|
|
50
|
+
}
|
|
51
|
+
@else {
|
|
52
|
+
$mdc-tooltip-density-tokens: tokens-mdc-plain-tooltip.get-density-tokens($theme);
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
// Add values for MDC tooltip tokens.
|
|
55
|
+
@include sass-utils.current-selector-or-root() {
|
|
56
|
+
@include mdc-plain-tooltip-theme.theme($mdc-tooltip-density-tokens);
|
|
45
57
|
}
|
|
46
|
-
|
|
47
|
-
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin theme($theme) {
|
|
62
|
+
@include mat.private-check-duplicate-theme-styles($theme, 'mtx-tooltip') {
|
|
63
|
+
@if mat.get-theme-version($theme) == 1 {
|
|
64
|
+
@include _theme-from-tokens(mat.get-theme-tokens($theme));
|
|
48
65
|
}
|
|
49
|
-
@
|
|
50
|
-
@include
|
|
66
|
+
@else {
|
|
67
|
+
@include base($theme);
|
|
68
|
+
@if mat.theme-has($theme, color) {
|
|
69
|
+
@include color($theme);
|
|
70
|
+
}
|
|
71
|
+
@if mat.theme-has($theme, density) {
|
|
72
|
+
@include density($theme);
|
|
73
|
+
}
|
|
74
|
+
@if mat.theme-has($theme, typography) {
|
|
75
|
+
@include typography($theme);
|
|
76
|
+
}
|
|
51
77
|
}
|
|
52
78
|
}
|
|
53
79
|
}
|
|
80
|
+
|
|
81
|
+
@mixin _theme-from-tokens($tokens) {
|
|
82
|
+
@if $tokens != () {
|
|
83
|
+
@include mdc-plain-tooltip-theme.theme(map.get($tokens, tokens-mdc-plain-tooltip.$prefix));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
3
|
-
import * as i2 from "@angular/
|
|
4
|
-
import * as i3 from "@angular/
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "@
|
|
7
|
-
import * as i6 from "
|
|
2
|
+
import * as i1 from "@angular/cdk/a11y";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/cdk/overlay";
|
|
5
|
+
import * as i4 from "@angular/material/core";
|
|
6
|
+
import * as i5 from "@ng-matero/extensions/core";
|
|
7
|
+
import * as i6 from "./tooltip";
|
|
8
8
|
import * as i7 from "@angular/cdk/scrolling";
|
|
9
9
|
export declare class MtxTooltipModule {
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTooltipModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxTooltipModule,
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxTooltipModule, never, [typeof i1.A11yModule, typeof i2.CommonModule, typeof i3.OverlayModule, typeof i4.MatCommonModule, typeof i5.MtxPipesModule, typeof i6.MtxTooltip, typeof i6.TooltipComponent], [typeof i6.MtxTooltip, typeof i6.TooltipComponent, typeof i4.MatCommonModule, typeof i7.CdkScrollableModule]>;
|
|
12
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<MtxTooltipModule>;
|
|
13
13
|
}
|
package/tooltip/tooltip.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';
|
|
2
2
|
import { Directionality } from '@angular/cdk/bidi';
|
|
3
3
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
4
|
-
import {
|
|
4
|
+
import { ConnectedPosition, OriginConnectionPosition, Overlay, OverlayConnectionPosition, OverlayRef, ScrollDispatcher, ScrollStrategy } from '@angular/cdk/overlay';
|
|
5
5
|
import { Platform } from '@angular/cdk/platform';
|
|
6
6
|
import { AfterViewInit, ChangeDetectorRef, ElementRef, InjectionToken, NgZone, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
@@ -62,7 +62,13 @@ export interface MtxTooltipDefaultOptions {
|
|
|
62
62
|
* @breaking-change 13.0.0 remove this variable
|
|
63
63
|
*/
|
|
64
64
|
export declare const TOOLTIP_PANEL_CLASS = "mtx-mdc-tooltip-panel";
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Directive that attaches a material design tooltip to the host element. Animates the showing and
|
|
67
|
+
* hiding of a tooltip provided position (defaults to below the element).
|
|
68
|
+
*
|
|
69
|
+
* https://material.io/design/components/tooltips.html
|
|
70
|
+
*/
|
|
71
|
+
export declare class MtxTooltip implements OnDestroy, AfterViewInit {
|
|
66
72
|
private _overlay;
|
|
67
73
|
private _elementRef;
|
|
68
74
|
private _scrollDispatcher;
|
|
@@ -74,7 +80,7 @@ export declare abstract class _MtxTooltipBase<T extends _TooltipComponentBase> i
|
|
|
74
80
|
protected _dir: Directionality;
|
|
75
81
|
private _defaultOptions;
|
|
76
82
|
_overlayRef: OverlayRef | null;
|
|
77
|
-
_tooltipInstance:
|
|
83
|
+
_tooltipInstance: TooltipComponent | null;
|
|
78
84
|
private _portal;
|
|
79
85
|
private _position;
|
|
80
86
|
private _positionAtOrigin;
|
|
@@ -83,13 +89,17 @@ export declare abstract class _MtxTooltipBase<T extends _TooltipComponentBase> i
|
|
|
83
89
|
private _scrollStrategy;
|
|
84
90
|
private _viewInitialized;
|
|
85
91
|
private _pointerExitEventsInitialized;
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
private readonly _tooltipComponent;
|
|
93
|
+
private _viewportMargin;
|
|
88
94
|
private _currentPosition;
|
|
89
|
-
|
|
95
|
+
private readonly _cssClassPrefix;
|
|
90
96
|
/** Allows the user to define the position of the tooltip relative to the parent element */
|
|
91
97
|
get position(): TooltipPosition;
|
|
92
98
|
set position(value: TooltipPosition);
|
|
99
|
+
/**
|
|
100
|
+
* Whether tooltip should be relative to the click or touch origin
|
|
101
|
+
* instead of outside the element bounding box.
|
|
102
|
+
*/
|
|
93
103
|
get positionAtOrigin(): boolean;
|
|
94
104
|
set positionAtOrigin(value: BooleanInput);
|
|
95
105
|
/** Disables the display of the tooltip. */
|
|
@@ -201,25 +211,17 @@ export declare abstract class _MtxTooltipBase<T extends _TooltipComponentBase> i
|
|
|
201
211
|
private _wheelListener;
|
|
202
212
|
/** Disables the native browser gestures, based on how the tooltip has been configured. */
|
|
203
213
|
private _disableNativeGesturesIfNecessary;
|
|
204
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
205
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
214
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTooltip, [null, null, null, null, null, null, null, null, null, null, { optional: true; }, null]>;
|
|
215
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxTooltip, "[mtxTooltip]", ["mtxTooltip"], { "position": { "alias": "mtxTooltipPosition"; "required": false; }; "positionAtOrigin": { "alias": "mtxTooltipPositionAtOrigin"; "required": false; }; "disabled": { "alias": "mtxTooltipDisabled"; "required": false; }; "showDelay": { "alias": "mtxTooltipShowDelay"; "required": false; }; "hideDelay": { "alias": "mtxTooltipHideDelay"; "required": false; }; "touchGestures": { "alias": "mtxTooltipTouchGestures"; "required": false; }; "message": { "alias": "mtxTooltip"; "required": false; }; "tooltipContext": { "alias": "mtxTooltipContext"; "required": false; }; "tooltipClass": { "alias": "mtxTooltipClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
206
216
|
}
|
|
207
217
|
/**
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* https://material.io/design/components/tooltips.html
|
|
218
|
+
* Internal component that wraps the tooltip's content.
|
|
219
|
+
* @docs-private
|
|
212
220
|
*/
|
|
213
|
-
export declare class
|
|
214
|
-
protected readonly _tooltipComponent: typeof TooltipComponent;
|
|
215
|
-
protected readonly _cssClassPrefix = "mtx-mdc";
|
|
216
|
-
constructor(overlay: Overlay, elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, viewContainerRef: ViewContainerRef, ngZone: NgZone, platform: Platform, ariaDescriber: AriaDescriber, focusMonitor: FocusMonitor, scrollStrategy: any, dir: Directionality, defaultOptions: MtxTooltipDefaultOptions, _document: any);
|
|
217
|
-
protected _addOffset(position: ConnectedPosition): ConnectedPosition;
|
|
218
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MtxTooltip, [null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
|
|
219
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MtxTooltip, "[mtxTooltip]", ["mtxTooltip"], {}, {}, never, never, false, never>;
|
|
220
|
-
}
|
|
221
|
-
export declare abstract class _TooltipComponentBase implements OnDestroy {
|
|
221
|
+
export declare class TooltipComponent implements OnDestroy {
|
|
222
222
|
private _changeDetectorRef;
|
|
223
|
+
protected _elementRef: ElementRef<HTMLElement>;
|
|
224
|
+
_isMultiline: boolean;
|
|
223
225
|
/** Message to display in the tooltip */
|
|
224
226
|
message: string | TemplateRef<any>;
|
|
225
227
|
/** Context to be added to the tooltip */
|
|
@@ -239,7 +241,7 @@ export declare abstract class _TooltipComponentBase implements OnDestroy {
|
|
|
239
241
|
/** Whether animations are currently disabled. */
|
|
240
242
|
private _animationsDisabled;
|
|
241
243
|
/** Reference to the internal tooltip element. */
|
|
242
|
-
|
|
244
|
+
_tooltip: ElementRef<HTMLElement>;
|
|
243
245
|
/** Whether interactions on the page should close the tooltip */
|
|
244
246
|
private _closeOnInteraction;
|
|
245
247
|
/** Whether the tooltip is currently visible. */
|
|
@@ -247,10 +249,10 @@ export declare abstract class _TooltipComponentBase implements OnDestroy {
|
|
|
247
249
|
/** Subject for notifying that the tooltip has been hidden from the view */
|
|
248
250
|
private readonly _onHide;
|
|
249
251
|
/** Name of the show animation and the class that toggles it. */
|
|
250
|
-
|
|
252
|
+
private readonly _showAnimation;
|
|
251
253
|
/** Name of the hide animation and the class that toggles it. */
|
|
252
|
-
|
|
253
|
-
constructor(_changeDetectorRef: ChangeDetectorRef, animationMode?: string);
|
|
254
|
+
private readonly _hideAnimation;
|
|
255
|
+
constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, animationMode?: string);
|
|
254
256
|
/**
|
|
255
257
|
* Shows the tooltip with an animation originating from the provided origin
|
|
256
258
|
* @param delay Amount of milliseconds to the delay showing the tooltip.
|
|
@@ -285,6 +287,8 @@ export declare abstract class _TooltipComponentBase implements OnDestroy {
|
|
|
285
287
|
* in the mdc-tooltip, not here.
|
|
286
288
|
*/
|
|
287
289
|
protected _onShow(): void;
|
|
290
|
+
/** Whether the tooltip text has overflown to the next line */
|
|
291
|
+
private _isTooltipMultiline;
|
|
288
292
|
/** Event listener dispatched when an animation on the tooltip finishes. */
|
|
289
293
|
_handleAnimationEnd({ animationName }: AnimationEvent): void;
|
|
290
294
|
/** Cancels any pending animation sequences. */
|
|
@@ -293,24 +297,6 @@ export declare abstract class _TooltipComponentBase implements OnDestroy {
|
|
|
293
297
|
private _finalizeAnimation;
|
|
294
298
|
/** Toggles the visibility of the tooltip element. */
|
|
295
299
|
private _toggleVisibility;
|
|
296
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<_TooltipComponentBase, [null, { optional: true; }]>;
|
|
297
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<_TooltipComponentBase, never, never, {}, {}, never, never, false, never>;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Internal component that wraps the tooltip's content.
|
|
301
|
-
* @docs-private
|
|
302
|
-
*/
|
|
303
|
-
export declare class TooltipComponent extends _TooltipComponentBase {
|
|
304
|
-
private _elementRef;
|
|
305
|
-
_isMultiline: boolean;
|
|
306
|
-
/** Reference to the internal tooltip element. */
|
|
307
|
-
_tooltip: ElementRef<HTMLElement>;
|
|
308
|
-
_showAnimation: string;
|
|
309
|
-
_hideAnimation: string;
|
|
310
|
-
constructor(changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, animationMode?: string);
|
|
311
|
-
protected _onShow(): void;
|
|
312
|
-
/** Whether the tooltip text has overflown to the next line */
|
|
313
|
-
private _isTooltipMultiline;
|
|
314
300
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, [null, null, { optional: true; }]>;
|
|
315
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "mtx-tooltip-component", never, {}, {}, never, never,
|
|
301
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "mtx-tooltip-component", never, {}, {}, never, never, true, never>;
|
|
316
302
|
}
|
package/tooltip/tooltip.scss
CHANGED
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
.mtx-mdc-tooltip {
|
|
13
13
|
// Add the official slots for the MDC tooltip.
|
|
14
14
|
@include mdc-plain-tooltip-theme.theme-styles($mdc-tooltip-token-slots);
|
|
15
|
-
|
|
16
|
-
// Add default values for MDC tooltip tokens that aren't outputted by the theming API.
|
|
17
|
-
@include mdc-plain-tooltip-theme.theme(m2-mdc-plain-tooltip.get-unthemable-tokens());
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
17
|
|
|
@@ -65,7 +62,8 @@
|
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
// We need the additional specificity here, because it can be overridden by `.cdk-overlay-panel`.
|
|
66
|
+
.mtx-mdc-tooltip-panel.mtx-mdc-tooltip-panel-non-interactive {
|
|
69
67
|
pointer-events: none;
|
|
70
68
|
}
|
|
71
69
|
|
package/_theming.scss
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@forward './alert/alert-theme.import';
|
|
2
|
-
@forward './button/button-theme.import';
|
|
3
|
-
@forward './colorpicker/colorpicker-theme.import';
|
|
4
|
-
@forward './datetimepicker/datetimepicker-theme.import';
|
|
5
|
-
@forward './drawer/drawer-theme.import';
|
|
6
|
-
@forward './grid/grid-theme.import';
|
|
7
|
-
@forward './loader/loader-theme.import';
|
|
8
|
-
@forward './popover/popover-theme.import';
|
|
9
|
-
@forward './progress/progress-theme.import';
|
|
10
|
-
@forward './select/select-theme.import';
|
|
11
|
-
@forward './split/split-theme.import';
|
|
12
|
-
@forward './tooltip/tooltip-theme.import';
|
|
13
|
-
|
|
14
|
-
@forward './core/theming/all-theme' show material-extensions-theme;
|
|
15
|
-
@forward './core/color/all-color' show material-extensions-color;
|
|
16
|
-
@forward './core/density/all-density' show material-extensions-density;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
@use 'sass:list';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use 'sass:meta';
|
|
4
|
-
// Note that this file is called `private`, because the APIs in it aren't public yet.
|
|
5
|
-
// Once they're made available, the code should be moved out into an `index.scss`.
|
|
6
|
-
|
|
7
|
-
// Taken from mat-density with small modifications to not rely on the new Sass module
|
|
8
|
-
// system, and to support arbitrary properties in a density configuration.
|
|
9
|
-
// https://github.com/material-components/material-components-web/blob/master/packages/mdc-density
|
|
10
|
-
|
|
11
|
-
$_density-interval: 4px !default;
|
|
12
|
-
$_minimum-scale: minimum !default;
|
|
13
|
-
$_maximum-scale: maximum !default;
|
|
14
|
-
$_supported-scales: (default, $_minimum-scale, $_maximum-scale) !default;
|
|
15
|
-
$_default-scale: 0 !default;
|
|
16
|
-
|
|
17
|
-
// Whether density should be generated at root. This will be temporarily set to `true`
|
|
18
|
-
// whenever density styles for legacy themes are generated.
|
|
19
|
-
$private-density-generate-at-root: false;
|
|
20
|
-
// Whether density styles should be generated. This will be temporarily set to `false` if
|
|
21
|
-
// duplicate density styles for a legacy theme would be generated. For legacy themes,
|
|
22
|
-
// we always generate the default density **only once** at root.
|
|
23
|
-
$private-density-generate-styles: true;
|
|
24
|
-
|
|
25
|
-
// Mixin that can be used to wrap density styles of given components. The mixin will
|
|
26
|
-
// move the density styles to root if the `$mat-private-density-generate-at-root` global variable
|
|
27
|
-
// is set. If `$mat-private-density-generate-styles` is set to `false`, generation of density
|
|
28
|
-
// styles wrapped in this mixin is skipped. This mixin exists to improve backwards compatibility
|
|
29
|
-
// of the new theming API where density styles are included as part of themes. Previously,
|
|
30
|
-
// density styles of components were part of their base styles. With the new API, they are
|
|
31
|
-
// part of the theming system. The `<..>-theme` mixins generate density by default unless
|
|
32
|
-
// the density configuration is explicitly specified as per new API. This means, that projects
|
|
33
|
-
// using `<..>-theme` mixins for separate themes (like `.dark-theme`) will cause duplicate
|
|
34
|
-
// density styles. This is breaking as it increases specificity of density styles. This mixin
|
|
35
|
-
// provides an API to control generation of density styles so that we can ensure they are only
|
|
36
|
-
// created *once* and at root.
|
|
37
|
-
@mixin private-density-legacy-compatibility() {
|
|
38
|
-
@if $private-density-generate-styles and $private-density-generate-at-root {
|
|
39
|
-
@at-root {
|
|
40
|
-
@content;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
@else if $private-density-generate-styles {
|
|
44
|
-
@content;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@function private-density-prop-value($density-config, $density-scale, $property-name) {
|
|
49
|
-
@if (meta.type-of($density-scale) == 'string' and
|
|
50
|
-
list.index($list: $_supported-scales, $value: $density-scale) == null) {
|
|
51
|
-
@error 'mat-density: Supported density scales #{$_supported-scales}, ' +
|
|
52
|
-
'but received #{$density-scale}.';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
$value: null;
|
|
56
|
-
$property-scale-map: map.get($density-config, $property-name);
|
|
57
|
-
|
|
58
|
-
@if map.has-key($property-scale-map, $density-scale) {
|
|
59
|
-
$value: map.get($property-scale-map, $density-scale);
|
|
60
|
-
}
|
|
61
|
-
@else {
|
|
62
|
-
$value: map.get($property-scale-map, default) + $density-scale * $_density-interval;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
$min-value: map.get($property-scale-map, $_minimum-scale);
|
|
66
|
-
$max-value: map.get($property-scale-map, $_maximum-scale);
|
|
67
|
-
|
|
68
|
-
@if ($value < $min-value or $value > $max-value) {
|
|
69
|
-
@error 'mat-density: #{$property-name} must be between #{$min-value} and ' +
|
|
70
|
-
'#{$max-value} (inclusive), but received #{$value}.';
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@return $value;
|
|
74
|
-
}
|