Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {applyPassive} from '@material/dom/events.js';
import {addHasRemoveClass, EventType, FormElement, observer, SpecificEventListener} from '@material/mwc-base/form-element.js';
import {MDCSliderAdapter} from '@material/slider/adapter.js';
import MDCSliderFoundation from '@material/slider/foundation.js';
import {html, property, query, TemplateResult} from 'lit-element';
import {classMap} from 'lit-html/directives/class-map';
import {styleMap} from 'lit-html/directives/style-map';
const {INPUT_EVENT, CHANGE_EVENT} = MDCSliderFoundation.strings;
export class SliderBase extends FormElement {
protected mdcFoundation!: MDCSliderFoundation;
protected readonly mdcFoundationClass = MDCSliderFoundation;
@query('.mdc-slider') protected mdcRoot!: HTMLElement;
@query('.mdc-slider') protected formElement!: HTMLElement;
@query('.mdc-slider__thumb-container') protected thumbContainer!: HTMLElement;
@query('.mdc-slider__pin-value-marker') protected pinMarker!: HTMLElement;
@property({type: Number})
@observer(function(this: SliderBase, value: number) {