@angular/material 19.0.0-next.8 → 19.0.0-rc.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 +1 -2
- package/autocomplete/_autocomplete-theme.scss +37 -24
- package/autocomplete/index.d.ts +5 -6
- package/badge/_badge-theme.scss +38 -24
- package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
- package/button/_button-theme.scss +229 -105
- package/button/_fab-theme.scss +95 -44
- package/button/_icon-button-theme.scss +38 -25
- package/button/index.d.ts +3 -3
- package/button-toggle/_button-toggle-theme.scss +62 -37
- package/card/_card-theme.scss +79 -38
- package/card/index.d.ts +2 -3
- package/checkbox/_checkbox-theme.scss +16 -10
- package/chips/_chips-theme.scss +64 -30
- package/core/_core-theme.scss +55 -37
- package/core/_core.scss +3 -6
- package/core/option/_optgroup-theme.scss +29 -18
- package/core/option/_option-theme.scss +34 -21
- package/core/ripple/_ripple-theme.scss +33 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/tokens/_m3-system.scss +86 -42
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/mat/_badge.scss +6 -3
- package/datepicker/_datepicker-theme.scss +53 -32
- package/datepicker/index.d.ts +33 -34
- package/dialog/_dialog-theme.scss +46 -23
- package/divider/_divider-theme.scss +28 -17
- package/expansion/_expansion-theme.scss +36 -24
- package/fesm2022/autocomplete/testing.mjs +2 -5
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +225 -148
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs +2 -5
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +45 -35
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +80 -58
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs +4 -7
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +82 -45
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +106 -79
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs +3 -6
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +56 -69
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs +4 -7
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +104 -62
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs +11 -14
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +322 -276
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +5 -11
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +242 -187
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs +13 -22
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +827 -582
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +15 -10
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +221 -156
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +10 -12
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs +7 -10
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +86 -80
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +12 -15
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +179 -132
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs +11 -17
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +75 -56
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +66 -46
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs +3 -3
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input.mjs +103 -72
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs +21 -38
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +197 -195
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +3 -6
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +178 -127
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +10 -13
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +83 -58
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +36 -35
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +28 -14
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs +6 -12
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +123 -87
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +6 -9
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +219 -182
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +6 -6
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +136 -125
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs +3 -6
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +77 -47
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs +2 -2
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +262 -194
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs +4 -7
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +143 -111
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs +3 -6
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +94 -74
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs +4 -4
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +146 -113
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table/testing.mjs +13 -25
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +183 -194
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs +5 -5
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +329 -251
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +7 -16
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +160 -155
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs +2 -5
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +26 -17
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs +6 -9
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +97 -74
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs +3 -6
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +57 -61
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +114 -61
- package/form-field/index.d.ts +9 -10
- package/grid-list/_grid-list-theme.scss +25 -15
- package/icon/_icon-theme.scss +22 -14
- package/input/_input-theme.scss +18 -11
- package/list/_list-theme.scss +89 -47
- package/list/index.d.ts +20 -21
- package/menu/_menu-theme.scss +33 -21
- package/menu/index.d.ts +8 -9
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +39 -23
- 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-bar/_progress-bar-theme.scss +20 -16
- package/progress-spinner/_progress-spinner-theme.scss +41 -25
- package/progress-spinner/index.d.ts +3 -4
- package/radio/_radio-theme.scss +60 -32
- package/radio/index.d.ts +2 -3
- package/schematics/collection.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +1 -6
- package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
- package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +480 -288
- package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
- package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
- package/schematics/ng-update/index_bundled.js +6 -1
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_select-theme.scss +38 -25
- package/select/index.d.ts +6 -7
- package/sidenav/_sidenav-theme.scss +28 -17
- package/slide-toggle/_slide-toggle-theme.scss +52 -28
- package/slider/_slider-theme.scss +62 -38
- package/snack-bar/_snack-bar-theme.scss +29 -17
- package/sort/_sort-theme.scss +33 -21
- package/stepper/_stepper-theme.scss +40 -27
- package/stepper/index.d.ts +14 -15
- package/table/_table-theme.scss +36 -23
- package/tabs/_tabs-theme.scss +97 -50
- package/tabs/index.d.ts +2 -2
- package/timepicker/_timepicker-theme.scss +37 -24
- package/toolbar/_toolbar-theme.scss +35 -22
- package/tooltip/_tooltip-theme.scss +18 -15
- package/tooltip/index.d.ts +5 -6
- package/tree/_tree-theme.scss +33 -21
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
package/fesm2022/tooltip.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coerci
|
|
|
3
3
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, inject, ElementRef, ViewContainerRef, NgZone, Injector, afterNextRender, Directive, Input, ChangeDetectorRef, ANIMATION_MODULE_TYPE, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
6
|
-
import { DOCUMENT, NgClass
|
|
6
|
+
import { DOCUMENT, NgClass } from '@angular/common';
|
|
7
7
|
import { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';
|
|
8
8
|
import { AriaDescriber, FocusMonitor, A11yModule } from '@angular/cdk/a11y';
|
|
9
9
|
import { Directionality } from '@angular/cdk/bidi';
|
|
@@ -76,6 +76,34 @@ const MAX_WIDTH = 200;
|
|
|
76
76
|
* https://material.io/design/components/tooltips.html
|
|
77
77
|
*/
|
|
78
78
|
class MatTooltip {
|
|
79
|
+
_overlay = inject(Overlay);
|
|
80
|
+
_elementRef = inject(ElementRef);
|
|
81
|
+
_scrollDispatcher = inject(ScrollDispatcher);
|
|
82
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
83
|
+
_ngZone = inject(NgZone);
|
|
84
|
+
_platform = inject(Platform);
|
|
85
|
+
_ariaDescriber = inject(AriaDescriber);
|
|
86
|
+
_focusMonitor = inject(FocusMonitor);
|
|
87
|
+
_dir = inject(Directionality);
|
|
88
|
+
_injector = inject(Injector);
|
|
89
|
+
_defaultOptions = inject(MAT_TOOLTIP_DEFAULT_OPTIONS, {
|
|
90
|
+
optional: true,
|
|
91
|
+
});
|
|
92
|
+
_overlayRef;
|
|
93
|
+
_tooltipInstance;
|
|
94
|
+
_portal;
|
|
95
|
+
_position = 'below';
|
|
96
|
+
_positionAtOrigin = false;
|
|
97
|
+
_disabled = false;
|
|
98
|
+
_tooltipClass;
|
|
99
|
+
_scrollStrategy = inject(MAT_TOOLTIP_SCROLL_STRATEGY);
|
|
100
|
+
_viewInitialized = false;
|
|
101
|
+
_pointerExitEventsInitialized = false;
|
|
102
|
+
_tooltipComponent = TooltipComponent;
|
|
103
|
+
_viewportMargin = 8;
|
|
104
|
+
_currentPosition;
|
|
105
|
+
_cssClassPrefix = 'mat-mdc';
|
|
106
|
+
_ariaDescriptionPending;
|
|
79
107
|
/** Allows the user to define the position of the tooltip relative to the parent element */
|
|
80
108
|
get position() {
|
|
81
109
|
return this._position;
|
|
@@ -127,6 +155,7 @@ class MatTooltip {
|
|
|
127
155
|
set showDelay(value) {
|
|
128
156
|
this._showDelay = coerceNumberProperty(value);
|
|
129
157
|
}
|
|
158
|
+
_showDelay;
|
|
130
159
|
/** The default delay in ms before hiding the tooltip after hide is called */
|
|
131
160
|
get hideDelay() {
|
|
132
161
|
return this._hideDelay;
|
|
@@ -137,6 +166,22 @@ class MatTooltip {
|
|
|
137
166
|
this._tooltipInstance._mouseLeaveHideDelay = this._hideDelay;
|
|
138
167
|
}
|
|
139
168
|
}
|
|
169
|
+
_hideDelay;
|
|
170
|
+
/**
|
|
171
|
+
* How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
|
|
172
|
+
* uses a long press gesture to show and hide, however it can conflict with the native browser
|
|
173
|
+
* gestures. To work around the conflict, Angular Material disables native gestures on the
|
|
174
|
+
* trigger, but that might not be desirable on particular elements (e.g. inputs and draggable
|
|
175
|
+
* elements). The different values for this option configure the touch event handling as follows:
|
|
176
|
+
* - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native
|
|
177
|
+
* browser gestures on particular elements. In particular, it allows text selection on inputs
|
|
178
|
+
* and textareas, and preserves the native browser dragging on elements marked as `draggable`.
|
|
179
|
+
* - `on` - Enables touch gestures for all elements and disables native
|
|
180
|
+
* browser gestures with no exceptions.
|
|
181
|
+
* - `off` - Disables touch gestures. Note that this will prevent the tooltip from
|
|
182
|
+
* showing on touch devices.
|
|
183
|
+
*/
|
|
184
|
+
touchGestures = 'auto';
|
|
140
185
|
/** The message to be displayed in the tooltip */
|
|
141
186
|
get message() {
|
|
142
187
|
return this._message;
|
|
@@ -156,6 +201,7 @@ class MatTooltip {
|
|
|
156
201
|
}
|
|
157
202
|
this._syncAriaDescription(oldMessage);
|
|
158
203
|
}
|
|
204
|
+
_message = '';
|
|
159
205
|
/** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */
|
|
160
206
|
get tooltipClass() {
|
|
161
207
|
return this._tooltipClass;
|
|
@@ -166,53 +212,15 @@ class MatTooltip {
|
|
|
166
212
|
this._setTooltipClass(this._tooltipClass);
|
|
167
213
|
}
|
|
168
214
|
}
|
|
215
|
+
/** Manually-bound passive event listeners. */
|
|
216
|
+
_passiveListeners = [];
|
|
217
|
+
/** Reference to the current document. */
|
|
218
|
+
_document = inject(DOCUMENT);
|
|
219
|
+
/** Timer started at the last `touchstart` event. */
|
|
220
|
+
_touchstartTimeout = null;
|
|
221
|
+
/** Emits when the component is destroyed. */
|
|
222
|
+
_destroyed = new Subject();
|
|
169
223
|
constructor() {
|
|
170
|
-
this._overlay = inject(Overlay);
|
|
171
|
-
this._elementRef = inject(ElementRef);
|
|
172
|
-
this._scrollDispatcher = inject(ScrollDispatcher);
|
|
173
|
-
this._viewContainerRef = inject(ViewContainerRef);
|
|
174
|
-
this._ngZone = inject(NgZone);
|
|
175
|
-
this._platform = inject(Platform);
|
|
176
|
-
this._ariaDescriber = inject(AriaDescriber);
|
|
177
|
-
this._focusMonitor = inject(FocusMonitor);
|
|
178
|
-
this._dir = inject(Directionality);
|
|
179
|
-
this._injector = inject(Injector);
|
|
180
|
-
this._defaultOptions = inject(MAT_TOOLTIP_DEFAULT_OPTIONS, {
|
|
181
|
-
optional: true,
|
|
182
|
-
});
|
|
183
|
-
this._position = 'below';
|
|
184
|
-
this._positionAtOrigin = false;
|
|
185
|
-
this._disabled = false;
|
|
186
|
-
this._scrollStrategy = inject(MAT_TOOLTIP_SCROLL_STRATEGY);
|
|
187
|
-
this._viewInitialized = false;
|
|
188
|
-
this._pointerExitEventsInitialized = false;
|
|
189
|
-
this._tooltipComponent = TooltipComponent;
|
|
190
|
-
this._viewportMargin = 8;
|
|
191
|
-
this._cssClassPrefix = 'mat-mdc';
|
|
192
|
-
/**
|
|
193
|
-
* How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
|
|
194
|
-
* uses a long press gesture to show and hide, however it can conflict with the native browser
|
|
195
|
-
* gestures. To work around the conflict, Angular Material disables native gestures on the
|
|
196
|
-
* trigger, but that might not be desirable on particular elements (e.g. inputs and draggable
|
|
197
|
-
* elements). The different values for this option configure the touch event handling as follows:
|
|
198
|
-
* - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native
|
|
199
|
-
* browser gestures on particular elements. In particular, it allows text selection on inputs
|
|
200
|
-
* and textareas, and preserves the native browser dragging on elements marked as `draggable`.
|
|
201
|
-
* - `on` - Enables touch gestures for all elements and disables native
|
|
202
|
-
* browser gestures with no exceptions.
|
|
203
|
-
* - `off` - Disables touch gestures. Note that this will prevent the tooltip from
|
|
204
|
-
* showing on touch devices.
|
|
205
|
-
*/
|
|
206
|
-
this.touchGestures = 'auto';
|
|
207
|
-
this._message = '';
|
|
208
|
-
/** Manually-bound passive event listeners. */
|
|
209
|
-
this._passiveListeners = [];
|
|
210
|
-
/** Reference to the current document. */
|
|
211
|
-
this._document = inject(DOCUMENT);
|
|
212
|
-
/** Timer started at the last `touchstart` event. */
|
|
213
|
-
this._touchstartTimeout = null;
|
|
214
|
-
/** Emits when the component is destroyed. */
|
|
215
|
-
this._destroyed = new Subject();
|
|
216
224
|
const defaultOptions = this._defaultOptions;
|
|
217
225
|
if (defaultOptions) {
|
|
218
226
|
this._showDelay = defaultOptions.showDelay;
|
|
@@ -689,10 +697,10 @@ class MatTooltip {
|
|
|
689
697
|
});
|
|
690
698
|
});
|
|
691
699
|
}
|
|
692
|
-
static
|
|
693
|
-
static
|
|
700
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
701
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatTooltip, isStandalone: true, selector: "[matTooltip]", inputs: { position: ["matTooltipPosition", "position"], positionAtOrigin: ["matTooltipPositionAtOrigin", "positionAtOrigin"], disabled: ["matTooltipDisabled", "disabled"], showDelay: ["matTooltipShowDelay", "showDelay"], hideDelay: ["matTooltipHideDelay", "hideDelay"], touchGestures: ["matTooltipTouchGestures", "touchGestures"], message: ["matTooltip", "message"], tooltipClass: ["matTooltipClass", "tooltipClass"] }, host: { properties: { "class.mat-mdc-tooltip-disabled": "disabled" }, classAttribute: "mat-mdc-tooltip-trigger" }, exportAs: ["matTooltip"], ngImport: i0 });
|
|
694
702
|
}
|
|
695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTooltip, decorators: [{
|
|
696
704
|
type: Directive,
|
|
697
705
|
args: [{
|
|
698
706
|
selector: '[matTooltip]',
|
|
@@ -701,7 +709,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
|
|
|
701
709
|
'class': 'mat-mdc-tooltip-trigger',
|
|
702
710
|
'[class.mat-mdc-tooltip-disabled]': 'disabled',
|
|
703
711
|
},
|
|
704
|
-
standalone: true,
|
|
705
712
|
}]
|
|
706
713
|
}], ctorParameters: () => [], propDecorators: { position: [{
|
|
707
714
|
type: Input,
|
|
@@ -733,21 +740,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
|
|
|
733
740
|
* @docs-private
|
|
734
741
|
*/
|
|
735
742
|
class TooltipComponent {
|
|
743
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
744
|
+
_elementRef = inject(ElementRef);
|
|
745
|
+
/* Whether the tooltip text overflows to multiple lines */
|
|
746
|
+
_isMultiline = false;
|
|
747
|
+
/** Message to display in the tooltip */
|
|
748
|
+
message;
|
|
749
|
+
/** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */
|
|
750
|
+
tooltipClass;
|
|
751
|
+
/** The timeout ID of any current timer set to show the tooltip */
|
|
752
|
+
_showTimeoutId;
|
|
753
|
+
/** The timeout ID of any current timer set to hide the tooltip */
|
|
754
|
+
_hideTimeoutId;
|
|
755
|
+
/** Element that caused the tooltip to open. */
|
|
756
|
+
_triggerElement;
|
|
757
|
+
/** Amount of milliseconds to delay the closing sequence. */
|
|
758
|
+
_mouseLeaveHideDelay;
|
|
759
|
+
/** Whether animations are currently disabled. */
|
|
760
|
+
_animationsDisabled;
|
|
761
|
+
/** Reference to the internal tooltip element. */
|
|
762
|
+
_tooltip;
|
|
763
|
+
/** Whether interactions on the page should close the tooltip */
|
|
764
|
+
_closeOnInteraction = false;
|
|
765
|
+
/** Whether the tooltip is currently visible. */
|
|
766
|
+
_isVisible = false;
|
|
767
|
+
/** Subject for notifying that the tooltip has been hidden from the view */
|
|
768
|
+
_onHide = new Subject();
|
|
769
|
+
/** Name of the show animation and the class that toggles it. */
|
|
770
|
+
_showAnimation = 'mat-mdc-tooltip-show';
|
|
771
|
+
/** Name of the hide animation and the class that toggles it. */
|
|
772
|
+
_hideAnimation = 'mat-mdc-tooltip-hide';
|
|
736
773
|
constructor() {
|
|
737
|
-
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
738
|
-
this._elementRef = inject(ElementRef);
|
|
739
|
-
/* Whether the tooltip text overflows to multiple lines */
|
|
740
|
-
this._isMultiline = false;
|
|
741
|
-
/** Whether interactions on the page should close the tooltip */
|
|
742
|
-
this._closeOnInteraction = false;
|
|
743
|
-
/** Whether the tooltip is currently visible. */
|
|
744
|
-
this._isVisible = false;
|
|
745
|
-
/** Subject for notifying that the tooltip has been hidden from the view */
|
|
746
|
-
this._onHide = new Subject();
|
|
747
|
-
/** Name of the show animation and the class that toggles it. */
|
|
748
|
-
this._showAnimation = 'mat-mdc-tooltip-show';
|
|
749
|
-
/** Name of the hide animation and the class that toggles it. */
|
|
750
|
-
this._hideAnimation = 'mat-mdc-tooltip-hide';
|
|
751
774
|
const animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
|
|
752
775
|
this._animationsDisabled = animationMode === 'NoopAnimations';
|
|
753
776
|
}
|
|
@@ -891,15 +914,15 @@ class TooltipComponent {
|
|
|
891
914
|
this._finalizeAnimation(isVisible);
|
|
892
915
|
}
|
|
893
916
|
}
|
|
894
|
-
static
|
|
895
|
-
static
|
|
917
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
918
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0-next.10", type: TooltipComponent, isStandalone: true, selector: "mat-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "mouseleave": "_handleMouseLeave($event)" } }, viewQueries: [{ propertyName: "_tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }], ngImport: i0, template: "<div\n #tooltip\n class=\"mdc-tooltip mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mat-mdc-tooltip-surface mdc-tooltip__surface\">{{message}}</div>\n</div>\n", styles: [".mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:\"\";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
896
919
|
}
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
898
921
|
type: Component,
|
|
899
922
|
args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
900
923
|
'(mouseleave)': '_handleMouseLeave($event)',
|
|
901
924
|
'aria-hidden': 'true',
|
|
902
|
-
},
|
|
925
|
+
}, imports: [NgClass], template: "<div\n #tooltip\n class=\"mdc-tooltip mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mat-mdc-tooltip-surface mdc-tooltip__surface\">{{message}}</div>\n</div>\n", styles: [".mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:\"\";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}"] }]
|
|
903
926
|
}], ctorParameters: () => [], propDecorators: { _tooltip: [{
|
|
904
927
|
type: ViewChild,
|
|
905
928
|
args: ['tooltip', {
|
|
@@ -926,14 +949,14 @@ const matTooltipAnimations = {
|
|
|
926
949
|
};
|
|
927
950
|
|
|
928
951
|
class MatTooltipModule {
|
|
929
|
-
static
|
|
930
|
-
static
|
|
931
|
-
static
|
|
952
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
953
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTooltipModule, imports: [A11yModule, OverlayModule, MatCommonModule, MatTooltip, TooltipComponent], exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });
|
|
954
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTooltipModule, providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [A11yModule, OverlayModule, MatCommonModule, MatCommonModule, CdkScrollableModule] });
|
|
932
955
|
}
|
|
933
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTooltipModule, decorators: [{
|
|
934
957
|
type: NgModule,
|
|
935
958
|
args: [{
|
|
936
|
-
imports: [A11yModule,
|
|
959
|
+
imports: [A11yModule, OverlayModule, MatCommonModule, MatTooltip, TooltipComponent],
|
|
937
960
|
exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],
|
|
938
961
|
providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],
|
|
939
962
|
}]
|