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

@vtex/styleguide

Package Overview
Dependencies
Maintainers
19
Versions
668
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vtex/styleguide - npm Package Compare versions

Comparing version 2.0.0-rc.4 to 2.0.0-rc.5

73

lib/Alert/index.js

@@ -0,3 +1,35 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Close = require('../Icons/Close');
var _Close2 = _interopRequireDefault(_Close);
var _Success = require('../Icons/Success');
var _Success2 = _interopRequireDefault(_Success);
var _Error = require('../Icons/Error');
var _Error2 = _interopRequireDefault(_Error);
var _Warning = require('../Icons/Warning');
var _Warning2 = _interopRequireDefault(_Warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,9 +41,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Close from '../Icons/Close';
import Success from '../Icons/Success';
import Error from '../Icons/Error';
import Warning from '../Icons/Warning';
var Alert = function (_Component) {

@@ -48,3 +73,3 @@ _inherits(Alert, _Component);

var showIcon = false;
var Icon = React.createElement('div', null);
var Icon = _react2.default.createElement('div', null);

@@ -56,3 +81,3 @@ switch (type) {

classes += 'bg-washed-green ';
Icon = Success;
Icon = _Success2.default;
break;

@@ -64,3 +89,3 @@ }

classes += 'bg-washed-red ';
Icon = Error;
Icon = _Error2.default;
break;

@@ -72,3 +97,3 @@ }

classes += 'bg-washed-yellow ';
Icon = Warning;
Icon = _Warning2.default;
break;

@@ -89,14 +114,14 @@ }

return React.createElement(
return _react2.default.createElement(
'div',
{ className: 'flex justify-between ' + classes },
React.createElement(
_react2.default.createElement(
'div',
{ className: 'flex items-center' },
showIcon && React.createElement(
showIcon && _react2.default.createElement(
'div',
{ className: 'flex' },
React.createElement(Icon, null)
_react2.default.createElement(Icon, null)
),
React.createElement(
_react2.default.createElement(
'div',

@@ -107,6 +132,6 @@ { className: '' + (showIcon ? 'ph5 flex' : 'pr5') },

),
onClose && React.createElement(
onClose && _react2.default.createElement(
'div',
{ className: 'pointer ' + closeClass, onClick: onClose },
React.createElement(Close, null)
_react2.default.createElement(_Close2.default, null)
)

@@ -118,9 +143,9 @@ );

return Alert;
}(Component);
}(_react.Component);
Alert.propTypes = {
type: PropTypes.oneOf(['success', 'error', 'warning', 'info', 'info-dark']),
children: PropTypes.node.isRequired,
onClose: PropTypes.func,
autoClose: PropTypes.number
type: _propTypes2.default.oneOf(['success', 'error', 'warning', 'info', 'info-dark']),
children: _propTypes2.default.node.isRequired,
onClose: _propTypes2.default.func,
autoClose: _propTypes2.default.number
};

@@ -132,2 +157,2 @@

export default Alert;
exports.default = Alert;

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Button = function (_Component) {

@@ -55,3 +68,3 @@ _inherits(Button, _Component);

return React.createElement(
return _react2.default.createElement(
'button',

@@ -65,3 +78,3 @@ Object.assign({ type: 'button', className: '' + classes }, this.props.htmlProps, { disabled: disabled }),

return Button;
}(Component);
}(_react.Component);

@@ -76,9 +89,9 @@ Button.defaultProps = {

Button.propTypes = {
primary: PropTypes.bool,
secondary: PropTypes.bool,
disabled: PropTypes.bool,
htmlProps: PropTypes.object,
children: PropTypes.node.isRequired
primary: _propTypes2.default.bool,
secondary: _propTypes2.default.bool,
disabled: _propTypes2.default.bool,
htmlProps: _propTypes2.default.object,
children: _propTypes2.default.node.isRequired
};
export default Button;
exports.default = Button;

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Check = function (_Component) {

@@ -25,6 +38,6 @@ _inherits(Check, _Component);

value: function render() {
return React.createElement(
return _react2.default.createElement(
'svg',
{ xmlns: 'http://www.w3.org/2000/svg', width: '18', height: '18' },
React.createElement('path', {
_react2.default.createElement('path', {
d: 'M6.61 11.89L3.5 8.78 2.44 9.84 6.61 14l8.95-8.95L14.5 4z',

@@ -38,5 +51,5 @@ fill: this.props.fill

return Check;
}(Component);
}(_react.Component);
export default Check;
exports.default = Check;

@@ -49,3 +62,3 @@

Check.propTypes = {
fill: PropTypes.string
fill: _propTypes2.default.string
};

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Close = function (_Component) {

@@ -25,3 +38,3 @@ _inherits(Close, _Component);

value: function render() {
return React.createElement(
return _react2.default.createElement(
'svg',

@@ -35,3 +48,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -46,3 +59,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -55,6 +68,6 @@ {

},
React.createElement(
_react2.default.createElement(
'g',
{ id: 'simple-remove', transform: 'translate(429.000000, 17.000000)' },
React.createElement('path', {
_react2.default.createElement('path', {
d: 'M7.82857143,0.171428571 C7.6,-0.0571428571 7.25714286,-0.0571428571 7.02857143,0.171428571 L4,3.2 L0.971428571,0.171428571 C0.742857143,-0.0571428571 0.4,-0.0571428571 0.171428571,0.171428571 C-0.0571428571,0.4 -0.0571428571,0.742857143 0.171428571,0.971428571 L3.2,4 L0.171428571,7.02857143 C-0.0571428571,7.25714286 -0.0571428571,7.6 0.171428571,7.82857143 C0.285714286,7.94285714 0.4,8 0.571428571,8 C0.742857143,8 0.857142857,7.94285714 0.971428571,7.82857143 L4,4.8 L7.02857143,7.82857143 C7.14285714,7.94285714 7.31428571,8 7.42857143,8 C7.54285714,8 7.71428571,7.94285714 7.82857143,7.82857143 C8.05714286,7.6 8.05714286,7.25714286 7.82857143,7.02857143 L4.8,4 L7.82857143,0.971428571 C8.05714286,0.742857143 8.05714286,0.4 7.82857143,0.171428571 Z',

@@ -71,3 +84,3 @@ id: 'Shape'

return Close;
}(Component);
}(_react.Component);

@@ -79,5 +92,5 @@ Close.defaultProps = {

Close.propTypes = {
fill: PropTypes.string
fill: _propTypes2.default.string
};
export default Close;
exports.default = Close;

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Deny = function (_Component) {

@@ -25,6 +38,6 @@ _inherits(Deny, _Component);

value: function render() {
return React.createElement(
return _react2.default.createElement(
'svg',
{ xmlns: 'http://www.w3.org/2000/svg', width: '18', height: '18' },
React.createElement('path', {
_react2.default.createElement('path', {
d: 'M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z',

@@ -38,5 +51,5 @@ fill: this.props.fill

return Deny;
}(Component);
}(_react.Component);
export default Deny;
exports.default = Deny;

@@ -49,3 +62,3 @@

Deny.propTypes = {
fill: PropTypes.string
fill: _propTypes2.default.string
};

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Error = function (_Component) {

@@ -25,3 +38,3 @@ _inherits(Error, _Component);

value: function render() {
return React.createElement(
return _react2.default.createElement(
'svg',

@@ -35,3 +48,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -46,3 +59,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -55,3 +68,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -62,7 +75,7 @@ {

},
React.createElement('polygon', {
_react2.default.createElement('polygon', {
id: 'Shape',
points: '8.8375 3.9375 7 5.775 5.1625 3.9375 3.9375 5.1625 5.775 7 3.9375 8.8375 5.1625 10.0625 7 8.225 8.8375 10.0625 10.0625 8.8375 8.225 7 10.0625 5.1625'
}),
React.createElement('path', {
_react2.default.createElement('path', {
d: 'M7,0 C3.15,0 0,3.15 0,7 C0,10.85 3.15,14 7,14 C10.85,14 14,10.85 14,7 C14,3.15 10.85,0 7,0 Z M7,12.25 C4.1125,12.25 1.75,9.8875 1.75,7 C1.75,4.1125 4.1125,1.75 7,1.75 C9.8875,1.75 12.25,4.1125 12.25,7 C12.25,9.8875 9.8875,12.25 7,12.25 Z',

@@ -79,3 +92,3 @@ id: 'Shape'

return Error;
}(Component);
}(_react.Component);

@@ -87,5 +100,5 @@ Error.defaultProps = {

Error.propTypes = {
fill: PropTypes.string
fill: _propTypes2.default.string
};
export default Error;
exports.default = Error;

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Success = function (_Component) {

@@ -25,3 +38,3 @@ _inherits(Success, _Component);

value: function render() {
return React.createElement(
return _react2.default.createElement(
'svg',

@@ -35,3 +48,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -46,3 +59,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -55,10 +68,10 @@ {

},
React.createElement(
_react2.default.createElement(
'g',
{ id: 'Group-11', transform: 'translate(16.000000, 21.000000)' },
React.createElement('path', {
_react2.default.createElement('path', {
d: 'M7,0 C3.140375,0 0,3.140375 0,7 C0,10.859625 3.140375,14 7,14 C10.859625,14 14,10.859625 14,7 C14,3.140375 10.859625,0 7,0 Z M7,12.25 C4.104625,12.25 1.75,9.895375 1.75,7 C1.75,4.104625 4.104625,1.75 7,1.75 C9.895375,1.75 12.25,4.104625 12.25,7 C12.25,9.895375 9.895375,12.25 7,12.25 Z',
id: 'Shape'
}),
React.createElement('polygon', {
_react2.default.createElement('polygon', {
id: 'Shape',

@@ -75,3 +88,3 @@ points: '6.125 9.98725 3.13775 7 4.375 5.76275 6.125 7.51275 9.625 4.01275 10.86225 5.25'

return Success;
}(Component);
}(_react.Component);

@@ -83,5 +96,5 @@ Success.defaultProps = {

Success.propTypes = {
fill: PropTypes.string
fill: _propTypes2.default.string
};
export default Success;
exports.default = Success;

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Warning = function (_Component) {

@@ -25,3 +38,3 @@ _inherits(Warning, _Component);

value: function render() {
return React.createElement(
return _react2.default.createElement(
'svg',

@@ -35,3 +48,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -46,3 +59,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -55,3 +68,3 @@ {

},
React.createElement(
_react2.default.createElement(
'g',

@@ -62,3 +75,3 @@ {

},
React.createElement('rect', {
_react2.default.createElement('rect', {
id: 'Rectangle-path',

@@ -70,3 +83,3 @@ x: '3.5',

}),
React.createElement('path', {
_react2.default.createElement('path', {
d: 'M7,0 C3.15,0 0,3.15 0,7 C0,10.85 3.15,14 7,14 C10.85,14 14,10.85 14,7 C14,3.15 10.85,0 7,0 Z M7,12.25 C4.1125,12.25 1.75,9.8875 1.75,7 C1.75,4.1125 4.1125,1.75 7,1.75 C9.8875,1.75 12.25,4.1125 12.25,7 C12.25,9.8875 9.8875,12.25 7,12.25 Z',

@@ -83,3 +96,3 @@ id: 'Shape'

return Warning;
}(Component);
}(_react.Component);

@@ -91,5 +104,5 @@ Warning.defaultProps = {

Warning.propTypes = {
fill: PropTypes.string
fill: _propTypes2.default.string
};
export default Warning;
exports.default = Warning;

@@ -0,3 +1,19 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,5 +25,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
var Input = function (_Component) {

@@ -86,6 +99,6 @@ _inherits(Input, _Component);

return React.createElement(
return _react2.default.createElement(
'div',
null,
React.createElement('input', Object.assign({}, htmlProps, {
_react2.default.createElement('input', Object.assign({}, htmlProps, {
onBlur: this.handleBlur,

@@ -98,3 +111,3 @@ onFocus: this.handleFocus,

})),
errorMessage && React.createElement(
errorMessage && _react2.default.createElement(
'div',

@@ -109,3 +122,3 @@ { className: errorMessageClasses },

return Input;
}(Component);
}(_react.Component);

@@ -120,12 +133,12 @@ Input.defaultProps = {

Input.propTypes = {
disabled: PropTypes.bool,
error: PropTypes.bool,
errorMessage: PropTypes.string,
disabled: _propTypes2.default.bool,
error: _propTypes2.default.bool,
errorMessage: _propTypes2.default.string,
/** Extra attributes for the input */
htmlProps: PropTypes.object,
onChange: PropTypes.func,
onFocus: PropTypes.func,
onBlur: PropTypes.func
htmlProps: _propTypes2.default.object,
onChange: _propTypes2.default.func,
onFocus: _propTypes2.default.func,
onBlur: _propTypes2.default.func
};
export default Input;
exports.default = Input;

@@ -1,5 +0,15 @@

import React from 'react';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Spinner = function Spinner() {
return React.createElement(
return _react2.default.createElement(
"svg",

@@ -11,3 +21,3 @@ {

},
React.createElement(
_react2.default.createElement(
"circle",

@@ -24,3 +34,3 @@ {

},
React.createElement("animateTransform", {
_react2.default.createElement("animateTransform", {
attributeName: "transform",

@@ -39,2 +49,2 @@ type: "rotate",

export default Spinner;
exports.default = Spinner;

@@ -0,3 +1,27 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Deny = require('../Icons/Deny');
var _Deny2 = _interopRequireDefault(_Deny);
var _Check = require('../Icons/Check');
var _Check2 = _interopRequireDefault(_Check);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -9,8 +33,2 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Deny from '../Icons/Deny';
import Check from '../Icons/Check';
var Toggle = function (_Component) {

@@ -97,3 +115,3 @@ _inherits(Toggle, _Component);

return React.createElement(
return _react2.default.createElement(
'label',

@@ -105,6 +123,6 @@ Object.assign({

this.props.children,
React.createElement(
_react2.default.createElement(
'div',
{ className: '' + classes },
React.createElement('div', {
_react2.default.createElement('div', {
style: {

@@ -116,14 +134,14 @@ height: '1.5rem',

}),
React.createElement(
_react2.default.createElement(
'div',
{ className: iconDenyClasses },
React.createElement(Deny, null)
_react2.default.createElement(_Deny2.default, null)
),
React.createElement(
_react2.default.createElement(
'div',
{ className: iconCheckClasses },
React.createElement(Check, null)
_react2.default.createElement(_Check2.default, null)
)
),
React.createElement('input', {
_react2.default.createElement('input', {
id: id,

@@ -142,3 +160,3 @@ type: 'checkbox',

return Toggle;
}(Component);
}(_react.Component);

@@ -154,11 +172,11 @@ Toggle.defaultProps = {

Toggle.propTypes = {
checked: PropTypes.bool,
children: PropTypes.node.isRequired,
disabled: PropTypes.bool,
id: PropTypes.string,
htmlProps: PropTypes.object,
primary: PropTypes.bool,
secondary: PropTypes.bool
checked: _propTypes2.default.bool,
children: _propTypes2.default.node.isRequired,
disabled: _propTypes2.default.bool,
id: _propTypes2.default.string,
htmlProps: _propTypes2.default.object,
primary: _propTypes2.default.bool,
secondary: _propTypes2.default.bool
};
export default Toggle;
exports.default = Toggle;
{
"name": "@vtex/styleguide",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"scripts": {

@@ -10,12 +10,12 @@ "test": "react-scripts test --env=jsdom",

"styleguide:build": "styleguidist build",
"compile": "NODE_ENV=production babel ./src/components --out-dir ./lib --ignore '__tests__,*.spec.js'",
"compile":
"NODE_ENV=production babel --plugins transform-es2015-modules-commonjs ./src/components --out-dir ./lib --ignore '__tests__,*.spec.js'",
"prepublishOnly": "npm run compile",
"develop": "npm link && watch 'npm run compile' src"
},
"files": [
"lib/"
],
"files": ["lib/"],
"homepage": "https://vtex.github.io/styleguide",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"eslint-config-vtex": "^7.0.0",

@@ -22,0 +22,0 @@ "eslint-config-vtex-react": "^3.0.3",

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