@angular/material 19.0.0-next.9 → 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/autocomplete/_autocomplete-theme.scss +8 -4
- package/autocomplete/index.d.ts +5 -6
- package/badge/_badge-theme.scss +10 -6
- package/bottom-sheet/_bottom-sheet-theme.scss +8 -4
- package/button/_button-theme.scss +10 -6
- package/button/_fab-theme.scss +10 -6
- package/button/_icon-button-theme.scss +8 -4
- package/button/index.d.ts +1 -1
- package/button-toggle/_button-toggle-theme.scss +11 -6
- package/card/_card-theme.scss +8 -4
- package/card/index.d.ts +2 -3
- package/checkbox/_checkbox-theme.scss +10 -6
- package/chips/_chips-theme.scss +10 -6
- package/core/_core-theme.scss +4 -7
- package/core/_core.scss +2 -5
- package/core/option/_optgroup-theme.scss +8 -4
- package/core/option/_option-theme.scss +10 -6
- package/core/ripple/_ripple-theme.scss +8 -4
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +10 -6
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/tokens/_m3-system.scss +55 -39
- package/datepicker/_datepicker-theme.scss +10 -6
- package/datepicker/index.d.ts +32 -33
- package/dialog/_dialog-theme.scss +8 -4
- package/divider/_divider-theme.scss +8 -4
- package/expansion/_expansion-theme.scss +8 -4
- package/fesm2022/autocomplete/testing.mjs +2 -5
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +220 -141
- 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 +41 -30
- 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 +76 -54
- 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 +78 -40
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +87 -60
- 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 +38 -40
- 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 +99 -56
- 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 +303 -251
- 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 +217 -160
- 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 +788 -533
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +15 -9
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +210 -140
- 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 +7 -9
- 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 +76 -65
- 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 +165 -111
- 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 +65 -43
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +6 -6
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +62 -42
- 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 +101 -69
- 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 +175 -164
- 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 +171 -118
- 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 +79 -54
- 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 +33 -32
- 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 +25 -11
- 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 +119 -82
- 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 +215 -177
- 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 +125 -112
- 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 +72 -41
- 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 +255 -185
- 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 +133 -98
- 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 +89 -68
- 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 +133 -95
- 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 +164 -159
- 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 +308 -225
- 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 +152 -146
- 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 +22 -12
- 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 +93 -69
- 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 +48 -46
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +9 -5
- package/form-field/index.d.ts +8 -9
- package/grid-list/_grid-list-theme.scss +8 -4
- package/icon/_icon-theme.scss +10 -6
- package/input/_input-theme.scss +8 -4
- package/list/_list-theme.scss +8 -4
- package/list/index.d.ts +20 -21
- package/menu/_menu-theme.scss +8 -4
- package/menu/index.d.ts +8 -9
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +8 -4
- 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 +11 -9
- package/progress-spinner/_progress-spinner-theme.scss +11 -9
- package/progress-spinner/index.d.ts +3 -4
- package/radio/_radio-theme.scss +10 -6
- package/radio/index.d.ts +2 -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/theme-color/index_bundled.js +35 -9
- package/schematics/ng-generate/theme-color/index_bundled.js.map +2 -2
- package/schematics/ng-update/index_bundled.js +6 -1
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_select-theme.scss +10 -6
- package/select/index.d.ts +6 -7
- package/sidenav/_sidenav-theme.scss +8 -4
- package/slide-toggle/_slide-toggle-theme.scss +10 -6
- package/slider/_slider-theme.scss +10 -6
- package/snack-bar/_snack-bar-theme.scss +10 -6
- package/sort/_sort-theme.scss +8 -4
- package/stepper/_stepper-theme.scss +10 -6
- package/stepper/index.d.ts +14 -15
- package/table/_table-theme.scss +8 -4
- package/tabs/_tabs-theme.scss +10 -6
- package/timepicker/_timepicker-theme.scss +10 -6
- package/toolbar/_toolbar-theme.scss +10 -6
- package/tooltip/_tooltip-theme.scss +8 -4
- package/tooltip/index.d.ts +5 -6
- package/tree/_tree-theme.scss +8 -4
package/fesm2022/slider.mjs
CHANGED
|
@@ -53,6 +53,12 @@ const MAT_SLIDER_VISUAL_THUMB = new InjectionToken('_MatSliderVisualThumb');
|
|
|
53
53
|
* @breaking-change 17.0.0
|
|
54
54
|
*/
|
|
55
55
|
class MatSliderChange {
|
|
56
|
+
/** The MatSliderThumb that was interacted with. */
|
|
57
|
+
source;
|
|
58
|
+
/** The MatSlider that was interacted with. */
|
|
59
|
+
parent;
|
|
60
|
+
/** The new value of the source slider. */
|
|
61
|
+
value;
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
/**
|
|
@@ -63,76 +69,41 @@ class MatSliderChange {
|
|
|
63
69
|
* @docs-private
|
|
64
70
|
*/
|
|
65
71
|
class MatSliderVisualThumb {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this._showFocusRipple();
|
|
102
|
-
this._hostElement.classList.add('mdc-slider__thumb--focused');
|
|
103
|
-
};
|
|
104
|
-
this._onBlur = () => {
|
|
105
|
-
// Happens when the user tabs away while still dragging a thumb.
|
|
106
|
-
if (!this._isActive) {
|
|
107
|
-
this._hideRipple(this._focusRippleRef);
|
|
108
|
-
}
|
|
109
|
-
// Happens when the user tabs away from a thumb but their cursor is still over it.
|
|
110
|
-
if (this._isHovered) {
|
|
111
|
-
this._showHoverRipple();
|
|
112
|
-
}
|
|
113
|
-
this._hostElement.classList.remove('mdc-slider__thumb--focused');
|
|
114
|
-
};
|
|
115
|
-
this._onDragStart = (event) => {
|
|
116
|
-
if (event.button !== 0) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
this._isActive = true;
|
|
120
|
-
this._showActiveRipple();
|
|
121
|
-
};
|
|
122
|
-
this._onDragEnd = () => {
|
|
123
|
-
this._isActive = false;
|
|
124
|
-
this._hideRipple(this._activeRippleRef);
|
|
125
|
-
// Happens when the user starts dragging a thumb, tabs away, and then stops dragging.
|
|
126
|
-
if (!this._sliderInput._isFocused) {
|
|
127
|
-
this._hideRipple(this._focusRippleRef);
|
|
128
|
-
}
|
|
129
|
-
// On Safari we need to immediately re-show the hover ripple because
|
|
130
|
-
// sliders do not retain focus from pointer events on that platform.
|
|
131
|
-
if (this._platform.SAFARI) {
|
|
132
|
-
this._showHoverRipple();
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
}
|
|
72
|
+
_cdr = inject(ChangeDetectorRef);
|
|
73
|
+
_ngZone = inject(NgZone);
|
|
74
|
+
_slider = inject(MAT_SLIDER);
|
|
75
|
+
/** Whether the slider displays a numeric value label upon pressing the thumb. */
|
|
76
|
+
discrete;
|
|
77
|
+
/** Indicates which slider thumb this input corresponds to. */
|
|
78
|
+
thumbPosition;
|
|
79
|
+
/** The display value of the slider thumb. */
|
|
80
|
+
valueIndicatorText;
|
|
81
|
+
/** The MatRipple for this slider thumb. */
|
|
82
|
+
_ripple;
|
|
83
|
+
/** The slider thumb knob. */
|
|
84
|
+
_knob;
|
|
85
|
+
/** The slider thumb value indicator container. */
|
|
86
|
+
_valueIndicatorContainer;
|
|
87
|
+
/** The slider input corresponding to this slider thumb. */
|
|
88
|
+
_sliderInput;
|
|
89
|
+
/** The native html element of the slider input corresponding to this thumb. */
|
|
90
|
+
_sliderInputEl;
|
|
91
|
+
/** The RippleRef for the slider thumbs hover state. */
|
|
92
|
+
_hoverRippleRef;
|
|
93
|
+
/** The RippleRef for the slider thumbs focus state. */
|
|
94
|
+
_focusRippleRef;
|
|
95
|
+
/** The RippleRef for the slider thumbs active state. */
|
|
96
|
+
_activeRippleRef;
|
|
97
|
+
/** Whether the slider thumb is currently being hovered. */
|
|
98
|
+
_isHovered = false;
|
|
99
|
+
/** Whether the slider thumb is currently being pressed. */
|
|
100
|
+
_isActive = false;
|
|
101
|
+
/** Whether the value indicator tooltip is visible. */
|
|
102
|
+
_isValueIndicatorVisible = false;
|
|
103
|
+
/** The host native HTML input element. */
|
|
104
|
+
_hostElement = inject(ElementRef).nativeElement;
|
|
105
|
+
_platform = inject(Platform);
|
|
106
|
+
constructor() { }
|
|
136
107
|
ngAfterViewInit() {
|
|
137
108
|
const sliderInput = this._slider._getInput(this.thumbPosition);
|
|
138
109
|
// No-op if the slider isn't configured properly. `MatSlider` will
|
|
@@ -166,6 +137,62 @@ class MatSliderVisualThumb {
|
|
|
166
137
|
input.removeEventListener('blur', this._onBlur);
|
|
167
138
|
}
|
|
168
139
|
}
|
|
140
|
+
_onPointerMove = (event) => {
|
|
141
|
+
if (this._sliderInput._isFocused) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const rect = this._hostElement.getBoundingClientRect();
|
|
145
|
+
const isHovered = this._slider._isCursorOnSliderThumb(event, rect);
|
|
146
|
+
this._isHovered = isHovered;
|
|
147
|
+
if (isHovered) {
|
|
148
|
+
this._showHoverRipple();
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
this._hideRipple(this._hoverRippleRef);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
_onMouseLeave = () => {
|
|
155
|
+
this._isHovered = false;
|
|
156
|
+
this._hideRipple(this._hoverRippleRef);
|
|
157
|
+
};
|
|
158
|
+
_onFocus = () => {
|
|
159
|
+
// We don't want to show the hover ripple on top of the focus ripple.
|
|
160
|
+
// Happen when the users cursor is over a thumb and then the user tabs to it.
|
|
161
|
+
this._hideRipple(this._hoverRippleRef);
|
|
162
|
+
this._showFocusRipple();
|
|
163
|
+
this._hostElement.classList.add('mdc-slider__thumb--focused');
|
|
164
|
+
};
|
|
165
|
+
_onBlur = () => {
|
|
166
|
+
// Happens when the user tabs away while still dragging a thumb.
|
|
167
|
+
if (!this._isActive) {
|
|
168
|
+
this._hideRipple(this._focusRippleRef);
|
|
169
|
+
}
|
|
170
|
+
// Happens when the user tabs away from a thumb but their cursor is still over it.
|
|
171
|
+
if (this._isHovered) {
|
|
172
|
+
this._showHoverRipple();
|
|
173
|
+
}
|
|
174
|
+
this._hostElement.classList.remove('mdc-slider__thumb--focused');
|
|
175
|
+
};
|
|
176
|
+
_onDragStart = (event) => {
|
|
177
|
+
if (event.button !== 0) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
this._isActive = true;
|
|
181
|
+
this._showActiveRipple();
|
|
182
|
+
};
|
|
183
|
+
_onDragEnd = () => {
|
|
184
|
+
this._isActive = false;
|
|
185
|
+
this._hideRipple(this._activeRippleRef);
|
|
186
|
+
// Happens when the user starts dragging a thumb, tabs away, and then stops dragging.
|
|
187
|
+
if (!this._sliderInput._isFocused) {
|
|
188
|
+
this._hideRipple(this._focusRippleRef);
|
|
189
|
+
}
|
|
190
|
+
// On Safari we need to immediately re-show the hover ripple because
|
|
191
|
+
// sliders do not retain focus from pointer events on that platform.
|
|
192
|
+
if (this._platform.SAFARI) {
|
|
193
|
+
this._showHoverRipple();
|
|
194
|
+
}
|
|
195
|
+
};
|
|
169
196
|
/** Handles displaying the hover ripple. */
|
|
170
197
|
_showHoverRipple() {
|
|
171
198
|
if (!this._isShowingRipple(this._hoverRippleRef)) {
|
|
@@ -253,8 +280,8 @@ class MatSliderVisualThumb {
|
|
|
253
280
|
this._isShowingRipple(this._focusRippleRef) ||
|
|
254
281
|
this._isShowingRipple(this._activeRippleRef));
|
|
255
282
|
}
|
|
256
|
-
static
|
|
257
|
-
static
|
|
283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderVisualThumb, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
284
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.10", type: MatSliderVisualThumb, isStandalone: true, selector: "mat-slider-visual-thumb", inputs: { discrete: "discrete", thumbPosition: "thumbPosition", valueIndicatorText: "valueIndicatorText" }, host: { classAttribute: "mdc-slider__thumb mat-mdc-slider-visual-thumb" }, providers: [{ provide: MAT_SLIDER_VISUAL_THUMB, useExisting: MatSliderVisualThumb }], viewQueries: [{ propertyName: "_ripple", first: true, predicate: MatRipple, descendants: true }, { propertyName: "_knob", first: true, predicate: ["knob"], descendants: true }, { propertyName: "_valueIndicatorContainer", first: true, predicate: ["valueIndicatorContainer"], descendants: true }], ngImport: i0, template: "@if (discrete) {\n <div class=\"mdc-slider__value-indicator-container\" #valueIndicatorContainer>\n <div class=\"mdc-slider__value-indicator\">\n <span class=\"mdc-slider__value-indicator-text\">{{valueIndicatorText}}</span>\n </div>\n </div>\n}\n<div class=\"mdc-slider__thumb-knob\" #knob></div>\n<div matRipple class=\"mat-focus-indicator\" [matRippleDisabled]=\"true\"></div>\n", styles: [".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
258
285
|
}
|
|
259
286
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderVisualThumb, decorators: [{
|
|
260
287
|
type: Component,
|
|
@@ -287,6 +314,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
287
314
|
* behavior to the native `<input type="range">` element.
|
|
288
315
|
*/
|
|
289
316
|
class MatSlider {
|
|
317
|
+
_ngZone = inject(NgZone);
|
|
318
|
+
_cdr = inject(ChangeDetectorRef);
|
|
319
|
+
_elementRef = inject(ElementRef);
|
|
320
|
+
_dir = inject(Directionality, { optional: true });
|
|
321
|
+
_globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {
|
|
322
|
+
optional: true,
|
|
323
|
+
});
|
|
324
|
+
/** The active portion of the slider track. */
|
|
325
|
+
_trackActive;
|
|
326
|
+
/** The slider thumb(s). */
|
|
327
|
+
_thumbs;
|
|
328
|
+
/** The sliders hidden range input(s). */
|
|
329
|
+
_input;
|
|
330
|
+
/** The sliders hidden range input(s). */
|
|
331
|
+
_inputs;
|
|
290
332
|
/** Whether the slider is disabled. */
|
|
291
333
|
get disabled() {
|
|
292
334
|
return this._disabled;
|
|
@@ -302,6 +344,7 @@ class MatSlider {
|
|
|
302
344
|
startInput.disabled = this._disabled;
|
|
303
345
|
}
|
|
304
346
|
}
|
|
347
|
+
_disabled = false;
|
|
305
348
|
/** Whether the slider displays a numeric value label upon pressing the thumb. */
|
|
306
349
|
get discrete() {
|
|
307
350
|
return this._discrete;
|
|
@@ -310,6 +353,9 @@ class MatSlider {
|
|
|
310
353
|
this._discrete = v;
|
|
311
354
|
this._updateValueIndicatorUIs();
|
|
312
355
|
}
|
|
356
|
+
_discrete = false;
|
|
357
|
+
/** Whether the slider displays tick marks along the slider track. */
|
|
358
|
+
showTickMarks = false;
|
|
313
359
|
/** The minimum value that the slider can have. */
|
|
314
360
|
get min() {
|
|
315
361
|
return this._min;
|
|
@@ -320,6 +366,17 @@ class MatSlider {
|
|
|
320
366
|
this._updateMin(min);
|
|
321
367
|
}
|
|
322
368
|
}
|
|
369
|
+
_min = 0;
|
|
370
|
+
/**
|
|
371
|
+
* Theme color of the slider. This API is supported in M2 themes only, it
|
|
372
|
+
* has no effect in M3 themes.
|
|
373
|
+
*
|
|
374
|
+
* For information on applying color variants in M3, see
|
|
375
|
+
* https://material.angular.io/guide/theming#using-component-color-variants.
|
|
376
|
+
*/
|
|
377
|
+
color;
|
|
378
|
+
/** Whether ripples are disabled in the slider. */
|
|
379
|
+
disableRipple = false;
|
|
323
380
|
_updateMin(min) {
|
|
324
381
|
const prevMin = this._min;
|
|
325
382
|
this._min = min;
|
|
@@ -368,6 +425,7 @@ class MatSlider {
|
|
|
368
425
|
this._updateMax(max);
|
|
369
426
|
}
|
|
370
427
|
}
|
|
428
|
+
_max = 100;
|
|
371
429
|
_updateMax(max) {
|
|
372
430
|
const prevMax = this._max;
|
|
373
431
|
this._max = max;
|
|
@@ -416,6 +474,7 @@ class MatSlider {
|
|
|
416
474
|
this._updateStep(step);
|
|
417
475
|
}
|
|
418
476
|
}
|
|
477
|
+
_step = 1;
|
|
419
478
|
_updateStep(step) {
|
|
420
479
|
this._step = step;
|
|
421
480
|
this._isRange ? this._updateStepRange() : this._updateStepNonRange();
|
|
@@ -463,51 +522,45 @@ class MatSlider {
|
|
|
463
522
|
}
|
|
464
523
|
}
|
|
465
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* Function that will be used to format the value before it is displayed
|
|
527
|
+
* in the thumb label. Can be used to format very large number in order
|
|
528
|
+
* for them to fit into the slider thumb.
|
|
529
|
+
*/
|
|
530
|
+
displayWith = (value) => `${value}`;
|
|
531
|
+
/** Used to keep track of & render the active & inactive tick marks on the slider track. */
|
|
532
|
+
_tickMarks;
|
|
533
|
+
/** Whether animations have been disabled. */
|
|
534
|
+
_noopAnimations;
|
|
535
|
+
/** Subscription to changes to the directionality (LTR / RTL) context for the application. */
|
|
536
|
+
_dirChangeSubscription;
|
|
537
|
+
/** Observer used to monitor size changes in the slider. */
|
|
538
|
+
_resizeObserver;
|
|
539
|
+
// Stored dimensions to avoid calling getBoundingClientRect redundantly.
|
|
540
|
+
_cachedWidth;
|
|
541
|
+
_cachedLeft;
|
|
542
|
+
_rippleRadius = 24;
|
|
543
|
+
// The value indicator tooltip text for the visual slider thumb(s).
|
|
544
|
+
/** @docs-private */
|
|
545
|
+
startValueIndicatorText = '';
|
|
546
|
+
/** @docs-private */
|
|
547
|
+
endValueIndicatorText = '';
|
|
548
|
+
// Used to control the translateX of the visual slider thumb(s).
|
|
549
|
+
_endThumbTransform;
|
|
550
|
+
_startThumbTransform;
|
|
551
|
+
_isRange = false;
|
|
552
|
+
/** Whether the slider is rtl. */
|
|
553
|
+
_isRtl = false;
|
|
554
|
+
_hasViewInitialized = false;
|
|
555
|
+
/**
|
|
556
|
+
* The width of the tick mark track.
|
|
557
|
+
* The tick mark track width is different from full track width
|
|
558
|
+
*/
|
|
559
|
+
_tickMarkTrackWidth = 0;
|
|
560
|
+
_hasAnimation = false;
|
|
561
|
+
_resizeTimer = null;
|
|
562
|
+
_platform = inject(Platform);
|
|
466
563
|
constructor() {
|
|
467
|
-
this._ngZone = inject(NgZone);
|
|
468
|
-
this._cdr = inject(ChangeDetectorRef);
|
|
469
|
-
this._elementRef = inject(ElementRef);
|
|
470
|
-
this._dir = inject(Directionality, { optional: true });
|
|
471
|
-
this._globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {
|
|
472
|
-
optional: true,
|
|
473
|
-
});
|
|
474
|
-
this._disabled = false;
|
|
475
|
-
this._discrete = false;
|
|
476
|
-
/** Whether the slider displays tick marks along the slider track. */
|
|
477
|
-
this.showTickMarks = false;
|
|
478
|
-
this._min = 0;
|
|
479
|
-
/** Whether ripples are disabled in the slider. */
|
|
480
|
-
this.disableRipple = false;
|
|
481
|
-
this._max = 100;
|
|
482
|
-
this._step = 1;
|
|
483
|
-
/**
|
|
484
|
-
* Function that will be used to format the value before it is displayed
|
|
485
|
-
* in the thumb label. Can be used to format very large number in order
|
|
486
|
-
* for them to fit into the slider thumb.
|
|
487
|
-
*/
|
|
488
|
-
this.displayWith = (value) => `${value}`;
|
|
489
|
-
this._rippleRadius = 24;
|
|
490
|
-
// The value indicator tooltip text for the visual slider thumb(s).
|
|
491
|
-
/** @docs-private */
|
|
492
|
-
this.startValueIndicatorText = '';
|
|
493
|
-
/** @docs-private */
|
|
494
|
-
this.endValueIndicatorText = '';
|
|
495
|
-
this._isRange = false;
|
|
496
|
-
/** Whether the slider is rtl. */
|
|
497
|
-
this._isRtl = false;
|
|
498
|
-
this._hasViewInitialized = false;
|
|
499
|
-
/**
|
|
500
|
-
* The width of the tick mark track.
|
|
501
|
-
* The tick mark track width is different from full track width
|
|
502
|
-
*/
|
|
503
|
-
this._tickMarkTrackWidth = 0;
|
|
504
|
-
this._hasAnimation = false;
|
|
505
|
-
this._resizeTimer = null;
|
|
506
|
-
this._platform = inject(Platform);
|
|
507
|
-
/** The radius of the native slider's knob. AFAIK there is no way to avoid hardcoding this. */
|
|
508
|
-
this._knobRadius = 8;
|
|
509
|
-
/** Whether or not the slider thumbs overlap. */
|
|
510
|
-
this._thumbsOverlap = false;
|
|
511
564
|
inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
|
|
512
565
|
const animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
|
|
513
566
|
this._noopAnimations = animationMode === 'NoopAnimations';
|
|
@@ -516,6 +569,9 @@ class MatSlider {
|
|
|
516
569
|
this._isRtl = this._dir.value === 'rtl';
|
|
517
570
|
}
|
|
518
571
|
}
|
|
572
|
+
/** The radius of the native slider's knob. AFAIK there is no way to avoid hardcoding this. */
|
|
573
|
+
_knobRadius = 8;
|
|
574
|
+
_inputPadding;
|
|
519
575
|
ngAfterViewInit() {
|
|
520
576
|
if (this._platform.isBrowser) {
|
|
521
577
|
this._updateDimensions();
|
|
@@ -699,6 +755,8 @@ class MatSlider {
|
|
|
699
755
|
this._updateTickMarkTrackUI();
|
|
700
756
|
this._cdr.detectChanges();
|
|
701
757
|
}
|
|
758
|
+
/** Whether or not the slider thumbs overlap. */
|
|
759
|
+
_thumbsOverlap = false;
|
|
702
760
|
/** Returns true if the slider knobs are overlapping one another. */
|
|
703
761
|
_areThumbsOverlapping() {
|
|
704
762
|
const startInput = this._getInput(_MatThumb.START);
|
|
@@ -925,8 +983,8 @@ class MatSlider {
|
|
|
925
983
|
const dy = event.clientY - centerY;
|
|
926
984
|
return Math.pow(dx, 2) + Math.pow(dy, 2) < Math.pow(radius, 2);
|
|
927
985
|
}
|
|
928
|
-
static
|
|
929
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.10", type: MatSlider, isStandalone: true, selector: "mat-slider", inputs: { disabled: ["disabled", "disabled", booleanAttribute], discrete: ["discrete", "discrete", booleanAttribute], showTickMarks: ["showTickMarks", "showTickMarks", booleanAttribute], min: ["min", "min", numberAttribute], color: "color", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], max: ["max", "max", numberAttribute], step: ["step", "step", numberAttribute], displayWith: "displayWith" }, host: { properties: { "class": "\"mat-\" + (color || \"primary\")", "class.mdc-slider--range": "_isRange", "class.mdc-slider--disabled": "disabled", "class.mdc-slider--discrete": "discrete", "class.mdc-slider--tick-marks": "showTickMarks", "class._mat-animation-noopable": "_noopAnimations" }, classAttribute: "mat-mdc-slider mdc-slider" }, providers: [{ provide: MAT_SLIDER, useExisting: MatSlider }], queries: [{ propertyName: "_input", first: true, predicate: MAT_SLIDER_THUMB, descendants: true }, { propertyName: "_inputs", predicate: MAT_SLIDER_RANGE_THUMB }], viewQueries: [{ propertyName: "_trackActive", first: true, predicate: ["trackActive"], descendants: true }, { propertyName: "_thumbs", predicate: MAT_SLIDER_VISUAL_THUMB, descendants: true }], exportAs: ["matSlider"], ngImport: i0, template: "<!-- Inputs -->\n<ng-content></ng-content>\n\n<!-- Track -->\n<div class=\"mdc-slider__track\">\n <div class=\"mdc-slider__track--inactive\"></div>\n <div class=\"mdc-slider__track--active\">\n <div #trackActive class=\"mdc-slider__track--active_fill\"></div>\n </div>\n @if (showTickMarks) {\n <div class=\"mdc-slider__tick-marks\" #tickMarkContainer>\n @if (_cachedWidth) {\n @for (tickMark of _tickMarks; track i; let i = $index) {\n <div\n [class]=\"tickMark === 0 ? 'mdc-slider__tick-mark--active' : 'mdc-slider__tick-mark--inactive'\"\n [style.transform]=\"_calcTickMarkTransform(i)\"></div>\n }\n }\n </div>\n }\n</div>\n\n<!-- Thumbs -->\n@if (_isRange) {\n <mat-slider-visual-thumb\n [discrete]=\"discrete\"\n [thumbPosition]=\"1\"\n [valueIndicatorText]=\"startValueIndicatorText\">\n </mat-slider-visual-thumb>\n}\n\n<mat-slider-visual-thumb\n [discrete]=\"discrete\"\n [thumbPosition]=\"2\"\n [valueIndicatorText]=\"endValueIndicatorText\">\n</mat-slider-visual-thumb>\n", styles: [".mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mdc-slider-inactive-track-height, 4px)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mdc-slider-active-track-shape, var(--mat-sys-corner-full));height:var(--mdc-slider-active-track-height, 4px);top:calc((var(--mdc-slider-inactive-track-height, 4px) - var(--mdc-slider-active-track-height, 4px))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mdc-slider-active-track-color, var(--mat-sys-primary));border-top-width:var(--mdc-slider-active-track-height, 4px)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mat-sys-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mdc-slider-inactive-track-color, var(--mat-sys-surface-variant));height:var(--mdc-slider-inactive-track-height, 4px);border-radius:var(--mdc-slider-inactive-track-shape, var(--mat-sys-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mat-sys-on-surface));opacity:.24}.mdc-slider__track--inactive::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}@media(forced-colors: active){.mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%);transform:var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg))}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;border-radius:4px;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom;opacity:1;transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary));color:var(--mdc-slider-label-label-text-color, var(--mat-sys-on-primary));width:var(--mat-slider-value-indicator-width, 28px);height:var(--mat-slider-value-indicator-height, 28px);padding:var(--mat-slider-value-indicator-padding, 0);opacity:var(--mat-slider-value-indicator-opacity, 1);border-radius:var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:\"\";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display, none);border-top-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary))}.mdc-slider__value-indicator::after{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}@media(forced-colors: active){.mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width, 28px);transform:var(--mat-slider-value-indicator-text-transform, rotate(45deg));font-family:var(--mdc-slider-label-label-text-font, var(--mat-sys-label-medium-font));font-size:var(--mdc-slider-label-label-text-size, var(--mat-sys-label-medium-size));font-weight:var(--mdc-slider-label-label-text-weight, var(--mat-sys-label-medium-weight));line-height:var(--mdc-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height));letter-spacing:var(--mdc-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-width:calc(var(--mdc-slider-handle-height, 20px)/2) calc(var(--mdc-slider-handle-width, 20px)/2);box-shadow:var(--mdc-slider-handle-elevation, var(--mat-sys-level1));background-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-radius:var(--mdc-slider-handle-shape, var(--mat-sys-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface));border-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mdc-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary));border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mdc-slider-with-tick-marks-container-size, 2px);height:var(--mdc-slider-with-tick-marks-container-size, 2px);border-radius:var(--mdc-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-slider-ripple-color, var(--mat-sys-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-focus-indicator::before{content:\"\"}"], dependencies: [{ kind: "component", type: MatSliderVisualThumb, selector: "mat-slider-visual-thumb", inputs: ["discrete", "thumbPosition", "valueIndicatorText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
986
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSlider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
987
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.10", type: MatSlider, isStandalone: true, selector: "mat-slider", inputs: { disabled: ["disabled", "disabled", booleanAttribute], discrete: ["discrete", "discrete", booleanAttribute], showTickMarks: ["showTickMarks", "showTickMarks", booleanAttribute], min: ["min", "min", numberAttribute], color: "color", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], max: ["max", "max", numberAttribute], step: ["step", "step", numberAttribute], displayWith: "displayWith" }, host: { properties: { "class": "\"mat-\" + (color || \"primary\")", "class.mdc-slider--range": "_isRange", "class.mdc-slider--disabled": "disabled", "class.mdc-slider--discrete": "discrete", "class.mdc-slider--tick-marks": "showTickMarks", "class._mat-animation-noopable": "_noopAnimations" }, classAttribute: "mat-mdc-slider mdc-slider" }, providers: [{ provide: MAT_SLIDER, useExisting: MatSlider }], queries: [{ propertyName: "_input", first: true, predicate: MAT_SLIDER_THUMB, descendants: true }, { propertyName: "_inputs", predicate: MAT_SLIDER_RANGE_THUMB }], viewQueries: [{ propertyName: "_trackActive", first: true, predicate: ["trackActive"], descendants: true }, { propertyName: "_thumbs", predicate: MAT_SLIDER_VISUAL_THUMB, descendants: true }], exportAs: ["matSlider"], ngImport: i0, template: "<!-- Inputs -->\n<ng-content></ng-content>\n\n<!-- Track -->\n<div class=\"mdc-slider__track\">\n <div class=\"mdc-slider__track--inactive\"></div>\n <div class=\"mdc-slider__track--active\">\n <div #trackActive class=\"mdc-slider__track--active_fill\"></div>\n </div>\n @if (showTickMarks) {\n <div class=\"mdc-slider__tick-marks\" #tickMarkContainer>\n @if (_cachedWidth) {\n @for (tickMark of _tickMarks; track i; let i = $index) {\n <div\n [class]=\"tickMark === 0 ? 'mdc-slider__tick-mark--active' : 'mdc-slider__tick-mark--inactive'\"\n [style.transform]=\"_calcTickMarkTransform(i)\"></div>\n }\n }\n </div>\n }\n</div>\n\n<!-- Thumbs -->\n@if (_isRange) {\n <mat-slider-visual-thumb\n [discrete]=\"discrete\"\n [thumbPosition]=\"1\"\n [valueIndicatorText]=\"startValueIndicatorText\">\n </mat-slider-visual-thumb>\n}\n\n<mat-slider-visual-thumb\n [discrete]=\"discrete\"\n [thumbPosition]=\"2\"\n [valueIndicatorText]=\"endValueIndicatorText\">\n</mat-slider-visual-thumb>\n", styles: [".mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mdc-slider-inactive-track-height, 4px)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mdc-slider-active-track-shape, var(--mat-sys-corner-full));height:var(--mdc-slider-active-track-height, 4px);top:calc((var(--mdc-slider-inactive-track-height, 4px) - var(--mdc-slider-active-track-height, 4px))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mdc-slider-active-track-color, var(--mat-sys-primary));border-top-width:var(--mdc-slider-active-track-height, 4px)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mat-sys-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mdc-slider-inactive-track-color, var(--mat-sys-surface-variant));height:var(--mdc-slider-inactive-track-height, 4px);border-radius:var(--mdc-slider-inactive-track-shape, var(--mat-sys-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mat-sys-on-surface));opacity:.24}.mdc-slider__track--inactive::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}@media(forced-colors: active){.mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%);transform:var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg))}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;border-radius:4px;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom;opacity:1;transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary));color:var(--mdc-slider-label-label-text-color, var(--mat-sys-on-primary));width:var(--mat-slider-value-indicator-width, 28px);height:var(--mat-slider-value-indicator-height, 28px);padding:var(--mat-slider-value-indicator-padding, 0);opacity:var(--mat-slider-value-indicator-opacity, 1);border-radius:var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:\"\";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display, none);border-top-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary))}.mdc-slider__value-indicator::after{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}@media(forced-colors: active){.mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width, 28px);transform:var(--mat-slider-value-indicator-text-transform, rotate(45deg));font-family:var(--mdc-slider-label-label-text-font, var(--mat-sys-label-medium-font));font-size:var(--mdc-slider-label-label-text-size, var(--mat-sys-label-medium-size));font-weight:var(--mdc-slider-label-label-text-weight, var(--mat-sys-label-medium-weight));line-height:var(--mdc-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height));letter-spacing:var(--mdc-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-width:calc(var(--mdc-slider-handle-height, 20px)/2) calc(var(--mdc-slider-handle-width, 20px)/2);box-shadow:var(--mdc-slider-handle-elevation, var(--mat-sys-level1));background-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-radius:var(--mdc-slider-handle-shape, var(--mat-sys-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface));border-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mdc-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary));border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mdc-slider-with-tick-marks-container-size, 2px);height:var(--mdc-slider-with-tick-marks-container-size, 2px);border-radius:var(--mdc-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-slider-ripple-color, var(--mat-sys-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-focus-indicator::before{content:\"\"}"], dependencies: [{ kind: "component", type: MatSliderVisualThumb, selector: "mat-slider-visual-thumb", inputs: ["discrete", "thumbPosition", "valueIndicatorText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
930
988
|
}
|
|
931
989
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSlider, decorators: [{
|
|
932
990
|
type: Component,
|
|
@@ -1030,6 +1088,10 @@ const MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR = {
|
|
|
1030
1088
|
* used, and the outcome will be a range slider with two slider thumbs.
|
|
1031
1089
|
*/
|
|
1032
1090
|
class MatSliderThumb {
|
|
1091
|
+
_ngZone = inject(NgZone);
|
|
1092
|
+
_elementRef = inject(ElementRef);
|
|
1093
|
+
_cdr = inject(ChangeDetectorRef);
|
|
1094
|
+
_slider = inject(MAT_SLIDER);
|
|
1033
1095
|
get value() {
|
|
1034
1096
|
return numberAttribute(this._hostElement.value, 0);
|
|
1035
1097
|
}
|
|
@@ -1056,6 +1118,12 @@ class MatSliderThumb {
|
|
|
1056
1118
|
this._cdr.detectChanges();
|
|
1057
1119
|
this._slider._cdr.markForCheck();
|
|
1058
1120
|
}
|
|
1121
|
+
/** Event emitted when the `value` is changed. */
|
|
1122
|
+
valueChange = new EventEmitter();
|
|
1123
|
+
/** Event emitted when the slider thumb starts being dragged. */
|
|
1124
|
+
dragStart = new EventEmitter();
|
|
1125
|
+
/** Event emitted when the slider thumb stops being dragged. */
|
|
1126
|
+
dragEnd = new EventEmitter();
|
|
1059
1127
|
/**
|
|
1060
1128
|
* The current translateX in px of the slider visual thumb.
|
|
1061
1129
|
* @docs-private
|
|
@@ -1073,6 +1141,12 @@ class MatSliderThumb {
|
|
|
1073
1141
|
set translateX(v) {
|
|
1074
1142
|
this._translateX = v;
|
|
1075
1143
|
}
|
|
1144
|
+
_translateX;
|
|
1145
|
+
/**
|
|
1146
|
+
* Indicates whether this thumb is the start or end thumb.
|
|
1147
|
+
* @docs-private
|
|
1148
|
+
*/
|
|
1149
|
+
thumbPosition = _MatThumb.END;
|
|
1076
1150
|
/** @docs-private */
|
|
1077
1151
|
get min() {
|
|
1078
1152
|
return numberAttribute(this._hostElement.min, 0);
|
|
@@ -1124,66 +1198,57 @@ class MatSliderThumb {
|
|
|
1124
1198
|
}
|
|
1125
1199
|
return this.translateX / this._slider._cachedWidth;
|
|
1126
1200
|
}
|
|
1201
|
+
/** The host native HTML input element. */
|
|
1202
|
+
_hostElement = this._elementRef.nativeElement;
|
|
1203
|
+
/** The aria-valuetext string representation of the input's value. */
|
|
1204
|
+
_valuetext = signal('');
|
|
1205
|
+
/** The radius of a native html slider's knob. */
|
|
1206
|
+
_knobRadius = 8;
|
|
1207
|
+
/** The distance in px from the start of the slider track to the first tick mark. */
|
|
1208
|
+
_tickMarkOffset = 3;
|
|
1209
|
+
/** Whether user's cursor is currently in a mouse down state on the input. */
|
|
1210
|
+
_isActive = false;
|
|
1211
|
+
/** Whether the input is currently focused (either by tab or after clicking). */
|
|
1212
|
+
_isFocused = false;
|
|
1127
1213
|
/** Used to relay updates to _isFocused to the slider visual thumbs. */
|
|
1128
1214
|
_setIsFocused(v) {
|
|
1129
1215
|
this._isFocused = v;
|
|
1130
1216
|
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether the initial value has been set.
|
|
1219
|
+
* This exists because the initial value cannot be immediately set because the min and max
|
|
1220
|
+
* must first be relayed from the parent MatSlider component, which can only happen later
|
|
1221
|
+
* in the component lifecycle.
|
|
1222
|
+
*/
|
|
1223
|
+
_hasSetInitialValue = false;
|
|
1224
|
+
/** The stored initial value. */
|
|
1225
|
+
_initialValue;
|
|
1226
|
+
/** Defined when a user is using a form control to manage slider value & validation. */
|
|
1227
|
+
_formControl;
|
|
1228
|
+
/** Emits when the component is destroyed. */
|
|
1229
|
+
_destroyed = new Subject();
|
|
1230
|
+
/**
|
|
1231
|
+
* Indicates whether UI updates should be skipped.
|
|
1232
|
+
*
|
|
1233
|
+
* This flag is used to avoid flickering
|
|
1234
|
+
* when correcting values on pointer up/down.
|
|
1235
|
+
*/
|
|
1236
|
+
_skipUIUpdate = false;
|
|
1237
|
+
/** Callback called when the slider input value changes. */
|
|
1238
|
+
_onChangeFn;
|
|
1239
|
+
/** Callback called when the slider input has been touched. */
|
|
1240
|
+
_onTouchedFn = () => { };
|
|
1241
|
+
/**
|
|
1242
|
+
* Whether the NgModel has been initialized.
|
|
1243
|
+
*
|
|
1244
|
+
* This flag is used to ignore ghost null calls to
|
|
1245
|
+
* writeValue which can break slider initialization.
|
|
1246
|
+
*
|
|
1247
|
+
* See https://github.com/angular/angular/issues/14988.
|
|
1248
|
+
*/
|
|
1249
|
+
_isControlInitialized = false;
|
|
1250
|
+
_platform = inject(Platform);
|
|
1131
1251
|
constructor() {
|
|
1132
|
-
this._ngZone = inject(NgZone);
|
|
1133
|
-
this._elementRef = inject(ElementRef);
|
|
1134
|
-
this._cdr = inject(ChangeDetectorRef);
|
|
1135
|
-
this._slider = inject(MAT_SLIDER);
|
|
1136
|
-
/** Event emitted when the `value` is changed. */
|
|
1137
|
-
this.valueChange = new EventEmitter();
|
|
1138
|
-
/** Event emitted when the slider thumb starts being dragged. */
|
|
1139
|
-
this.dragStart = new EventEmitter();
|
|
1140
|
-
/** Event emitted when the slider thumb stops being dragged. */
|
|
1141
|
-
this.dragEnd = new EventEmitter();
|
|
1142
|
-
/**
|
|
1143
|
-
* Indicates whether this thumb is the start or end thumb.
|
|
1144
|
-
* @docs-private
|
|
1145
|
-
*/
|
|
1146
|
-
this.thumbPosition = _MatThumb.END;
|
|
1147
|
-
/** The host native HTML input element. */
|
|
1148
|
-
this._hostElement = this._elementRef.nativeElement;
|
|
1149
|
-
/** The aria-valuetext string representation of the input's value. */
|
|
1150
|
-
this._valuetext = signal('');
|
|
1151
|
-
/** The radius of a native html slider's knob. */
|
|
1152
|
-
this._knobRadius = 8;
|
|
1153
|
-
/** The distance in px from the start of the slider track to the first tick mark. */
|
|
1154
|
-
this._tickMarkOffset = 3;
|
|
1155
|
-
/** Whether user's cursor is currently in a mouse down state on the input. */
|
|
1156
|
-
this._isActive = false;
|
|
1157
|
-
/** Whether the input is currently focused (either by tab or after clicking). */
|
|
1158
|
-
this._isFocused = false;
|
|
1159
|
-
/**
|
|
1160
|
-
* Whether the initial value has been set.
|
|
1161
|
-
* This exists because the initial value cannot be immediately set because the min and max
|
|
1162
|
-
* must first be relayed from the parent MatSlider component, which can only happen later
|
|
1163
|
-
* in the component lifecycle.
|
|
1164
|
-
*/
|
|
1165
|
-
this._hasSetInitialValue = false;
|
|
1166
|
-
/** Emits when the component is destroyed. */
|
|
1167
|
-
this._destroyed = new Subject();
|
|
1168
|
-
/**
|
|
1169
|
-
* Indicates whether UI updates should be skipped.
|
|
1170
|
-
*
|
|
1171
|
-
* This flag is used to avoid flickering
|
|
1172
|
-
* when correcting values on pointer up/down.
|
|
1173
|
-
*/
|
|
1174
|
-
this._skipUIUpdate = false;
|
|
1175
|
-
/** Callback called when the slider input has been touched. */
|
|
1176
|
-
this._onTouchedFn = () => { };
|
|
1177
|
-
/**
|
|
1178
|
-
* Whether the NgModel has been initialized.
|
|
1179
|
-
*
|
|
1180
|
-
* This flag is used to ignore ghost null calls to
|
|
1181
|
-
* writeValue which can break slider initialization.
|
|
1182
|
-
*
|
|
1183
|
-
* See https://github.com/angular/angular/issues/14988.
|
|
1184
|
-
*/
|
|
1185
|
-
this._isControlInitialized = false;
|
|
1186
|
-
this._platform = inject(Platform);
|
|
1187
1252
|
this._ngZone.runOutsideAngular(() => {
|
|
1188
1253
|
this._hostElement.addEventListener('pointerdown', this._onPointerDown.bind(this));
|
|
1189
1254
|
this._hostElement.addEventListener('pointermove', this._onPointerMove.bind(this));
|
|
@@ -1449,11 +1514,11 @@ class MatSliderThumb {
|
|
|
1449
1514
|
blur() {
|
|
1450
1515
|
this._hostElement.blur();
|
|
1451
1516
|
}
|
|
1452
|
-
static
|
|
1453
|
-
static
|
|
1517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1518
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-next.10", type: MatSliderThumb, isStandalone: true, selector: "input[matSliderThumb]", inputs: { value: ["value", "value", numberAttribute] }, outputs: { valueChange: "valueChange", dragStart: "dragStart", dragEnd: "dragEnd" }, host: { attributes: { "type": "range" }, listeners: { "change": "_onChange()", "input": "_onInput()", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "attr.aria-valuetext": "_valuetext()" }, classAttribute: "mdc-slider__input" }, providers: [
|
|
1454
1519
|
MAT_SLIDER_THUMB_VALUE_ACCESSOR,
|
|
1455
1520
|
{ provide: MAT_SLIDER_THUMB, useExisting: MatSliderThumb },
|
|
1456
|
-
], exportAs: ["matSliderThumb"], ngImport: i0 });
|
|
1521
|
+
], exportAs: ["matSliderThumb"], ngImport: i0 });
|
|
1457
1522
|
}
|
|
1458
1523
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderThumb, decorators: [{
|
|
1459
1524
|
type: Directive,
|
|
@@ -1487,6 +1552,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
1487
1552
|
type: Output
|
|
1488
1553
|
}] } });
|
|
1489
1554
|
class MatSliderRangeThumb extends MatSliderThumb {
|
|
1555
|
+
_cdr = inject(ChangeDetectorRef);
|
|
1490
1556
|
/** @docs-private */
|
|
1491
1557
|
getSibling() {
|
|
1492
1558
|
if (!this._sibling) {
|
|
@@ -1494,6 +1560,7 @@ class MatSliderRangeThumb extends MatSliderThumb {
|
|
|
1494
1560
|
}
|
|
1495
1561
|
return this._sibling;
|
|
1496
1562
|
}
|
|
1563
|
+
_sibling;
|
|
1497
1564
|
/**
|
|
1498
1565
|
* Returns the minimum translateX position allowed for this slider input's visual thumb.
|
|
1499
1566
|
* @docs-private
|
|
@@ -1520,9 +1587,12 @@ class MatSliderRangeThumb extends MatSliderThumb {
|
|
|
1520
1587
|
this._isLeftThumb =
|
|
1521
1588
|
(this._isEndThumb && this._slider._isRtl) || (!this._isEndThumb && !this._slider._isRtl);
|
|
1522
1589
|
}
|
|
1590
|
+
/** Whether this slider corresponds to the input on the left hand side. */
|
|
1591
|
+
_isLeftThumb;
|
|
1592
|
+
/** Whether this slider corresponds to the input with greater value. */
|
|
1593
|
+
_isEndThumb;
|
|
1523
1594
|
constructor() {
|
|
1524
1595
|
super();
|
|
1525
|
-
this._cdr = inject(ChangeDetectorRef);
|
|
1526
1596
|
this._isEndThumb = this._hostElement.hasAttribute('matSliderEndThumb');
|
|
1527
1597
|
this._setIsLeftThumb();
|
|
1528
1598
|
this.thumbPosition = this._isEndThumb ? _MatThumb.END : _MatThumb.START;
|
|
@@ -1666,11 +1736,11 @@ class MatSliderRangeThumb extends MatSliderThumb {
|
|
|
1666
1736
|
this._updateWidthInactive();
|
|
1667
1737
|
this._updateSibling();
|
|
1668
1738
|
}
|
|
1669
|
-
static
|
|
1670
|
-
static
|
|
1739
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderRangeThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1740
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatSliderRangeThumb, isStandalone: true, selector: "input[matSliderStartThumb], input[matSliderEndThumb]", providers: [
|
|
1671
1741
|
MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR,
|
|
1672
1742
|
{ provide: MAT_SLIDER_RANGE_THUMB, useExisting: MatSliderRangeThumb },
|
|
1673
|
-
], exportAs: ["matSliderRangeThumb"], usesInheritance: true, ngImport: i0 });
|
|
1743
|
+
], exportAs: ["matSliderRangeThumb"], usesInheritance: true, ngImport: i0 });
|
|
1674
1744
|
}
|
|
1675
1745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderRangeThumb, decorators: [{
|
|
1676
1746
|
type: Directive,
|
|
@@ -1685,15 +1755,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
1685
1755
|
}], ctorParameters: () => [] });
|
|
1686
1756
|
|
|
1687
1757
|
class MatSliderModule {
|
|
1688
|
-
static
|
|
1689
|
-
static
|
|
1758
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1759
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderModule, imports: [MatCommonModule,
|
|
1690
1760
|
MatRippleModule,
|
|
1691
1761
|
MatSlider,
|
|
1692
1762
|
MatSliderThumb,
|
|
1693
1763
|
MatSliderRangeThumb,
|
|
1694
|
-
MatSliderVisualThumb], exports: [MatSlider, MatSliderThumb, MatSliderRangeThumb] });
|
|
1695
|
-
static
|
|
1696
|
-
MatRippleModule] });
|
|
1764
|
+
MatSliderVisualThumb], exports: [MatSlider, MatSliderThumb, MatSliderRangeThumb] });
|
|
1765
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderModule, imports: [MatCommonModule,
|
|
1766
|
+
MatRippleModule] });
|
|
1697
1767
|
}
|
|
1698
1768
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatSliderModule, decorators: [{
|
|
1699
1769
|
type: NgModule,
|