@rmwc/line-ripple
Advanced tools
Comparing version 2.2.0 to 3.0.0
@@ -5,4 +5,12 @@ [ | ||
"displayName": "LineRipple", | ||
"methods": [] | ||
"methods": [ | ||
{ | ||
"name": "getDefaultFoundation", | ||
"docblock": null, | ||
"modifiers": [], | ||
"params": [], | ||
"returns": null | ||
} | ||
] | ||
} | ||
] |
@@ -1,3 +0,11 @@ | ||
import * as React from 'react'; | ||
export declare const LineRipple: React.ComponentType<import("@rmwc/base/simpleTag").SimpleTagPropsT>; | ||
/// <reference types="react" /> | ||
import { FoundationComponent } from '@rmwc/base'; | ||
export declare type LineRipplePropsT = {}; | ||
export declare class LineRipple extends FoundationComponent<LineRipplePropsT> { | ||
static displayName: string; | ||
root_: null | HTMLElement; | ||
constructor(props: LineRipplePropsT); | ||
getDefaultFoundation(): any; | ||
render(): JSX.Element; | ||
} | ||
export default LineRipple; |
75
index.js
@@ -8,2 +8,4 @@ 'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -13,2 +15,4 @@ | ||
var _mdc = require('@material/line-ripple/dist/mdc.lineRipple'); | ||
var _base = require('@rmwc/base'); | ||
@@ -18,8 +22,69 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
var LineRipple = exports.LineRipple = (0, _base.simpleTag)({ | ||
displayName: 'LineRipple', | ||
classNames: 'mdc-line-ripple' | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var LineRipple = exports.LineRipple = function (_FoundationComponent) { | ||
_inherits(LineRipple, _FoundationComponent); | ||
function LineRipple(props) { | ||
_classCallCheck(this, LineRipple); | ||
var _this = _possibleConstructorReturn(this, (LineRipple.__proto__ || Object.getPrototypeOf(LineRipple)).call(this, props)); | ||
_this.createClassList('root_'); | ||
_this.createPropsList('root_'); | ||
return _this; | ||
} | ||
_createClass(LineRipple, [{ | ||
key: 'getDefaultFoundation', | ||
value: function getDefaultFoundation() { | ||
var _this2 = this; | ||
return new _mdc.MDCLineRippleFoundation({ | ||
addClass: function addClass(className) { | ||
return _this2.classList.root_.add(className); | ||
}, | ||
removeClass: function removeClass(className) { | ||
return _this2.classList.root_.remove(className); | ||
}, | ||
hasClass: function hasClass(className) { | ||
return _this2.classList.root_.has(className); | ||
}, | ||
setStyle: function setStyle(propertyName, value) { | ||
return _this2.root_ && (_this2.root_.style[propertyName] = value); | ||
}, | ||
registerEventHandler: function registerEventHandler(evtType, handler) { | ||
return _this2.propsList.root_.addEventListener(evtType, handler); | ||
}, | ||
deregisterEventHandler: function deregisterEventHandler(evtType, handler) { | ||
return _this2.propsList.root_.removeEventListener(evtType, handler); | ||
} | ||
}); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var _this3 = this; | ||
return React.createElement('div', Object.assign({}, this.props, this.propsList.root_.all(), { | ||
className: 'mdc-line-ripple ' + this.classList.root_.renderToString(), | ||
ref: function ref(_ref) { | ||
return _this3.root_ = _ref; | ||
} | ||
})); | ||
} | ||
}]); | ||
return LineRipple; | ||
}(_base.FoundationComponent); | ||
Object.defineProperty(LineRipple, 'displayName', { | ||
enumerable: true, | ||
writable: true, | ||
value: 'LineRipple' | ||
}); | ||
exports.default = LineRipple; |
{ | ||
"name": "@rmwc/line-ripple", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "RMWC LineRipple component", | ||
@@ -29,5 +29,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@material/line-ripple": "~0.39.0", | ||
"@rmwc/base": "^2.2.0" | ||
"@material/line-ripple": "~0.40.0", | ||
"@rmwc/base": "^3.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
6864
95
+ Added@material/animation@0.40.1(transitive)
+ Added@material/base@0.40.1(transitive)
+ Added@material/line-ripple@0.40.1(transitive)
+ Added@material/theme@0.40.1(transitive)
+ Added@rmwc/base@3.0.11(transitive)
- Removed@material/animation@0.39.0(transitive)
- Removed@material/base@0.39.0(transitive)
- Removed@material/line-ripple@0.39.3(transitive)
- Removed@material/theme@0.39.1(transitive)
- Removed@rmwc/base@2.2.0(transitive)
Updated@rmwc/base@^3.0.0