@ng-matero/extensions 19.4.1 → 20.0.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 +1 -1
- package/alert/_alert-theme.scss +26 -31
- package/alert/_m2-alert.scss +59 -0
- package/alert/_m3-alert.scss +41 -0
- package/alert/alert.scss +27 -31
- package/alert/index.d.ts +30 -5
- package/button/index.d.ts +31 -5
- package/checkbox-group/index.d.ts +117 -5
- package/colorpicker/_colorpicker-theme.scss +31 -36
- package/{core/tokens/m2/mtx/_colorpicker.scss → colorpicker/_m2-colorpicker.scss} +6 -10
- package/colorpicker/_m3-colorpicker.scss +23 -0
- package/colorpicker/colorpicker-toggle.scss +4 -9
- package/colorpicker/index.d.ts +285 -3
- package/column-resize/index.d.ts +456 -3
- package/core/index.d.ts +147 -5
- package/core/theming/_color-api-backwards-compatibility.scss +8 -15
- package/core/theming/_definition.scss +81 -75
- package/core/theming/_palettes.scss +1036 -0
- package/core/tokens/{m2/_index.scss → _m2-tokens.scss} +22 -22
- package/core/tokens/_m2-utils.scss +108 -0
- package/core/tokens/_m3-system.scss +128 -106
- package/core/tokens/_m3-tokens.scss +36 -282
- package/core/tokens/_m3-utils.scss +48 -0
- package/core/tokens/_token-utils.scss +67 -239
- package/core/tokens/m3/_index.scss +7 -0
- package/core/tokens/m3/_md-sys-color.scss +156 -0
- package/core/tokens/m3/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/_md-sys-motion.scss +35 -0
- package/core/tokens/m3/_md-sys-shape.scss +21 -0
- package/core/tokens/m3/_md-sys-state.scss +13 -0
- package/core/tokens/m3/_md-sys-typescale.scss +128 -0
- package/core/tokens/m3/_theme.scss +47 -0
- package/datetimepicker/_datetimepicker-theme.scss +29 -39
- package/datetimepicker/_m2-datetimepicker.scss +149 -0
- package/datetimepicker/_m3-datetimepicker.scss +81 -0
- package/datetimepicker/calendar-body.scss +31 -56
- package/datetimepicker/calendar.scss +43 -79
- package/datetimepicker/clock.scss +28 -47
- package/datetimepicker/datetimepicker-content.scss +9 -15
- package/datetimepicker/datetimepicker-toggle.scss +4 -9
- package/datetimepicker/index.d.ts +1208 -3
- package/datetimepicker/time-view.scss +26 -32
- package/dialog/index.d.ts +54 -5
- package/drawer/_drawer-theme.scss +25 -30
- package/{core/tokens/m2/mtx/_drawer.scss → drawer/_m2-drawer.scss} +9 -12
- package/drawer/_m3-drawer.scss +24 -0
- package/drawer/drawer-container.scss +13 -24
- package/drawer/index.d.ts +221 -3
- package/fesm2022/mtxAlert.mjs +7 -7
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +11 -11
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +7 -7
- package/fesm2022/mtxColorpicker.mjs +21 -21
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +232 -103
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +63 -67
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +10 -10
- package/fesm2022/mtxGrid.mjs +78 -77
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +24 -25
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +54 -54
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +10 -10
- package/fesm2022/mtxTooltip.mjs +13 -13
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +24 -34
- package/grid/_m2-grid.scss +66 -0
- package/grid/_m3-grid.scss +35 -0
- package/grid/column-menu.scss +6 -23
- package/grid/column-resize/_column-resize.scss +35 -30
- package/grid/grid.scss +41 -74
- package/grid/index.d.ts +799 -3
- package/index.d.ts +2 -5
- package/loader/_loader-theme.scss +26 -31
- package/{core/tokens/m2/mtx/_loader.scss → loader/_m2-loader.scss} +5 -10
- package/loader/_m3-loader.scss +20 -0
- package/loader/index.d.ts +43 -5
- package/loader/loader.scss +4 -5
- package/package.json +28 -28
- package/photoviewer/index.d.ts +26 -5
- package/{core/tokens/m2/mtx/_popover.scss → popover/_m2-popover.scss} +9 -12
- package/popover/_m3-popover.scss +26 -0
- package/popover/_popover-theme.scss +26 -31
- package/popover/index.d.ts +399 -3
- package/popover/popover.scss +23 -29
- 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 +53 -0
- package/progress/_m3-progress.scss +33 -0
- package/progress/_progress-theme.scss +22 -34
- package/progress/index.d.ts +35 -5
- package/progress/progress.scss +28 -43
- package/select/_m2-select.scss +79 -0
- package/select/_m3-select.scss +46 -0
- package/select/_select-theme.scss +27 -37
- package/select/index.d.ts +381 -3
- package/select/select.scss +189 -205
- package/{core/tokens/m2/mtx/_split.scss → split/_m2-split.scss} +6 -9
- package/split/_m3-split.scss +23 -0
- package/split/_split-theme.scss +31 -34
- package/split/index.d.ts +255 -3
- package/split/split.scss +8 -11
- package/tooltip/_m2-tooltip.scss +50 -0
- package/tooltip/_m3-tooltip.scss +28 -0
- package/tooltip/_tooltip-theme.scss +23 -47
- package/tooltip/index.d.ts +345 -3
- package/tooltip/tooltip.scss +11 -15
- package/alert/alert-module.d.ts +0 -8
- package/alert/alert.d.ts +0 -19
- package/alert/public-api.d.ts +0 -2
- package/button/button-loading.d.ts +0 -19
- package/button/button-module.d.ts +0 -10
- package/button/public-api.d.ts +0 -2
- package/checkbox-group/checkbox-group-module.d.ts +0 -11
- package/checkbox-group/checkbox-group.d.ts +0 -86
- package/checkbox-group/interfaces.d.ts +0 -17
- package/checkbox-group/public-api.d.ts +0 -3
- package/colorpicker/colorpicker-animations.d.ts +0 -9
- package/colorpicker/colorpicker-input.d.ts +0 -88
- package/colorpicker/colorpicker-module.d.ts +0 -15
- package/colorpicker/colorpicker-toggle.d.ts +0 -39
- package/colorpicker/colorpicker.d.ts +0 -140
- package/colorpicker/public-api.d.ts +0 -5
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -29
- package/column-resize/column-resize-directives/column-resize.d.ts +0 -29
- package/column-resize/column-resize-directives/constants.d.ts +0 -10
- package/column-resize/column-resize-module.d.ts +0 -12
- package/column-resize/column-resize-notifier.d.ts +0 -48
- package/column-resize/column-resize.d.ts +0 -39
- package/column-resize/column-size-store.d.ts +0 -12
- package/column-resize/event-dispatcher.d.ts +0 -35
- package/column-resize/overlay-handle.d.ts +0 -43
- package/column-resize/polyfill.d.ts +0 -9
- package/column-resize/public-api.d.ts +0 -12
- package/column-resize/resizable.d.ts +0 -63
- package/column-resize/resize-ref.d.ts +0 -17
- package/column-resize/resize-strategy.d.ts +0 -84
- package/column-resize/selectors.d.ts +0 -10
- package/core/datetime/datetime-adapter.d.ts +0 -45
- package/core/datetime/datetime-formats.d.ts +0 -22
- package/core/datetime/datetime.module.d.ts +0 -15
- package/core/datetime/index.d.ts +0 -5
- package/core/datetime/native-datetime-adapter.d.ts +0 -40
- package/core/datetime/native-datetime-formats.d.ts +0 -2
- package/core/pipes/index.d.ts +0 -3
- package/core/pipes/is-template-ref.pipe.d.ts +0 -7
- package/core/pipes/pipes.module.d.ts +0 -9
- package/core/pipes/to-observable.pipe.d.ts +0 -8
- package/core/public-api.d.ts +0 -2
- package/core/theming/_inspection.scss +0 -38
- package/core/theming/_validation.scss +0 -5
- package/core/tokens/_density.scss +0 -49
- package/core/tokens/_format-tokens.scss +0 -5
- package/core/tokens/_token-definition.scss +0 -271
- package/core/tokens/m2/mdc/_plain-tooltip.scss +0 -63
- package/core/tokens/m2/mtx/_alert.scss +0 -62
- package/core/tokens/m2/mtx/_datetimepicker.scss +0 -152
- package/core/tokens/m2/mtx/_grid.scss +0 -69
- package/core/tokens/m2/mtx/_progress.scss +0 -56
- package/core/tokens/m2/mtx/_select.scss +0 -82
- package/core/tokens/m3/definitions/_index.scss +0 -9
- package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +0 -51
- package/core/tokens/m3/definitions/_md-ref-palette.scss +0 -100
- package/core/tokens/m3/definitions/_md-ref-typeface.scss +0 -14
- package/core/tokens/m3/definitions/_md-sys-color.scss +0 -126
- package/core/tokens/m3/definitions/_md-sys-elevation.scss +0 -15
- package/core/tokens/m3/definitions/_md-sys-motion.scss +0 -46
- package/core/tokens/m3/definitions/_md-sys-shape.scss +0 -24
- package/core/tokens/m3/definitions/_md-sys-state.scss +0 -13
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +0 -308
- package/core/tokens/m3/index.scss +0 -47
- package/core/tokens/m3/mdc/_plain-tooltip.scss +0 -15
- package/core/tokens/m3/mtx/_alert.scss +0 -41
- package/core/tokens/m3/mtx/_colorpicker.scss +0 -19
- package/core/tokens/m3/mtx/_datetimepicker.scss +0 -140
- package/core/tokens/m3/mtx/_drawer.scss +0 -22
- package/core/tokens/m3/mtx/_grid.scss +0 -32
- package/core/tokens/m3/mtx/_loader.scss +0 -22
- package/core/tokens/m3/mtx/_popover.scss +0 -25
- package/core/tokens/m3/mtx/_progress.scss +0 -32
- package/core/tokens/m3/mtx/_select.scss +0 -76
- package/core/tokens/m3/mtx/_split.scss +0 -30
- package/datetimepicker/calendar-body.d.ts +0 -66
- package/datetimepicker/calendar.d.ts +0 -157
- package/datetimepicker/clock.d.ts +0 -101
- package/datetimepicker/datetimepicker-actions.d.ts +0 -36
- package/datetimepicker/datetimepicker-animations.d.ts +0 -11
- package/datetimepicker/datetimepicker-errors.d.ts +0 -2
- package/datetimepicker/datetimepicker-filtertype.d.ts +0 -5
- package/datetimepicker/datetimepicker-input.d.ts +0 -105
- package/datetimepicker/datetimepicker-intl.d.ts +0 -53
- package/datetimepicker/datetimepicker-module.d.ts +0 -22
- package/datetimepicker/datetimepicker-toggle.d.ts +0 -42
- package/datetimepicker/datetimepicker-types.d.ts +0 -6
- package/datetimepicker/datetimepicker.d.ts +0 -274
- package/datetimepicker/month-view.d.ts +0 -80
- package/datetimepicker/multi-year-view.d.ts +0 -86
- package/datetimepicker/public-api.d.ts +0 -16
- package/datetimepicker/time-view.d.ts +0 -147
- package/datetimepicker/year-view.d.ts +0 -68
- package/dialog/dialog-config.d.ts +0 -17
- package/dialog/dialog-container.d.ts +0 -11
- package/dialog/dialog-module.d.ts +0 -12
- package/dialog/dialog.d.ts +0 -15
- package/dialog/public-api.d.ts +0 -4
- package/drawer/drawer-animations.d.ts +0 -8
- package/drawer/drawer-config.d.ts +0 -63
- package/drawer/drawer-container.d.ts +0 -35
- package/drawer/drawer-module.d.ts +0 -10
- package/drawer/drawer-ref.d.ts +0 -53
- package/drawer/drawer.d.ts +0 -59
- package/drawer/public-api.d.ts +0 -6
- package/grid/cell.d.ts +0 -32
- package/grid/column-menu.d.ts +0 -39
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -24
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -24
- package/grid/column-resize/column-resize-directives/common.d.ts +0 -13
- package/grid/column-resize/column-resize-module.d.ts +0 -17
- package/grid/column-resize/index.d.ts +0 -7
- package/grid/column-resize/overlay-handle.d.ts +0 -32
- package/grid/column-resize/resizable-directives/common.d.ts +0 -19
- package/grid/column-resize/resizable-directives/resizable.d.ts +0 -32
- package/grid/column-resize/resize-strategy.d.ts +0 -20
- package/grid/expansion-toggle.d.ts +0 -17
- package/grid/grid-module.d.ts +0 -31
- package/grid/grid-pipes.d.ts +0 -39
- package/grid/grid-utils.d.ts +0 -33
- package/grid/grid.d.ts +0 -268
- package/grid/interfaces.d.ts +0 -180
- package/grid/public-api.d.ts +0 -17
- package/grid/selectable-cell.d.ts +0 -16
- package/loader/loader-module.d.ts +0 -10
- package/loader/loader.d.ts +0 -30
- package/loader/public-api.d.ts +0 -2
- package/photoviewer/photoviewer-module.d.ts +0 -7
- package/photoviewer/photoviewer.d.ts +0 -17
- package/photoviewer/public-api.d.ts +0 -2
- package/popover/popover-animations.d.ts +0 -11
- package/popover/popover-content.d.ts +0 -43
- package/popover/popover-errors.d.ts +0 -14
- package/popover/popover-interfaces.d.ts +0 -50
- package/popover/popover-module.d.ts +0 -13
- package/popover/popover-target.d.ts +0 -7
- package/popover/popover-trigger.d.ts +0 -132
- package/popover/popover-types.d.ts +0 -10
- package/popover/popover.d.ts +0 -147
- package/popover/public-api.d.ts +0 -8
- package/progress/progress-module.d.ts +0 -8
- package/progress/progress.d.ts +0 -24
- package/progress/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -2
- package/select/option.d.ts +0 -21
- package/select/public-api.d.ts +0 -5
- package/select/select-intl.d.ts +0 -18
- package/select/select-module.d.ts +0 -12
- package/select/select.d.ts +0 -270
- package/select/templates.d.ts +0 -67
- package/split/interfaces.d.ts +0 -52
- package/split/public-api.d.ts +0 -5
- package/split/split-module.d.ts +0 -9
- package/split/split-pane.d.ts +0 -53
- package/split/split.d.ts +0 -133
- package/split/utils.d.ts +0 -13
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip-animations.d.ts +0 -9
- package/tooltip/tooltip-module.d.ts +0 -13
- package/tooltip/tooltip.d.ts +0 -321
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@use '../core/tokens/token-utils';
|
|
2
|
-
@use '
|
|
2
|
+
@use './m3-datetimepicker';
|
|
3
|
+
|
|
4
|
+
$fallbacks: m3-datetimepicker.get-tokens();
|
|
3
5
|
|
|
4
6
|
$time-font-size: 36px;
|
|
5
7
|
$time-input-width: 72px;
|
|
@@ -7,8 +9,6 @@ $time-input-height: 56px;
|
|
|
7
9
|
$time-seperator-width: 24px;
|
|
8
10
|
$time-ampm-width: 40px;
|
|
9
11
|
|
|
10
|
-
$_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token-slots();
|
|
11
|
-
|
|
12
12
|
.mtx-time-view {
|
|
13
13
|
display: block;
|
|
14
14
|
outline: none;
|
|
@@ -35,29 +35,26 @@ $_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token
|
|
|
35
35
|
border: 2px solid transparent;
|
|
36
36
|
appearance: none;
|
|
37
37
|
outline: none;
|
|
38
|
+
border-radius: token-utils.slot(datetimepicker-selector-container-shape, $fallbacks);
|
|
39
|
+
background-color: token-utils.slot(datetimepicker-time-input-background-color, $fallbacks);
|
|
40
|
+
color: token-utils.slot(datetimepicker-time-input-text-color, $fallbacks);
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
@include token-utils.create-token-slot(color, time-input-text-color);
|
|
42
|
+
&.mtx-time-input-active {
|
|
43
|
+
background-color: token-utils.slot(datetimepicker-time-input-active-state-background-color, $fallbacks);
|
|
44
|
+
color: token-utils.slot(datetimepicker-time-input-active-state-text-color, $fallbacks);
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
&:focus {
|
|
47
|
+
border-color: token-utils.slot(datetimepicker-time-input-focus-state-outline-color, $fallbacks);
|
|
48
|
+
background-color: token-utils.slot(datetimepicker-time-input-focus-state-background-color, $fallbacks);
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@include token-utils.create-token-slot(background-color, time-input-focus-state-background-color);
|
|
51
|
-
|
|
52
|
-
&::placeholder {
|
|
53
|
-
@include token-utils.create-token-slot(color, time-input-focus-state-placeholder-text-color);
|
|
54
|
-
}
|
|
50
|
+
&::placeholder {
|
|
51
|
+
color: token-utils.slot(datetimepicker-time-input-focus-state-placeholder-text-color, $fallbacks);
|
|
55
52
|
}
|
|
56
53
|
}
|
|
54
|
+
}
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
56
|
+
&.mtx-time-input-warning {
|
|
57
|
+
border-color: token-utils.slot(datetimepicker-time-input-warn-state-outline-color, $fallbacks);
|
|
61
58
|
}
|
|
62
59
|
}
|
|
63
60
|
|
|
@@ -82,25 +79,22 @@ $_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token
|
|
|
82
79
|
|
|
83
80
|
.mtx-time-am,
|
|
84
81
|
.mtx-time-pm {
|
|
85
|
-
--
|
|
82
|
+
--mat-button-text-label-text-weight: 400;
|
|
83
|
+
--mat-button-text-label-text-color: #{token-utils.slot(datetimepicker-time-ampm-text-color, $fallbacks)};
|
|
84
|
+
--mat-button-text-container-shape: #{token-utils.slot(datetimepicker-selector-container-shape, $fallbacks)};
|
|
86
85
|
|
|
87
86
|
flex: 1;
|
|
88
87
|
width: $time-ampm-width;
|
|
89
88
|
min-width: auto;
|
|
90
89
|
border-width: 1px;
|
|
91
90
|
border-style: solid;
|
|
91
|
+
border-color: token-utils.slot(datetimepicker-time-ampm-outline-color, $fallbacks);
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
@include token-utils.create-token-slot(border-color, time-ampm-outline-color);
|
|
97
|
-
|
|
98
|
-
&.mtx-time-ampm-active {
|
|
99
|
-
--mdc-text-button-label-text-weight: 500;
|
|
93
|
+
&.mtx-time-ampm-active {
|
|
94
|
+
--mat-button-text-label-text-weight: 500;
|
|
95
|
+
--mat-button-text-label-text-color: #{token-utils.slot(datetimepicker-time-ampm-selected-state-text-color, $fallbacks)};
|
|
100
96
|
|
|
101
|
-
|
|
102
|
-
@include token-utils.create-token-slot(background-color, time-ampm-selected-state-background-color);
|
|
103
|
-
}
|
|
97
|
+
background-color: token-utils.slot(datetimepicker-time-ampm-selected-state-background-color, $fallbacks);
|
|
104
98
|
}
|
|
105
99
|
|
|
106
100
|
.mat-mdc-button-touch-target {
|
|
@@ -125,7 +119,7 @@ $_tokens: tokens-mtx-datetimepicker.$prefix, tokens-mtx-datetimepicker.get-token
|
|
|
125
119
|
justify-content: flex-end;
|
|
126
120
|
padding-top: 8px;
|
|
127
121
|
|
|
128
|
-
.mat-mdc-button-base
|
|
122
|
+
.mat-mdc-button-base + .mat-mdc-button-base {
|
|
129
123
|
margin-left: 8px;
|
|
130
124
|
|
|
131
125
|
[dir='rtl'] & {
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import * as _angular_material_dialog from '@angular/material/dialog';
|
|
5
|
+
import { MatDialogConfig, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
6
|
+
import * as i3 from '@angular/material/button';
|
|
7
|
+
import * as i4 from '@angular/material/icon';
|
|
8
|
+
import * as i5 from '@ng-matero/extensions/core';
|
|
9
|
+
import { ThemePalette } from '@angular/material/core';
|
|
10
|
+
import { Observable } from 'rxjs';
|
|
11
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
12
|
+
|
|
13
|
+
interface MtxDialogData extends MatDialogConfig {
|
|
14
|
+
title?: string | Observable<string>;
|
|
15
|
+
description?: string | Observable<string>;
|
|
16
|
+
buttons?: MtxDialogBtns[];
|
|
17
|
+
showCloseIcon?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface MtxDialogBtns {
|
|
20
|
+
type?: 'raised' | 'stroked' | 'flat';
|
|
21
|
+
color?: ThemePalette;
|
|
22
|
+
class?: string;
|
|
23
|
+
focusInitial?: boolean;
|
|
24
|
+
text: string | Observable<string>;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class MtxDialogContainer {
|
|
29
|
+
dialogRef: MatDialogRef<MtxDialogContainer, any>;
|
|
30
|
+
data: MtxDialogData;
|
|
31
|
+
_onClick(fn: () => void): void;
|
|
32
|
+
_onClose(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDialogContainer, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxDialogContainer, "mtx-dialog-container", ["mtxDialogContainer"], {}, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class MtxDialogModule {
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDialogModule, never>;
|
|
39
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDialogModule, never, [typeof i1.CommonModule, typeof _angular_material_dialog.MatDialogModule, typeof i3.MatButtonModule, typeof i4.MatIconModule, typeof i5.MtxPipesModule, typeof MtxDialogContainer], [typeof MtxDialogContainer]>;
|
|
40
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MtxDialogModule>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class MtxDialog {
|
|
44
|
+
dialog: MatDialog;
|
|
45
|
+
originalOpen(componentOrTemplateRef: (ComponentType<any> | TemplateRef<any>) | undefined, config: any): _angular_material_dialog.MatDialogRef<any, any>;
|
|
46
|
+
open(config: MtxDialogData, componentOrTemplateRef?: ComponentType<any> | TemplateRef<any>): _angular_material_dialog.MatDialogRef<any, any>;
|
|
47
|
+
alert(title: string | Observable<string>, description?: string | Observable<string>, onOk?: () => void): void;
|
|
48
|
+
confirm(title: string | Observable<string>, description?: string | Observable<string>, onOk?: () => void, onClose?: () => void): void;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDialog, never>;
|
|
50
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MtxDialog>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { MtxDialog, MtxDialogContainer, MtxDialogModule };
|
|
54
|
+
export type { MtxDialogBtns, MtxDialogData };
|
|
@@ -1,58 +1,59 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
|
-
@use '../core/theming/inspection';
|
|
4
|
-
@use '../core/theming/validation';
|
|
5
3
|
@use '../core/tokens/token-utils';
|
|
6
|
-
@use '
|
|
4
|
+
@use './m2-drawer';
|
|
5
|
+
@use './m3-drawer';
|
|
7
6
|
|
|
8
7
|
@mixin base($theme) {
|
|
9
8
|
@if mat.get-theme-version($theme) == 1 {
|
|
10
|
-
@include
|
|
9
|
+
@include token-utils.create-token-values(map.get(m3-drawer.get-tokens($theme), base));
|
|
11
10
|
}
|
|
12
11
|
@else {
|
|
13
12
|
@include mat.private-current-selector-or-root() {
|
|
14
|
-
@include token-utils.create-token-values(
|
|
15
|
-
tokens-mtx-drawer.$prefix,
|
|
16
|
-
tokens-mtx-drawer.get-unthemable-tokens()
|
|
17
|
-
);
|
|
13
|
+
@include token-utils.create-token-values-mixed(m2-drawer.get-unthemable-tokens());
|
|
18
14
|
}
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
@mixin color($theme) {
|
|
23
19
|
@if mat.get-theme-version($theme) == 1 {
|
|
24
|
-
@include
|
|
20
|
+
@include token-utils.create-token-values(map.get(m3-drawer.get-tokens($theme), color));
|
|
25
21
|
}
|
|
26
22
|
@else {
|
|
27
23
|
@include mat.private-current-selector-or-root() {
|
|
28
|
-
@include token-utils.create-token-values(
|
|
29
|
-
tokens-mtx-drawer.$prefix,
|
|
30
|
-
tokens-mtx-drawer.get-color-tokens($theme)
|
|
31
|
-
);
|
|
24
|
+
@include token-utils.create-token-values-mixed(m2-drawer.get-color-tokens($theme));
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
@mixin typography($theme) {
|
|
37
30
|
@if mat.get-theme-version($theme) == 1 {
|
|
38
|
-
@include
|
|
31
|
+
@include token-utils.create-token-values(map.get(m3-drawer.get-tokens($theme), typography));
|
|
32
|
+
}
|
|
33
|
+
@else {
|
|
34
|
+
@include mat.private-current-selector-or-root() {
|
|
35
|
+
@include token-utils.create-token-values-mixed(m2-drawer.get-typography-tokens($theme));
|
|
36
|
+
}
|
|
39
37
|
}
|
|
40
|
-
@else {}
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
@mixin density($theme) {
|
|
44
41
|
@if mat.get-theme-version($theme) == 1 {
|
|
45
|
-
@include
|
|
42
|
+
@include token-utils.create-token-values(map.get(m3-drawer.get-tokens($theme), density));
|
|
43
|
+
}
|
|
44
|
+
@else {
|
|
45
|
+
@include mat.private-current-selector-or-root() {
|
|
46
|
+
@include token-utils.create-token-values-mixed(m2-drawer.get-density-tokens($theme));
|
|
47
|
+
}
|
|
46
48
|
}
|
|
47
|
-
@else {}
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
51
52
|
@function _define-overrides() {
|
|
52
53
|
@return (
|
|
53
54
|
(
|
|
54
|
-
namespace:
|
|
55
|
-
tokens:
|
|
55
|
+
namespace: drawer,
|
|
56
|
+
tokens: token-utils.get-overrides(m3-drawer.get-tokens(), drawer),
|
|
56
57
|
),
|
|
57
58
|
);
|
|
58
59
|
}
|
|
@@ -61,10 +62,13 @@
|
|
|
61
62
|
@include token-utils.batch-create-token-values($tokens, _define-overrides()...);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
@mixin theme($theme) {
|
|
65
|
+
@mixin theme($theme, $color-variant: null) {
|
|
65
66
|
@include mat.private-check-duplicate-theme-styles($theme, 'mtx-drawer') {
|
|
66
67
|
@if mat.get-theme-version($theme) == 1 {
|
|
67
|
-
@include
|
|
68
|
+
@include base($theme);
|
|
69
|
+
@include color($theme);
|
|
70
|
+
@include density($theme);
|
|
71
|
+
@include typography($theme);
|
|
68
72
|
}
|
|
69
73
|
@else {
|
|
70
74
|
@include base($theme);
|
|
@@ -80,12 +84,3 @@
|
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
|
-
|
|
84
|
-
@mixin _theme-from-tokens($tokens) {
|
|
85
|
-
@include validation.selector-defined(
|
|
86
|
-
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
87
|
-
@if ($tokens != ()) {
|
|
88
|
-
@include token-utils.create-token-values(tokens-mtx-drawer.$prefix,
|
|
89
|
-
map.get($tokens, tokens-mtx-drawer.$prefix));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
|
-
@use '
|
|
4
|
-
@use '
|
|
5
|
-
|
|
6
|
-
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
-
$prefix: (mtx, drawer);
|
|
3
|
+
@use '../core/tokens/m2-utils';
|
|
4
|
+
@use '../core/style/elevation';
|
|
8
5
|
|
|
9
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
10
7
|
// but may be in a future version of the theming API.
|
|
11
8
|
@function get-unthemable-tokens() {
|
|
12
9
|
@return (
|
|
13
|
-
container-shape: 0,
|
|
14
|
-
container-elevation-shadow: elevation.get-box-shadow(16),
|
|
10
|
+
drawer-container-shape: 0,
|
|
11
|
+
drawer-container-elevation-shadow: elevation.get-box-shadow(16),
|
|
15
12
|
);
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
16
|
@function get-color-tokens($theme) {
|
|
20
17
|
@return (
|
|
21
|
-
container-background-color: mat.get-theme-color($theme, background, dialog),
|
|
22
|
-
container-text-color: mat.get-theme-color($theme, foreground, text),
|
|
18
|
+
drawer-container-background-color: mat.get-theme-color($theme, background, dialog),
|
|
19
|
+
drawer-container-text-color: mat.get-theme-color($theme, foreground, text),
|
|
23
20
|
);
|
|
24
21
|
}
|
|
25
22
|
|
|
@@ -38,8 +35,8 @@ $prefix: (mtx, drawer);
|
|
|
38
35
|
@function get-token-slots() {
|
|
39
36
|
@return mat.private-deep-merge-all(
|
|
40
37
|
get-unthemable-tokens(),
|
|
41
|
-
get-color-tokens(
|
|
42
|
-
get-typography-tokens(
|
|
43
|
-
get-density-tokens(
|
|
38
|
+
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
39
|
+
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
40
|
+
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
44
41
|
);
|
|
45
42
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../core/style/elevation';
|
|
3
|
+
@use '../core/tokens/m3-utils';
|
|
4
|
+
@use '../core/tokens/m3';
|
|
5
|
+
|
|
6
|
+
/// Generates custom tokens for the mtx-drawer.
|
|
7
|
+
@function get-tokens($theme: m3.$sys-theme) {
|
|
8
|
+
$system: m3-utils.get-system($theme);
|
|
9
|
+
|
|
10
|
+
$tokens: (
|
|
11
|
+
base: (
|
|
12
|
+
drawer-container-shape: map.get($system, corner-large),
|
|
13
|
+
drawer-container-elevation-shadow: elevation.get-box-shadow(2),
|
|
14
|
+
),
|
|
15
|
+
color: (
|
|
16
|
+
drawer-container-background-color: map.get($system, surface),
|
|
17
|
+
drawer-container-text-color: map.get($system, on-surface-variant),
|
|
18
|
+
),
|
|
19
|
+
typography: (),
|
|
20
|
+
density: (),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
@return $tokens;
|
|
24
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
@use '@angular/cdk' as cdk;
|
|
3
3
|
@use '@angular/material' as mat;
|
|
4
4
|
@use '../core/tokens/token-utils';
|
|
5
|
-
@use '
|
|
5
|
+
@use './m3-drawer';
|
|
6
6
|
|
|
7
|
-
$
|
|
7
|
+
$fallbacks: m3-drawer.get-tokens();
|
|
8
8
|
|
|
9
9
|
@keyframes _mtx-drawer-enter {
|
|
10
10
|
from {
|
|
@@ -41,12 +41,9 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
|
|
|
41
41
|
// We don't use this, but it's useful for consumers to position
|
|
42
42
|
// elements (e.g. close buttons) inside the bottom sheet.
|
|
43
43
|
position: relative;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@include token-utils.create-token-slot(color, container-text-color);
|
|
48
|
-
@include token-utils.create-token-slot(box-shadow, container-elevation-shadow);
|
|
49
|
-
}
|
|
44
|
+
background-color: token-utils.slot(drawer-container-background-color, $fallbacks);
|
|
45
|
+
color: token-utils.slot(drawer-container-text-color, $fallbacks);
|
|
46
|
+
box-shadow: token-utils.slot(drawer-container-elevation-shadow, $fallbacks);
|
|
50
47
|
|
|
51
48
|
@include cdk.high-contrast(active, off) {
|
|
52
49
|
outline: 1px solid;
|
|
@@ -80,29 +77,21 @@ $_tokens: tokens-mtx-drawer.$prefix, tokens-mtx-drawer.get-token-slots();
|
|
|
80
77
|
}
|
|
81
78
|
|
|
82
79
|
.mtx-drawer-right {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
@include token-utils.create-token-slot(border-bottom-left-radius, container-shape);
|
|
86
|
-
}
|
|
80
|
+
border-top-left-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
81
|
+
border-bottom-left-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
87
82
|
}
|
|
88
83
|
|
|
89
84
|
.mtx-drawer-left {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
@include token-utils.create-token-slot(border-bottom-right-radius, container-shape);
|
|
93
|
-
}
|
|
85
|
+
border-top-right-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
86
|
+
border-bottom-right-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
94
87
|
}
|
|
95
88
|
|
|
96
89
|
.mtx-drawer-bottom {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@include token-utils.create-token-slot(border-top-right-radius, container-shape);
|
|
100
|
-
}
|
|
90
|
+
border-top-left-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
91
|
+
border-top-right-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
.mtx-drawer-top {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
@include token-utils.create-token-slot(border-bottom-right-radius, container-shape);
|
|
107
|
-
}
|
|
95
|
+
border-bottom-left-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
96
|
+
border-bottom-right-radius: token-utils.slot(drawer-container-shape, $fallbacks);
|
|
108
97
|
}
|
package/drawer/index.d.ts
CHANGED
|
@@ -1,5 +1,223 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ViewContainerRef, OnDestroy, EventEmitter, ComponentRef, InjectionToken, TemplateRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/cdk/dialog';
|
|
4
|
+
import { CdkDialogContainer, DialogRef } from '@angular/cdk/dialog';
|
|
5
|
+
import * as i2 from '@angular/cdk/portal';
|
|
6
|
+
import { CdkPortalOutlet, ComponentType } from '@angular/cdk/portal';
|
|
7
|
+
import * as i3 from '@angular/material/core';
|
|
8
|
+
import { Direction } from '@angular/cdk/bidi';
|
|
9
|
+
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
10
|
+
import { Observable, Subject } from 'rxjs';
|
|
11
|
+
|
|
12
|
+
/** Options for where to set focus to automatically on dialog open. */
|
|
13
|
+
type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
14
|
+
/** Possible overrides for a drawer's position. */
|
|
15
|
+
type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
1
16
|
/**
|
|
2
|
-
*
|
|
17
|
+
* Configuration used when opening a drawer.
|
|
3
18
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
19
|
+
declare class MtxDrawerConfig<D = any> {
|
|
20
|
+
/** The view container to place the overlay for the drawer into. */
|
|
21
|
+
viewContainerRef?: ViewContainerRef;
|
|
22
|
+
/** ID for the drawer. If omitted, a unique one will be generated. */
|
|
23
|
+
id?: string;
|
|
24
|
+
/** Extra CSS classes to be added to the drawer container. */
|
|
25
|
+
panelClass?: string | string[];
|
|
26
|
+
/** Text layout direction for the drawer. */
|
|
27
|
+
direction?: Direction;
|
|
28
|
+
/** Data being injected into the child component. */
|
|
29
|
+
data?: D | null;
|
|
30
|
+
/** Whether the drawer has a backdrop. */
|
|
31
|
+
hasBackdrop?: boolean;
|
|
32
|
+
/** Custom class for the backdrop. */
|
|
33
|
+
backdropClass?: string;
|
|
34
|
+
/** Whether the user can use escape or clicking outside to close the drawer. */
|
|
35
|
+
disableClose?: boolean;
|
|
36
|
+
/** Aria label to assign to the drawer element. */
|
|
37
|
+
ariaLabel?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the drawer should close when the user goes backwards/forwards in history.
|
|
40
|
+
* Note that this usually doesn't include clicking on links (unless the user is using
|
|
41
|
+
* the `HashLocationStrategy`).
|
|
42
|
+
*/
|
|
43
|
+
closeOnNavigation?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Where the drawer should focus on open.
|
|
46
|
+
* @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
|
|
47
|
+
* AutoFocusTarget instead.
|
|
48
|
+
*/
|
|
49
|
+
autoFocus?: AutoFocusTarget | string | boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the drawer should restore focus to the
|
|
52
|
+
* previously-focused element, after it's closed.
|
|
53
|
+
*/
|
|
54
|
+
restoreFocus?: boolean;
|
|
55
|
+
/** Scroll strategy to be used for the drawer. */
|
|
56
|
+
scrollStrategy?: ScrollStrategy;
|
|
57
|
+
/** Position of the drawer. */
|
|
58
|
+
position?: DrawerPosition;
|
|
59
|
+
/** Width of the drawer. */
|
|
60
|
+
width?: string;
|
|
61
|
+
/** Height of the drawer. */
|
|
62
|
+
height?: string;
|
|
63
|
+
/** Min-width of the drawer. If a number is provided, assumes pixel units. */
|
|
64
|
+
minWidth?: number | string;
|
|
65
|
+
/** Min-height of the drawer. If a number is provided, assumes pixel units. */
|
|
66
|
+
minHeight?: number | string;
|
|
67
|
+
/** Max-width of the drawer. If a number is provided, assumes pixel units. */
|
|
68
|
+
maxWidth?: number | string;
|
|
69
|
+
/** Max-height of the drawer. If a number is provided, assumes pixel units. */
|
|
70
|
+
maxHeight?: number | string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Internal component that wraps user-provided drawer content.
|
|
75
|
+
* @docs-private
|
|
76
|
+
*/
|
|
77
|
+
declare class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConfig> implements OnDestroy {
|
|
78
|
+
/** The portal outlet inside of this container into which the content will be loaded. */
|
|
79
|
+
_portalOutlet: CdkPortalOutlet;
|
|
80
|
+
protected _animationsDisabled: boolean;
|
|
81
|
+
/** The state of the drawer animations. */
|
|
82
|
+
_animationState: 'void' | 'visible' | 'hidden';
|
|
83
|
+
/** Emits whenever the state of the animation changes. */
|
|
84
|
+
_animationStateChanged: EventEmitter<{
|
|
85
|
+
toState: "visible" | "hidden";
|
|
86
|
+
phase: "start" | "done";
|
|
87
|
+
}>;
|
|
88
|
+
/** Whether the component has been destroyed. */
|
|
89
|
+
private _destroyed;
|
|
90
|
+
get _drawerPosition(): string;
|
|
91
|
+
protected _contentAttached(): void;
|
|
92
|
+
/** Begin animation of bottom sheet entrance into view. */
|
|
93
|
+
enter(): void;
|
|
94
|
+
/** Begin animation of the bottom sheet exiting from view. */
|
|
95
|
+
exit(): void;
|
|
96
|
+
ngOnDestroy(): void;
|
|
97
|
+
private _simulateAnimation;
|
|
98
|
+
protected _handleAnimationEvent(isStart: boolean, animationName: string): void;
|
|
99
|
+
protected _captureInitialFocus(): void;
|
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerContainer, never>;
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MtxDrawerContainer, "mtx-drawer-container", never, {}, {}, never, never, true, never>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare class MtxDrawerModule {
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawerModule, never>;
|
|
106
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDrawerModule, never, [typeof i1.DialogModule, typeof i2.PortalModule, typeof i3.MatCommonModule, typeof MtxDrawerContainer], [typeof MtxDrawerContainer, typeof i3.MatCommonModule]>;
|
|
107
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MtxDrawerModule>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Reference to a drawer dispatched from the drawer service.
|
|
112
|
+
*/
|
|
113
|
+
declare class MtxDrawerRef<T = any, R = any> {
|
|
114
|
+
private _ref;
|
|
115
|
+
/** Instance of the component making up the content of the drawer. */
|
|
116
|
+
get instance(): T;
|
|
117
|
+
/**
|
|
118
|
+
* `ComponentRef` of the component opened into the drawer. Will be
|
|
119
|
+
* null when the drawer is opened using a `TemplateRef`.
|
|
120
|
+
*/
|
|
121
|
+
get componentRef(): ComponentRef<T> | null;
|
|
122
|
+
/**
|
|
123
|
+
* Instance of the component into which the drawer content is projected.
|
|
124
|
+
* @docs-private
|
|
125
|
+
*/
|
|
126
|
+
containerInstance: MtxDrawerContainer;
|
|
127
|
+
/** Whether the user is allowed to close the drawer. */
|
|
128
|
+
disableClose: boolean | undefined;
|
|
129
|
+
/** Unique ID for the drawer. */
|
|
130
|
+
id: string;
|
|
131
|
+
/** Subject for notifying the user that the drawer has been dismissed. */
|
|
132
|
+
private readonly _afterDismissed;
|
|
133
|
+
/** Subject for notifying the user that the drawer has opened and appeared. */
|
|
134
|
+
private readonly _afterOpened;
|
|
135
|
+
/** Result to be passed down to the `afterDismissed` stream. */
|
|
136
|
+
private _result;
|
|
137
|
+
/** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
|
|
138
|
+
private _closeFallbackTimeout;
|
|
139
|
+
constructor(_ref: DialogRef<R, T>, config: MtxDrawerConfig, containerInstance: MtxDrawerContainer);
|
|
140
|
+
/**
|
|
141
|
+
* Dismisses the drawer.
|
|
142
|
+
* @param result Data to be passed back to the drawer opener.
|
|
143
|
+
*/
|
|
144
|
+
dismiss(result?: R): void;
|
|
145
|
+
/** Gets an observable that is notified when the drawer is finished closing. */
|
|
146
|
+
afterDismissed(): Observable<R | undefined>;
|
|
147
|
+
/** Gets an observable that is notified when the drawer has opened and appeared. */
|
|
148
|
+
afterOpened(): Observable<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
151
|
+
*/
|
|
152
|
+
backdropClick(): Observable<MouseEvent>;
|
|
153
|
+
/**
|
|
154
|
+
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
155
|
+
*/
|
|
156
|
+
keydownEvents(): Observable<KeyboardEvent>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Injection token that can be used to access the data that was passed in to a drawer. */
|
|
160
|
+
declare const MTX_DRAWER_DATA: InjectionToken<any>;
|
|
161
|
+
/** Injection token that can be used to specify default drawer options. */
|
|
162
|
+
declare const MTX_DRAWER_DEFAULT_OPTIONS: InjectionToken<MtxDrawerConfig<any>>;
|
|
163
|
+
/**
|
|
164
|
+
* Service to trigger Material Design bottom sheets.
|
|
165
|
+
*/
|
|
166
|
+
declare class MtxDrawer implements OnDestroy {
|
|
167
|
+
private _overlay;
|
|
168
|
+
private _parentDrawer;
|
|
169
|
+
private _defaultOptions;
|
|
170
|
+
private readonly _openDrawersAtThisLevel;
|
|
171
|
+
private readonly _afterAllDismissedAtThisLevel;
|
|
172
|
+
private readonly _afterOpenedAtThisLevel;
|
|
173
|
+
private _dialog;
|
|
174
|
+
/** Keeps track of the currently-open dialogs. */
|
|
175
|
+
get openDrawers(): MtxDrawerRef<any>[];
|
|
176
|
+
/** Stream that emits when a drawer has been opened. */
|
|
177
|
+
get afterOpened(): Subject<MtxDrawerRef<any>>;
|
|
178
|
+
private _getAfterAllDismissed;
|
|
179
|
+
/**
|
|
180
|
+
* Stream that emits when all open drawer have finished closing.
|
|
181
|
+
* Will emit on subscribe if there are no open drawers to begin with.
|
|
182
|
+
*/
|
|
183
|
+
readonly afterAllDismissed: Observable<void>;
|
|
184
|
+
/**
|
|
185
|
+
* Opens a drawer containing the given component.
|
|
186
|
+
* @param component Type of the component to load into the drawer.
|
|
187
|
+
* @param config Extra configuration options.
|
|
188
|
+
* @returns Reference to the newly-opened drawer.
|
|
189
|
+
*/
|
|
190
|
+
open<T, D = any, R = any>(component: ComponentType<T>, config?: MtxDrawerConfig<D>): MtxDrawerRef<T, R>;
|
|
191
|
+
/**
|
|
192
|
+
* Opens a drawer containing the given template.
|
|
193
|
+
* @param template TemplateRef to instantiate as the drawer content.
|
|
194
|
+
* @param config Extra configuration options.
|
|
195
|
+
* @returns Reference to the newly-opened drawer.
|
|
196
|
+
*/
|
|
197
|
+
open<T, D = any, R = any>(template: TemplateRef<T>, config?: MtxDrawerConfig<D>): MtxDrawerRef<T, R>;
|
|
198
|
+
/**
|
|
199
|
+
* Dismisses all of the currently-open drawers.
|
|
200
|
+
*/
|
|
201
|
+
dismissAll(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Finds an open drawer by its id.
|
|
204
|
+
* @param id ID to use when looking up the drawer.
|
|
205
|
+
*/
|
|
206
|
+
getDrawerById(id: string): MtxDrawerRef<any> | undefined;
|
|
207
|
+
ngOnDestroy(): void;
|
|
208
|
+
private _dismissDrawers;
|
|
209
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MtxDrawer, never>;
|
|
210
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MtxDrawer>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Animations used by the drawer.
|
|
215
|
+
* @deprecated No longer used. Will be removed.
|
|
216
|
+
* @breaking-change 21.0.0
|
|
217
|
+
*/
|
|
218
|
+
declare const mtxDrawerAnimations: {
|
|
219
|
+
readonly drawerState: any;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export { MTX_DRAWER_DATA, MTX_DRAWER_DEFAULT_OPTIONS, MtxDrawer, MtxDrawerConfig, MtxDrawerContainer, MtxDrawerModule, MtxDrawerRef, mtxDrawerAnimations };
|
|
223
|
+
export type { AutoFocusTarget, DrawerPosition };
|