@flodesk/grain 11.0.0-next.4 → 11.0.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,13 +65,13 @@ export var Arrange = /*#__PURE__*/forwardRef(function (_ref, ref) {
65
65
  columns: columns,
66
66
  rows: rows
67
67
  }, sharedProps),
68
- classNameProps: _objectSpread(_objectSpread({
68
+ classNameProps: _objectSpread({
69
69
  alignItems: alignItems,
70
70
  justifyItems: justifyItems,
71
71
  justifyContent: justifyContent,
72
72
  alignContent: alignContent,
73
- autoFlow: autoFlow
74
- }, !columns && autoFlow), sharedProps)
73
+ autoFlow: !columns ? autoFlow : undefined
74
+ }, sharedProps)
75
75
  });
76
76
 
77
77
  var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
@@ -0,0 +1,92 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.array.index-of.js";
3
+ import "core-js/modules/es.symbol.js";
4
+ import "core-js/modules/es.object.define-property.js";
5
+ import "core-js/modules/es.array.filter.js";
6
+ import "core-js/modules/es.object.to-string.js";
7
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
8
+ import "core-js/modules/web.dom-collections.for-each.js";
9
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
10
+ import "core-js/modules/es.object.define-properties.js";
11
+ import "core-js/modules/es.object.assign.js";
12
+ var _excluded = ["direction", "wrap", "justifyContent", "alignItems", "alignContent", "gap", "columnGap", "rowGap", "children", "className", "style"];
13
+
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
+
16
+ import "core-js/modules/es.regexp.exec.js";
17
+ import "core-js/modules/es.string.replace.js";
18
+ import "core-js/modules/es.string.trim.js";
19
+ import "core-js/modules/es.array.concat.js";
20
+
21
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
+
23
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
+
25
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
+
27
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
28
+
29
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
30
+
31
+ import React, { forwardRef } from 'react';
32
+ import { types } from '../../types';
33
+ import { generateAttributes } from '../../utilities';
34
+ import { Box } from '../box';
35
+ import styles from './styles.module.css';
36
+ import { jsx as ___EmotionJSX } from "@emotion/react";
37
+ export var Flex = /*#__PURE__*/forwardRef(function (_ref, ref) {
38
+ var _ref$direction = _ref.direction,
39
+ direction = _ref$direction === void 0 ? 'row' : _ref$direction,
40
+ _ref$wrap = _ref.wrap,
41
+ wrap = _ref$wrap === void 0 ? 'wrap' : _ref$wrap,
42
+ _ref$justifyContent = _ref.justifyContent,
43
+ justifyContent = _ref$justifyContent === void 0 ? 'start' : _ref$justifyContent,
44
+ _ref$alignItems = _ref.alignItems,
45
+ alignItems = _ref$alignItems === void 0 ? 'start' : _ref$alignItems,
46
+ _ref$alignContent = _ref.alignContent,
47
+ alignContent = _ref$alignContent === void 0 ? 'start' : _ref$alignContent,
48
+ gap = _ref.gap,
49
+ columnGap = _ref.columnGap,
50
+ rowGap = _ref.rowGap,
51
+ children = _ref.children,
52
+ className = _ref.className,
53
+ style = _ref.style,
54
+ props = _objectWithoutProperties(_ref, _excluded);
55
+
56
+ var propClassName = className ? className : '';
57
+ var propStyle = style ? style : {};
58
+ var sharedProps = {
59
+ gap: gap,
60
+ columnGap: columnGap,
61
+ rowGap: rowGap
62
+ };
63
+ var attributes = generateAttributes({
64
+ styleProps: _objectSpread({}, sharedProps),
65
+ classNameProps: _objectSpread({
66
+ justifyContent: justifyContent,
67
+ alignItems: alignItems,
68
+ alignContent: alignContent,
69
+ wrap: wrap,
70
+ direction: direction
71
+ }, sharedProps)
72
+ });
73
+
74
+ var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
75
+
76
+ var classAttributes = "".concat(attributes.classNames, " ").concat(propClassName, " ").concat(styles.flex).trim().replace(/\s+/g, ' ');
77
+ return ___EmotionJSX(Box, _extends({
78
+ ref: ref,
79
+ style: styleAttributes,
80
+ className: classAttributes
81
+ }, props), children);
82
+ });
83
+ Flex.propTypes = {
84
+ direction: types.flexDirection,
85
+ wrap: types.flexWrap,
86
+ justifyContent: types.flexJustifyContent,
87
+ alignItems: types.flexAlignItems,
88
+ alignContent: types.flexAlignContent,
89
+ gap: types.responsiveSpace,
90
+ columnGap: types.responsiveSpace,
91
+ rowGap: types.responsiveSpace
92
+ };
@@ -0,0 +1,3 @@
1
+ .flex {
2
+ display: flex;
3
+ }
@@ -0,0 +1,68 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.array.index-of.js";
3
+ import "core-js/modules/es.symbol.js";
4
+ import "core-js/modules/es.object.define-property.js";
5
+ import "core-js/modules/es.array.filter.js";
6
+ import "core-js/modules/es.object.to-string.js";
7
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
8
+ import "core-js/modules/web.dom-collections.for-each.js";
9
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
10
+ import "core-js/modules/es.object.define-properties.js";
11
+ import "core-js/modules/es.object.assign.js";
12
+ var _excluded = ["children", "gap", "style", "className"];
13
+
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
+
16
+ import "core-js/modules/es.regexp.exec.js";
17
+ import "core-js/modules/es.string.replace.js";
18
+ import "core-js/modules/es.string.trim.js";
19
+ import "core-js/modules/es.array.concat.js";
20
+
21
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
+
23
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
+
25
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
+
27
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
28
+
29
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
30
+
31
+ import PropTypes from 'prop-types';
32
+ import React, { forwardRef } from 'react';
33
+ import { types } from '../../types';
34
+ import { Box } from '../box';
35
+ import { generateAttributes } from '../../utilities';
36
+ import styles from './styles.module.css';
37
+ import { jsx as ___EmotionJSX } from "@emotion/react";
38
+ export var Stack = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
+ var children = _ref.children,
40
+ stackGap = _ref.gap,
41
+ style = _ref.style,
42
+ className = _ref.className,
43
+ props = _objectWithoutProperties(_ref, _excluded);
44
+
45
+ var propClassName = className ? className : '';
46
+ var propStyle = style ? style : {};
47
+ var attributes = generateAttributes({
48
+ styleProps: {
49
+ stackGap: stackGap
50
+ },
51
+ classNameProps: {
52
+ stackGap: stackGap
53
+ }
54
+ });
55
+
56
+ var styleAttributes = _objectSpread(_objectSpread({}, attributes.styles), propStyle);
57
+
58
+ var classAttributes = "".concat(propClassName, " ").concat(attributes.classNames, " ").concat(styles.stack).trim().replace(/\s+/g, ' ');
59
+ return ___EmotionJSX(Box, _extends({
60
+ ref: ref,
61
+ style: styleAttributes,
62
+ className: classAttributes
63
+ }, props), children);
64
+ });
65
+ Stack.propTypes = {
66
+ children: PropTypes.node,
67
+ gap: types.responsiveSpace
68
+ };
@@ -0,0 +1,3 @@
1
+ .stack > * + * {
2
+ margin-top: var(--stackGap);
3
+ }
@@ -102,10 +102,12 @@ var spaceProps = styleConfig.spaceProps,
102
102
  textTransformProps = styleConfig.textTransformProps,
103
103
  autoFlowProps = styleConfig.autoFlowProps,
104
104
  gridTemplateProps = styleConfig.gridTemplateProps,
105
- gridItemsAlignmentProps = styleConfig.gridItemsAlignmentProps,
106
- gridContentPositionProps = styleConfig.gridContentPositionProps;
105
+ itemAlignmentProps = styleConfig.itemAlignmentProps,
106
+ contentPositionProps = styleConfig.contentPositionProps,
107
+ flexDirectionProps = styleConfig.flexDirectionProps,
108
+ flexWrapProps = styleConfig.flexWrapProps;
107
109
  var classAndStyleDeclarationProps = [spaceProps, colorProps, shadowProps, radiusProps, transitionProps, sizeProps, borderColorProps, alignProps];
108
- var classDeclarationProps = [].concat(classAndStyleDeclarationProps, [positionProps, overflowProps, cursorProps, sizeProps, alignSelfProps, borderWidthProps, weightProps, textDisplayProps, borderSideProps, textTransformProps, autoFlowProps, gridItemsAlignmentProps, gridContentPositionProps]);
110
+ var classDeclarationProps = [].concat(classAndStyleDeclarationProps, [positionProps, overflowProps, cursorProps, sizeProps, alignSelfProps, borderWidthProps, weightProps, textDisplayProps, borderSideProps, textTransformProps, autoFlowProps, itemAlignmentProps, contentPositionProps, flexDirectionProps, flexWrapProps]);
109
111
  var styleDeclarationProps = [].concat(classAndStyleDeclarationProps, [dimensionProps, aspectRatioProps, orderProps, flexProps, opacityProps, zIndexProps, letterSpacingProps, gridTemplateProps]);
110
112
  var defaultBorder = "\n [class*=\"bd\"] {\n border-color: var(--grn-color-border);\n border-width: 1px;\n }\n";
111
113
  var utilities = "\n ".concat(defaultBorder, "\n ").concat(generateUtilityClassDeclarations(classDeclarationProps), ";\n ").concat(generateStyleClassDeclarations(styleDeclarationProps), ";\n");
package/es/types.js CHANGED
@@ -6,11 +6,12 @@ export var yPlacements = ['top', 'topStart', 'topEnd', 'bottom', 'bottomStart',
6
6
  export var xPlacements = ['right', 'rightStart', 'rightEnd', 'left', 'leftStart', 'leftEnd'];
7
7
  export var placements = [].concat(yPlacements, xPlacements);
8
8
  export var directions = ['row', 'column'];
9
- var axisAlignments = ['start', 'end', 'center', 'stretch'];
9
+ export var axisAlignments = ['start', 'end', 'center', 'stretch', 'baseline'];
10
10
  var distributions = ['space-around', 'space-between', 'space-evenly'];
11
11
  export var gridContentPositions = [].concat(axisAlignments, distributions);
12
12
  export var gridItemsAlignments = axisAlignments;
13
13
  export var flexJustifyContents = [].concat(axisAlignments, distributions);
14
+ export var contentPositions = [].concat(axisAlignments, distributions);
14
15
  export var flexAlignItems = [].concat(axisAlignments, ['baseline']);
15
16
  export var flexAlignContents = [].concat(axisAlignments, distributions, ['baseline']);
16
17
  export var autoFlows = directions;
@@ -48,9 +49,9 @@ export var types = {
48
49
  autoFlow: PropTypes.oneOfType([PropTypes.oneOf(autoFlows), PropTypes.string, PropTypes.object]),
49
50
  gridItemsAlignment: PropTypes.oneOfType([PropTypes.oneOf(gridItemsAlignments), PropTypes.object]),
50
51
  gridContentPosition: PropTypes.oneOfType([PropTypes.oneOf(gridContentPositions), PropTypes.object]),
51
- flexJustifyContent: PropTypes.oneOfType([PropTypes.oneOf(flexJustifyContents), PropTypes.object]),
52
- flexAlignItems: PropTypes.oneOfType([PropTypes.oneOf(flexAlignItems), PropTypes.object]),
53
- flexAlignContent: PropTypes.oneOfType([PropTypes.oneOf(flexAlignContents), PropTypes.object]),
52
+ flexJustifyContent: PropTypes.oneOfType([PropTypes.oneOf(contentPositions), PropTypes.object]),
53
+ flexAlignItems: PropTypes.oneOfType([PropTypes.oneOf(axisAlignments), PropTypes.object]),
54
+ flexAlignContent: PropTypes.oneOfType([PropTypes.oneOf(contentPositions), PropTypes.object]),
54
55
  flexDirection: PropTypes.oneOfType([PropTypes.oneOf(flexDirections), PropTypes.object]),
55
56
  flexWrap: PropTypes.oneOfType([PropTypes.oneOf(flexWraps), PropTypes.object]),
56
57
  alignSelf: PropTypes.oneOfType([PropTypes.oneOf(alignSelfs), PropTypes.object]),
@@ -28,7 +28,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
28
28
 
29
29
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
30
30
 
31
- import { alignSelfs, autoFlows, borderWidths, cursors, gridContentPositions, gridItemsAlignments, overflows, positions, sides, textAlignments, textDisplays, textTransforms } from '../types';
31
+ import { alignSelfs, autoFlows, axisAlignments, borderWidths, contentPositions, cursors, flexDirections, flexWraps, overflows, positions, sides, textAlignments, textDisplays, textTransforms } from '../types';
32
32
  import { vars } from '../variables';
33
33
  import { getDimension, getSpace, getTextSize, isSpaceVar } from './responsive';
34
34
  import { getColor, getRadius, getShadow, getTransition, getWeight, isColorVar, isRadiusVar, isShadowVar, isTrasitionVar } from './styles';
@@ -142,6 +142,10 @@ export var styleConfig = {
142
142
  propName: 'columnGap',
143
143
  property: 'column-gap',
144
144
  short: 'cg'
145
+ }, {
146
+ propName: 'stackGap',
147
+ property: '--stackGap',
148
+ short: 'sg'
145
149
  }],
146
150
  valueTransformer: getSpace,
147
151
  variableChecker: isSpaceVar,
@@ -458,7 +462,7 @@ export var styleConfig = {
458
462
  short: 'gtr'
459
463
  }]
460
464
  },
461
- gridItemsAlignmentProps: {
465
+ itemAlignmentProps: {
462
466
  props: [{
463
467
  propName: 'alignItems',
464
468
  property: 'align-items',
@@ -468,12 +472,12 @@ export var styleConfig = {
468
472
  property: 'justify-items',
469
473
  short: 'ji'
470
474
  }],
471
- variables: gridItemsAlignments,
475
+ variables: axisAlignments,
472
476
  variableChecker: function variableChecker(value) {
473
- return gridItemsAlignments.includes(value);
477
+ return axisAlignments.includes(value);
474
478
  }
475
479
  },
476
- gridContentPositionProps: {
480
+ contentPositionProps: {
477
481
  props: [{
478
482
  propName: 'alignContent',
479
483
  property: 'align-content',
@@ -483,9 +487,31 @@ export var styleConfig = {
483
487
  property: 'justify-content',
484
488
  short: 'jc'
485
489
  }],
486
- variables: gridContentPositions,
490
+ variables: contentPositions,
491
+ variableChecker: function variableChecker(value) {
492
+ return contentPositions.includes(value);
493
+ }
494
+ },
495
+ flexDirectionProps: {
496
+ props: [{
497
+ propName: 'direction',
498
+ property: 'flex-direction',
499
+ short: 'fd'
500
+ }],
501
+ variables: flexDirections,
502
+ variableChecker: function variableChecker(value) {
503
+ return flexDirections.includes(value);
504
+ }
505
+ },
506
+ flexWrapProps: {
507
+ props: [{
508
+ propName: 'wrap',
509
+ property: 'flex-wrap',
510
+ short: 'fw'
511
+ }],
512
+ variables: flexWraps,
487
513
  variableChecker: function variableChecker(value) {
488
- return gridContentPositions.includes(value);
514
+ return flexWraps.includes(value);
489
515
  }
490
516
  }
491
517
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "11.0.0-next.4",
3
+ "version": "11.0.0-next.6",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",
@@ -1,85 +0,0 @@
1
- import _styled from "@emotion/styled/base";
2
- var _excluded = ["direction", "wrap", "justifyContent", "alignItems", "alignContent", "gap", "columnGap", "rowGap", "children"];
3
-
4
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
-
6
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
7
-
8
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
-
10
- import "core-js/modules/es.array.includes.js";
11
- import "core-js/modules/es.string.includes.js";
12
- import "core-js/modules/es.object.keys.js";
13
- import "core-js/modules/es.array.concat.js";
14
- import "core-js/modules/es.array.index-of.js";
15
- import "core-js/modules/es.symbol.js";
16
- import "core-js/modules/es.object.assign.js";
17
- import React, { forwardRef } from 'react';
18
- import { types } from '../types';
19
- import { getResponsiveOneOf, getResponsiveSpace } from '../utilities';
20
- import { Box } from './box';
21
- import { jsx as ___EmotionJSX } from "@emotion/react";
22
- var flexProps = {
23
- direction: types.flexDirection,
24
- wrap: types.flexWrap,
25
- justifyContent: types.flexJustifyContent,
26
- alignItems: types.flexAlignItems,
27
- alignContent: types.flexAlignContent,
28
- gap: types.responsiveSpace,
29
- columnGap: types.responsiveSpace,
30
- rowGap: types.responsiveSpace
31
- };
32
-
33
- var Root = /*#__PURE__*/_styled(Box, process.env.NODE_ENV === "production" ? {
34
- shouldForwardProp: function shouldForwardProp(prop) {
35
- return !Object.keys(flexProps).includes(prop);
36
- },
37
- target: "e1kdx4dg0"
38
- } : {
39
- shouldForwardProp: function shouldForwardProp(prop) {
40
- return !Object.keys(flexProps).includes(prop);
41
- },
42
- target: "e1kdx4dg0",
43
- label: "Root"
44
- })("display:flex;", function (_ref) {
45
- var direction = _ref.direction,
46
- wrap = _ref.wrap,
47
- justifyContent = _ref.justifyContent,
48
- alignItems = _ref.alignItems,
49
- alignContent = _ref.alignContent,
50
- gap = _ref.gap,
51
- columnGap = _ref.columnGap,
52
- rowGap = _ref.rowGap;
53
- return "\n ".concat(getResponsiveOneOf('flex-direction', direction), ";\n ").concat(getResponsiveOneOf('flex-wrap', wrap), ";\n ").concat(getResponsiveOneOf('justify-content', justifyContent), ";\n ").concat(getResponsiveOneOf('align-items', alignItems), ";\n ").concat(getResponsiveOneOf('align-content', alignContent), ";\n ").concat(getResponsiveSpace('gap', gap), ";\n ").concat(getResponsiveSpace('column-gap', columnGap), ";\n ").concat(getResponsiveSpace('row-gap', rowGap), ";\n ");
54
- }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL2ZsZXguanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CRSIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9mbGV4LmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyBmb3J3YXJkUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgdHlwZXMgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRSZXNwb25zaXZlT25lT2YsIGdldFJlc3BvbnNpdmVTcGFjZSB9IGZyb20gJy4uL3V0aWxpdGllcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBCb3ggfSBmcm9tICcuL2JveCc7XG5cbmNvbnN0IGZsZXhQcm9wcyA9IHtcbiAgZGlyZWN0aW9uOiB0eXBlcy5mbGV4RGlyZWN0aW9uLFxuICB3cmFwOiB0eXBlcy5mbGV4V3JhcCxcbiAganVzdGlmeUNvbnRlbnQ6IHR5cGVzLmZsZXhKdXN0aWZ5Q29udGVudCxcbiAgYWxpZ25JdGVtczogdHlwZXMuZmxleEFsaWduSXRlbXMsXG4gIGFsaWduQ29udGVudDogdHlwZXMuZmxleEFsaWduQ29udGVudCxcbiAgZ2FwOiB0eXBlcy5yZXNwb25zaXZlU3BhY2UsXG4gIGNvbHVtbkdhcDogdHlwZXMucmVzcG9uc2l2ZVNwYWNlLFxuICByb3dHYXA6IHR5cGVzLnJlc3BvbnNpdmVTcGFjZSxcbn07XG5cbmNvbnN0IFJvb3QgPSBzdHlsZWQoQm94LCB7XG4gIHNob3VsZEZvcndhcmRQcm9wOiBwcm9wID0+ICFPYmplY3Qua2V5cyhmbGV4UHJvcHMpLmluY2x1ZGVzKHByb3ApLFxufSlgXG4gIGRpc3BsYXk6IGZsZXg7XG4gICR7KHsgZGlyZWN0aW9uLCB3cmFwLCBqdXN0aWZ5Q29udGVudCwgYWxpZ25JdGVtcywgYWxpZ25Db250ZW50LCBnYXAsIGNvbHVtbkdhcCwgcm93R2FwIH0pID0+IGBcbiAgICAke2dldFJlc3BvbnNpdmVPbmVPZignZmxleC1kaXJlY3Rpb24nLCBkaXJlY3Rpb24pfTtcbiAgICAke2dldFJlc3BvbnNpdmVPbmVPZignZmxleC13cmFwJywgd3JhcCl9O1xuICAgICR7Z2V0UmVzcG9uc2l2ZU9uZU9mKCdqdXN0aWZ5LWNvbnRlbnQnLCBqdXN0aWZ5Q29udGVudCl9O1xuICAgICR7Z2V0UmVzcG9uc2l2ZU9uZU9mKCdhbGlnbi1pdGVtcycsIGFsaWduSXRlbXMpfTtcbiAgICAke2dldFJlc3BvbnNpdmVPbmVPZignYWxpZ24tY29udGVudCcsIGFsaWduQ29udGVudCl9O1xuICAgICR7Z2V0UmVzcG9uc2l2ZVNwYWNlKCdnYXAnLCBnYXApfTtcbiAgICAke2dldFJlc3BvbnNpdmVTcGFjZSgnY29sdW1uLWdhcCcsIGNvbHVtbkdhcCl9O1xuICAgICR7Z2V0UmVzcG9uc2l2ZVNwYWNlKCdyb3ctZ2FwJywgcm93R2FwKX07XG4gIGB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXggPSBmb3J3YXJkUmVmKFxuICAoXG4gICAge1xuICAgICAgZGlyZWN0aW9uID0gJ3JvdycsXG4gICAgICB3cmFwID0gJ3dyYXAnLFxuICAgICAganVzdGlmeUNvbnRlbnQgPSAnc3RhcnQnLFxuICAgICAgYWxpZ25JdGVtcyA9ICdzdGFydCcsXG4gICAgICBhbGlnbkNvbnRlbnQgPSAnc3RhcnQnLFxuICAgICAgZ2FwLFxuICAgICAgY29sdW1uR2FwLFxuICAgICAgcm93R2FwLFxuICAgICAgY2hpbGRyZW4sXG4gICAgICAuLi5wcm9wc1xuICAgIH0sXG4gICAgcmVmLFxuICApID0+IHtcbiAgICByZXR1cm4gKFxuICAgICAgPFJvb3RcbiAgICAgICAgcmVmPXtyZWZ9XG4gICAgICAgIGRpcmVjdGlvbj17ZGlyZWN0aW9ufVxuICAgICAgICB3cmFwPXt3cmFwfVxuICAgICAgICBqdXN0aWZ5Q29udGVudD17anVzdGlmeUNvbnRlbnR9XG4gICAgICAgIGFsaWduSXRlbXM9e2FsaWduSXRlbXN9XG4gICAgICAgIGFsaWduQ29udGVudD17YWxpZ25Db250ZW50fVxuICAgICAgICBnYXA9e2dhcH1cbiAgICAgICAgY29sdW1uR2FwPXtjb2x1bW5HYXB9XG4gICAgICAgIHJvd0dhcD17cm93R2FwfVxuICAgICAgICB7Li4ucHJvcHN9XG4gICAgICA+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgIDwvUm9vdD5cbiAgICApO1xuICB9LFxuKTtcblxuRmxleC5wcm9wVHlwZXMgPSBmbGV4UHJvcHM7XG4iXX0= */"));
55
-
56
- export var Flex = /*#__PURE__*/forwardRef(function (_ref2, ref) {
57
- var _ref2$direction = _ref2.direction,
58
- direction = _ref2$direction === void 0 ? 'row' : _ref2$direction,
59
- _ref2$wrap = _ref2.wrap,
60
- wrap = _ref2$wrap === void 0 ? 'wrap' : _ref2$wrap,
61
- _ref2$justifyContent = _ref2.justifyContent,
62
- justifyContent = _ref2$justifyContent === void 0 ? 'start' : _ref2$justifyContent,
63
- _ref2$alignItems = _ref2.alignItems,
64
- alignItems = _ref2$alignItems === void 0 ? 'start' : _ref2$alignItems,
65
- _ref2$alignContent = _ref2.alignContent,
66
- alignContent = _ref2$alignContent === void 0 ? 'start' : _ref2$alignContent,
67
- gap = _ref2.gap,
68
- columnGap = _ref2.columnGap,
69
- rowGap = _ref2.rowGap,
70
- children = _ref2.children,
71
- props = _objectWithoutProperties(_ref2, _excluded);
72
-
73
- return ___EmotionJSX(Root, _extends({
74
- ref: ref,
75
- direction: direction,
76
- wrap: wrap,
77
- justifyContent: justifyContent,
78
- alignItems: alignItems,
79
- alignContent: alignContent,
80
- gap: gap,
81
- columnGap: columnGap,
82
- rowGap: rowGap
83
- }, props), children);
84
- });
85
- Flex.propTypes = flexProps;
@@ -1,43 +0,0 @@
1
- import "core-js/modules/es.object.keys.js";
2
- import "core-js/modules/es.array.index-of.js";
3
- import "core-js/modules/es.symbol.js";
4
- import "core-js/modules/es.object.assign.js";
5
- import _styled from "@emotion/styled/base";
6
- var _excluded = ["children", "gap"];
7
-
8
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
9
-
10
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
-
12
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
-
14
- import { getResponsiveSpace } from '../utilities';
15
- import PropTypes from 'prop-types';
16
- import React, { forwardRef } from 'react';
17
- import { types } from '../types';
18
- import { Box } from './box';
19
- import { jsx as ___EmotionJSX } from "@emotion/react";
20
-
21
- var Root = /*#__PURE__*/_styled(Box, process.env.NODE_ENV === "production" ? {
22
- target: "e17bgatr0"
23
- } : {
24
- target: "e17bgatr0",
25
- label: "Root"
26
- })("&>*+*{", function (p) {
27
- return getResponsiveSpace('margin-top', p.gap);
28
- }, ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL3N0YWNrLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPd0IiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvc3RhY2suanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZ2V0UmVzcG9uc2l2ZVNwYWNlIH0gZnJvbSAnLi4vdXRpbGl0aWVzJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgUmVhY3QsIHsgZm9yd2FyZFJlZiB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IHR5cGVzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgQm94IH0gZnJvbSAnLi9ib3gnO1xuXG5jb25zdCBSb290ID0gc3R5bGVkKEJveClgXG4gICYgPiAqICsgKiB7XG4gICAgJHtwID0+IGdldFJlc3BvbnNpdmVTcGFjZSgnbWFyZ2luLXRvcCcsIHAuZ2FwKX07XG4gIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdGFjayA9IGZvcndhcmRSZWYoKHsgY2hpbGRyZW4sIGdhcCwgLi4ucHJvcHMgfSwgcmVmKSA9PiAoXG4gIDxSb290IHJlZj17cmVmfSBnYXA9e2dhcH0gey4uLnByb3BzfT5cbiAgICB7Y2hpbGRyZW59XG4gIDwvUm9vdD5cbikpO1xuXG5TdGFjay5wcm9wVHlwZXMgPSB7XG4gIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZSxcbiAgZ2FwOiB0eXBlcy5yZXNwb25zaXZlU3BhY2UsXG59O1xuIl19 */"));
29
-
30
- export var Stack = /*#__PURE__*/forwardRef(function (_ref, ref) {
31
- var children = _ref.children,
32
- gap = _ref.gap,
33
- props = _objectWithoutProperties(_ref, _excluded);
34
-
35
- return ___EmotionJSX(Root, _extends({
36
- ref: ref,
37
- gap: gap
38
- }, props), children);
39
- });
40
- Stack.propTypes = {
41
- children: PropTypes.node,
42
- gap: types.responsiveSpace
43
- };