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

@asyarb/system

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyarb/system - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [1.1.4](https://github.com/asyarb/system/compare/v1.1.3...v1.1.4) (2019-08-09)
### Bug Fixes
* flex and grid children props ([03a2e67](https://github.com/asyarb/system/commit/03a2e67))
### [1.1.3](https://github.com/asyarb/system/compare/v1.1.2...v1.1.3) (2019-08-09)

@@ -7,0 +14,0 @@

2

dist/index.js

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

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var styled=_interopDefault(require("styled-components")),styledSystem=require("styled-system"),React=_interopDefault(require("react"));function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(r,!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,o,s={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(s[r]=e[r]);return s}function _objectWithoutProperties(e,t){if(null==e)return{};var r,o,s=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}const boxStyle=styledSystem.variant({prop:"boxStyle",key:"boxStyles"}),objectFit=styledSystem.style({prop:"objectFit",cssProperty:"object-fit"}),objectPosition=styledSystem.style({prop:"objectPosition",cssProperty:"object-position"}),transform=styledSystem.style({prop:"transform"}),transition=styledSystem.style({prop:"transition"}),placeSelf=styledSystem.style({prop:"placeSelf",cssProperty:"place-self"}),placeContent=styledSystem.style({prop:"placeContent",cssProperty:"place-content"}),placeItems=styledSystem.style({prop:"placeItems",cssProperty:"place-items"}),fill=styledSystem.style({prop:"fill",key:"colors"}),Box=styled.div(styledSystem.compose(styledSystem.space,styledSystem.color,styledSystem.layout,styledSystem.background,styledSystem.border,styledSystem.position,styledSystem.shadow,transform,transition,boxStyle,styledSystem.justifySelf,styledSystem.alignSelf,placeSelf,styledSystem.flex,styledSystem.gridRow,styledSystem.gridColumn));Box.defaultProps={display:"block"};const Flex=styled(Box)(styledSystem.compose(styledSystem.flexbox));Flex.defaultProps={display:"flex"};const Grid=styled(Box)(styledSystem.compose(styledSystem.grid,placeContent,placeItems));Grid.defaultProps={display:"grid"};const Image=styled(Box)(styledSystem.compose(objectFit,objectPosition));Image.defaultProps={as:"img",display:"block"};const SVG=styled(Box)(e=>({"*":_objectSpread2({},fill(e))})),Text=styled(Box)(styledSystem.typography),Heading=styled(Text)({});Heading.defaultProps={as:"h2"};const Subheading=styled(Text)({});Subheading.defaultProps={as:"h3"};const Input=styled(Text)({});Input.defaultProps={as:"input",display:"block"};const Button=styled(Text)({});Button.defaultProps={as:"button",display:"block"};const _firstLeft=(e,t)=>{for(t>=e.length&&(t=e.length-1);t>-1&&(null===e[t]||void 0===e[t]);)t--;return e[t]},_castArray=e=>Array.isArray(e)?e:[e],_zipWith=(e,t,r)=>{const o=[],s=Math.max(t.length,r.length);for(let l=0;l<s;l++)o[l]=e(_firstLeft(t,l),_firstLeft(r,l));return o},AspectRatio=React.forwardRef((e,t)=>{let{x:r,y:o,children:s}=e,l=_objectWithoutProperties(e,["x","y","children"]);return React.createElement(Box,_extends({ref:t,position:"relative"},l),React.createElement(Box,{pt:_zipWith((e,t)=>"".concat(t/e*100,"%"),_castArray(r),_castArray(o)),"aria-hidden":!0}),React.createElement(Box,{position:"absolute",top:0,left:0,right:0,bottom:0},s))}),BoundedBox=React.forwardRef((e,t)=>{let{maxWidth:r="xlarge",children:o}=e,s=_objectWithoutProperties(e,["maxWidth","children"]);return React.createElement(Box,_extends({ref:t},s),React.createElement(Box,{maxWidth:r,mx:"auto",height:"100%"},o))}),Image$1=React.forwardRef((e,t)=>{let{objectFit:r="cover",objectPosition:o="50% 50%",src:s}=e,l=_objectWithoutProperties(e,["objectFit","objectPosition","src"]);return React.createElement(Image,_extends({ref:t,width:"100%",height:"100%",src:s,loading:"lazy",objectFit:r,objectPosition:o},l))}),isInternal=e=>/^\/(?!\/)/.test(e),Link=React.forwardRef((e,t)=>{let{href:r,getProps:o,children:s}=e,l=_objectWithoutProperties(e,["href","getProps","children"]),n=r;return"string"==typeof n&&n.match(/^https?:\/\/#/)&&(n=n.replace(/^https?:\/\//,"")),React.createElement(Text,_extends({as:"a",ref:t,href:n,getProps:o,display:"inline",rel:!isInternal(n)&&"nofollow noopener noreferrer"},l),s)}),SVG$1=React.forwardRef((e,t)=>{let{svg:r,fill:o}=e,s=_objectWithoutProperties(e,["svg","fill"]);return React.createElement(AspectRatio,_extends({ref:t},s),React.createElement(SVG,{as:r,fill:o,width:"100%",height:"100%"}))});exports.AspectRatio=AspectRatio,exports.BoundedBox=BoundedBox,exports.Box=Box,exports.Button=Button,exports.Flex=Flex,exports.Grid=Grid,exports.Heading=Heading,exports.Image=Image$1,exports.Input=Input,exports.Link=Link,exports.SVG=SVG$1,exports.SVGBase=SVG,exports.Subheading=Subheading,exports.Text=Text;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var styled=_interopDefault(require("styled-components")),styledSystem=require("styled-system"),React=_interopDefault(require("react"));function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(r,!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,o,s={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(s[r]=e[r]);return s}function _objectWithoutProperties(e,t){if(null==e)return{};var r,o,s=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}const boxStyle=styledSystem.variant({prop:"boxStyle",key:"boxStyles"}),objectFit=styledSystem.style({prop:"objectFit",cssProperty:"object-fit"}),objectPosition=styledSystem.style({prop:"objectPosition",cssProperty:"object-position"}),transform=styledSystem.style({prop:"transform"}),transition=styledSystem.style({prop:"transition"}),justifySelf=styledSystem.style({prop:"justifySelf",cssProperty:"justify-self"}),alignSelf=styledSystem.style({prop:"alignSelf",cssProperty:"align-self"}),placeSelf=styledSystem.style({prop:"placeSelf",cssProperty:"place-self"}),placeContent=styledSystem.style({prop:"placeContent",cssProperty:"place-content"}),placeItems=styledSystem.style({prop:"placeItems",cssProperty:"place-items"}),gridRow=styledSystem.style({prop:"gridRow",cssProperty:"grid-roow"}),gridColumn=styledSystem.style({prop:"gridColumn",cssProperty:"grid-roow"}),fill=styledSystem.style({prop:"fill",key:"colors"}),Box=styled.div(styledSystem.compose(styledSystem.space,styledSystem.color,styledSystem.layout,styledSystem.background,styledSystem.border,styledSystem.position,styledSystem.shadow,transform,transition,boxStyle,justifySelf,alignSelf,placeSelf,styledSystem.flex,gridRow,gridColumn));Box.defaultProps={display:"block"};const Flex=styled(Box)(styledSystem.compose(styledSystem.flexbox));Flex.defaultProps={display:"flex"};const Grid=styled(Box)(styledSystem.compose(styledSystem.grid,placeContent,placeItems));Grid.defaultProps={display:"grid"};const Image=styled(Box)(styledSystem.compose(objectFit,objectPosition));Image.defaultProps={as:"img",display:"block"};const SVG=styled(Box)(e=>({"*":_objectSpread2({},fill(e))})),Text=styled(Box)(styledSystem.typography),Heading=styled(Text)({});Heading.defaultProps={as:"h2"};const Subheading=styled(Text)({});Subheading.defaultProps={as:"h3"};const Input=styled(Text)({});Input.defaultProps={as:"input",display:"block"};const Button=styled(Text)({});Button.defaultProps={as:"button",display:"block"};const _firstLeft=(e,t)=>{for(t>=e.length&&(t=e.length-1);t>-1&&(null===e[t]||void 0===e[t]);)t--;return e[t]},_castArray=e=>Array.isArray(e)?e:[e],_zipWith=(e,t,r)=>{const o=[],s=Math.max(t.length,r.length);for(let l=0;l<s;l++)o[l]=e(_firstLeft(t,l),_firstLeft(r,l));return o},AspectRatio=React.forwardRef((e,t)=>{let{x:r,y:o,children:s}=e,l=_objectWithoutProperties(e,["x","y","children"]);return React.createElement(Box,_extends({ref:t,position:"relative"},l),React.createElement(Box,{pt:_zipWith((e,t)=>"".concat(t/e*100,"%"),_castArray(r),_castArray(o)),"aria-hidden":!0}),React.createElement(Box,{position:"absolute",top:0,left:0,right:0,bottom:0},s))}),BoundedBox=React.forwardRef((e,t)=>{let{maxWidth:r="xlarge",children:o}=e,s=_objectWithoutProperties(e,["maxWidth","children"]);return React.createElement(Box,_extends({ref:t},s),React.createElement(Box,{maxWidth:r,mx:"auto",height:"100%"},o))}),Image$1=React.forwardRef((e,t)=>{let{objectFit:r="cover",objectPosition:o="50% 50%",src:s}=e,l=_objectWithoutProperties(e,["objectFit","objectPosition","src"]);return React.createElement(Image,_extends({ref:t,width:"100%",height:"100%",src:s,loading:"lazy",objectFit:r,objectPosition:o},l))}),isInternal=e=>/^\/(?!\/)/.test(e),Link=React.forwardRef((e,t)=>{let{href:r,getProps:o,children:s}=e,l=_objectWithoutProperties(e,["href","getProps","children"]),n=r;return"string"==typeof n&&n.match(/^https?:\/\/#/)&&(n=n.replace(/^https?:\/\//,"")),React.createElement(Text,_extends({as:"a",ref:t,href:n,getProps:o,display:"inline",rel:!isInternal(n)&&"nofollow noopener noreferrer"},l),s)}),SVG$1=React.forwardRef((e,t)=>{let{svg:r,fill:o}=e,s=_objectWithoutProperties(e,["svg","fill"]);return React.createElement(AspectRatio,_extends({ref:t},s),React.createElement(SVG,{as:r,fill:o,width:"100%",height:"100%"}))});exports.AspectRatio=AspectRatio,exports.BoundedBox=BoundedBox,exports.Box=Box,exports.Button=Button,exports.Flex=Flex,exports.Grid=Grid,exports.Heading=Heading,exports.Image=Image$1,exports.Input=Input,exports.Link=Link,exports.SVG=SVG$1,exports.SVGBase=SVG,exports.Subheading=Subheading,exports.Text=Text;
//# sourceMappingURL=index.js.map
{
"name": "@asyarb/system",
"version": "1.1.3",
"version": "1.1.4",
"description": "Collection of opinionated React components.",

@@ -5,0 +5,0 @@ "license": "MIT",

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