@elliemae/ds-grid 2.3.0-next.3 → 3.0.0-alpha.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/dist/cjs/Grid.js +81 -0
- package/dist/cjs/Grid.js.map +7 -0
- package/dist/cjs/GridItem.js +53 -0
- package/dist/cjs/GridItem.js.map +7 -0
- package/dist/cjs/defaultProps.js +43 -0
- package/dist/cjs/defaultProps.js.map +7 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/propTypes.js +79 -0
- package/dist/cjs/propTypes.js.map +7 -0
- package/dist/cjs/types.js +27 -0
- package/dist/cjs/types.js.map +7 -0
- package/dist/cjs/utils/constants.js +46 -0
- package/dist/cjs/utils/constants.js.map +7 -0
- package/dist/cjs/utils/styles.js +171 -0
- package/dist/cjs/utils/styles.js.map +7 -0
- package/dist/esm/Grid.js +52 -0
- package/dist/esm/Grid.js.map +7 -0
- package/dist/esm/GridItem.js +24 -0
- package/dist/esm/GridItem.js.map +7 -0
- package/dist/esm/defaultProps.js +14 -0
- package/dist/esm/defaultProps.js.map +7 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/propTypes.js +50 -0
- package/dist/esm/propTypes.js.map +7 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +7 -0
- package/dist/esm/utils/constants.js +17 -0
- package/dist/esm/utils/constants.js.map +7 -0
- package/dist/esm/utils/styles.js +142 -0
- package/dist/esm/utils/styles.js.map +7 -0
- package/{types → dist/types}/Grid.d.ts +1 -1
- package/{types → dist/types}/GridItem.d.ts +0 -0
- package/{types → dist/types}/defaultProps.d.ts +0 -0
- package/dist/types/index.d.ts +1 -0
- package/{types → dist/types}/propTypes.d.ts +0 -0
- package/{types → dist/types}/tests/DSGrid.events.test.d.ts +0 -0
- package/{types → dist/types}/types.d.ts +0 -0
- package/{types → dist/types}/utils/constants.d.ts +0 -0
- package/{types → dist/types}/utils/styles.d.ts +0 -0
- package/package.json +40 -32
- package/cjs/Grid.js +0 -91
- package/cjs/GridItem.js +0 -29
- package/cjs/defaultProps.js +0 -15
- package/cjs/index.js +0 -13
- package/cjs/propTypes.js +0 -46
- package/cjs/types.js +0 -2
- package/cjs/utils/constants.js +0 -11
- package/cjs/utils/styles.js +0 -129
- package/esm/Grid.js +0 -80
- package/esm/GridItem.js +0 -21
- package/esm/defaultProps.js +0 -11
- package/esm/index.js +0 -1
- package/esm/propTypes.js +0 -42
- package/esm/types.js +0 -1
- package/esm/utils/constants.js +0 -5
- package/esm/utils/styles.js +0 -119
- package/types/index.d.ts +0 -5
package/dist/cjs/Grid.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var Grid_exports = {};
|
|
29
|
+
__export(Grid_exports, {
|
|
30
|
+
DSGridWithSchema: () => DSGridWithSchema,
|
|
31
|
+
Grid: () => Grid,
|
|
32
|
+
default: () => Grid_default
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_react_desc = require("react-desc");
|
|
37
|
+
var import_lodash = require("lodash");
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_propTypes = require("./propTypes");
|
|
40
|
+
var import_GridItem = require("./GridItem");
|
|
41
|
+
var import_defaultProps = require("./defaultProps");
|
|
42
|
+
const Grid = import_react.default.forwardRef((props, ref) => {
|
|
43
|
+
const { rows, cols, alignItems, children, className, justify, gutter, wrap, width, height, ...rest } = props;
|
|
44
|
+
let isSpanParent = true;
|
|
45
|
+
const renderChildren = import_react.default.Children.map(children, (child) => {
|
|
46
|
+
if ((0, import_lodash.get)(child, "child.type.name") === "Grid" || (0, import_lodash.get)(child, "type.displayName") === "Grid" || parseInt((0, import_lodash.get)(child, "props.span", 0), 10) > 0) {
|
|
47
|
+
const { width: wc, height: hc, span } = child.props;
|
|
48
|
+
if (!span)
|
|
49
|
+
isSpanParent = false;
|
|
50
|
+
return import_react.default.cloneElement(child, {
|
|
51
|
+
...child.props,
|
|
52
|
+
width: (0, import_ds_system.fixSpaceGutter)(wc),
|
|
53
|
+
height: (0, import_ds_system.fixSpaceGutter)(hc)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return child;
|
|
57
|
+
});
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement(import_GridItem.GridItem, {
|
|
59
|
+
alignItems,
|
|
60
|
+
className,
|
|
61
|
+
cols,
|
|
62
|
+
gutter,
|
|
63
|
+
isSpanParent,
|
|
64
|
+
justify,
|
|
65
|
+
rows,
|
|
66
|
+
wrap,
|
|
67
|
+
childNumber: import_react.default.Children.count(children),
|
|
68
|
+
ref,
|
|
69
|
+
w: width,
|
|
70
|
+
h: height,
|
|
71
|
+
...rest
|
|
72
|
+
}, renderChildren);
|
|
73
|
+
});
|
|
74
|
+
Grid.displayName = "Grid";
|
|
75
|
+
Grid.defaultProps = import_defaultProps.defaultProps;
|
|
76
|
+
Grid.propTypes = import_propTypes.propTypes;
|
|
77
|
+
const DSGridWithSchema = (0, import_react_desc.describe)(Grid);
|
|
78
|
+
DSGridWithSchema.propTypes = import_propTypes.propTypes;
|
|
79
|
+
var Grid_default = Grid;
|
|
80
|
+
module.exports = __toCommonJS(Grid_exports);
|
|
81
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Grid.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from 'react-desc';\nimport { get } from 'lodash';\nimport { fixSpaceGutter } from '@elliemae/ds-system';\nimport { propTypes } from './propTypes';\nimport { GridItem } from './GridItem';\nimport { defaultProps } from './defaultProps';\nimport type { GridPropsT } from './types';\n\nconst Grid = React.forwardRef<HTMLDivElement, GridPropsT>((props, ref) => {\n const { rows, cols, alignItems, children, className, justify, gutter, wrap, width, height, ...rest } = props;\n\n let isSpanParent = true;\n\n const renderChildren = React.Children.map(children, (child: React.ReactNode) => {\n if (\n get(child, 'child.type.name') === 'Grid' ||\n get(child, 'type.displayName') === 'Grid' ||\n parseInt(get(child, 'props.span', 0), 10) > 0\n ) {\n const { width: wc, height: hc, span } = child.props;\n if (!span) isSpanParent = false;\n return React.cloneElement(child, {\n ...child.props,\n width: fixSpaceGutter(wc),\n height: fixSpaceGutter(hc),\n });\n }\n return child;\n });\n\n return (\n <GridItem\n alignItems={alignItems}\n className={className}\n cols={cols}\n gutter={gutter}\n isSpanParent={isSpanParent}\n justify={justify}\n rows={rows}\n wrap={wrap}\n childNumber={React.Children.count(children)}\n ref={ref}\n w={width}\n h={height}\n {...rest}\n >\n {renderChildren}\n </GridItem>\n );\n});\n\n// Since this component is using ForwardRef, we must provide a displayName to avoid 'undefined' name in propsTable.\nGrid.displayName = 'Grid';\n\n// We should use props helpers to merge default props in the future, right now it causes many issues within Dimsum\nGrid.defaultProps = defaultProps;\n\nGrid.propTypes = propTypes;\nconst DSGridWithSchema = describe(Grid);\nDSGridWithSchema.propTypes = propTypes;\n\nexport default Grid;\nexport { DSGridWithSchema, Grid };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAyB;AACzB,oBAAoB;AACpB,uBAA+B;AAC/B,uBAA0B;AAC1B,sBAAyB;AACzB,0BAA6B;AAG7B,MAAM,OAAO,qBAAM,WAAuC,CAAC,OAAO,QAAQ;AACxE,QAAM,EAAE,MAAM,MAAM,YAAY,UAAU,WAAW,SAAS,QAAQ,MAAM,OAAO,WAAW,SAAS;AAEvG,MAAI,eAAe;AAEnB,QAAM,iBAAiB,qBAAM,SAAS,IAAI,UAAU,CAAC,UAA2B;AAC9E,QACE,uBAAI,OAAO,uBAAuB,UAClC,uBAAI,OAAO,wBAAwB,UACnC,SAAS,uBAAI,OAAO,cAAc,IAAI,MAAM,GAC5C;AACA,YAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,MAAM;AAC9C,UAAI,CAAC;AAAM,uBAAe;AAC1B,aAAO,qBAAM,aAAa,OAAO;AAAA,WAC5B,MAAM;AAAA,QACT,OAAO,qCAAe;AAAA,QACtB,QAAQ,qCAAe;AAAA;AAAA;AAG3B,WAAO;AAAA;AAGT,SACE,mDAAC,0BAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,qBAAM,SAAS,MAAM;AAAA,IAClC;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,OACC;AAAA,KAEH;AAAA;AAMP,KAAK,cAAc;AAGnB,KAAK,eAAe;AAEpB,KAAK,YAAY;AACjB,MAAM,mBAAmB,gCAAS;AAClC,iBAAiB,YAAY;AAE7B,IAAO,eAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var GridItem_exports = {};
|
|
29
|
+
__export(GridItem_exports, {
|
|
30
|
+
GridItem: () => GridItem
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
34
|
+
var import_styled_components2 = require("@xstyled/styled-components");
|
|
35
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
36
|
+
var import_styles = require("./utils/styles");
|
|
37
|
+
const GridItem = import_styled_components.default.div`
|
|
38
|
+
display: grid;
|
|
39
|
+
display: -ms-grid;
|
|
40
|
+
column-gap: ${({ gutter }) => (0, import_ds_system.mapGap)(gutter)};
|
|
41
|
+
row-gap: ${({ gutter }) => (0, import_ds_system.mapGap)(gutter)};
|
|
42
|
+
${import_styled_components2.grids}
|
|
43
|
+
${import_styled_components2.flexboxes}
|
|
44
|
+
${import_styled_components2.sizing}
|
|
45
|
+
${import_styled_components2.space}
|
|
46
|
+
${import_styled_components2.height}
|
|
47
|
+
${import_styled_components2.width}
|
|
48
|
+
${import_styles.manageCols}
|
|
49
|
+
${import_styles.manageRows}
|
|
50
|
+
${import_styles.manageSpan}
|
|
51
|
+
`;
|
|
52
|
+
module.exports = __toCommonJS(GridItem_exports);
|
|
53
|
+
//# sourceMappingURL=GridItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/GridItem.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport styled from 'styled-components';\nimport { space, width, height, flexboxes, grids, sizing } from '@xstyled/styled-components';\nimport { mapGap } from '@elliemae/ds-system';\nimport type { GridItemPropsT } from './types';\nimport { manageCols, manageRows, manageSpan } from './utils/styles';\n\nexport const GridItem = styled.div<GridItemPropsT>`\n display: grid;\n display: -ms-grid;\n column-gap: ${({ gutter }) => mapGap(gutter)};\n row-gap: ${({ gutter }) => mapGap(gutter)};\n ${grids}\n ${flexboxes}\n ${sizing}\n ${space}\n ${height}\n ${width}\n ${manageCols}\n ${manageRows}\n ${manageSpan}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,+BAAmB;AACnB,gCAA+D;AAC/D,uBAAuB;AAEvB,oBAAmD;AAE5C,MAAM,WAAW,iCAAO;AAAA;AAAA;AAAA,gBAGf,CAAC,EAAE,aAAa,6BAAO;AAAA,aAC1B,CAAC,EAAE,aAAa,6BAAO;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var defaultProps_exports = {};
|
|
29
|
+
__export(defaultProps_exports, {
|
|
30
|
+
defaultProps: () => defaultProps
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
const defaultProps = {
|
|
34
|
+
rows: [],
|
|
35
|
+
cols: [],
|
|
36
|
+
className: "",
|
|
37
|
+
justify: "flex-start",
|
|
38
|
+
gutter: 0,
|
|
39
|
+
wrap: "wrap",
|
|
40
|
+
span: 1
|
|
41
|
+
};
|
|
42
|
+
module.exports = __toCommonJS(defaultProps_exports);
|
|
43
|
+
//# sourceMappingURL=defaultProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/defaultProps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const defaultProps = {\n rows: [],\n cols: [],\n className: '',\n justify: 'flex-start' as const,\n gutter: 0,\n wrap: 'wrap' as const,\n span: 1,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
DSGridWithSchema: () => import_Grid.DSGridWithSchema,
|
|
31
|
+
Grid: () => import_Grid.Grid,
|
|
32
|
+
GridContainer: () => import_Grid.default,
|
|
33
|
+
GridItem: () => import_Grid.default,
|
|
34
|
+
default: () => import_Grid.default
|
|
35
|
+
});
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_Grid = __toESM(require("./Grid"));
|
|
38
|
+
module.exports = __toCommonJS(src_exports);
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { default, Grid, default as GridContainer, default as GridItem, DSGridWithSchema } from './Grid';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kBAA+F;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var propTypes_exports = {};
|
|
29
|
+
__export(propTypes_exports, {
|
|
30
|
+
propTypes: () => propTypes
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react_desc = require("react-desc");
|
|
34
|
+
var import_constants = require("./utils/constants");
|
|
35
|
+
const rowColBreakpoints = import_react_desc.PropTypes.shape({
|
|
36
|
+
small: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string])),
|
|
37
|
+
medium: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string])),
|
|
38
|
+
large: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]))
|
|
39
|
+
});
|
|
40
|
+
const spanBreakpoints = import_react_desc.PropTypes.shape({
|
|
41
|
+
small: import_react_desc.PropTypes.number,
|
|
42
|
+
medium: import_react_desc.PropTypes.number,
|
|
43
|
+
large: import_react_desc.PropTypes.number
|
|
44
|
+
});
|
|
45
|
+
const propTypes = {
|
|
46
|
+
rows: import_react_desc.PropTypes.oneOfType([
|
|
47
|
+
import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string])),
|
|
48
|
+
rowColBreakpoints
|
|
49
|
+
]).description("Row layout cells").defaultValue([]),
|
|
50
|
+
cols: import_react_desc.PropTypes.oneOfType([
|
|
51
|
+
import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string])),
|
|
52
|
+
rowColBreakpoints
|
|
53
|
+
]).description("Column layout cells").defaultValue([]),
|
|
54
|
+
span: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, spanBreakpoints]).description("Expands the grid element within columns."),
|
|
55
|
+
alignItems: import_react_desc.PropTypes.oneOf(import_constants.alignItemsPlacement).description("flex-like align items prop"),
|
|
56
|
+
children: import_react_desc.PropTypes.node.description("Children node inside grid cell"),
|
|
57
|
+
className: import_react_desc.PropTypes.string.description("CSS class").defaultValue(""),
|
|
58
|
+
justifyContent: import_react_desc.PropTypes.oneOf(import_constants.justifyPlacement).description("flex-like justify prop").defaultValue(import_constants.justifyPlacement[0]),
|
|
59
|
+
gutter: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Space between cells prop").defaultValue(0),
|
|
60
|
+
wrap: import_react_desc.PropTypes.oneOf(import_constants.wrap).description("Wrap type").defaultValue(import_constants.wrap[0]),
|
|
61
|
+
height: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid height."),
|
|
62
|
+
width: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid width."),
|
|
63
|
+
p: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid padding in all sides."),
|
|
64
|
+
m: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid margin in all sides."),
|
|
65
|
+
px: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid padding in left and right sides."),
|
|
66
|
+
mx: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid margin in left and right sides."),
|
|
67
|
+
py: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid padding in top and bottom sides."),
|
|
68
|
+
my: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid margin in top and bottom sides."),
|
|
69
|
+
ml: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid left margin."),
|
|
70
|
+
mr: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid right margin"),
|
|
71
|
+
mt: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid top margin"),
|
|
72
|
+
mb: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid bottom margin"),
|
|
73
|
+
pl: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid left padding."),
|
|
74
|
+
pr: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid right padding"),
|
|
75
|
+
pt: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid top padding"),
|
|
76
|
+
pb: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("Grid bottom padding")
|
|
77
|
+
};
|
|
78
|
+
module.exports = __toCommonJS(propTypes_exports);
|
|
79
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from 'react-desc';\nimport { alignItemsPlacement, justifyPlacement, wrap } from './utils/constants';\n\nconst rowColBreakpoints = PropTypes.shape({\n small: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),\n medium: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),\n large: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),\n});\n\nconst spanBreakpoints = PropTypes.shape({\n small: PropTypes.number,\n medium: PropTypes.number,\n large: PropTypes.number,\n});\n\nexport const propTypes = {\n rows: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),\n rowColBreakpoints,\n ])\n .description('Row layout cells')\n .defaultValue([]),\n cols: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),\n rowColBreakpoints,\n ])\n .description('Column layout cells')\n .defaultValue([]),\n span: PropTypes.oneOfType([PropTypes.number, spanBreakpoints]).description(\n 'Expands the grid element within columns.',\n ),\n alignItems: PropTypes.oneOf(alignItemsPlacement).description('flex-like align items prop'),\n children: PropTypes.node.description('Children node inside grid cell'),\n className: PropTypes.string.description('CSS class').defaultValue(''),\n justifyContent: PropTypes.oneOf(justifyPlacement)\n .description('flex-like justify prop')\n .defaultValue(justifyPlacement[0]),\n gutter: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Space between cells prop')\n .defaultValue(0),\n wrap: PropTypes.oneOf(wrap).description('Wrap type').defaultValue(wrap[0]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid height.'),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid width.'),\n p: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid padding in all sides.'),\n m: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid margin in all sides.'),\n px: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid padding in left and right sides.'),\n mx: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid margin in left and right sides.'),\n py: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid padding in top and bottom sides.'),\n my: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid margin in top and bottom sides.'),\n ml: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid left margin.'),\n mr: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid right margin'),\n mt: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid top margin'),\n mb: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid bottom margin'),\n pl: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid left padding.'),\n pr: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid right padding'),\n pt: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid top padding'),\n pb: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid bottom padding'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAC1B,uBAA4D;AAE5D,MAAM,oBAAoB,4BAAU,MAAM;AAAA,EACxC,OAAO,4BAAU,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAAA,EAC1E,QAAQ,4BAAU,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAAA,EAC3E,OAAO,4BAAU,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAAA;AAG5E,MAAM,kBAAkB,4BAAU,MAAM;AAAA,EACtC,OAAO,4BAAU;AAAA,EACjB,QAAQ,4BAAU;AAAA,EAClB,OAAO,4BAAU;AAAA;AAGZ,MAAM,YAAY;AAAA,EACvB,MAAM,4BAAU,UAAU;AAAA,IACxB,4BAAU,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAAA,IACnE;AAAA,KAEC,YAAY,oBACZ,aAAa;AAAA,EAChB,MAAM,4BAAU,UAAU;AAAA,IACxB,4BAAU,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAAA,IACnE;AAAA,KAEC,YAAY,uBACZ,aAAa;AAAA,EAChB,MAAM,4BAAU,UAAU,CAAC,4BAAU,QAAQ,kBAAkB,YAC7D;AAAA,EAEF,YAAY,4BAAU,MAAM,sCAAqB,YAAY;AAAA,EAC7D,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,WAAW,4BAAU,OAAO,YAAY,aAAa,aAAa;AAAA,EAClE,gBAAgB,4BAAU,MAAM,mCAC7B,YAAY,0BACZ,aAAa,kCAAiB;AAAA,EACjC,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SACtD,YAAY,4BACZ,aAAa;AAAA,EAChB,MAAM,4BAAU,MAAM,uBAAM,YAAY,aAAa,aAAa,sBAAK;AAAA,EACvE,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC9E,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC7E,GAAG,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EACzE,GAAG,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EACzE,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAC1E,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var types_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
module.exports = __toCommonJS(types_exports);
|
|
27
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { alignItemsPlacement, justifyPlacement, wrap } from './utils/constants';\n\ninterface RowColBreakpoints {\n small?: string | number[];\n medium?: string | number[];\n large?: string | number[];\n}\n\ninterface SpanBreakpoints {\n small?: number;\n medium?: number;\n large?: number;\n}\n\nexport interface GridPropsT {\n height?: string;\n width?: string;\n rows?: string[] | string | number[] | RowColBreakpoints;\n cols?: string[] | string | number[] | RowColBreakpoints;\n justifyContent?: typeof justifyPlacement[number];\n alignItems?: typeof alignItemsPlacement[number];\n children?: React.ReactNode;\n className?: string;\n justify?: typeof justifyPlacement[number];\n gutter?: string | number;\n wrap?: typeof wrap[number];\n span?: number;\n p?: string | number;\n m?: string | number;\n px?: string | number;\n mx?: string | number;\n py?: string | number;\n my?: string | number;\n ml?: string | number;\n mr?: string | number;\n mt?: string | number;\n mb?: string | number;\n pl?: string | number;\n pr?: string | number;\n pt?: string | number;\n pb?: string | number;\n}\n\nexport interface GridPropsWithDefaultT {\n rows: string | number[] | RowColBreakpoints;\n cols: string | number[] | RowColBreakpoints;\n alignItems: typeof alignItemsPlacement[number];\n children?: React.ReactNode;\n className: string;\n justify: typeof justifyPlacement[number];\n gutter: string | number;\n wrap: typeof wrap[number];\n span: number | SpanBreakpoints;\n}\n\nexport interface GridItemPropsT {\n rows: string | number[] | RowColBreakpoints;\n cols: string | number[] | RowColBreakpoints;\n alignItems: typeof alignItemsPlacement[number];\n children: React.ReactElement[];\n className: string;\n justify: typeof justifyPlacement[number];\n gutter: string | number;\n wrap: typeof wrap[number];\n childNumber: number;\n isSpanParent: boolean;\n span?: number | SpanBreakpoints;\n ref: React.ForwardedRef<HTMLDivElement>;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var constants_exports = {};
|
|
29
|
+
__export(constants_exports, {
|
|
30
|
+
alignItemsPlacement: () => alignItemsPlacement,
|
|
31
|
+
justifyPlacement: () => justifyPlacement,
|
|
32
|
+
wrap: () => wrap
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
const justifyPlacement = [
|
|
36
|
+
"flex-start",
|
|
37
|
+
"center",
|
|
38
|
+
"flex-end",
|
|
39
|
+
"space-between",
|
|
40
|
+
"space-around",
|
|
41
|
+
"space-evenly"
|
|
42
|
+
];
|
|
43
|
+
const alignItemsPlacement = ["flex-start", "center", "flex-end", "stretch", "baseline"];
|
|
44
|
+
const wrap = ["wrap", "nowrap", "wrap-reverse"];
|
|
45
|
+
module.exports = __toCommonJS(constants_exports);
|
|
46
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/constants.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const justifyPlacement = [\n 'flex-start',\n 'center',\n 'flex-end',\n 'space-between',\n 'space-around',\n 'space-evenly',\n] as const;\n\nexport const alignItemsPlacement = ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'] as const;\n\nexport const wrap = ['wrap', 'nowrap', 'wrap-reverse'] as const;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,sBAAsB,CAAC,cAAc,UAAU,YAAY,WAAW;AAE5E,MAAM,OAAO,CAAC,QAAQ,UAAU;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var styles_exports = {};
|
|
29
|
+
__export(styles_exports, {
|
|
30
|
+
manageCols: () => manageCols,
|
|
31
|
+
manageRows: () => manageRows,
|
|
32
|
+
manageSpan: () => manageSpan
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
36
|
+
const manageSpan = import_ds_system.css`
|
|
37
|
+
${({ isSpanParent, span, theme }) => {
|
|
38
|
+
if (!isSpanParent)
|
|
39
|
+
return "";
|
|
40
|
+
if (typeof span === "object") {
|
|
41
|
+
let data = "";
|
|
42
|
+
Object.keys(theme.media).forEach((key) => {
|
|
43
|
+
if (span[key] && theme.breakpoints[key]) {
|
|
44
|
+
if (key === "small") {
|
|
45
|
+
data += `
|
|
46
|
+
-ms-grid-column: auto / span ${span[key]};
|
|
47
|
+
grid-column: auto / span ${span[key]};
|
|
48
|
+
`;
|
|
49
|
+
} else {
|
|
50
|
+
data += `@media (min-width: ${theme.breakpoints[key]}) {
|
|
51
|
+
-ms-grid-column: auto / span ${span[key]};
|
|
52
|
+
grid-column: auto / span ${span[key]};
|
|
53
|
+
}`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
return `
|
|
60
|
+
-ms-grid-column: auto / span ${span};
|
|
61
|
+
grid-column: auto / span ${span};`;
|
|
62
|
+
}}
|
|
63
|
+
`;
|
|
64
|
+
const manageCols = import_ds_system.css`
|
|
65
|
+
${({ cols, theme, isSpanParent }) => {
|
|
66
|
+
if (typeof cols === "object" && !Array.isArray(cols)) {
|
|
67
|
+
let data = "";
|
|
68
|
+
Object.keys(theme.media).forEach((key) => {
|
|
69
|
+
if (cols[key] && Array.isArray(cols[key])) {
|
|
70
|
+
const mtg = (0, import_ds_system.mapTemplateGrid)(cols[key]).join(" ");
|
|
71
|
+
const mtgs = (0, import_ds_system.mapTemplateGrid)(cols[key]).map((c) => `minmax(0, ${c})`).join(" ");
|
|
72
|
+
if (key === "small") {
|
|
73
|
+
data += `-ms-grid-columns: ${mtg || "minmax(0px, 1fr)"};
|
|
74
|
+
grid-template-columns: ${mtg || "auto"};
|
|
75
|
+
-ms-grid-columns: ${mtgs || "minmax(0px, 1fr)"};
|
|
76
|
+
grid-template-columns: ${mtgs || "auto"};`;
|
|
77
|
+
} else {
|
|
78
|
+
data += `@media (min-width: ${theme.breakpoints[key]}) {
|
|
79
|
+
-ms-grid-columns: ${mtg || "minmax(0px, 1fr)"};
|
|
80
|
+
grid-template-columns: ${mtg || "auto"};
|
|
81
|
+
-ms-grid-columns: ${mtgs || "minmax(0px, 1fr)"};
|
|
82
|
+
grid-template-columns: ${mtgs || "auto"};
|
|
83
|
+
}`;
|
|
84
|
+
}
|
|
85
|
+
} else if (isSpanParent) {
|
|
86
|
+
if (key === "small") {
|
|
87
|
+
data += `-ms-grid-columns: repeat(${cols[key]}, 1fr);
|
|
88
|
+
grid-template-columns: repeat(${cols[key]}, 1fr);`;
|
|
89
|
+
} else {
|
|
90
|
+
data += `@media (min-width: ${theme.breakpoints[key]}) {
|
|
91
|
+
-ms-grid-columns: repeat(${cols[key]}, 1fr);
|
|
92
|
+
grid-template-columns: repeat(${cols[key]}, 1fr);
|
|
93
|
+
}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return data;
|
|
98
|
+
}
|
|
99
|
+
if (Array.isArray(cols)) {
|
|
100
|
+
const mtg = (0, import_ds_system.mapTemplateGrid)(cols).join(" ");
|
|
101
|
+
const mtgs = (0, import_ds_system.mapTemplateGrid)(cols).map((c) => `minmax(0, ${c})`).join(" ");
|
|
102
|
+
return `
|
|
103
|
+
-ms-grid-columns: ${mtg || "minmax(0px, 1fr)"};
|
|
104
|
+
grid-template-columns: ${mtg || "auto"};
|
|
105
|
+
-ms-grid-columns: ${mtgs || "minmax(0px, 1fr)"};
|
|
106
|
+
grid-template-columns: ${mtgs || "auto"};
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
if (isSpanParent) {
|
|
110
|
+
return `
|
|
111
|
+
-ms-grid-columns: repeat(${cols}, 1fr);
|
|
112
|
+
grid-template-columns: repeat(${cols}, 1fr);`;
|
|
113
|
+
}
|
|
114
|
+
return "";
|
|
115
|
+
}}
|
|
116
|
+
`;
|
|
117
|
+
const manageRows = import_ds_system.css`
|
|
118
|
+
${({ rows, theme, isSpanParent }) => {
|
|
119
|
+
if (typeof rows === "object" && !Array.isArray(rows)) {
|
|
120
|
+
let data = "";
|
|
121
|
+
Object.keys(theme.media).forEach((key) => {
|
|
122
|
+
if (rows[key] && Array.isArray(rows[key])) {
|
|
123
|
+
const mtg = (0, import_ds_system.mapTemplateGrid)(rows[key]).join(" ");
|
|
124
|
+
const mtgs = (0, import_ds_system.mapTemplateGrid)(rows[key]).map((c) => `minmax(0, ${c})`).join(" ");
|
|
125
|
+
if (key === "small") {
|
|
126
|
+
data += `-ms-grid-rows: ${mtg || "minmax(0px, 1fr)"};
|
|
127
|
+
grid-template-rows: ${mtg || "auto"};
|
|
128
|
+
-ms-grid-rows: ${mtgs || "minmax(0px, 1fr)"};
|
|
129
|
+
grid-template-rows: ${mtgs || "auto"};`;
|
|
130
|
+
} else {
|
|
131
|
+
data += `@media (min-width: ${theme.breakpoints[key]}) {
|
|
132
|
+
-ms-grid-rows: ${mtg || "minmax(0px, 1fr)"};
|
|
133
|
+
grid-template-rows: ${mtg || "auto"};
|
|
134
|
+
-ms-grid-rows: ${mtgs || "minmax(0px, 1fr)"};
|
|
135
|
+
grid-template-rows: ${mtgs || "auto"};
|
|
136
|
+
}`;
|
|
137
|
+
}
|
|
138
|
+
} else if (isSpanParent) {
|
|
139
|
+
if (key === "small") {
|
|
140
|
+
data += `-ms-grid-rows: repeat(${rows[key]}, 1fr);
|
|
141
|
+
grid-template-rows: repeat(${rows[key]}, 1fr);`;
|
|
142
|
+
} else {
|
|
143
|
+
data += `@media (min-width: ${theme.breakpoints[key]}) {
|
|
144
|
+
-ms-grid-rows: repeat(${rows[key]}, 1fr);
|
|
145
|
+
grid-template-rows: repeat(${rows[key]}, 1fr);
|
|
146
|
+
}`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
return data;
|
|
151
|
+
}
|
|
152
|
+
if (Array.isArray(rows)) {
|
|
153
|
+
const mtg = (0, import_ds_system.mapTemplateGrid)(rows).join(" ");
|
|
154
|
+
const mtgs = (0, import_ds_system.mapTemplateGrid)(rows).map((c) => `minmax(0, ${c})`).join(" ");
|
|
155
|
+
return `
|
|
156
|
+
-ms-grid-rows: ${mtg || "minmax(0px, 1fr)"};
|
|
157
|
+
grid-template-rows: ${mtg || "auto"};
|
|
158
|
+
-ms-grid-rows: ${mtgs || "minmax(0px, 1fr)"};
|
|
159
|
+
grid-template-rows: ${mtgs || "auto"};
|
|
160
|
+
`;
|
|
161
|
+
}
|
|
162
|
+
if (isSpanParent) {
|
|
163
|
+
return `
|
|
164
|
+
-ms-grid-rows: repeat(${rows}, 1fr);
|
|
165
|
+
grid-template-rows: repeat(${rows}, 1fr);`;
|
|
166
|
+
}
|
|
167
|
+
return "";
|
|
168
|
+
}}
|
|
169
|
+
`;
|
|
170
|
+
module.exports = __toCommonJS(styles_exports);
|
|
171
|
+
//# sourceMappingURL=styles.js.map
|