@rmwc/line-ripple
Advanced tools
Comparing version 5.0.2-alpha.0 to 5.0.3-alpha.0
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
@@ -41,50 +42,50 @@ var extendStatics = function (d, b) { | ||
}; | ||
define(["require", "exports", "react", "@material/line-ripple", "@rmwc/base"], function (require, exports, React, line_ripple_1, base_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
React = __importStar(React); | ||
var LineRipple = /** @class */ (function (_super) { | ||
__extends(LineRipple, _super); | ||
function LineRipple() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.root = _this.createElement('root'); | ||
return _this; | ||
} | ||
LineRipple.prototype.getDefaultFoundation = function () { | ||
var _this = this; | ||
return new line_ripple_1.MDCLineRippleFoundation({ | ||
addClass: function (className) { return _this.root.addClass(className); }, | ||
removeClass: function (className) { return _this.root.removeClass(className); }, | ||
hasClass: function (className) { return _this.root.hasClass(className); }, | ||
setStyle: function (propertyName, value) { | ||
return _this.root.setStyle(propertyName, value); | ||
}, | ||
registerEventHandler: function (evtType, handler) { | ||
return _this.root.addEventListener(evtType, handler); | ||
}, | ||
deregisterEventHandler: function (evtType, handler) { | ||
return _this.root.removeEventListener(evtType, handler); | ||
} | ||
}); | ||
}; | ||
LineRipple.prototype.sync = function (props, prevProps) { | ||
var _this = this; | ||
// active | ||
this.syncProp(props.active, prevProps.active, function () { | ||
props.active ? _this.foundation.activate() : _this.foundation.deactivate(); | ||
}); | ||
// center | ||
this.syncProp(props.center, prevProps.center, function () { | ||
_this.foundation.setRippleCenter(props.center); | ||
}); | ||
}; | ||
LineRipple.prototype.render = function () { | ||
var _a = this.props, active = _a.active, center = _a.center, rest = __rest(_a, ["active", "center"]); | ||
return (React.createElement("div", __assign({}, this.root.props(__assign({}, rest, { className: "mdc-line-ripple " + (this.props.className || '') })), { ref: this.root.setRef }))); | ||
}; | ||
LineRipple.displayName = 'LineRipple'; | ||
return LineRipple; | ||
}(base_1.FoundationComponent)); | ||
exports.LineRipple = LineRipple; | ||
exports.default = LineRipple; | ||
}); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var React = __importStar(require("react")); | ||
// @ts-ignore | ||
var line_ripple_1 = require("@material/line-ripple"); | ||
var base_1 = require("@rmwc/base"); | ||
var LineRipple = /** @class */ (function (_super) { | ||
__extends(LineRipple, _super); | ||
function LineRipple() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.root = _this.createElement('root'); | ||
return _this; | ||
} | ||
LineRipple.prototype.getDefaultFoundation = function () { | ||
var _this = this; | ||
return new line_ripple_1.MDCLineRippleFoundation({ | ||
addClass: function (className) { return _this.root.addClass(className); }, | ||
removeClass: function (className) { return _this.root.removeClass(className); }, | ||
hasClass: function (className) { return _this.root.hasClass(className); }, | ||
setStyle: function (propertyName, value) { | ||
return _this.root.setStyle(propertyName, value); | ||
}, | ||
registerEventHandler: function (evtType, handler) { | ||
return _this.root.addEventListener(evtType, handler); | ||
}, | ||
deregisterEventHandler: function (evtType, handler) { | ||
return _this.root.removeEventListener(evtType, handler); | ||
} | ||
}); | ||
}; | ||
LineRipple.prototype.sync = function (props, prevProps) { | ||
var _this = this; | ||
// active | ||
this.syncProp(props.active, prevProps.active, function () { | ||
props.active ? _this.foundation.activate() : _this.foundation.deactivate(); | ||
}); | ||
// center | ||
this.syncProp(props.center, prevProps.center, function () { | ||
_this.foundation.setRippleCenter(props.center); | ||
}); | ||
}; | ||
LineRipple.prototype.render = function () { | ||
var _a = this.props, active = _a.active, center = _a.center, rest = __rest(_a, ["active", "center"]); | ||
return (React.createElement("div", __assign({}, this.root.props(__assign({}, rest, { className: "mdc-line-ripple " + (this.props.className || '') })), { ref: this.root.setRef }))); | ||
}; | ||
LineRipple.displayName = 'LineRipple'; | ||
return LineRipple; | ||
}(base_1.FoundationComponent)); | ||
exports.LineRipple = LineRipple; | ||
exports.default = LineRipple; |
{ | ||
"name": "@rmwc/line-ripple", | ||
"version": "5.0.2-alpha.0", | ||
"version": "5.0.3-alpha.0", | ||
"description": "RMWC LineRipple component", | ||
@@ -35,5 +35,5 @@ "main": "dist/index.js", | ||
"@material/line-ripple": "^0.43.0", | ||
"@rmwc/base": "^5.0.2-alpha.0" | ||
"@rmwc/base": "^5.0.3-alpha.0" | ||
}, | ||
"gitHead": "69fbf9ddbdad8cf2b014443c386e1c125a9cee79" | ||
"gitHead": "32b316530fb6c1c78e2335bc56d9be85e3cb3752" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59513
11
2112
Updated@rmwc/base@^5.0.3-alpha.0