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

@tds2/button

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tds2/button - npm Package Compare versions

Comparing version 0.1.30 to 0.1.31

2

lib/Button.web.js

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

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireDefault(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _styledComponents=_interopRequireDefault(require("styled-components"));var _sharedStyle=require("./sharedStyle");var _ThemeProvider=require("../../providers/ThemeProvider");var _this=this,_jsxFileName="/Users/hamedmamdoohi/Desktop/react-native-storybook/packages/Button/src/Button.web.jsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var StyledButton=(0,_styledComponents.default)('button')(function(_ref){var variant=_ref.variant,tokens=_ref.tokens;var color=(0,_sharedStyle.setColorByVariant)(variant,tokens);return"\n font-family: "+tokens.font.web+";\n height: "+tokens.height+"px;\n border: 2px solid "+color.default.border+" !important;\n background-color: "+color.default.background+" !important;\n color: "+color.default.text+" !important;\n &[style] {\n :hover {\n border: 2px solid "+color.hover.border+" !important;\n background-color: "+color.hover.background+" !important;\n color: "+color.hover.text+" !important;\n cursor: pointer;\n }\n :active {\n background-color: "+color.active.background+" !important;\n color: "+color.active.text+" !important;\n box-shadow: 0 0 0 3px "+color.active.boxShadow+" !important;\n }\n :focus {\n outline: 0 !important;\n background-color: "+color.focus.background+" !important;\n box-shadow: 0 0 0 3px "+color.focus.boxShadow+" !important;\n \n color: "+color.focus.text+" !important;\n border: 2px solid "+color.focus.border+" !important;\n \n }\n :active:focus {\n background-color: "+color.activeFocus.background+" !important;\n box-shadow: 0 0 0 3px "+color.activeFocus.boxShadow+" !important;\n color: "+color.activeFocus.text+" !important;\n border: 2px solid "+color.activeFocus.border+" !important;\n }\n }\n ";});var Button=function Button(_ref2){var variant=_ref2.variant,overrides=_ref2.tokens,children=_ref2.children;var tokens=(0,_ThemeProvider.useTokens)('button',variant,overrides);return _react.default.createElement(StyledButton,{variant:variant,tokens:tokens,style:_objectSpread(_objectSpread({fontWeight:400,letterSpacing:'normal'},_sharedStyle.text),_sharedStyle.button),__self:_this,__source:{fileName:_jsxFileName,lineNumber:49,columnNumber:5}},children);};Button.propTypes={type:_propTypes.default.oneOf(['button','submit','reset']),variant:_propTypes.default.oneOf(['primary','secondary','inverted','standard','brand','danger']),children:_propTypes.default.string};Button.defaultProps={type:'button',variant:'primary'};var _default=Button;exports.default=_default;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireDefault(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _styledComponents=_interopRequireDefault(require("styled-components"));var _sharedStyle=require("./sharedStyle");var _ThemeProvider=require("../../providers/ThemeProvider");var _this=this,_jsxFileName="/Users/hamedmamdoohi/Desktop/react-native-storybook/packages/Button/src/Button.web.jsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var StyledButton=(0,_styledComponents.default)('button')(function(_ref){var variant=_ref.variant,tokens=_ref.tokens;var color=(0,_sharedStyle.setColorByVariant)(variant,tokens);return"\n border-radius: "+tokens.border_radius+"px;\n font-family: "+tokens.font.web+";\n height: "+tokens.height+"px;\n border: 2px solid "+color.default.border+" !important;\n background-color: "+color.default.background+" !important;\n color: "+color.default.text+" !important;\n &[style] {\n :hover {\n border: 2px solid "+color.hover.border+" !important;\n background-color: "+color.hover.background+" !important;\n color: "+color.hover.text+" !important;\n cursor: pointer;\n }\n :active {\n background-color: "+color.active.background+" !important;\n color: "+color.active.text+" !important;\n box-shadow: 0 0 0 3px "+color.active.boxShadow+" !important;\n }\n :focus {\n outline: 0 !important;\n background-color: "+color.focus.background+" !important;\n box-shadow: 0 0 0 3px "+color.focus.boxShadow+" !important;\n \n color: "+color.focus.text+" !important;\n border: 2px solid "+color.focus.border+" !important;\n \n }\n :active:focus {\n background-color: "+color.activeFocus.background+" !important;\n box-shadow: 0 0 0 3px "+color.activeFocus.boxShadow+" !important;\n color: "+color.activeFocus.text+" !important;\n border: 2px solid "+color.activeFocus.border+" !important;\n }\n }\n ";});var Button=function Button(_ref2){var variant=_ref2.variant,overrides=_ref2.tokens,children=_ref2.children;var tokens=(0,_ThemeProvider.useTokens)('button',variant,overrides);return _react.default.createElement(StyledButton,{variant:variant,tokens:tokens,style:_objectSpread(_objectSpread({fontWeight:400,letterSpacing:'normal'},_sharedStyle.text),_sharedStyle.button),__self:_this,__source:{fileName:_jsxFileName,lineNumber:50,columnNumber:5}},children);};Button.propTypes={type:_propTypes.default.oneOf(['button','submit','reset']),variant:_propTypes.default.oneOf(['primary','secondary','inverted','standard','brand','danger']),children:_propTypes.default.string};Button.defaultProps={type:'button',variant:'primary'};var _default=Button;exports.default=_default;
{
"name": "@tds2/button",
"version": "0.1.30",
"version": "0.1.31",
"description": "Button component",

@@ -43,3 +43,3 @@ "keywords": [

},
"gitHead": "58d669e63435a9e6f4da26d3559c3c56045e2fb4"
"gitHead": "50c1bc399fbfe189a04a8842f07997463021b98e"
}
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