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

@rmwc/base

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rmwc/base - npm Package Compare versions

Comparing version 3.0.11 to 4.0.0

9

foundation-component.js

@@ -218,2 +218,11 @@ 'use strict';

// bugfix for events coming from form elements
// and also fits with reacts form pattern better...
// This should always otherwise be null since there is no target
// for Custom Events
Object.defineProperty(evt, 'target', {
value: evtData,
writable: false
});
// Custom handling for React

@@ -220,0 +229,0 @@ var propName = evtType;

3

index.d.ts
/// <reference types="react" />
export { default as classNames } from 'classnames';
export { default as PropTypes } from 'prop-types';
export { simpleTag } from './simpleTag';

@@ -8,2 +10,3 @@ export { SimpleTagPropsT } from './simpleTag';

export { randomId } from './utils/randomId';
export { debounce } from './utils/debounce';
export { withFoundation, syncFoundationProp } from './withFoundation';

@@ -10,0 +13,0 @@ export { FoundationComponent } from './foundation-component';

@@ -7,2 +7,20 @@ 'use strict';

var _classnames = require('classnames');
Object.defineProperty(exports, 'classNames', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_classnames).default;
}
});
var _propTypes = require('prop-types');
Object.defineProperty(exports, 'PropTypes', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_propTypes).default;
}
});
var _simpleTag = require('./simpleTag');

@@ -44,2 +62,11 @@

var _debounce = require('./utils/debounce');
Object.defineProperty(exports, 'debounce', {
enumerable: true,
get: function get() {
return _debounce.debounce;
}
});
var _withFoundation = require('./withFoundation');

@@ -77,1 +104,3 @@

});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

5

package.json
{
"name": "@rmwc/base",
"version": "3.0.11",
"version": "4.0.0",
"description": "RMWC base module",

@@ -31,4 +31,5 @@ "main": "index.js",

"hyperform": "^0.9.9",
"mutation-observer": "^1.0.3"
"mutation-observer": "^1.0.3",
"prop-types": "^15.6.1"
}
}

@@ -16,5 +16,4 @@ import * as React from 'react';

theme?: string | string[];
apiRef?: <S>(api: S) => S;
} & React.HTMLAttributes<any> & React.HTMLProps<any>;
export declare const simpleTag: ({ displayName, defaultProps, consumeProps, tag, wrap: defaultWrap, classNames }: SimpleTagFactoryT) => React.ComponentType<SimpleTagPropsT>;
export {};

@@ -9,16 +9,5 @@ 'use strict';

if (global['window']) {
var _require = require('hyperform'),
ValidityState = _require.ValidityState;
var hyperform = require('hyperform');
hyperform(window);
var defineValidity = {
get: function get() {
return ValidityState(this);
},
configurable: true
};
Object.defineProperty(global['HTMLInputElement'].prototype, 'validity', defineValidity);
Object.defineProperty(global['HTMLTextAreaElement'].prototype, 'validity', defineValidity);
Object.defineProperty(window['HTMLElement'].prototype, 'dataset', {

@@ -25,0 +14,0 @@ writable: true,

@@ -1,1 +0,1 @@

export declare const debounce: (func: any, wait: any, immediate?: boolean) => () => void;
export declare const debounce: (func: Function, wait: number) => () => void;

@@ -7,4 +7,2 @@ "use strict";

var debounce = exports.debounce = function debounce(func, wait) {
var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var timeout;

@@ -16,9 +14,8 @@ return function () {

timeout = null;
if (!immediate) func.apply(context, args);
func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout !== null && clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};

@@ -1,2 +0,4 @@

export const debounce = function(func, wait, immediate = false) {
// @flow
export const debounce = function(func: Function, wait: number) {
var timeout;

@@ -8,9 +10,8 @@ return function() {

timeout = null;
if (!immediate) func.apply(context, args);
func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout !== null && clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};

@@ -151,5 +151,2 @@ 'use strict';

this._safeSyncWithProps(this.props);
// this method should be deprecated in the future in favor of standard refs
typeof this.props.apiRef === 'function' && this.props.apiRef(this);
}

@@ -156,0 +153,0 @@ }, {

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 not supported yet

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 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