@ng-matero/extensions 18.0.3 → 18.1.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.
Files changed (177) hide show
  1. package/README.md +27 -2
  2. package/alert/alert.scss +13 -16
  3. package/colorpicker/colorpicker-toggle.scss +1 -1
  4. package/colorpicker/colorpicker.d.ts +1 -1
  5. package/column-resize/resize-strategy.d.ts +1 -1
  6. package/core/m2/_typography.scss +172 -0
  7. package/core/pipes/is-template-ref.pipe.d.ts +2 -2
  8. package/core/style/_elevation.scss +167 -0
  9. package/core/tokens/_m3-tokens.scss +13 -10
  10. package/core/tokens/_token-utils.scss +120 -30
  11. package/core/tokens/m2/mtx/_alert.scss +17 -9
  12. package/core/tokens/m2/mtx/_datetimepicker.scss +3 -3
  13. package/core/tokens/m2/mtx/_drawer.scss +2 -2
  14. package/core/tokens/m2/mtx/_grid.scss +0 -2
  15. package/core/tokens/m2/mtx/_popover.scss +3 -0
  16. package/core/tokens/m2/mtx/_select.scss +2 -4
  17. package/core/tokens/m3/definitions/_index.scss +8 -0
  18. package/core/tokens/m3/definitions/_md-ref-palette.scss +100 -0
  19. package/core/tokens/m3/definitions/_md-ref-typeface.scss +14 -0
  20. package/core/tokens/m3/definitions/_md-sys-color.scss +126 -0
  21. package/core/tokens/m3/definitions/_md-sys-elevation.scss +15 -0
  22. package/core/tokens/m3/definitions/_md-sys-motion.scss +46 -0
  23. package/core/tokens/m3/definitions/_md-sys-shape.scss +24 -0
  24. package/core/tokens/m3/definitions/_md-sys-state.scss +13 -0
  25. package/core/tokens/m3/definitions/_md-sys-typescale.scss +308 -0
  26. package/core/tokens/m3/mtx/_alert.scss +19 -9
  27. package/core/tokens/m3/mtx/_datetimepicker.scss +3 -3
  28. package/core/tokens/m3/mtx/_drawer.scss +2 -2
  29. package/core/tokens/m3/mtx/_grid.scss +0 -2
  30. package/core/tokens/m3/mtx/_popover.scss +3 -0
  31. package/core/tokens/m3/mtx/_select.scss +2 -2
  32. package/core/typography/_all-typography.scss +2 -2
  33. package/datetimepicker/calendar.d.ts +4 -2
  34. package/datetimepicker/calendar.scss +38 -0
  35. package/datetimepicker/datetimepicker-actions.d.ts +32 -0
  36. package/datetimepicker/datetimepicker-actions.scss +18 -0
  37. package/datetimepicker/datetimepicker-animations.d.ts +1 -1
  38. package/datetimepicker/datetimepicker-content.scss +40 -22
  39. package/datetimepicker/datetimepicker-module.d.ts +2 -1
  40. package/datetimepicker/datetimepicker-toggle.scss +1 -1
  41. package/datetimepicker/datetimepicker.d.ts +33 -3
  42. package/datetimepicker/public-api.d.ts +1 -0
  43. package/datetimepicker/time.d.ts +12 -8
  44. package/datetimepicker/time.scss +6 -6
  45. package/dialog/dialog.d.ts +1 -1
  46. package/drawer/drawer-config.d.ts +8 -6
  47. package/drawer/drawer-container.d.ts +12 -68
  48. package/drawer/drawer-container.scss +4 -6
  49. package/drawer/drawer-module.d.ts +2 -2
  50. package/drawer/drawer-ref.d.ts +13 -4
  51. package/drawer/drawer.d.ts +24 -24
  52. package/esm2022/alert/alert-module.mjs +5 -5
  53. package/esm2022/alert/alert.mjs +6 -5
  54. package/esm2022/button/button-loading.mjs +3 -3
  55. package/esm2022/button/button-module.mjs +4 -4
  56. package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
  57. package/esm2022/checkbox-group/checkbox-group.mjs +3 -3
  58. package/esm2022/colorpicker/colorpicker-input.mjs +3 -3
  59. package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
  60. package/esm2022/colorpicker/colorpicker-toggle.mjs +6 -6
  61. package/esm2022/colorpicker/colorpicker.mjs +8 -8
  62. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  63. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
  64. package/esm2022/column-resize/column-resize-module.mjs +4 -4
  65. package/esm2022/column-resize/column-resize-notifier.mjs +6 -6
  66. package/esm2022/column-resize/column-resize.mjs +3 -3
  67. package/esm2022/column-resize/column-size-store.mjs +3 -3
  68. package/esm2022/column-resize/event-dispatcher.mjs +3 -3
  69. package/esm2022/column-resize/overlay-handle.mjs +3 -3
  70. package/esm2022/column-resize/resizable.mjs +3 -3
  71. package/esm2022/column-resize/resize-strategy.mjs +9 -9
  72. package/esm2022/core/datetime/datetime.module.mjs +8 -8
  73. package/esm2022/core/datetime/native-datetime-adapter.mjs +3 -3
  74. package/esm2022/core/pipes/is-template-ref.pipe.mjs +3 -3
  75. package/esm2022/core/pipes/pipes.module.mjs +4 -4
  76. package/esm2022/core/pipes/to-observable.pipe.mjs +3 -3
  77. package/esm2022/datetimepicker/calendar-body.mjs +3 -3
  78. package/esm2022/datetimepicker/calendar.mjs +10 -6
  79. package/esm2022/datetimepicker/clock.mjs +3 -3
  80. package/esm2022/datetimepicker/datetimepicker-actions.mjs +88 -0
  81. package/esm2022/datetimepicker/datetimepicker-animations.mjs +3 -3
  82. package/esm2022/datetimepicker/datetimepicker-input.mjs +3 -3
  83. package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
  84. package/esm2022/datetimepicker/datetimepicker-module.mjs +24 -7
  85. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +6 -6
  86. package/esm2022/datetimepicker/datetimepicker.mjs +92 -20
  87. package/esm2022/datetimepicker/month-view.mjs +7 -5
  88. package/esm2022/datetimepicker/multi-year-view.mjs +7 -5
  89. package/esm2022/datetimepicker/public-api.mjs +2 -1
  90. package/esm2022/datetimepicker/time.mjs +29 -20
  91. package/esm2022/datetimepicker/year-view.mjs +7 -5
  92. package/esm2022/dialog/dialog-container.mjs +3 -3
  93. package/esm2022/dialog/dialog-module.mjs +4 -4
  94. package/esm2022/dialog/dialog.mjs +3 -3
  95. package/esm2022/drawer/drawer-config.mjs +2 -2
  96. package/esm2022/drawer/drawer-container.mjs +32 -196
  97. package/esm2022/drawer/drawer-module.mjs +7 -7
  98. package/esm2022/drawer/drawer-ref.mjs +27 -18
  99. package/esm2022/drawer/drawer.mjs +98 -121
  100. package/esm2022/grid/cell.mjs +3 -3
  101. package/esm2022/grid/column-menu.mjs +5 -5
  102. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  103. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +3 -3
  104. package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
  105. package/esm2022/grid/column-resize/overlay-handle.mjs +3 -3
  106. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -3
  107. package/esm2022/grid/column-resize/resize-strategy.mjs +3 -3
  108. package/esm2022/grid/expansion-toggle.mjs +3 -3
  109. package/esm2022/grid/grid-module.mjs +4 -4
  110. package/esm2022/grid/grid-pipes.mjs +21 -21
  111. package/esm2022/grid/grid-utils.mjs +3 -3
  112. package/esm2022/grid/grid.mjs +5 -5
  113. package/esm2022/grid/selectable-cell.mjs +3 -3
  114. package/esm2022/loader/loader-module.mjs +4 -4
  115. package/esm2022/loader/loader.mjs +3 -3
  116. package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
  117. package/esm2022/photoviewer/photoviewer.mjs +3 -3
  118. package/esm2022/popover/popover-content.mjs +6 -6
  119. package/esm2022/popover/popover-interfaces.mjs +1 -1
  120. package/esm2022/popover/popover-module.mjs +4 -4
  121. package/esm2022/popover/popover-target.mjs +3 -3
  122. package/esm2022/popover/popover-trigger.mjs +3 -3
  123. package/esm2022/popover/popover.mjs +29 -19
  124. package/esm2022/progress/progress-module.mjs +4 -4
  125. package/esm2022/progress/progress.mjs +3 -3
  126. package/esm2022/select/option.mjs +3 -3
  127. package/esm2022/select/select-module.mjs +4 -4
  128. package/esm2022/select/select.mjs +3 -3
  129. package/esm2022/select/templates.mjs +33 -33
  130. package/esm2022/split/split-module.mjs +4 -4
  131. package/esm2022/split/split-pane.mjs +3 -3
  132. package/esm2022/split/split.mjs +3 -3
  133. package/esm2022/tooltip/tooltip-module.mjs +4 -4
  134. package/esm2022/tooltip/tooltip.mjs +20 -18
  135. package/fesm2022/mtxAlert.mjs +9 -8
  136. package/fesm2022/mtxAlert.mjs.map +1 -1
  137. package/fesm2022/mtxButton.mjs +7 -7
  138. package/fesm2022/mtxCheckboxGroup.mjs +7 -7
  139. package/fesm2022/mtxColorpicker.mjs +20 -20
  140. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  141. package/fesm2022/mtxColumnResize.mjs +40 -40
  142. package/fesm2022/mtxCore.mjs +21 -21
  143. package/fesm2022/mtxDatetimepicker.mjs +273 -82
  144. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  145. package/fesm2022/mtxDialog.mjs +10 -10
  146. package/fesm2022/mtxDrawer.mjs +160 -340
  147. package/fesm2022/mtxDrawer.mjs.map +1 -1
  148. package/fesm2022/mtxGrid.mjs +68 -68
  149. package/fesm2022/mtxGrid.mjs.map +1 -1
  150. package/fesm2022/mtxLoader.mjs +7 -7
  151. package/fesm2022/mtxPhotoviewer.mjs +7 -7
  152. package/fesm2022/mtxPopover.mjs +44 -34
  153. package/fesm2022/mtxPopover.mjs.map +1 -1
  154. package/fesm2022/mtxProgress.mjs +7 -7
  155. package/fesm2022/mtxSelect.mjs +43 -43
  156. package/fesm2022/mtxSplit.mjs +10 -10
  157. package/fesm2022/mtxTooltip.mjs +23 -21
  158. package/fesm2022/mtxTooltip.mjs.map +1 -1
  159. package/grid/column-menu.scss +0 -1
  160. package/grid/grid.scss +2 -0
  161. package/package.json +7 -7
  162. package/popover/popover-interfaces.d.ts +0 -1
  163. package/popover/popover.d.ts +2 -5
  164. package/prebuilt-themes/azure-blue.css +1 -1
  165. package/prebuilt-themes/cyan-orange.css +1 -1
  166. package/prebuilt-themes/deeppurple-amber.css +1 -1
  167. package/prebuilt-themes/indigo-pink.css +1 -1
  168. package/prebuilt-themes/magenta-violet.css +1 -1
  169. package/prebuilt-themes/pink-bluegrey.css +1 -1
  170. package/prebuilt-themes/purple-green.css +1 -1
  171. package/prebuilt-themes/rose-red.css +1 -1
  172. package/select/option.d.ts +1 -1
  173. package/select/select.scss +2 -2
  174. package/tooltip/_tooltip-theme.scss +19 -15
  175. package/tooltip/tooltip.d.ts +3 -0
  176. package/tooltip/tooltip.scss +61 -29
  177. package/core/typography/_typography.scss +0 -40
@@ -1,30 +1,11 @@
1
- @use '@material/theme/custom-properties' as mdc-custom-properties;
2
- @use '@material/tooltip/tooltip' as mdc-tooltip;
3
- @use '@material/tooltip/plain-tooltip-theme' as mdc-plain-tooltip-theme;
4
- @use '../core/tokens/m2/mdc/plain-tooltip' as m2-mdc-plain-tooltip;
5
-
6
- @include mdc-custom-properties.configure($emit-fallback-values: false, $emit-fallback-vars: false) {
7
- $mdc-tooltip-token-slots: m2-mdc-plain-tooltip.get-token-slots();
8
-
9
- // Add the MDC tooltip static styles.
10
- @include mdc-tooltip.static-styles();
11
-
12
- .mtx-mdc-tooltip {
13
- // Add the official slots for the MDC tooltip.
14
- @include mdc-plain-tooltip-theme.theme-styles($mdc-tooltip-token-slots);
15
- }
16
- }
17
-
18
- // Fix tooltip' positioning when mat-tooltip and mtx-tooltip coexist.
19
- .mdc-tooltip.mat-mdc-tooltip,
20
- .mdc-tooltip.mtx-mdc-tooltip {
21
- position: relative;
22
- }
1
+ @use '../core/tokens/m2/mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
2
+ @use '../core/tokens/token-utils';
23
3
 
24
4
  .mtx-mdc-tooltip {
25
5
  // We don't use MDC's positioning so this has to be relative.
26
6
  position: relative;
27
7
  transform: scale(0);
8
+ display: inline-flex;
28
9
 
29
10
  // Increases the area of the tooltip so the user's pointer can go from the trigger directly to it.
30
11
  &::before {
@@ -56,23 +37,74 @@
56
37
  }
57
38
  }
58
39
 
59
- &._mtx-animation-noopable {
40
+ &._mat-animation-noopable {
60
41
  animation: none;
61
42
  transform: scale(1);
62
43
  }
63
44
  }
64
45
 
46
+ .mtx-mdc-tooltip-surface {
47
+ word-break: normal;
48
+ overflow-wrap: anywhere;
49
+ padding: 4px 8px;
50
+ min-width: 40px;
51
+ max-width: 200px;
52
+ min-height: 24px;
53
+ max-height: 40vh;
54
+ box-sizing: border-box;
55
+ overflow: hidden;
56
+ text-align: center;
57
+
58
+ // TODO(crisbeto): these styles aren't necessary, but they were present in
59
+ // MDC and removing them is likely to cause screenshot differences.
60
+ will-change: transform, opacity;
61
+
62
+ @include token-utils.use-tokens(
63
+ tokens-mdc-plain-tooltip.$prefix,
64
+ tokens-mdc-plain-tooltip.get-token-slots()
65
+ ) {
66
+ @include token-utils.create-token-slot(background-color, container-color);
67
+ @include token-utils.create-token-slot(color, supporting-text-color);
68
+ @include token-utils.create-token-slot(border-radius, container-shape);
69
+ @include token-utils.create-token-slot(font-family, supporting-text-font);
70
+ @include token-utils.create-token-slot(font-size, supporting-text-size);
71
+ @include token-utils.create-token-slot(font-weight, supporting-text-weight);
72
+ @include token-utils.create-token-slot(line-height, supporting-text-line-height);
73
+ @include token-utils.create-token-slot(letter-spacing, supporting-text-tracking);
74
+ }
75
+
76
+ // Renders an outline in high contrast mode.
77
+ &::before {
78
+ position: absolute;
79
+ box-sizing: border-box;
80
+ width: 100%;
81
+ height: 100%;
82
+ top: 0;
83
+ left: 0;
84
+ border: 1px solid transparent;
85
+ border-radius: inherit;
86
+ content: '';
87
+ pointer-events: none;
88
+ }
89
+
90
+ .mdc-tooltip--multiline & {
91
+ text-align: left;
92
+ }
93
+
94
+ [dir='rtl'] .mdc-tooltip--multiline & {
95
+ text-align: right;
96
+ }
97
+ }
98
+
65
99
  // We need the additional specificity here, because it can be overridden by `.cdk-overlay-panel`.
66
100
  .mtx-mdc-tooltip-panel.mtx-mdc-tooltip-panel-non-interactive {
67
101
  pointer-events: none;
68
102
  }
69
103
 
70
- // TODO(crisbeto): we may be able to use MDC directly for these animations.
71
-
72
104
  @keyframes mtx-mdc-tooltip-show {
73
105
  0% {
74
106
  opacity: 0;
75
- transform: scale(.8);
107
+ transform: scale(0.8);
76
108
  }
77
109
 
78
110
  100% {
@@ -89,14 +121,14 @@
89
121
 
90
122
  100% {
91
123
  opacity: 0;
92
- transform: scale(.8);
124
+ transform: scale(0.8);
93
125
  }
94
126
  }
95
127
 
96
128
  .mtx-mdc-tooltip-show {
97
- animation: mtx-mdc-tooltip-show 150ms cubic-bezier(0, 0, .2, 1) forwards;
129
+ animation: mtx-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards;
98
130
  }
99
131
 
100
132
  .mtx-mdc-tooltip-hide {
101
- animation: mtx-mdc-tooltip-hide 75ms cubic-bezier(.4, 0, 1, 1) forwards;
133
+ animation: mtx-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards;
102
134
  }
@@ -1,40 +0,0 @@
1
- @use '@material/typography' as mdc-typography;
2
- @use 'sass:map';
3
-
4
- /// Defines a typography level from the Material Design spec.
5
- /// @param {String} $font-size The font-size for this level.
6
- /// @param {String | Number} $line-height The line-height for this level.
7
- /// @param {String | Number} $font-weight The font-weight for this level.
8
- /// @param {String} $font-family The font-family for this level.
9
- /// @param {String} $letter-spacing The letter-spacing for this level.
10
- /// @returns {Map} A map representing the definition of this typographic level.
11
- @function define-typography-level(
12
- $font-size,
13
- $line-height: $font-size,
14
- $font-weight: 400,
15
- $font-family: null,
16
- $letter-spacing: normal) {
17
-
18
- @return (
19
- font-size: $font-size,
20
- line-height: $line-height,
21
- font-weight: $font-weight,
22
- font-family: $font-family,
23
- letter-spacing: $letter-spacing
24
- );
25
- }
26
-
27
- // Converts an MDC typography level config to an Angular Material one.
28
- @function typography-config-level-from-mdc($mdc-level, $font-family: null) {
29
- $mdc-level-config: map.get(mdc-typography.$styles, $mdc-level);
30
-
31
- // Explicitly default the font family to null since we'll apply it globally
32
- // through the `define-typgraphy-config`/`define-legacy-typography-config`.
33
- @return define-typography-level(
34
- $font-family: $font-family,
35
- $font-size: map.get($mdc-level-config, font-size),
36
- $line-height: map.get($mdc-level-config, line-height),
37
- $font-weight: map.get($mdc-level-config, font-weight),
38
- $letter-spacing: map.get($mdc-level-config, letter-spacing)
39
- );
40
- }