@flodesk/grain 9.12.1 → 9.14.0
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.
package/es/components/arrange.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
-
var _excluded = ["children", "gap", "alignItems", "justifyItems", "justifyContent", "alignContent", "columns", "rows", "autoFlow"];
|
|
2
|
+
var _excluded = ["children", "gap", "columnGap", "rowGap", "alignItems", "justifyItems", "justifyContent", "alignContent", "columns", "rows", "autoFlow"];
|
|
3
3
|
|
|
4
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
5
|
|
|
@@ -21,6 +21,8 @@ import { Box } from './box';
|
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
22
|
var gridProps = {
|
|
23
23
|
gap: types.responsiveSpace,
|
|
24
|
+
columnGap: types.responsiveSpace,
|
|
25
|
+
rowGap: types.responsiveSpace,
|
|
24
26
|
columns: types.responsiveColumns,
|
|
25
27
|
rows: types.responsiveRows,
|
|
26
28
|
autoFlow: types.autoFlow,
|
|
@@ -45,17 +47,21 @@ var Root = /*#__PURE__*/_styled(Box, process.env.NODE_ENV === "production" ? {
|
|
|
45
47
|
var columns = _ref.columns,
|
|
46
48
|
autoFlow = _ref.autoFlow,
|
|
47
49
|
gap = _ref.gap,
|
|
50
|
+
columnGap = _ref.columnGap,
|
|
51
|
+
rowGap = _ref.rowGap,
|
|
48
52
|
rows = _ref.rows,
|
|
49
53
|
justifyItems = _ref.justifyItems,
|
|
50
54
|
alignItems = _ref.alignItems,
|
|
51
55
|
justifyContent = _ref.justifyContent,
|
|
52
56
|
alignContent = _ref.alignContent;
|
|
53
|
-
return "\n ".concat(!columns && getResponsiveOneOf('grid-auto-flow', autoFlow), ";\n ").concat(getResponsiveSpace('gap', gap), ";\n ").concat(getResponsiveOneOf('grid-template-columns', columns), ";\n ").concat(getResponsiveOneOf('grid-template-rows', rows), ";\n ").concat(getResponsiveOneOf('justify-items', justifyItems), ";\n ").concat(getResponsiveOneOf('align-items', alignItems), ";\n ").concat(getResponsiveOneOf('justify-content', justifyContent), ";\n ").concat(getResponsiveOneOf('align-content', alignContent), ";\n ");
|
|
54
|
-
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
57
|
+
return "\n ".concat(!columns && getResponsiveOneOf('grid-auto-flow', autoFlow), ";\n ").concat(getResponsiveSpace('gap', gap), ";\n ").concat(getResponsiveSpace('column-gap', columnGap), ";\n ").concat(getResponsiveSpace('row-gap', rowGap), ";\n ").concat(getResponsiveOneOf('grid-template-columns', columns), ";\n ").concat(getResponsiveOneOf('grid-template-rows', rows), ";\n ").concat(getResponsiveOneOf('justify-items', justifyItems), ";\n ").concat(getResponsiveOneOf('align-items', alignItems), ";\n ").concat(getResponsiveOneOf('justify-content', justifyContent), ";\n ").concat(getResponsiveOneOf('align-content', alignContent), ";\n ");
|
|
58
|
+
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL2FycmFuZ2UuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCRSIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9hcnJhbmdlLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGdldFJlc3BvbnNpdmVPbmVPZiwgZ2V0UmVzcG9uc2l2ZVNwYWNlIH0gZnJvbSAnLi4vdXRpbGl0aWVzJztcbmltcG9ydCBSZWFjdCwgeyBmb3J3YXJkUmVmIH0gZ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gICAgICByb3dzLFxuICAgICAgYXV0b0Zsb3cgPSAnY29sdW1uJyxcbiAgICAgIC4uLnByb3BzXG4gICAgfSxcbiAgICByZWYsXG4gICkgPT4gKFxuICAgIDxSb290XG4gICAgICByZWY9e3JlZn1cbiAgICAgIGdhcD17Z2FwfVxuICAgICAgY29sdW1uR2FwPXtjb2x1bW5HYXB9XG4gICAgICByb3dHYXA9e3Jvd0dhcH1cbiAgICAgIGFsaWduSXRlbXM9e2FsaWduSXRlbXN9XG4gICAgICBqdXN0aWZ5SXRlbXM9e2p1c3RpZnlJdGVtc31cbiAgICAgIGp1c3RpZnlDb250ZW50PXtqdXN0aWZ5Q29udGVudH1cbiAgICAgIGFsaWduQ29udGVudD17YWxpZ25Db250ZW50fVxuICAgICAgY29sdW1ucz17Y29sdW1uc31cbiAgICAgIHJvd3M9e3Jvd3N9XG4gICAgICBhdXRvRmxvdz17YXV0b0Zsb3d9XG4gICAgICB7Li4ucHJvcHN9XG4gICAgPlxuICAgICAge2NoaWxkcmVufVxuICAgIDwvUm9vdD5cbiAgKSxcbik7XG5cbkFycmFuZ2UucHJvcFR5cGVzID0gZ3JpZFByb3BzO1xuIl19 */"));
|
|
55
59
|
|
|
56
60
|
export var Arrange = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
57
61
|
var children = _ref2.children,
|
|
58
62
|
gap = _ref2.gap,
|
|
63
|
+
columnGap = _ref2.columnGap,
|
|
64
|
+
rowGap = _ref2.rowGap,
|
|
59
65
|
_ref2$alignItems = _ref2.alignItems,
|
|
60
66
|
alignItems = _ref2$alignItems === void 0 ? 'center' : _ref2$alignItems,
|
|
61
67
|
justifyItems = _ref2.justifyItems,
|
|
@@ -71,6 +77,8 @@ export var Arrange = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
71
77
|
return ___EmotionJSX(Root, _extends({
|
|
72
78
|
ref: ref,
|
|
73
79
|
gap: gap,
|
|
80
|
+
columnGap: columnGap,
|
|
81
|
+
rowGap: rowGap,
|
|
74
82
|
alignItems: alignItems,
|
|
75
83
|
justifyItems: justifyItems,
|
|
76
84
|
justifyContent: justifyContent,
|
|
@@ -45,6 +45,9 @@ export var Dropdown = function Dropdown(_ref) {
|
|
|
45
45
|
if (option.type === 'divider') return ___EmotionJSX(MenuItemDivider, {
|
|
46
46
|
key: index
|
|
47
47
|
});
|
|
48
|
+
if (option.type === 'node') return ___EmotionJSX(Fragment, {
|
|
49
|
+
key: index
|
|
50
|
+
}, option.node);
|
|
48
51
|
return ___EmotionJSX(Menu.Item, {
|
|
49
52
|
key: index
|
|
50
53
|
}, function (_ref3) {
|