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

@polygon.io/core

Package Overview
Dependencies
Maintainers
8
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polygon.io/core - npm Package Compare versions

Comparing version 2.1.2 to 3.0.0

dist/components/Modal/CloseIcon.js

2

dist/components/Modal/Header.js

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

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _react=_interopRequireDefault(require("react")),_Padding=_interopRequireDefault(require("../Padding")),_index=require("./index.styles"),__jsx=_react["default"].createElement,Header=function(a){var b=a.className,c=a.children,d=a.dismissable,e=a.onClose;return __jsx(_Padding["default"],{className:b,t:"6",x:"6",b:"3"},d&&__jsx(_index.CloseIcon,{className:"fal fa-times",onClick:e}),c)};Header.defaultProps={className:void 0,children:null,dismissable:!0,onClose:function onClose(){}};var _default=Header;exports["default"]=_default;
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _react=_interopRequireDefault(require("react")),_Padding=_interopRequireDefault(require("../Padding")),__jsx=_react["default"].createElement,Header=function(a){var b=a.className,c=a.children;return __jsx(_Padding["default"],{className:b,t:"6",x:"6",b:"3"},c)};Header.defaultProps={className:void 0,children:null};var _default=Header;exports["default"]=_default;

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

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function get(){return _modal["default"]}}),Object.defineProperty(exports,"ModalContent",{enumerable:!0,get:function get(){return _Content["default"]}}),Object.defineProperty(exports,"ModalHeader",{enumerable:!0,get:function get(){return _Header["default"]}}),Object.defineProperty(exports,"ModalFooter",{enumerable:!0,get:function get(){return _Footer["default"]}}),Object.defineProperty(exports,"ModalWrapper",{enumerable:!0,get:function get(){return _wrapper["default"]}});var _modal=_interopRequireDefault(require("./modal")),_Content=_interopRequireDefault(require("./Content")),_Header=_interopRequireDefault(require("./Header")),_Footer=_interopRequireDefault(require("./Footer")),_wrapper=_interopRequireDefault(require("./wrapper"));
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function get(){return _modal["default"]}}),Object.defineProperty(exports,"ModalContent",{enumerable:!0,get:function get(){return _Content["default"]}}),Object.defineProperty(exports,"ModalHeader",{enumerable:!0,get:function get(){return _Header["default"]}}),Object.defineProperty(exports,"ModalFooter",{enumerable:!0,get:function get(){return _Footer["default"]}}),Object.defineProperty(exports,"CloseIcon",{enumerable:!0,get:function get(){return _CloseIcon["default"]}}),Object.defineProperty(exports,"ModalWrapper",{enumerable:!0,get:function get(){return _wrapper["default"]}});var _modal=_interopRequireDefault(require("./modal")),_Content=_interopRequireDefault(require("./Content")),_Header=_interopRequireDefault(require("./Header")),_Footer=_interopRequireDefault(require("./Footer")),_CloseIcon=_interopRequireDefault(require("./CloseIcon")),_wrapper=_interopRequireDefault(require("./wrapper"));

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

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.Card=exports.ModalBackground=exports.StyledModal=exports.StyledFooter=exports.CloseIcon=exports.Body=exports.ScrollablePadding=void 0;var _styledComponents=_interopRequireDefault(require("styled-components")),_Container=_interopRequireDefault(require("../Container")),_Padding=_interopRequireDefault(require("../Padding")),ScrollablePadding=(0,_styledComponents["default"])(_Padding["default"]).withConfig({displayName:"indexstyles__ScrollablePadding",componentId:"sc-jy4smw-0"})(["overflow:auto;"]);exports.ScrollablePadding=ScrollablePadding;var Body=_styledComponents["default"].div.withConfig({displayName:"indexstyles__Body",componentId:"sc-jy4smw-1"})(["overflow:auto;min-height:2rem;"]);exports.Body=Body;var CloseIcon=_styledComponents["default"].i.withConfig({displayName:"indexstyles__CloseIcon",componentId:"sc-jy4smw-2"})(["position:absolute;top:",";right:",";color:",";font-size:",";cursor:pointer;"],function(a){var b=a.theme;return b.font.size.s5},function(a){var b=a.theme;return b.font.size.s5},function(a){var b=a.theme;return b.color.content.primary},function(a){var b=a.theme;return b.font.size.s5});exports.CloseIcon=CloseIcon;var StyledFooter=(0,_styledComponents["default"])(_Container["default"]).withConfig({displayName:"indexstyles__StyledFooter",componentId:"sc-jy4smw-3"})(["padding:",";"],function(a){var b=a.theme;return b.spacing.s6});exports.StyledFooter=StyledFooter;var StyledModal=(0,_styledComponents["default"])(_Container["default"]).withConfig({displayName:"indexstyles__StyledModal",componentId:"sc-jy4smw-4"})(["overflow:hidden;position:fixed;top:0;bottom:0;left:0;right:0;z-index:9999;"]);exports.StyledModal=StyledModal;var ModalBackground=_styledComponents["default"].div.withConfig({displayName:"indexstyles__ModalBackground",componentId:"sc-jy4smw-5"})(["position:absolute;top:0;bottom:0;left:0;right:0;opacity:0.6;background-color:",";"],function(a){var b=a.theme;return b.color.content.primary});exports.ModalBackground=ModalBackground;var Card=(0,_styledComponents["default"])(_Container["default"]).withConfig({displayName:"indexstyles__Card",componentId:"sc-jy4smw-6"})(["margin:",";overflow:hidden;position:relative;z-index:1;width:80vw;min-height:",";max-width:",";border-radius:",";background-color:",";",""],function(a){var b=a.theme;return"".concat(b.spacing.s4," 0")},function(a){var b=a.addMinHeight;return b&&"80vh"},function(a){var b=a.theme;return"".concat(b.breakpoints.md,"px")},function(a){var b=a.theme;return b.radius},function(a){var b=a.theme;return b.color.background.primary},function(a){var b=a.theme,c=a.fullScreen;return c&&"\n\t\tposition: fixed;\n\t\ttop: calc(0px + ".concat(b.spacing.s1,");\n\t\tbottom: calc(0px + ").concat(b.spacing.s1,");\n\t\tright: calc(0px + ").concat(b.spacing.s1,");\n\t\tleft: calc(0px + ").concat(b.spacing.s1,");\n\t\twidth: auto;\n\t\tmax-width: 100vw;\n\t\tmargin: ").concat(b.spacing.s0,";\n\t")});exports.Card=Card;
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:!0}),exports.Card=exports.ModalBackground=exports.StyledModal=exports.StyledFooter=exports.CloseIcon=exports.Body=exports.ScrollablePadding=void 0;var _styledComponents=_interopRequireWildcard(require("styled-components")),_Container=_interopRequireDefault(require("../Container")),_Padding=_interopRequireDefault(require("../Padding"));function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!==_typeof(a)&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d["default"]=a,c&&c.set(a,d),d}var fullScreenStyle=(0,_styledComponents.css)(["position:fixed;top:calc(0px + ",");bottom:calc(0px + ",");right:calc(0px + ",");left:calc(0px + ",");width:auto;max-width:100vw;margin:",";"],function(a){var b=a.theme;return b.spacing.s1},function(a){var b=a.theme;return b.spacing.s1},function(a){var b=a.theme;return b.spacing.s1},function(a){var b=a.theme;return b.spacing.s1},function(a){var b=a.theme;return b.spacing.s0}),ScrollablePadding=(0,_styledComponents["default"])(_Padding["default"]).withConfig({displayName:"indexstyles__ScrollablePadding",componentId:"sc-jy4smw-0"})(["overflow:auto;"]);exports.ScrollablePadding=ScrollablePadding;var Body=_styledComponents["default"].div.withConfig({displayName:"indexstyles__Body",componentId:"sc-jy4smw-1"})(["overflow:auto;min-height:2rem;"]);exports.Body=Body;var CloseIcon=_styledComponents["default"].i.withConfig({displayName:"indexstyles__CloseIcon",componentId:"sc-jy4smw-2"})(["position:absolute;top:",";right:",";font-size:",";cursor:pointer;color:",";"],function(a){var b=a.theme;return b.font.size.s5},function(a){var b=a.theme;return b.font.size.s5},function(a){var b=a.theme;return b.font.size.s5},function(a){var b=a.theme,c=a.color;return b.color.content[c]});exports.CloseIcon=CloseIcon;var StyledFooter=(0,_styledComponents["default"])(_Container["default"]).withConfig({displayName:"indexstyles__StyledFooter",componentId:"sc-jy4smw-3"})(["padding:",";"],function(a){var b=a.theme;return b.spacing.s6});exports.StyledFooter=StyledFooter;var StyledModal=(0,_styledComponents["default"])(_Container["default"]).withConfig({displayName:"indexstyles__StyledModal",componentId:"sc-jy4smw-4"})(["overflow:hidden;position:fixed;top:0;bottom:0;left:0;right:0;z-index:9999;"]);exports.StyledModal=StyledModal;var ModalBackground=_styledComponents["default"].div.withConfig({displayName:"indexstyles__ModalBackground",componentId:"sc-jy4smw-5"})(["position:absolute;top:0;bottom:0;left:0;right:0;opacity:0.6;background-color:",";"],function(a){var b=a.theme;return b.color.content.primary});exports.ModalBackground=ModalBackground;var Card=(0,_styledComponents["default"])(_Container["default"]).withConfig({displayName:"indexstyles__Card",componentId:"sc-jy4smw-6"})(["margin:",";overflow:hidden;position:relative;z-index:1;width:80vw;min-height:",";max-width:",";border-radius:",";box-shadow:",";background-color:",";",""],function(a){var b=a.theme;return"".concat(b.spacing.s4," 0")},function(a){var b=a.addMinHeight;return b&&"80vh"},function(a){var b=a.theme;return"".concat(b.breakpoints.md,"px")},function(a){var b=a.theme;return"calc(".concat(b.radius," * 2)")},function(a){var b=a.theme;return b.shadow},function(a){var b=a.theme;return b.color.background.primary},function(a){var b=a.fullScreen;return b&&fullScreenStyle});exports.Card=Card;

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

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _react=_interopRequireWildcard(require("react")),_reactDom=require("react-dom"),_provider=_interopRequireDefault(require("./provider")),_index=require("./index.styles"),_useEventHandler=_interopRequireDefault(require("../../hooks/useEventHandler"));function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!==_typeof(a)&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d["default"]=a,c&&c.set(a,d),d}var __jsx=_react["default"].createElement,Modal=function(a){var b=a.className,c=a.open,d=a.dismissible,e=a.children,f=a.onClose,g=a.fullScreen,h=a.addMinHeight,i=(0,_react.useCallback)(function(a){var b=a.key;c&&"Escape"===b&&f()},[f,c]);(0,_useEventHandler["default"])("keydown",i);var j=(0,_react.useContext)(_provider["default"]);return c&&j.current?/*#__PURE__*/(0,_reactDom.createPortal)(__jsx(_index.StyledModal,{flexDirection:"column",justifyContent:"center",alignItems:"center"},__jsx(_index.ModalBackground,{onClick:d?f:void 0}),__jsx(_index.Card,{className:b,flexDirection:"column",fullScreen:g,addMinHeight:h},e)),j.current):null};Modal.defaultProps={className:void 0,open:!1,dismissible:!1,children:null,fullScreen:!1,addMinHeight:!1};var _default=Modal;exports["default"]=_default;
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _react=_interopRequireWildcard(require("react")),_reactDom=require("react-dom"),_index=require("./index.styles"),_provider=_interopRequireDefault(require("./provider")),_useEventHandler=_interopRequireDefault(require("../../hooks/useEventHandler"));function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!==_typeof(a)&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d["default"]=a,c&&c.set(a,d),d}var __jsx=_react["default"].createElement,Modal=function(a){var b=a.className,c=a.open,d=a.dismissible,e=a.children,f=a.onClose,g=a.fullScreen,h=a.addMinHeight,i=(0,_react.useCallback)(function(a){var b=a.key;c&&"Escape"===b&&f()},[f,c]);(0,_useEventHandler["default"])("keydown",i);var j=(0,_react.useContext)(_provider["default"]);return c&&j.current?/*#__PURE__*/(0,_reactDom.createPortal)(__jsx(_index.StyledModal,{flexDirection:"column",justifyContent:"center",alignItems:"center"},__jsx(_index.ModalBackground,{onClick:d?f:void 0}),__jsx(_index.Card,{className:b,flexDirection:"column",fullScreen:g,addMinHeight:h},e)),j.current):null};Modal.defaultProps={className:void 0,open:!1,dismissible:!1,children:null,fullScreen:!1,addMinHeight:!1};var _default=Modal;exports["default"]=_default;
{
"name": "@polygon.io/core",
"version": "2.1.2",
"version": "3.0.0",
"description": "A set of themeable UI components for React",

@@ -42,3 +42,3 @@ "main": "dist/index.js",

},
"gitHead": "9ef1bff3c82a5af90bf75c584e3a873fff93cf13"
"gitHead": "85863967fa507126853a096185e0e4b93ea17966"
}
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