Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@material/slider

Package Overview
Dependencies
Maintainers
14
Versions
1675
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/slider - npm Package Compare versions

Comparing version 15.0.0-canary.311ab4d4a.0 to 15.0.0-canary.311f29a60.0

20

adapter.d.ts

@@ -203,39 +203,39 @@ /**

*/
registerEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
registerEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void;
/**
* Deregisters an event listener on the root element.
*/
deregisterEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
deregisterEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void;
/**
* Registers an event listener on the given thumb element.
*/
registerThumbEventHandler<K extends EventType>(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void;
registerThumbEventHandler<K extends EventType>(thumb: Thumb, eventType: K, handler: SpecificEventListener<K>): void;
/**
* Deregisters an event listener on the given thumb element.
*/
deregisterThumbEventHandler<K extends EventType>(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void;
deregisterThumbEventHandler<K extends EventType>(thumb: Thumb, eventType: K, handler: SpecificEventListener<K>): void;
/**
* Registers an event listener on the given input element.
*/
registerInputEventHandler<K extends EventType>(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void;
registerInputEventHandler<K extends EventType>(thumb: Thumb, eventType: K, handler: SpecificEventListener<K>): void;
/**
* Deregisters an event listener on the given input element.
*/
deregisterInputEventHandler<K extends EventType>(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void;
deregisterInputEventHandler<K extends EventType>(thumb: Thumb, eventType: K, handler: SpecificEventListener<K>): void;
/**
* Registers an event listener on the body element.
*/
registerBodyEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
registerBodyEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void;
/**
* Deregisters an event listener on the body element.
*/
deregisterBodyEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
deregisterBodyEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void;
/**
* Registers an event listener on the window.
*/
registerWindowEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
registerWindowEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void;
/**
* Deregisters an event listener on the window.
*/
deregisterWindowEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
deregisterWindowEventHandler<K extends EventType>(eventType: K, handler: SpecificEventListener<K>): void;
}

@@ -6,3 +6,3 @@ # Change Log

# [15.0.0-canary.311ab4d4a.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.311ab4d4a.0) (2023-02-27)
# [15.0.0-canary.311f29a60.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.311f29a60.0) (2024-04-23)

@@ -9,0 +9,0 @@

@@ -159,31 +159,31 @@ /**

},
registerEventHandler: function (evtType, handler) {
_this.listen(evtType, handler);
registerEventHandler: function (eventType, handler) {
_this.listen(eventType, handler);
},
deregisterEventHandler: function (evtType, handler) {
_this.unlisten(evtType, handler);
deregisterEventHandler: function (eventType, handler) {
_this.unlisten(eventType, handler);
},
registerThumbEventHandler: function (thumb, evtType, handler) {
_this.getThumbEl(thumb).addEventListener(evtType, handler);
registerThumbEventHandler: function (thumb, eventType, handler) {
_this.getThumbEl(thumb).addEventListener(eventType, handler);
},
deregisterThumbEventHandler: function (thumb, evtType, handler) {
_this.getThumbEl(thumb).removeEventListener(evtType, handler);
deregisterThumbEventHandler: function (thumb, eventType, handler) {
_this.getThumbEl(thumb).removeEventListener(eventType, handler);
},
registerInputEventHandler: function (thumb, evtType, handler) {
_this.getInput(thumb).addEventListener(evtType, handler);
registerInputEventHandler: function (thumb, eventType, handler) {
_this.getInput(thumb).addEventListener(eventType, handler);
},
deregisterInputEventHandler: function (thumb, evtType, handler) {
_this.getInput(thumb).removeEventListener(evtType, handler);
deregisterInputEventHandler: function (thumb, eventType, handler) {
_this.getInput(thumb).removeEventListener(eventType, handler);
},
registerBodyEventHandler: function (evtType, handler) {
document.body.addEventListener(evtType, handler);
registerBodyEventHandler: function (eventType, handler) {
document.body.addEventListener(eventType, handler);
},
deregisterBodyEventHandler: function (evtType, handler) {
document.body.removeEventListener(evtType, handler);
deregisterBodyEventHandler: function (eventType, handler) {
document.body.removeEventListener(eventType, handler);
},
registerWindowEventHandler: function (evtType, handler) {
window.addEventListener(evtType, handler);
registerWindowEventHandler: function (eventType, handler) {
window.addEventListener(eventType, handler);
},
deregisterWindowEventHandler: function (evtType, handler) {
window.removeEventListener(evtType, handler);
deregisterWindowEventHandler: function (eventType, handler) {
window.removeEventListener(eventType, handler);
},

@@ -295,6 +295,6 @@ // tslint:enable:object-literal-sort-keys

rippleSurface.classList.add(className);
}, computeBoundingRect: function () { return rippleSurface.getBoundingClientRect(); }, deregisterInteractionHandler: function (evtType, handler) {
input.removeEventListener(evtType, handler);
}, isSurfaceActive: function () { return matches(input, ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (evtType, handler) {
input.addEventListener(evtType, handler, applyPassive());
}, computeBoundingRect: function () { return rippleSurface.getBoundingClientRect(); }, deregisterInteractionHandler: function (eventType, handler) {
input.removeEventListener(eventType, handler);
}, isSurfaceActive: function () { return matches(input, ':active'); }, isUnbounded: function () { return true; }, registerInteractionHandler: function (eventType, handler) {
input.addEventListener(eventType, handler, applyPassive());
}, removeClass: function (className) {

@@ -301,0 +301,0 @@ rippleSurface.classList.remove(className);

@@ -39,3 +39,2 @@ /**

private value;
private rect;
private isDisabled;

@@ -113,3 +112,2 @@ private isDiscrete;

/**
* - Syncs slider boundingClientRect with the current DOM.
* - Updates UI based on internal state.

@@ -116,0 +114,0 @@ */

@@ -313,3 +313,2 @@ /**

/**
* - Syncs slider boundingClientRect with the current DOM.
* - Updates UI based on internal state.

@@ -319,3 +318,2 @@ */

var _b = _a === void 0 ? {} : _a, skipUpdateUI = _b.skipUpdateUI;
this.rect = this.adapter.getBoundingClientRect();
if (this.isRange) {

@@ -643,4 +641,5 @@ this.startThumbKnobWidth = this.adapter.getThumbKnobWidth(Thumb.START);

MDCSliderFoundation.prototype.mapClientXOnSliderScale = function (clientX) {
var xPos = clientX - this.rect.left;
var pctComplete = xPos / this.rect.width;
var rect = this.adapter.getBoundingClientRect();
var xPos = clientX - rect.left;
var pctComplete = xPos / rect.width;
if (this.adapter.isRTL()) {

@@ -713,4 +712,5 @@ pctComplete = 1 - pctComplete;

var _a = this, max = _a.max, min = _a.min;
var rect = this.adapter.getBoundingClientRect();
var pctComplete = (this.value - this.valueStart) / (max - min);
var rangePx = pctComplete * this.rect.width;
var rangePx = pctComplete * rect.width;
var isRtl = this.adapter.isRTL();

@@ -720,4 +720,4 @@ var transformProp = HAS_WINDOW ? getCorrectPropertyName(window, 'transform') : 'transform';

var thumbLeftPos_1 = this.adapter.isRTL() ?
(max - this.value) / (max - min) * this.rect.width :
(this.valueStart - min) / (max - min) * this.rect.width;
(max - this.value) / (max - min) * rect.width :
(this.valueStart - min) / (max - min) * rect.width;
var thumbRightPos_1 = thumbLeftPos_1 + rangePx;

@@ -732,3 +732,3 @@ this.animFrame.request(AnimationKeys.SLIDER_UPDATE, function () {

_this.adapter.setTrackActiveStyleProperty('left', 'auto');
_this.adapter.setTrackActiveStyleProperty('right', _this.rect.width - thumbRightPos_1 + "px");
_this.adapter.setTrackActiveStyleProperty('right', rect.width - thumbRightPos_1 + "px");
}

@@ -758,3 +758,3 @@ else {

this.animFrame.request(AnimationKeys.SLIDER_UPDATE, function () {
var thumbStartPos = isRtl ? _this.rect.width - rangePx : rangePx;
var thumbStartPos = isRtl ? rect.width - rangePx : rangePx;
_this.adapter.setThumbStyleProperty(transformProp, "translateX(" + thumbStartPos + "px)", Thumb.END);

@@ -761,0 +761,0 @@ _this.alignValueIndicator(Thumb.END, thumbStartPos);

{
"name": "@material/slider",
"version": "15.0.0-canary.311ab4d4a.0",
"version": "15.0.0-canary.311f29a60.0",
"description": "The Material Components for the web slider component",

@@ -23,15 +23,15 @@ "main": "dist/mdc.slider.js",

"dependencies": {
"@material/animation": "15.0.0-canary.311ab4d4a.0",
"@material/base": "15.0.0-canary.311ab4d4a.0",
"@material/dom": "15.0.0-canary.311ab4d4a.0",
"@material/elevation": "15.0.0-canary.311ab4d4a.0",
"@material/feature-targeting": "15.0.0-canary.311ab4d4a.0",
"@material/ripple": "15.0.0-canary.311ab4d4a.0",
"@material/rtl": "15.0.0-canary.311ab4d4a.0",
"@material/theme": "15.0.0-canary.311ab4d4a.0",
"@material/tokens": "15.0.0-canary.311ab4d4a.0",
"@material/typography": "15.0.0-canary.311ab4d4a.0",
"@material/animation": "15.0.0-canary.311f29a60.0",
"@material/base": "15.0.0-canary.311f29a60.0",
"@material/dom": "15.0.0-canary.311f29a60.0",
"@material/elevation": "15.0.0-canary.311f29a60.0",
"@material/feature-targeting": "15.0.0-canary.311f29a60.0",
"@material/ripple": "15.0.0-canary.311f29a60.0",
"@material/rtl": "15.0.0-canary.311f29a60.0",
"@material/theme": "15.0.0-canary.311f29a60.0",
"@material/tokens": "15.0.0-canary.311f29a60.0",
"@material/typography": "15.0.0-canary.311f29a60.0",
"tslib": "^2.1.0"
},
"gitHead": "07f8d2f7bb4b2f30e60a6bd8739befd9d17bfbfc"
"gitHead": "7bc0264e163e842f0f96c1dbf7a468c022db1497"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc