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

@rmwc/ripple

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rmwc/ripple - npm Package Compare versions

Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4

46

index.d.ts
import * as React from 'react';
export { withRipple } from './withRipple';
export { WithRipplePropsT } from './withRipple';
export declare type RipplePropsT = {

@@ -89,2 +87,46 @@ /** Makes the ripple unbounded */

}
export declare type WithRipplePropsT = {
ripple?: boolean;
surface?: boolean;
cssOnly?: boolean;
unbounded?: boolean;
};
/**
* HOC that adds ripples to any component
*/
export declare const withRipple: ({ unbounded: defaultUnbounded, surface: defaultSurface }?: {
unbounded?: boolean | undefined;
surface?: boolean | undefined;
}) => (Component: React.ComponentType<any>) => {
new (props: Readonly<any>): {
render(): JSX.Element;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<any>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callBack?: (() => void) | undefined): void;
readonly props: Readonly<{
children?: React.ReactNode;
}> & Readonly<any>;
state: Readonly<{}>;
context: any;
refs: {
[key: string]: React.ReactInstance;
};
};
new (props: any, context?: any): {
render(): JSX.Element;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<any>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callBack?: (() => void) | undefined): void;
readonly props: Readonly<{
children?: React.ReactNode;
}> & Readonly<any>;
state: Readonly<{}>;
context: any;
refs: {
[key: string]: React.ReactInstance;
};
};
displayName: string;
defaultProps: {
ripple: boolean;
};
};
export default Ripple;

@@ -6,3 +6,3 @@ 'use strict';

});
exports.Ripple = exports.withRipple = undefined;
exports.withRipple = exports.Ripple = undefined;

@@ -13,11 +13,2 @@ 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 _withRipple = require('./withRipple');
Object.defineProperty(exports, 'withRipple', {
enumerable: true,
get: function get() {
return _withRipple.withRipple;
}
});
var _react = require('react');

@@ -124,2 +115,63 @@

});
/**
* HOC that adds ripples to any component
*/
var withRipple = function withRipple() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
defaultUnbounded = _ref.unbounded,
_ref$surface = _ref.surface,
defaultSurface = _ref$surface === undefined ? true : _ref$surface;
return function (Component) {
var _class, _temp;
return _temp = _class = function (_React$Component) {
_inherits(_class, _React$Component);
function _class() {
_classCallCheck(this, _class);
return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
}
_createClass(_class, [{
key: 'render',
value: function render() {
var _props2 = this.props,
ripple = _props2.ripple,
rest = _objectWithoutProperties(_props2, ['ripple']);
if (ripple && !rest.cssOnly) {
return React.createElement(
Ripple,
Object.assign({}, rest, {
unbounded: rest.unbounded || defaultUnbounded,
surface: rest.surface || defaultSurface
}),
React.createElement(Component, rest)
);
}
return React.createElement(Component, rest);
}
}]);
return _class;
}(React.Component), Object.defineProperty(_class, 'displayName', {
enumerable: true,
writable: true,
value: 'withRipple(' + (Component.displayName || 'Unknown') + ')'
}), Object.defineProperty(_class, 'defaultProps', {
enumerable: true,
writable: true,
value: {
ripple: true
}
}), _temp;
};
};
exports.withRipple = withRipple;
exports.default = Ripple;

4

package.json
{
"name": "@rmwc/ripple",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"description": "RMWC Ripple component",

@@ -30,5 +30,5 @@ "main": "index.js",

"@material/ripple": "~0.39.0",
"@rmwc/base": "^2.0.0-alpha.3",
"@rmwc/base": "^2.0.0-alpha.4",
"classnames": "^2.2.5"
}
}

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