@ng-matero/extensions 19.4.0 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/_index.scss +1 -1
  2. package/alert/_alert-theme.scss +26 -31
  3. package/alert/_m2-alert.scss +59 -0
  4. package/alert/_m3-alert.scss +41 -0
  5. package/alert/alert.scss +27 -31
  6. package/alert/index.d.ts +30 -5
  7. package/button/index.d.ts +31 -5
  8. package/checkbox-group/index.d.ts +117 -5
  9. package/colorpicker/_colorpicker-theme.scss +31 -36
  10. package/{core/tokens/m2/mtx/_colorpicker.scss → colorpicker/_m2-colorpicker.scss} +6 -10
  11. package/colorpicker/_m3-colorpicker.scss +23 -0
  12. package/colorpicker/colorpicker-toggle.scss +4 -9
  13. package/colorpicker/index.d.ts +285 -3
  14. package/column-resize/index.d.ts +456 -3
  15. package/core/index.d.ts +147 -5
  16. package/core/theming/_color-api-backwards-compatibility.scss +8 -15
  17. package/core/theming/_definition.scss +81 -75
  18. package/core/theming/_palettes.scss +1036 -0
  19. package/core/tokens/{m2/_index.scss → _m2-tokens.scss} +22 -22
  20. package/core/tokens/_m2-utils.scss +108 -0
  21. package/core/tokens/_m3-system.scss +128 -106
  22. package/core/tokens/_m3-tokens.scss +36 -282
  23. package/core/tokens/_m3-utils.scss +48 -0
  24. package/core/tokens/_token-utils.scss +67 -239
  25. package/core/tokens/m3/_index.scss +7 -0
  26. package/core/tokens/m3/_md-sys-color.scss +156 -0
  27. package/core/tokens/m3/_md-sys-elevation.scss +15 -0
  28. package/core/tokens/m3/_md-sys-motion.scss +35 -0
  29. package/core/tokens/m3/_md-sys-shape.scss +21 -0
  30. package/core/tokens/m3/_md-sys-state.scss +13 -0
  31. package/core/tokens/m3/_md-sys-typescale.scss +128 -0
  32. package/core/tokens/m3/_theme.scss +47 -0
  33. package/datetimepicker/_datetimepicker-theme.scss +29 -39
  34. package/datetimepicker/_m2-datetimepicker.scss +149 -0
  35. package/datetimepicker/_m3-datetimepicker.scss +81 -0
  36. package/datetimepicker/calendar-body.scss +31 -56
  37. package/datetimepicker/calendar.scss +43 -79
  38. package/datetimepicker/clock.scss +28 -47
  39. package/datetimepicker/datetimepicker-content.scss +9 -15
  40. package/datetimepicker/datetimepicker-toggle.scss +4 -9
  41. package/datetimepicker/index.d.ts +1208 -3
  42. package/datetimepicker/time-view.scss +26 -32
  43. package/dialog/index.d.ts +54 -5
  44. package/drawer/_drawer-theme.scss +25 -30
  45. package/{core/tokens/m2/mtx/_drawer.scss → drawer/_m2-drawer.scss} +9 -12
  46. package/drawer/_m3-drawer.scss +24 -0
  47. package/drawer/drawer-container.scss +13 -24
  48. package/drawer/index.d.ts +221 -3
  49. package/fesm2022/mtxAlert.mjs +7 -7
  50. package/fesm2022/mtxAlert.mjs.map +1 -1
  51. package/fesm2022/mtxButton.mjs +7 -7
  52. package/fesm2022/mtxCheckboxGroup.mjs +7 -7
  53. package/fesm2022/mtxColorpicker.mjs +21 -21
  54. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  55. package/fesm2022/mtxColumnResize.mjs +232 -103
  56. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  57. package/fesm2022/mtxCore.mjs +21 -21
  58. package/fesm2022/mtxDatetimepicker.mjs +63 -63
  59. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  60. package/fesm2022/mtxDialog.mjs +10 -10
  61. package/fesm2022/mtxDialog.mjs.map +1 -1
  62. package/fesm2022/mtxDrawer.mjs +10 -10
  63. package/fesm2022/mtxGrid.mjs +78 -77
  64. package/fesm2022/mtxGrid.mjs.map +1 -1
  65. package/fesm2022/mtxLoader.mjs +7 -7
  66. package/fesm2022/mtxPhotoviewer.mjs +7 -7
  67. package/fesm2022/mtxPopover.mjs +24 -25
  68. package/fesm2022/mtxPopover.mjs.map +1 -1
  69. package/fesm2022/mtxProgress.mjs +7 -7
  70. package/fesm2022/mtxSelect.mjs +54 -54
  71. package/fesm2022/mtxSelect.mjs.map +1 -1
  72. package/fesm2022/mtxSplit.mjs +10 -10
  73. package/fesm2022/mtxTooltip.mjs +13 -13
  74. package/fesm2022/mtxTooltip.mjs.map +1 -1
  75. package/grid/_grid-theme.scss +22 -35
  76. package/grid/_m2-grid.scss +66 -0
  77. package/grid/_m3-grid.scss +35 -0
  78. package/grid/column-menu.scss +6 -23
  79. package/grid/column-resize/_column-resize.scss +35 -30
  80. package/grid/grid.scss +41 -73
  81. package/grid/index.d.ts +799 -3
  82. package/index.d.ts +2 -5
  83. package/loader/_loader-theme.scss +26 -31
  84. package/{core/tokens/m2/mtx/_loader.scss → loader/_m2-loader.scss} +5 -10
  85. package/loader/_m3-loader.scss +20 -0
  86. package/loader/index.d.ts +43 -5
  87. package/loader/loader.scss +4 -5
  88. package/package.json +29 -29
  89. package/photoviewer/index.d.ts +26 -5
  90. package/{core/tokens/m2/mtx/_popover.scss → popover/_m2-popover.scss} +9 -12
  91. package/popover/_m3-popover.scss +26 -0
  92. package/popover/_popover-theme.scss +26 -31
  93. package/popover/index.d.ts +399 -3
  94. package/popover/popover.scss +23 -29
  95. package/prebuilt-themes/azure-blue.css +1 -1
  96. package/prebuilt-themes/cyan-orange.css +1 -1
  97. package/prebuilt-themes/deeppurple-amber.css +1 -1
  98. package/prebuilt-themes/indigo-pink.css +1 -1
  99. package/prebuilt-themes/magenta-violet.css +1 -1
  100. package/prebuilt-themes/pink-bluegrey.css +1 -1
  101. package/prebuilt-themes/purple-green.css +1 -1
  102. package/prebuilt-themes/rose-red.css +1 -1
  103. package/progress/_m2-progress.scss +53 -0
  104. package/progress/_m3-progress.scss +33 -0
  105. package/progress/_progress-theme.scss +22 -34
  106. package/progress/index.d.ts +35 -5
  107. package/progress/progress.scss +28 -43
  108. package/select/_m2-select.scss +79 -0
  109. package/select/_m3-select.scss +46 -0
  110. package/select/_select-theme.scss +27 -37
  111. package/select/index.d.ts +381 -3
  112. package/select/select.scss +189 -205
  113. package/{core/tokens/m2/mtx/_split.scss → split/_m2-split.scss} +6 -9
  114. package/split/_m3-split.scss +23 -0
  115. package/split/_split-theme.scss +31 -34
  116. package/split/index.d.ts +255 -3
  117. package/split/split.scss +8 -11
  118. package/tooltip/_m2-tooltip.scss +50 -0
  119. package/tooltip/_m3-tooltip.scss +28 -0
  120. package/tooltip/_tooltip-theme.scss +23 -47
  121. package/tooltip/index.d.ts +345 -3
  122. package/tooltip/tooltip.scss +11 -15
  123. package/alert/alert-module.d.ts +0 -8
  124. package/alert/alert.d.ts +0 -19
  125. package/alert/public-api.d.ts +0 -2
  126. package/button/button-loading.d.ts +0 -19
  127. package/button/button-module.d.ts +0 -10
  128. package/button/public-api.d.ts +0 -2
  129. package/checkbox-group/checkbox-group-module.d.ts +0 -11
  130. package/checkbox-group/checkbox-group.d.ts +0 -86
  131. package/checkbox-group/interfaces.d.ts +0 -17
  132. package/checkbox-group/public-api.d.ts +0 -3
  133. package/colorpicker/colorpicker-animations.d.ts +0 -9
  134. package/colorpicker/colorpicker-input.d.ts +0 -88
  135. package/colorpicker/colorpicker-module.d.ts +0 -15
  136. package/colorpicker/colorpicker-toggle.d.ts +0 -39
  137. package/colorpicker/colorpicker.d.ts +0 -140
  138. package/colorpicker/public-api.d.ts +0 -5
  139. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -29
  140. package/column-resize/column-resize-directives/column-resize.d.ts +0 -29
  141. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  142. package/column-resize/column-resize-module.d.ts +0 -12
  143. package/column-resize/column-resize-notifier.d.ts +0 -48
  144. package/column-resize/column-resize.d.ts +0 -39
  145. package/column-resize/column-size-store.d.ts +0 -12
  146. package/column-resize/event-dispatcher.d.ts +0 -35
  147. package/column-resize/overlay-handle.d.ts +0 -43
  148. package/column-resize/polyfill.d.ts +0 -9
  149. package/column-resize/public-api.d.ts +0 -12
  150. package/column-resize/resizable.d.ts +0 -63
  151. package/column-resize/resize-ref.d.ts +0 -17
  152. package/column-resize/resize-strategy.d.ts +0 -84
  153. package/column-resize/selectors.d.ts +0 -10
  154. package/core/datetime/datetime-adapter.d.ts +0 -45
  155. package/core/datetime/datetime-formats.d.ts +0 -22
  156. package/core/datetime/datetime.module.d.ts +0 -15
  157. package/core/datetime/index.d.ts +0 -5
  158. package/core/datetime/native-datetime-adapter.d.ts +0 -40
  159. package/core/datetime/native-datetime-formats.d.ts +0 -2
  160. package/core/pipes/index.d.ts +0 -3
  161. package/core/pipes/is-template-ref.pipe.d.ts +0 -7
  162. package/core/pipes/pipes.module.d.ts +0 -9
  163. package/core/pipes/to-observable.pipe.d.ts +0 -8
  164. package/core/public-api.d.ts +0 -2
  165. package/core/theming/_inspection.scss +0 -38
  166. package/core/theming/_validation.scss +0 -5
  167. package/core/tokens/_density.scss +0 -49
  168. package/core/tokens/_format-tokens.scss +0 -5
  169. package/core/tokens/_token-definition.scss +0 -271
  170. package/core/tokens/m2/mdc/_plain-tooltip.scss +0 -63
  171. package/core/tokens/m2/mtx/_alert.scss +0 -62
  172. package/core/tokens/m2/mtx/_datetimepicker.scss +0 -152
  173. package/core/tokens/m2/mtx/_grid.scss +0 -69
  174. package/core/tokens/m2/mtx/_progress.scss +0 -56
  175. package/core/tokens/m2/mtx/_select.scss +0 -82
  176. package/core/tokens/m3/definitions/_index.scss +0 -9
  177. package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +0 -51
  178. package/core/tokens/m3/definitions/_md-ref-palette.scss +0 -100
  179. package/core/tokens/m3/definitions/_md-ref-typeface.scss +0 -14
  180. package/core/tokens/m3/definitions/_md-sys-color.scss +0 -126
  181. package/core/tokens/m3/definitions/_md-sys-elevation.scss +0 -15
  182. package/core/tokens/m3/definitions/_md-sys-motion.scss +0 -46
  183. package/core/tokens/m3/definitions/_md-sys-shape.scss +0 -24
  184. package/core/tokens/m3/definitions/_md-sys-state.scss +0 -13
  185. package/core/tokens/m3/definitions/_md-sys-typescale.scss +0 -308
  186. package/core/tokens/m3/index.scss +0 -47
  187. package/core/tokens/m3/mdc/_plain-tooltip.scss +0 -15
  188. package/core/tokens/m3/mtx/_alert.scss +0 -41
  189. package/core/tokens/m3/mtx/_colorpicker.scss +0 -19
  190. package/core/tokens/m3/mtx/_datetimepicker.scss +0 -140
  191. package/core/tokens/m3/mtx/_drawer.scss +0 -22
  192. package/core/tokens/m3/mtx/_grid.scss +0 -32
  193. package/core/tokens/m3/mtx/_loader.scss +0 -22
  194. package/core/tokens/m3/mtx/_popover.scss +0 -25
  195. package/core/tokens/m3/mtx/_progress.scss +0 -32
  196. package/core/tokens/m3/mtx/_select.scss +0 -76
  197. package/core/tokens/m3/mtx/_split.scss +0 -30
  198. package/datetimepicker/calendar-body.d.ts +0 -66
  199. package/datetimepicker/calendar.d.ts +0 -157
  200. package/datetimepicker/clock.d.ts +0 -101
  201. package/datetimepicker/datetimepicker-actions.d.ts +0 -36
  202. package/datetimepicker/datetimepicker-animations.d.ts +0 -11
  203. package/datetimepicker/datetimepicker-errors.d.ts +0 -2
  204. package/datetimepicker/datetimepicker-filtertype.d.ts +0 -5
  205. package/datetimepicker/datetimepicker-input.d.ts +0 -105
  206. package/datetimepicker/datetimepicker-intl.d.ts +0 -53
  207. package/datetimepicker/datetimepicker-module.d.ts +0 -22
  208. package/datetimepicker/datetimepicker-toggle.d.ts +0 -42
  209. package/datetimepicker/datetimepicker-types.d.ts +0 -6
  210. package/datetimepicker/datetimepicker.d.ts +0 -274
  211. package/datetimepicker/month-view.d.ts +0 -80
  212. package/datetimepicker/multi-year-view.d.ts +0 -86
  213. package/datetimepicker/public-api.d.ts +0 -16
  214. package/datetimepicker/time-view.d.ts +0 -147
  215. package/datetimepicker/year-view.d.ts +0 -68
  216. package/dialog/dialog-config.d.ts +0 -17
  217. package/dialog/dialog-container.d.ts +0 -11
  218. package/dialog/dialog-module.d.ts +0 -12
  219. package/dialog/dialog.d.ts +0 -15
  220. package/dialog/public-api.d.ts +0 -4
  221. package/drawer/drawer-animations.d.ts +0 -8
  222. package/drawer/drawer-config.d.ts +0 -63
  223. package/drawer/drawer-container.d.ts +0 -35
  224. package/drawer/drawer-module.d.ts +0 -10
  225. package/drawer/drawer-ref.d.ts +0 -53
  226. package/drawer/drawer.d.ts +0 -59
  227. package/drawer/public-api.d.ts +0 -6
  228. package/grid/cell.d.ts +0 -32
  229. package/grid/column-menu.d.ts +0 -39
  230. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -24
  231. package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -24
  232. package/grid/column-resize/column-resize-directives/common.d.ts +0 -13
  233. package/grid/column-resize/column-resize-module.d.ts +0 -17
  234. package/grid/column-resize/index.d.ts +0 -7
  235. package/grid/column-resize/overlay-handle.d.ts +0 -32
  236. package/grid/column-resize/resizable-directives/common.d.ts +0 -19
  237. package/grid/column-resize/resizable-directives/resizable.d.ts +0 -32
  238. package/grid/column-resize/resize-strategy.d.ts +0 -20
  239. package/grid/expansion-toggle.d.ts +0 -17
  240. package/grid/grid-module.d.ts +0 -31
  241. package/grid/grid-pipes.d.ts +0 -39
  242. package/grid/grid-utils.d.ts +0 -33
  243. package/grid/grid.d.ts +0 -268
  244. package/grid/interfaces.d.ts +0 -180
  245. package/grid/public-api.d.ts +0 -17
  246. package/grid/selectable-cell.d.ts +0 -16
  247. package/loader/loader-module.d.ts +0 -10
  248. package/loader/loader.d.ts +0 -30
  249. package/loader/public-api.d.ts +0 -2
  250. package/photoviewer/photoviewer-module.d.ts +0 -7
  251. package/photoviewer/photoviewer.d.ts +0 -17
  252. package/photoviewer/public-api.d.ts +0 -2
  253. package/popover/popover-animations.d.ts +0 -11
  254. package/popover/popover-content.d.ts +0 -43
  255. package/popover/popover-errors.d.ts +0 -14
  256. package/popover/popover-interfaces.d.ts +0 -50
  257. package/popover/popover-module.d.ts +0 -13
  258. package/popover/popover-target.d.ts +0 -7
  259. package/popover/popover-trigger.d.ts +0 -132
  260. package/popover/popover-types.d.ts +0 -10
  261. package/popover/popover.d.ts +0 -147
  262. package/popover/public-api.d.ts +0 -8
  263. package/progress/progress-module.d.ts +0 -8
  264. package/progress/progress.d.ts +0 -24
  265. package/progress/public-api.d.ts +0 -2
  266. package/public-api.d.ts +0 -2
  267. package/select/option.d.ts +0 -21
  268. package/select/public-api.d.ts +0 -5
  269. package/select/select-intl.d.ts +0 -18
  270. package/select/select-module.d.ts +0 -12
  271. package/select/select.d.ts +0 -270
  272. package/select/templates.d.ts +0 -67
  273. package/split/interfaces.d.ts +0 -52
  274. package/split/public-api.d.ts +0 -5
  275. package/split/split-module.d.ts +0 -9
  276. package/split/split-pane.d.ts +0 -53
  277. package/split/split.d.ts +0 -133
  278. package/split/utils.d.ts +0 -13
  279. package/tooltip/public-api.d.ts +0 -3
  280. package/tooltip/tooltip-animations.d.ts +0 -9
  281. package/tooltip/tooltip-module.d.ts +0 -13
  282. package/tooltip/tooltip.d.ts +0 -321
@@ -1,321 +0,0 @@
1
- import { Directionality } from '@angular/cdk/bidi';
2
- import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
3
- import { ConnectedPosition, OriginConnectionPosition, Overlay, OverlayConnectionPosition, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';
4
- import { AfterViewInit, ElementRef, InjectionToken, OnDestroy, TemplateRef } from '@angular/core';
5
- import { Observable } from 'rxjs';
6
- import * as i0 from "@angular/core";
7
- /** Possible positions for a tooltip. */
8
- export type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
9
- /**
10
- * Options for how the tooltip trigger should handle touch gestures.
11
- * See `MtxTooltip.touchGestures` for more information.
12
- */
13
- export type TooltipTouchGestures = 'auto' | 'on' | 'off';
14
- /** Possible visibility states of a tooltip. */
15
- export type TooltipVisibility = 'initial' | 'visible' | 'hidden';
16
- /** Time in ms to throttle repositioning after scroll events. */
17
- export declare const SCROLL_THROTTLE_MS = 20;
18
- /**
19
- * Creates an error to be thrown if the user supplied an invalid tooltip position.
20
- * @docs-private
21
- */
22
- export declare function getMtxTooltipInvalidPositionError(position: string): Error;
23
- /** Injection token that determines the scroll handling while a tooltip is visible. */
24
- export declare const MTX_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
25
- /**
26
- * @docs-private
27
- * @deprecated No longer used, will be removed.
28
- * @breaking-change 21.0.0
29
- */
30
- export declare function MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
31
- /**
32
- * @docs-private
33
- * @deprecated No longer used, will be removed.
34
- * @breaking-change 21.0.0
35
- */
36
- export declare const MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: {
37
- provide: InjectionToken<() => ScrollStrategy>;
38
- deps: (typeof Overlay)[];
39
- useFactory: typeof MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY;
40
- };
41
- /**
42
- * @docs-private
43
- * @deprecated No longer used, will be removed.
44
- * @breaking-change 21.0.0
45
- */
46
- export declare function MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MtxTooltipDefaultOptions;
47
- /** Injection token to be used to override the default options for `mtxTooltip`. */
48
- export declare const MTX_TOOLTIP_DEFAULT_OPTIONS: InjectionToken<MtxTooltipDefaultOptions>;
49
- /** Default `mtxTooltip` options that can be overridden. */
50
- export interface MtxTooltipDefaultOptions {
51
- /** Default delay when the tooltip is shown. */
52
- showDelay: number;
53
- /** Default delay when the tooltip is hidden. */
54
- hideDelay: number;
55
- /** Default delay when hiding the tooltip on a touch device. */
56
- touchendHideDelay: number;
57
- /** Time between the user putting the pointer on a tooltip trigger and the long press event being fired on a touch device. */
58
- touchLongPressShowDelay?: number;
59
- /** Default touch gesture handling for tooltips. */
60
- touchGestures?: TooltipTouchGestures;
61
- /** Default position for tooltips. */
62
- position?: TooltipPosition;
63
- /**
64
- * Default value for whether tooltips should be positioned near the click or touch origin
65
- * instead of outside the element bounding box.
66
- */
67
- positionAtOrigin?: boolean;
68
- /** Disables the ability for the user to interact with the tooltip element. */
69
- disableTooltipInteractivity?: boolean;
70
- /**
71
- * Default classes to be applied to the tooltip. These default classes will not be applied if
72
- * `tooltipClass` is defined directly on the tooltip element, as it will override the default.
73
- */
74
- tooltipClass?: string | string[];
75
- }
76
- /**
77
- * CSS class that will be attached to the overlay panel.
78
- * @deprecated
79
- * @breaking-change 13.0.0 remove this variable
80
- */
81
- export declare const TOOLTIP_PANEL_CLASS = "mtx-mdc-tooltip-panel";
82
- /**
83
- * Directive that attaches a material design tooltip to the host element. Animates the showing and
84
- * hiding of a tooltip provided position (defaults to below the element).
85
- *
86
- * https://material.io/design/components/tooltips.html
87
- */
88
- export declare class MtxTooltip implements OnDestroy, AfterViewInit {
89
- private _elementRef;
90
- private _ngZone;
91
- private _platform;
92
- private _ariaDescriber;
93
- private _focusMonitor;
94
- protected _dir: Directionality;
95
- private _injector;
96
- private _viewContainerRef;
97
- private _defaultOptions;
98
- _overlayRef: OverlayRef | null;
99
- _tooltipInstance: TooltipComponent | null;
100
- private _portal;
101
- private _position;
102
- private _positionAtOrigin;
103
- private _disabled;
104
- private _tooltipClass;
105
- private _viewInitialized;
106
- private _pointerExitEventsInitialized;
107
- private readonly _tooltipComponent;
108
- private _viewportMargin;
109
- private _currentPosition;
110
- private readonly _cssClassPrefix;
111
- private _ariaDescriptionPending;
112
- private _dirSubscribed;
113
- /** Allows the user to define the position of the tooltip relative to the parent element */
114
- get position(): TooltipPosition;
115
- set position(value: TooltipPosition);
116
- /**
117
- * Whether tooltip should be relative to the click or touch origin
118
- * instead of outside the element bounding box.
119
- */
120
- get positionAtOrigin(): boolean;
121
- set positionAtOrigin(value: BooleanInput);
122
- /** Disables the display of the tooltip. */
123
- get disabled(): boolean;
124
- set disabled(value: BooleanInput);
125
- /** The default delay in ms before showing the tooltip after show is called */
126
- get showDelay(): number;
127
- set showDelay(value: NumberInput);
128
- private _showDelay;
129
- /** The default delay in ms before hiding the tooltip after hide is called */
130
- get hideDelay(): number;
131
- set hideDelay(value: NumberInput);
132
- private _hideDelay;
133
- /**
134
- * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
135
- * uses a long press gesture to show and hide, however it can conflict with the native browser
136
- * gestures. To work around the conflict, Angular Material disables native gestures on the
137
- * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable
138
- * elements). The different values for this option configure the touch event handling as follows:
139
- * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native
140
- * browser gestures on particular elements. In particular, it allows text selection on inputs
141
- * and textareas, and preserves the native browser dragging on elements marked as `draggable`.
142
- * - `on` - Enables touch gestures for all elements and disables native
143
- * browser gestures with no exceptions.
144
- * - `off` - Disables touch gestures. Note that this will prevent the tooltip from
145
- * showing on touch devices.
146
- */
147
- touchGestures: TooltipTouchGestures;
148
- /** The message to be displayed in the tooltip */
149
- get message(): string | TemplateRef<any>;
150
- set message(value: string | TemplateRef<any>);
151
- private _message;
152
- /** Context to be passed to the tooltip. */
153
- get tooltipContext(): any;
154
- set tooltipContext(value: any);
155
- private _tooltipContext;
156
- /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */
157
- get tooltipClass(): string | string[] | Set<string> | {
158
- [key: string]: any;
159
- };
160
- set tooltipClass(value: string | string[] | Set<string> | {
161
- [key: string]: any;
162
- });
163
- /** Manually-bound passive event listeners. */
164
- private readonly _passiveListeners;
165
- /** Timer started at the last `touchstart` event. */
166
- private _touchstartTimeout;
167
- /** Emits when the component is destroyed. */
168
- private readonly _destroyed;
169
- /** Whether ngOnDestroyed has been called. */
170
- private _isDestroyed;
171
- constructor(...args: unknown[]);
172
- ngAfterViewInit(): void;
173
- /**
174
- * Dispose the tooltip when destroyed.
175
- */
176
- ngOnDestroy(): void;
177
- /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
178
- show(delay?: number, origin?: {
179
- x: number;
180
- y: number;
181
- }): void;
182
- /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */
183
- hide(delay?: number): void;
184
- /** Shows/hides the tooltip */
185
- toggle(origin?: {
186
- x: number;
187
- y: number;
188
- }): void;
189
- /** Returns true if the tooltip is currently visible to the user */
190
- _isTooltipVisible(): boolean;
191
- /** Create the overlay config and position strategy */
192
- private _createOverlay;
193
- /** Detaches the currently-attached tooltip. */
194
- private _detach;
195
- /** Updates the position of the current tooltip. */
196
- private _updatePosition;
197
- /** Adds the configured offset to a position. Used as a hook for child classes. */
198
- protected _addOffset(position: ConnectedPosition): ConnectedPosition;
199
- /**
200
- * Returns the origin position and a fallback position based on the user's position preference.
201
- * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
202
- */
203
- _getOrigin(): {
204
- main: OriginConnectionPosition;
205
- fallback: OriginConnectionPosition;
206
- };
207
- /** Returns the overlay position and a fallback position based on the user's preference */
208
- _getOverlayPosition(): {
209
- main: OverlayConnectionPosition;
210
- fallback: OverlayConnectionPosition;
211
- };
212
- /** Updates the tooltip message and repositions the overlay according to the new message length */
213
- private _updateTooltipMessage;
214
- /** Updates the tooltip context */
215
- private _setTooltipContext;
216
- /** Updates the tooltip class */
217
- private _setTooltipClass;
218
- /** Inverts an overlay position. */
219
- private _invertPosition;
220
- /** Updates the class on the overlay panel based on the current position of the tooltip. */
221
- private _updateCurrentPositionClass;
222
- /** Binds the pointer events to the tooltip trigger. */
223
- private _setupPointerEnterEventsIfNeeded;
224
- private _setupPointerExitEventsIfNeeded;
225
- private _addListeners;
226
- private _platformSupportsMouseEvents;
227
- /** Listener for the `wheel` event on the element. */
228
- private _wheelListener;
229
- /** Disables the native browser gestures, based on how the tooltip has been configured. */
230
- private _disableNativeGesturesIfNecessary;
231
- /** Updates the tooltip's ARIA description based on it current state. */
232
- private _syncAriaDescription;
233
- static ɵfac: i0.ɵɵFactoryDeclaration<MtxTooltip, never>;
234
- 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>;
235
- }
236
- /**
237
- * Internal component that wraps the tooltip's content.
238
- * @docs-private
239
- */
240
- export declare class TooltipComponent implements OnDestroy {
241
- private _changeDetectorRef;
242
- protected _elementRef: ElementRef<HTMLElement>;
243
- _isMultiline: boolean;
244
- /** Message to display in the tooltip */
245
- message: string | TemplateRef<any>;
246
- /** Context to be added to the tooltip */
247
- tooltipContext: any;
248
- /** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */
249
- tooltipClass: string | string[] | Set<string> | {
250
- [key: string]: any;
251
- };
252
- /** The timeout ID of any current timer set to show the tooltip */
253
- private _showTimeoutId;
254
- /** The timeout ID of any current timer set to hide the tooltip */
255
- private _hideTimeoutId;
256
- /** Element that caused the tooltip to open. */
257
- _triggerElement: HTMLElement;
258
- /** Amount of milliseconds to delay the closing sequence. */
259
- _mouseLeaveHideDelay: number;
260
- /** Whether animations are currently disabled. */
261
- private _animationsDisabled;
262
- /** Reference to the internal tooltip element. */
263
- _tooltip: ElementRef<HTMLElement>;
264
- /** Whether interactions on the page should close the tooltip */
265
- private _closeOnInteraction;
266
- /** Whether the tooltip is currently visible. */
267
- private _isVisible;
268
- /** Subject for notifying that the tooltip has been hidden from the view */
269
- private readonly _onHide;
270
- /** Name of the show animation and the class that toggles it. */
271
- private readonly _showAnimation;
272
- /** Name of the hide animation and the class that toggles it. */
273
- private readonly _hideAnimation;
274
- constructor(...args: unknown[]);
275
- /**
276
- * Shows the tooltip with an animation originating from the provided origin
277
- * @param delay Amount of milliseconds to the delay showing the tooltip.
278
- */
279
- show(delay: number): void;
280
- /**
281
- * Begins the animation to hide the tooltip after the provided delay in ms.
282
- * @param delay Amount of milliseconds to delay showing the tooltip.
283
- */
284
- hide(delay: number): void;
285
- /** Returns an observable that notifies when the tooltip has been hidden from view. */
286
- afterHidden(): Observable<void>;
287
- /** Whether the tooltip is being displayed. */
288
- isVisible(): boolean;
289
- ngOnDestroy(): void;
290
- /**
291
- * Interactions on the HTML body should close the tooltip immediately as defined in the
292
- * material design spec.
293
- * https://material.io/design/components/tooltips.html#behavior
294
- */
295
- _handleBodyInteraction(): void;
296
- /**
297
- * Marks that the tooltip needs to be checked in the next change detection run.
298
- * Mainly used for rendering the initial text before positioning a tooltip, which
299
- * can be problematic in components with OnPush change detection.
300
- */
301
- _markForCheck(): void;
302
- _handleMouseLeave({ relatedTarget }: MouseEvent): void;
303
- /**
304
- * Callback for when the timeout in this.show() gets completed.
305
- * This method is only needed by the mdc-tooltip, and so it is only implemented
306
- * in the mdc-tooltip, not here.
307
- */
308
- protected _onShow(): void;
309
- /** Whether the tooltip text has overflown to the next line */
310
- private _isTooltipMultiline;
311
- /** Event listener dispatched when an animation on the tooltip finishes. */
312
- _handleAnimationEnd({ animationName }: AnimationEvent): void;
313
- /** Cancels any pending animation sequences. */
314
- _cancelPendingAnimations(): void;
315
- /** Handles the cleanup after an animation has finished. */
316
- private _finalizeAnimation;
317
- /** Toggles the visibility of the tooltip element. */
318
- private _toggleVisibility;
319
- static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
320
- static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "mtx-tooltip-component", never, {}, {}, never, never, true, never>;
321
- }