1 | /**
|
2 | * @license
|
3 | * Copyright 2020 Google Inc.
|
4 | *
|
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 | * of this software and associated documentation files (the "Software"), to deal
|
7 | * in the Software without restriction, including without limitation the rights
|
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 | * copies of the Software, and to permit persons to whom the Software is
|
10 | * furnished to do so, subject to the following conditions:
|
11 | *
|
12 | * The above copyright notice and this permission notice shall be included in
|
13 | * all copies or substantial portions of the Software.
|
14 | *
|
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21 | * THE SOFTWARE.
|
22 | */
|
23 | /** Slider element classes. */
|
24 | export var cssClasses = {
|
25 | DISABLED: 'mdc-slider--disabled',
|
26 | DISCRETE: 'mdc-slider--discrete',
|
27 | INPUT: 'mdc-slider__input',
|
28 | RANGE: 'mdc-slider--range',
|
29 | THUMB: 'mdc-slider__thumb',
|
30 | // Applied when thumb is in the focused state.
|
31 | THUMB_FOCUSED: 'mdc-slider__thumb--focused',
|
32 | THUMB_KNOB: 'mdc-slider__thumb-knob',
|
33 | // Class added to the top thumb (for overlapping thumbs in range slider).
|
34 | THUMB_TOP: 'mdc-slider__thumb--top',
|
35 | THUMB_WITH_INDICATOR: 'mdc-slider__thumb--with-indicator',
|
36 | TICK_MARKS: 'mdc-slider--tick-marks',
|
37 | TICK_MARKS_CONTAINER: 'mdc-slider__tick-marks',
|
38 | TICK_MARK_ACTIVE: 'mdc-slider__tick-mark--active',
|
39 | TICK_MARK_INACTIVE: 'mdc-slider__tick-mark--inactive',
|
40 | TRACK: 'mdc-slider__track',
|
41 | // The active track fill element that will be scaled as the value changes.
|
42 | TRACK_ACTIVE: 'mdc-slider__track--active_fill',
|
43 | VALUE_INDICATOR_CONTAINER: 'mdc-slider__value-indicator-container',
|
44 | VALUE_INDICATOR_TEXT: 'mdc-slider__value-indicator-text',
|
45 | };
|
46 | /** Slider numbers. */
|
47 | export var numbers = {
|
48 | // Default step size.
|
49 | STEP_SIZE: 1,
|
50 | // Default minimum difference between the start and end values.
|
51 | MIN_RANGE: 0,
|
52 | // Minimum absolute difference between clientX of move event / down event
|
53 | // for which to update thumb, in the case of overlapping thumbs.
|
54 | // This is needed to reduce chances of choosing the thumb based on
|
55 | // pointer jitter.
|
56 | THUMB_UPDATE_MIN_PX: 5,
|
57 | };
|
58 | /** Slider attributes. */
|
59 | export var attributes = {
|
60 | ARIA_VALUETEXT: 'aria-valuetext',
|
61 | INPUT_DISABLED: 'disabled',
|
62 | INPUT_MIN: 'min',
|
63 | INPUT_MAX: 'max',
|
64 | INPUT_VALUE: 'value',
|
65 | INPUT_STEP: 'step',
|
66 | DATA_MIN_RANGE: 'data-min-range',
|
67 | };
|
68 | /** Slider events. */
|
69 | export var events = {
|
70 | CHANGE: 'MDCSlider:change',
|
71 | INPUT: 'MDCSlider:input',
|
72 | };
|
73 | /** Slider strings. */
|
74 | export var strings = {
|
75 | VAR_VALUE_INDICATOR_CARET_LEFT: '--slider-value-indicator-caret-left',
|
76 | VAR_VALUE_INDICATOR_CARET_RIGHT: '--slider-value-indicator-caret-right',
|
77 | VAR_VALUE_INDICATOR_CARET_TRANSFORM: '--slider-value-indicator-caret-transform',
|
78 | VAR_VALUE_INDICATOR_CONTAINER_LEFT: '--slider-value-indicator-container-left',
|
79 | VAR_VALUE_INDICATOR_CONTAINER_RIGHT: '--slider-value-indicator-container-right',
|
80 | VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM: '--slider-value-indicator-container-transform',
|
81 | };
|
82 | //# sourceMappingURL=constants.js.map |
\ | No newline at end of file |