@deanacus/upstart
Advanced tools
| import React from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import { a as _taggedTemplateLiteral } from './_rollupPluginBabelHelpers-53ddb3bb.js'; | ||
| import styled, { css } from 'styled-components'; | ||
| function _templateObject2() { | ||
| var data = _taggedTemplateLiteral(["\n height: 0;\n overflow: hidden;\n "]); | ||
| _templateObject2 = function _templateObject2() { | ||
| return data; | ||
| }; | ||
| return data; | ||
| } | ||
| function _templateObject() { | ||
| var data = _taggedTemplateLiteral(["\n ", "\n"]); | ||
| _templateObject = function _templateObject() { | ||
| return data; | ||
| }; | ||
| return data; | ||
| } | ||
| var StyledCollapsible = styled.div(_templateObject(), function (_ref) { | ||
| var collapsed = _ref.collapsed; | ||
| return collapsed && css(_templateObject2()); | ||
| }); | ||
| var Collapsible = function Collapsible(_ref) { | ||
| var children = _ref.children, | ||
| collapsed = _ref.collapsed, | ||
| className = _ref.className; | ||
| return React.createElement(StyledCollapsible, { | ||
| collapsed: collapsed, | ||
| className: className, | ||
| "aria-expanded": !collapsed | ||
| }, children); | ||
| }; | ||
| Collapsible.propTypes = { | ||
| children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]), | ||
| collapsed: PropTypes.bool, | ||
| className: PropTypes.string | ||
| }; | ||
| Collapsible.defaultProps = { | ||
| children: null, | ||
| collapsed: false, | ||
| className: null | ||
| }; | ||
| Collapsible.__docgenInfo = { | ||
| "description": "", | ||
| "methods": [], | ||
| "displayName": "Collapsible", | ||
| "props": { | ||
| "children": { | ||
| "defaultValue": { | ||
| "value": "null", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "union", | ||
| "value": [{ | ||
| "name": "node" | ||
| }, { | ||
| "name": "arrayOf", | ||
| "value": { | ||
| "name": "node" | ||
| } | ||
| }] | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| }, | ||
| "collapsed": { | ||
| "defaultValue": { | ||
| "value": "false", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "bool" | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| }, | ||
| "className": { | ||
| "defaultValue": { | ||
| "value": "null", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "string" | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| } | ||
| } | ||
| }; | ||
| export default Collapsible; | ||
| export { Collapsible }; |
+158
| import React from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import { a as _taggedTemplateLiteral } from './_rollupPluginBabelHelpers-53ddb3bb.js'; | ||
| import styled, { css } from 'styled-components'; | ||
| import { g as getRem } from './styled-utils-64b20f59.js'; | ||
| function _templateObject3() { | ||
| var data = _taggedTemplateLiteral(["margin-top: ", ";"]); | ||
| _templateObject3 = function _templateObject3() { | ||
| return data; | ||
| }; | ||
| return data; | ||
| } | ||
| function _templateObject2() { | ||
| var data = _taggedTemplateLiteral(["margin-left: ", ";"]); | ||
| _templateObject2 = function _templateObject2() { | ||
| return data; | ||
| }; | ||
| return data; | ||
| } | ||
| function _templateObject() { | ||
| var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: ", ";\n flex-wrap: nowrap;\n width: 100%;\n\n & > * {\n margin: 0;\n flex: 1;\n }\n\n & > * + * {\n ", "\n }\n"]); | ||
| _templateObject = function _templateObject() { | ||
| return data; | ||
| }; | ||
| return data; | ||
| } | ||
| var StyledStack = styled.div(_templateObject(), function (_ref) { | ||
| var horizontal = _ref.horizontal; | ||
| return horizontal ? 'row' : 'column'; | ||
| }, function (_ref2) { | ||
| var horizontal = _ref2.horizontal, | ||
| spacing = _ref2.spacing, | ||
| theme = _ref2.theme; | ||
| return horizontal ? css(_templateObject2(), getRem(theme.space[spacing])) : css(_templateObject3(), getRem(theme.space[spacing])); | ||
| }); | ||
| var Stack = function Stack(_ref) { | ||
| var horizontal = _ref.horizontal, | ||
| spacing = _ref.spacing, | ||
| children = _ref.children, | ||
| className = _ref.className; | ||
| return React.createElement(StyledStack, { | ||
| className: className, | ||
| spacing: spacing, | ||
| horizontal: horizontal | ||
| }, children); | ||
| }; | ||
| Stack.propTypes = { | ||
| children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]), | ||
| className: PropTypes.string, | ||
| horizontal: PropTypes.bool, | ||
| spacing: PropTypes.oneOf(['xxxs', 'xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'xxxl']) | ||
| }; | ||
| Stack.defaultProps = { | ||
| children: null, | ||
| className: null, | ||
| horizontal: false, | ||
| spacing: 'sm' | ||
| }; | ||
| Stack.__docgenInfo = { | ||
| "description": "", | ||
| "methods": [], | ||
| "displayName": "Stack", | ||
| "props": { | ||
| "children": { | ||
| "defaultValue": { | ||
| "value": "null", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "union", | ||
| "value": [{ | ||
| "name": "node" | ||
| }, { | ||
| "name": "arrayOf", | ||
| "value": { | ||
| "name": "node" | ||
| } | ||
| }] | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| }, | ||
| "className": { | ||
| "defaultValue": { | ||
| "value": "null", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "string" | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| }, | ||
| "horizontal": { | ||
| "defaultValue": { | ||
| "value": "false", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "bool" | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| }, | ||
| "spacing": { | ||
| "defaultValue": { | ||
| "value": "'sm'", | ||
| "computed": false | ||
| }, | ||
| "type": { | ||
| "name": "enum", | ||
| "value": [{ | ||
| "value": "'xxxs'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'xxs'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'xs'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'sm'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'md'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'lg'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'xl'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'xxl'", | ||
| "computed": false | ||
| }, { | ||
| "value": "'xxxl'", | ||
| "computed": false | ||
| }] | ||
| }, | ||
| "required": false, | ||
| "description": "" | ||
| } | ||
| } | ||
| }; | ||
| export default Stack; | ||
| export { Stack }; |
+2
-0
@@ -11,2 +11,3 @@ import 'react'; | ||
| export { Card } from './Card.js'; | ||
| export { Collapsible } from './Collapsible.js'; | ||
| export { Column } from './Column.js'; | ||
@@ -24,2 +25,3 @@ export { Container } from './Container.js'; | ||
| export { Separator } from './Separator.js'; | ||
| export { Stack } from './Stack.js'; | ||
| export { Table } from './Table.js'; | ||
@@ -26,0 +28,0 @@ export { TableRow } from './TableRow.js'; |
+3
-2
@@ -5,2 +5,3 @@ import React from 'react'; | ||
| import styled from 'styled-components'; | ||
| import { g as getRem } from './styled-utils-64b20f59.js'; | ||
@@ -19,7 +20,7 @@ function _templateObject() { | ||
| size = _ref.size; | ||
| return "".concat(size ? theme.fontSizes[size] : theme.fontSizes.sm, "px"); | ||
| return getRem(theme.fontSizes[size]); | ||
| }, function (_ref2) { | ||
| var theme = _ref2.theme, | ||
| size = _ref2.size; | ||
| return "".concat(size ? theme.fontSizes[size] : theme.fontSizes.sm, "px"); | ||
| return getRem(theme.fontSizes[size]); | ||
| }); | ||
@@ -26,0 +27,0 @@ |
+1
-1
@@ -84,3 +84,3 @@ { | ||
| "sideEffects": false, | ||
| "version": "0.0.18" | ||
| "version": "0.0.19" | ||
| } |
141030
4.53%33
6.45%4634
5.51%