@elliemae/ds-grid 3.0.0-next.1 → 3.0.0-next.13
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 +109 -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/index.js +39 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +92 -0
- package/dist/cjs/react-desc-prop-types.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 +39 -0
- package/dist/cjs/utils/constants.js.map +7 -0
- package/dist/cjs/utils/styles.js +178 -0
- package/dist/cjs/utils/styles.js.map +7 -0
- package/dist/esm/Grid.js +82 -0
- package/dist/esm/Grid.js.map +7 -0
- package/dist/esm/GridItem.js +31 -0
- package/dist/esm/GridItem.js.map +7 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +69 -0
- package/dist/esm/react-desc-prop-types.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 +10 -0
- package/dist/esm/utils/constants.js.map +7 -0
- package/dist/esm/utils/styles.js +149 -0
- package/dist/esm/utils/styles.js.map +7 -0
- package/package.json +42 -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/Grid.d.ts +0 -11
- package/types/GridItem.d.ts +0 -2
- package/types/defaultProps.d.ts +0 -9
- package/types/index.d.ts +0 -5
- package/types/propTypes.d.ts +0 -135
- package/types/tests/DSGrid.events.test.d.ts +0 -1
- package/types/types.d.ts +0 -66
- package/types/utils/constants.d.ts +0 -3
- package/types/utils/styles.d.ts +0 -3
package/dist/esm/Grid.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
import React2 from "react";
|
|
34
|
+
import { describe, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
35
|
+
import { get } from "lodash";
|
|
36
|
+
import { fixSpaceGutter } from "@elliemae/ds-system";
|
|
37
|
+
import { DSGridPropTypes, defaultProps } from "./react-desc-prop-types";
|
|
38
|
+
import { GridItem } from "./GridItem";
|
|
39
|
+
const Grid = React2.forwardRef((props, ref) => {
|
|
40
|
+
const _a = props, { children } = _a, propsWithoutChildren = __objRest(_a, ["children"]);
|
|
41
|
+
const propsWithDefaults = useMemoMergePropsWithDefault(propsWithoutChildren, defaultProps);
|
|
42
|
+
const _b = propsWithDefaults, { rows, cols, alignItems, className, justify, gutter, wrap, width, height } = _b, rest = __objRest(_b, ["rows", "cols", "alignItems", "className", "justify", "gutter", "wrap", "width", "height"]);
|
|
43
|
+
let isSpanParent = true;
|
|
44
|
+
const renderChildren = React2.Children.map(children, (child) => {
|
|
45
|
+
if (get(child, "child.type.name") === "Grid" || get(child, "type.displayName") === "Grid" || parseInt(get(child, "props.span", 0), 10) > 0) {
|
|
46
|
+
const { width: wc, height: hc, span } = child.props;
|
|
47
|
+
if (!span)
|
|
48
|
+
isSpanParent = false;
|
|
49
|
+
return React2.cloneElement(child, __spreadProps(__spreadValues({}, child.props), {
|
|
50
|
+
width: fixSpaceGutter(wc),
|
|
51
|
+
height: fixSpaceGutter(hc)
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
return child;
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ React2.createElement(GridItem, __spreadProps(__spreadValues({
|
|
57
|
+
alignItems,
|
|
58
|
+
className,
|
|
59
|
+
cols,
|
|
60
|
+
gutter,
|
|
61
|
+
isSpanParent,
|
|
62
|
+
justify,
|
|
63
|
+
rows,
|
|
64
|
+
wrap,
|
|
65
|
+
childNumber: React2.Children.count(children),
|
|
66
|
+
ref
|
|
67
|
+
}, rest), {
|
|
68
|
+
w: width,
|
|
69
|
+
h: height
|
|
70
|
+
}), renderChildren);
|
|
71
|
+
});
|
|
72
|
+
Grid.displayName = "Grid";
|
|
73
|
+
Grid.propTypes = DSGridPropTypes;
|
|
74
|
+
const DSGridWithSchema = describe(Grid);
|
|
75
|
+
DSGridWithSchema.propTypes = DSGridPropTypes;
|
|
76
|
+
var Grid_default = Grid;
|
|
77
|
+
export {
|
|
78
|
+
DSGridWithSchema,
|
|
79
|
+
Grid,
|
|
80
|
+
Grid_default as default
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Grid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { get } from 'lodash';\nimport { fixSpaceGutter } from '@elliemae/ds-system';\nimport { DSGridT, DSGridPropTypes, defaultProps } from './react-desc-prop-types';\nimport { GridItem } from './GridItem';\n\nconst Grid = React.forwardRef<HTMLDivElement, DSGridT.Props>((props, ref) => {\n const { children, ...propsWithoutChildren } = props;\n const propsWithDefaults = useMemoMergePropsWithDefault(propsWithoutChildren, defaultProps);\n\n const { rows, cols, alignItems, className, justify, gutter, wrap, width, height, ...rest } = propsWithDefaults;\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) as string, 10) > 0\n ) {\n const { width: wc, height: hc, span } = (child as React.ReactElement).props as Required<DSGridT.Props>;\n if (!span) isSpanParent = false;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return React.cloneElement(child as React.ReactElement, {\n ...(child as React.ReactElement).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 {...rest}\n w={width}\n h={height}\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\nGrid.propTypes = DSGridPropTypes;\nconst DSGridWithSchema = describe(Grid);\nDSGridWithSchema.propTypes = DSGridPropTypes;\n\nexport default Grid;\nexport { DSGridWithSchema, Grid };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,OAAO,OAAM,WAA0C,CAAC,OAAO,QAAQ;AAC3E,QAA8C,YAAtC,eAAsC,IAAzB,iCAAyB,IAAzB,CAAb;AACR,QAAM,oBAAoB,6BAA6B,sBAAsB;AAE7E,QAA6F,wBAArF,QAAM,MAAM,YAAY,WAAW,SAAS,QAAQ,MAAM,OAAO,WAAoB,IAAT,iBAAS,IAAT,CAA5E,QAAM,QAAM,cAAY,aAAW,WAAS,UAAQ,QAAM,SAAO;AAEzE,MAAI,eAAe;AAEnB,QAAM,iBAAiB,OAAM,SAAS,IAAI,UAAU,CAAC,UAA2B;AAC9E,QACE,IAAI,OAAO,uBAAuB,UAClC,IAAI,OAAO,wBAAwB,UACnC,SAAS,IAAI,OAAO,cAAc,IAAc,MAAM,GACtD;AACA,YAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAU,MAA6B;AACtE,UAAI,CAAC;AAAM,uBAAe;AAE1B,aAAO,OAAM,aAAa,OAA6B,iCACjD,MAA6B,QADoB;AAAA,QAErD,OAAO,eAAe;AAAA,QACtB,QAAQ,eAAe;AAAA;AAAA;AAG3B,WAAO;AAAA;AAGT,SACE,qCAAC,UAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,OAAM,SAAS,MAAM;AAAA,IAClC;AAAA,KACI,OAXN;AAAA,IAYE,GAAG;AAAA,IACH,GAAG;AAAA,MAEF;AAAA;AAMP,KAAK,cAAc;AAEnB,KAAK,YAAY;AACjB,MAAM,mBAAmB,SAAS;AAClC,iBAAiB,YAAY;AAE7B,IAAO,eAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import {
|
|
4
|
+
space,
|
|
5
|
+
width,
|
|
6
|
+
height,
|
|
7
|
+
flexboxes,
|
|
8
|
+
grids,
|
|
9
|
+
sizing
|
|
10
|
+
} from "@xstyled/styled-components";
|
|
11
|
+
import { mapGap } from "@elliemae/ds-system";
|
|
12
|
+
import { manageCols, manageRows, manageSpan } from "./utils/styles";
|
|
13
|
+
const GridItem = styled.div`
|
|
14
|
+
display: grid;
|
|
15
|
+
display: -ms-grid;
|
|
16
|
+
column-gap: ${({ gutter }) => mapGap(gutter)};
|
|
17
|
+
row-gap: ${({ gutter }) => mapGap(gutter)};
|
|
18
|
+
${grids}
|
|
19
|
+
${flexboxes}
|
|
20
|
+
${sizing}
|
|
21
|
+
${space}
|
|
22
|
+
${height}
|
|
23
|
+
${width}
|
|
24
|
+
${manageCols}
|
|
25
|
+
${manageRows}
|
|
26
|
+
${manageSpan}
|
|
27
|
+
`;
|
|
28
|
+
export {
|
|
29
|
+
GridItem
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=GridItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/GridItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport styled from 'styled-components';\nimport {\n space,\n width,\n height,\n flexboxes,\n grids,\n sizing,\n LayoutProps,\n SpaceProps,\n SizingProps,\n} from '@xstyled/styled-components';\nimport { mapGap } from '@elliemae/ds-system';\nimport { manageCols, manageRows, manageSpan } from './utils/styles';\nimport { DSGridT } from './react-desc-prop-types';\n\nexport const GridItem = styled.div<DSGridT.ItemProps & LayoutProps & SpaceProps & SizingProps>`\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"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AACA;AAGO,MAAM,WAAW,OAAO;AAAA;AAAA;AAAA,gBAGf,CAAC,EAAE,aAAa,OAAO;AAAA,aAC1B,CAAC,EAAE,aAAa,OAAO;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,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { default as default2, Grid, default as default3, default as default4, DSGridWithSchema } from "./Grid";
|
|
3
|
+
export {
|
|
4
|
+
DSGridWithSchema,
|
|
5
|
+
Grid,
|
|
6
|
+
default3 as GridContainer,
|
|
7
|
+
default4 as GridItem,
|
|
8
|
+
default2 as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, Grid, default as GridContainer, default as GridItem, DSGridWithSchema } from './Grid';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import {
|
|
22
|
+
PropTypes,
|
|
23
|
+
globalAttributesPropTypes,
|
|
24
|
+
xstyledPropTypes
|
|
25
|
+
} from "@elliemae/ds-props-helpers";
|
|
26
|
+
import { alignItemsPlacement, justifyPlacement, wrap } from "./utils/constants";
|
|
27
|
+
const defaultProps = {
|
|
28
|
+
rows: [],
|
|
29
|
+
cols: [],
|
|
30
|
+
className: "",
|
|
31
|
+
justify: "flex-start",
|
|
32
|
+
gutter: 0,
|
|
33
|
+
wrap: "wrap",
|
|
34
|
+
span: 1
|
|
35
|
+
};
|
|
36
|
+
const rowColBreakpoints = PropTypes.shape({
|
|
37
|
+
small: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),
|
|
38
|
+
medium: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),
|
|
39
|
+
large: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))
|
|
40
|
+
});
|
|
41
|
+
const spanBreakpoints = PropTypes.shape({
|
|
42
|
+
small: PropTypes.number,
|
|
43
|
+
medium: PropTypes.number,
|
|
44
|
+
large: PropTypes.number
|
|
45
|
+
});
|
|
46
|
+
const DSGridPropTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
|
|
47
|
+
rows: PropTypes.oneOfType([
|
|
48
|
+
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),
|
|
49
|
+
rowColBreakpoints
|
|
50
|
+
]).description("Row layout cells").defaultValue([]),
|
|
51
|
+
cols: PropTypes.oneOfType([
|
|
52
|
+
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),
|
|
53
|
+
rowColBreakpoints
|
|
54
|
+
]).description("Column layout cells").defaultValue([]),
|
|
55
|
+
span: PropTypes.oneOfType([PropTypes.number, spanBreakpoints]).description("Expands the grid element within columns."),
|
|
56
|
+
alignItems: PropTypes.oneOf(alignItemsPlacement).description("flex-like align items prop"),
|
|
57
|
+
children: PropTypes.node.description("Children node inside grid cell"),
|
|
58
|
+
className: PropTypes.string.description("CSS class").defaultValue(""),
|
|
59
|
+
justifyContent: PropTypes.oneOf(justifyPlacement).description("flex-like justify prop").defaultValue(justifyPlacement[0]),
|
|
60
|
+
gutter: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Space between cells prop").defaultValue(0),
|
|
61
|
+
wrap: PropTypes.oneOf(wrap).description("Wrap type").defaultValue(wrap[0]),
|
|
62
|
+
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Grid height."),
|
|
63
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Grid width.")
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
DSGridPropTypes,
|
|
67
|
+
defaultProps
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { alignItemsPlacement, justifyPlacement, wrap } from './utils/constants';\n\nexport declare namespace DSGridT {\n interface RowColBreakpoints {\n small?: string | number[];\n medium?: string | number[];\n large?: string | number[];\n }\n\n interface SpanBreakpoints {\n small?: number;\n medium?: number;\n large?: number;\n }\n\n interface IProps {\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 }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof IProps>, XstyledProps {}\n\n export interface ItemProps {\n rows: string[] | string | number[] | RowColBreakpoints;\n cols: string[] | 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 childNumber: number;\n isSpanParent: boolean;\n span?: number | SpanBreakpoints;\n ref: React.ForwardedRef<HTMLDivElement>;\n }\n}\n\nexport const defaultProps = {\n rows: [],\n cols: [],\n className: '',\n justify: 'flex-start',\n gutter: 0,\n wrap: 'wrap',\n span: 1,\n};\n\n// =============================================================================\n// PropTypes\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 DSGridPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\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} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AAAA;AAAA;AAAA;AAAA;AAOA;AAgDO,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA;AAMR,MAAM,oBAAoB,UAAU,MAAM;AAAA,EACxC,OAAO,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,EAC1E,QAAQ,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,EAC3E,OAAO,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA;AAG5E,MAAM,kBAAkB,UAAU,MAAM;AAAA,EACtC,OAAO,UAAU;AAAA,EACjB,QAAQ,UAAU;AAAA,EAClB,OAAO,UAAU;AAAA;AAGZ,MAAM,kBAAkB,gDAC1B,4BACA,mBAF0B;AAAA,EAG7B,MAAM,UAAU,UAAU;AAAA,IACxB,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,IACnE;AAAA,KAEC,YAAY,oBACZ,aAAa;AAAA,EAChB,MAAM,UAAU,UAAU;AAAA,IACxB,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,IACnE;AAAA,KAEC,YAAY,uBACZ,aAAa;AAAA,EAChB,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,kBAAkB,YAC7D;AAAA,EAEF,YAAY,UAAU,MAAM,qBAAqB,YAAY;AAAA,EAC7D,UAAU,UAAU,KAAK,YAAY;AAAA,EACrC,WAAW,UAAU,OAAO,YAAY,aAAa,aAAa;AAAA,EAClE,gBAAgB,UAAU,MAAM,kBAC7B,YAAY,0BACZ,aAAa,iBAAiB;AAAA,EACjC,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SACtD,YAAY,4BACZ,aAAa;AAAA,EAChB,MAAM,UAAU,MAAM,MAAM,YAAY,aAAa,aAAa,KAAK;AAAA,EACvE,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SAAS,YAAY;AAAA,EAC9E,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SAAS,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const justifyPlacement = ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"];
|
|
3
|
+
const alignItemsPlacement = ["flex-start", "center", "flex-end", "stretch", "baseline"];
|
|
4
|
+
const wrap = ["wrap", "nowrap", "wrap-reverse"];
|
|
5
|
+
export {
|
|
6
|
+
alignItemsPlacement,
|
|
7
|
+
justifyPlacement,
|
|
8
|
+
wrap
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/constants.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const justifyPlacement = ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'];\n\nexport const alignItemsPlacement = ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'];\n\nexport const wrap = ['wrap', 'nowrap', 'wrap-reverse'];\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,mBAAmB,CAAC,cAAc,UAAU,YAAY,iBAAiB,gBAAgB;AAE/F,MAAM,sBAAsB,CAAC,cAAc,UAAU,YAAY,WAAW;AAE5E,MAAM,OAAO,CAAC,QAAQ,UAAU;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { css, mapTemplateGrid } from "@elliemae/ds-system";
|
|
3
|
+
const manageSpan = css`
|
|
4
|
+
${({ isSpanParent, span, theme }) => {
|
|
5
|
+
if (!isSpanParent)
|
|
6
|
+
return "";
|
|
7
|
+
if (typeof span === "number") {
|
|
8
|
+
return `
|
|
9
|
+
-ms-grid-column: auto / span ${span};
|
|
10
|
+
grid-column: auto / span ${span};`;
|
|
11
|
+
}
|
|
12
|
+
if (typeof span !== "object")
|
|
13
|
+
return ``;
|
|
14
|
+
let data = "";
|
|
15
|
+
Object.keys(theme.media).forEach((key) => {
|
|
16
|
+
const theKey = key;
|
|
17
|
+
const spanValue = span[theKey];
|
|
18
|
+
if (!!spanValue && theme.breakpoints[theKey]) {
|
|
19
|
+
if (theKey === "small") {
|
|
20
|
+
data += `
|
|
21
|
+
-ms-grid-column: auto / span ${spanValue};
|
|
22
|
+
grid-column: auto / span ${spanValue};
|
|
23
|
+
`;
|
|
24
|
+
} else {
|
|
25
|
+
data += `@media (min-width: ${theme.breakpoints[theKey]}) {
|
|
26
|
+
-ms-grid-column: auto / span ${spanValue};
|
|
27
|
+
grid-column: auto / span ${spanValue};
|
|
28
|
+
}`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return data;
|
|
33
|
+
}}
|
|
34
|
+
`;
|
|
35
|
+
const manageCols = css`
|
|
36
|
+
${({ cols, theme, isSpanParent }) => {
|
|
37
|
+
if (typeof cols === "object" && !Array.isArray(cols)) {
|
|
38
|
+
let data = "";
|
|
39
|
+
Object.keys(theme.media).forEach((key) => {
|
|
40
|
+
const theKey = key;
|
|
41
|
+
const colValue = cols[theKey];
|
|
42
|
+
if (!!colValue && Array.isArray(colValue)) {
|
|
43
|
+
const mtg = mapTemplateGrid(colValue).join(" ");
|
|
44
|
+
const mtgs = mapTemplateGrid(colValue).map((c) => `minmax(0, ${c})`).join(" ");
|
|
45
|
+
if (theKey === "small") {
|
|
46
|
+
data += `-ms-grid-columns: ${mtg || "minmax(0px, 1fr)"};
|
|
47
|
+
grid-template-columns: ${mtg || "auto"};
|
|
48
|
+
-ms-grid-columns: ${mtgs || "minmax(0px, 1fr)"};
|
|
49
|
+
grid-template-columns: ${mtgs || "auto"};`;
|
|
50
|
+
} else {
|
|
51
|
+
data += `@media (min-width: ${theme.breakpoints[theKey]}) {
|
|
52
|
+
-ms-grid-columns: ${mtg || "minmax(0px, 1fr)"};
|
|
53
|
+
grid-template-columns: ${mtg || "auto"};
|
|
54
|
+
-ms-grid-columns: ${mtgs || "minmax(0px, 1fr)"};
|
|
55
|
+
grid-template-columns: ${mtgs || "auto"};
|
|
56
|
+
}`;
|
|
57
|
+
}
|
|
58
|
+
} else if (!!colValue && isSpanParent) {
|
|
59
|
+
if (theKey === "small") {
|
|
60
|
+
data += `-ms-grid-columns: repeat(${colValue}, 1fr);
|
|
61
|
+
grid-template-columns: repeat(${colValue}, 1fr);`;
|
|
62
|
+
} else {
|
|
63
|
+
data += `@media (min-width: ${theme.breakpoints[theKey]}) {
|
|
64
|
+
-ms-grid-columns: repeat(${colValue}, 1fr);
|
|
65
|
+
grid-template-columns: repeat(${colValue}, 1fr);
|
|
66
|
+
}`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return data;
|
|
71
|
+
}
|
|
72
|
+
if (Array.isArray(cols)) {
|
|
73
|
+
const mtg = mapTemplateGrid(cols).join(" ");
|
|
74
|
+
const mtgs = mapTemplateGrid(cols).map((c) => `minmax(0, ${c})`).join(" ");
|
|
75
|
+
return `
|
|
76
|
+
-ms-grid-columns: ${mtg || "minmax(0px, 1fr)"};
|
|
77
|
+
grid-template-columns: ${mtg || "auto"};
|
|
78
|
+
-ms-grid-columns: ${mtgs || "minmax(0px, 1fr)"};
|
|
79
|
+
grid-template-columns: ${mtgs || "auto"};`;
|
|
80
|
+
}
|
|
81
|
+
if (isSpanParent) {
|
|
82
|
+
return `
|
|
83
|
+
-ms-grid-columns: repeat(${cols}, 1fr);
|
|
84
|
+
grid-template-columns: repeat(${cols}, 1fr);`;
|
|
85
|
+
}
|
|
86
|
+
return "";
|
|
87
|
+
}}
|
|
88
|
+
`;
|
|
89
|
+
const manageRows = css`
|
|
90
|
+
${({ rows, theme, isSpanParent }) => {
|
|
91
|
+
if (typeof rows === "object" && !Array.isArray(rows)) {
|
|
92
|
+
let data = "";
|
|
93
|
+
Object.keys(theme.media).forEach((key) => {
|
|
94
|
+
const theKey = key;
|
|
95
|
+
const rowValue = rows[theKey];
|
|
96
|
+
if (rowValue && Array.isArray(rowValue)) {
|
|
97
|
+
const mtg = mapTemplateGrid(rowValue).join(" ");
|
|
98
|
+
const mtgs = mapTemplateGrid(rowValue).map((c) => `minmax(0, ${c})`).join(" ");
|
|
99
|
+
if (key === "small") {
|
|
100
|
+
data += `-ms-grid-rows: ${mtg || "minmax(0px, 1fr)"};
|
|
101
|
+
grid-template-rows: ${mtg || "auto"};
|
|
102
|
+
-ms-grid-rows: ${mtgs || "minmax(0px, 1fr)"};
|
|
103
|
+
grid-template-rows: ${mtgs || "auto"};`;
|
|
104
|
+
} else {
|
|
105
|
+
data += `@media (min-width: ${theme.breakpoints[theKey]}) {
|
|
106
|
+
-ms-grid-rows: ${mtg || "minmax(0px, 1fr)"};
|
|
107
|
+
grid-template-rows: ${mtg || "auto"};
|
|
108
|
+
-ms-grid-rows: ${mtgs || "minmax(0px, 1fr)"};
|
|
109
|
+
grid-template-rows: ${mtgs || "auto"};
|
|
110
|
+
}`;
|
|
111
|
+
}
|
|
112
|
+
} else if (!!rowValue && isSpanParent) {
|
|
113
|
+
if (theKey === "small") {
|
|
114
|
+
data += `-ms-grid-rows: repeat(${rowValue}, 1fr);
|
|
115
|
+
grid-template-rows: repeat(${rowValue}, 1fr);`;
|
|
116
|
+
} else {
|
|
117
|
+
data += `@media (min-width: ${theme.breakpoints[theKey]}) {
|
|
118
|
+
-ms-grid-rows: repeat(${rowValue}, 1fr);
|
|
119
|
+
grid-template-rows: repeat(${rowValue}, 1fr);
|
|
120
|
+
}`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return data;
|
|
125
|
+
}
|
|
126
|
+
if (Array.isArray(rows)) {
|
|
127
|
+
const mtg = mapTemplateGrid(rows).join(" ");
|
|
128
|
+
const mtgs = mapTemplateGrid(rows).map((c) => `minmax(0, ${c})`).join(" ");
|
|
129
|
+
return `
|
|
130
|
+
-ms-grid-rows: ${mtg || "minmax(0px, 1fr)"};
|
|
131
|
+
grid-template-rows: ${mtg || "auto"};
|
|
132
|
+
-ms-grid-rows: ${mtgs || "minmax(0px, 1fr)"};
|
|
133
|
+
grid-template-rows: ${mtgs || "auto"};
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
if (isSpanParent) {
|
|
137
|
+
return `
|
|
138
|
+
-ms-grid-rows: repeat(${rows}, 1fr);
|
|
139
|
+
grid-template-rows: repeat(${rows}, 1fr);`;
|
|
140
|
+
}
|
|
141
|
+
return "";
|
|
142
|
+
}}
|
|
143
|
+
`;
|
|
144
|
+
export {
|
|
145
|
+
manageCols,
|
|
146
|
+
manageRows,
|
|
147
|
+
manageSpan
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/styles.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport { css, mapTemplateGrid } from '@elliemae/ds-system';\nimport { DSGridT } from '../react-desc-prop-types';\n\nexport const manageSpan = css<DSGridT.ItemProps>`\n ${({ isSpanParent, span, theme }) => {\n if (!isSpanParent) return '';\n\n if (typeof span === 'number') {\n return `\n -ms-grid-column: auto / span ${span};\n grid-column: auto / span ${span};`;\n }\n\n if (typeof span !== 'object') return ``;\n\n // Span object\n\n let data = '';\n Object.keys(theme.media).forEach((key) => {\n // Type castings\n const theKey = key as keyof typeof span & keyof typeof theme.breakpoints;\n const spanValue = span[theKey];\n\n if (!!spanValue && theme.breakpoints[theKey]) {\n if (theKey === 'small') {\n data += `\n -ms-grid-column: auto / span ${spanValue};\n grid-column: auto / span ${spanValue};\n `;\n } else {\n data += `@media (min-width: ${theme.breakpoints[theKey]}) {\n -ms-grid-column: auto / span ${spanValue};\n grid-column: auto / span ${spanValue};\n }`;\n }\n }\n });\n return data;\n }}\n`;\n\nexport const manageCols = css<DSGridT.ItemProps>`\n ${({ cols, theme, isSpanParent }) => {\n if (typeof cols === 'object' && !Array.isArray(cols)) {\n let data = '';\n Object.keys(theme.media).forEach((key) => {\n const theKey = key as keyof typeof cols;\n const colValue = cols[theKey];\n if (!!colValue && Array.isArray(colValue)) {\n const mtg = (mapTemplateGrid(colValue) as string[]).join(' ');\n const mtgs = (mapTemplateGrid(colValue) as string[]).map((c) => `minmax(0, ${c})`).join(' ');\n if (theKey === 'small') {\n data += `-ms-grid-columns: ${mtg || 'minmax(0px, 1fr)'};\n grid-template-columns: ${mtg || 'auto'};\n -ms-grid-columns: ${mtgs || 'minmax(0px, 1fr)'};\n grid-template-columns: ${mtgs || 'auto'};`;\n } else {\n data += `@media (min-width: ${theme.breakpoints[theKey]}) {\n -ms-grid-columns: ${mtg || 'minmax(0px, 1fr)'};\n grid-template-columns: ${mtg || 'auto'};\n -ms-grid-columns: ${mtgs || 'minmax(0px, 1fr)'};\n grid-template-columns: ${mtgs || 'auto'};\n }`;\n }\n } else if (!!colValue && isSpanParent) {\n if (theKey === 'small') {\n data += `-ms-grid-columns: repeat(${colValue}, 1fr);\n grid-template-columns: repeat(${colValue}, 1fr);`;\n } else {\n data += `@media (min-width: ${theme.breakpoints[theKey]}) {\n -ms-grid-columns: repeat(${colValue}, 1fr);\n grid-template-columns: repeat(${colValue}, 1fr);\n }`;\n }\n }\n });\n return data;\n }\n if (Array.isArray(cols)) {\n const mtg = (mapTemplateGrid(cols) as string[]).join(' ');\n const mtgs = (mapTemplateGrid(cols) as string[]).map((c) => `minmax(0, ${c})`).join(' ');\n return `\n -ms-grid-columns: ${mtg || 'minmax(0px, 1fr)'};\n grid-template-columns: ${mtg || 'auto'};\n -ms-grid-columns: ${mtgs || 'minmax(0px, 1fr)'};\n grid-template-columns: ${mtgs || 'auto'};`;\n }\n if (isSpanParent) {\n return `\n -ms-grid-columns: repeat(${cols}, 1fr);\n grid-template-columns: repeat(${cols}, 1fr);`;\n }\n return '';\n }}\n`;\n\nexport const manageRows = css<DSGridT.ItemProps>`\n ${({ rows, theme, isSpanParent }) => {\n if (typeof rows === 'object' && !Array.isArray(rows)) {\n let data = '';\n Object.keys(theme.media).forEach((key) => {\n const theKey = key as keyof typeof rows & keyof typeof theme.breakpoints;\n const rowValue = rows[theKey];\n if (rowValue && Array.isArray(rowValue)) {\n const mtg = (mapTemplateGrid(rowValue) as string[]).join(' ');\n const mtgs = (mapTemplateGrid(rowValue) as string[]).map((c) => `minmax(0, ${c})`).join(' ');\n if (key === 'small') {\n data += `-ms-grid-rows: ${mtg || 'minmax(0px, 1fr)'};\n grid-template-rows: ${mtg || 'auto'};\n -ms-grid-rows: ${mtgs || 'minmax(0px, 1fr)'};\n grid-template-rows: ${mtgs || 'auto'};`;\n } else {\n data += `@media (min-width: ${theme.breakpoints[theKey]}) {\n -ms-grid-rows: ${mtg || 'minmax(0px, 1fr)'};\n grid-template-rows: ${mtg || 'auto'};\n -ms-grid-rows: ${mtgs || 'minmax(0px, 1fr)'};\n grid-template-rows: ${mtgs || 'auto'};\n }`;\n }\n } else if (!!rowValue && isSpanParent) {\n if (theKey === 'small') {\n data += `-ms-grid-rows: repeat(${rowValue}, 1fr);\n grid-template-rows: repeat(${rowValue}, 1fr);`;\n } else {\n data += `@media (min-width: ${theme.breakpoints[theKey]}) {\n -ms-grid-rows: repeat(${rowValue}, 1fr);\n grid-template-rows: repeat(${rowValue}, 1fr);\n }`;\n }\n }\n });\n return data;\n }\n if (Array.isArray(rows)) {\n const mtg = (mapTemplateGrid(rows) as string[]).join(' ');\n const mtgs = (mapTemplateGrid(rows) as string[]).map((c) => `minmax(0, ${c})`).join(' ');\n return `\n -ms-grid-rows: ${mtg || 'minmax(0px, 1fr)'};\n grid-template-rows: ${mtg || 'auto'};\n -ms-grid-rows: ${mtgs || 'minmax(0px, 1fr)'};\n grid-template-rows: ${mtgs || 'auto'};\n `;\n }\n if (isSpanParent) {\n return `\n -ms-grid-rows: repeat(${rows}, 1fr);\n grid-template-rows: repeat(${rows}, 1fr);`;\n }\n return '';\n }}\n`;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-grid",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Grid",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
11
|
-
"import": "./esm/index.js",
|
|
12
|
-
"require": "./cjs/index.js"
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
13
16
|
},
|
|
14
17
|
"./utils/styles": {
|
|
15
|
-
"import": "./esm/utils/styles.js",
|
|
16
|
-
"require": "./cjs/utils/styles.js"
|
|
18
|
+
"import": "./dist/esm/utils/styles.js",
|
|
19
|
+
"require": "./dist/cjs/utils/styles.js"
|
|
17
20
|
},
|
|
18
21
|
"./utils/constants": {
|
|
19
|
-
"import": "./esm/utils/constants.js",
|
|
20
|
-
"require": "./cjs/utils/constants.js"
|
|
22
|
+
"import": "./dist/esm/utils/constants.js",
|
|
23
|
+
"require": "./dist/cjs/utils/constants.js"
|
|
21
24
|
},
|
|
22
25
|
"./types": {
|
|
23
|
-
"import": "./esm/types.js",
|
|
24
|
-
"require": "./cjs/types.js"
|
|
26
|
+
"import": "./dist/esm/types.js",
|
|
27
|
+
"require": "./dist/cjs/types.js"
|
|
25
28
|
},
|
|
26
29
|
"./propTypes": {
|
|
27
|
-
"import": "./esm/propTypes.js",
|
|
28
|
-
"require": "./cjs/propTypes.js"
|
|
30
|
+
"import": "./dist/esm/propTypes.js",
|
|
31
|
+
"require": "./dist/cjs/propTypes.js"
|
|
29
32
|
},
|
|
30
33
|
"./GridItem": {
|
|
31
|
-
"import": "./esm/GridItem.js",
|
|
32
|
-
"require": "./cjs/GridItem.js"
|
|
34
|
+
"import": "./dist/esm/GridItem.js",
|
|
35
|
+
"require": "./dist/cjs/GridItem.js"
|
|
33
36
|
},
|
|
34
37
|
"./Grid": {
|
|
35
|
-
"import": "./esm/Grid.js",
|
|
36
|
-
"require": "./cjs/Grid.js"
|
|
38
|
+
"import": "./dist/esm/Grid.js",
|
|
39
|
+
"require": "./dist/cjs/Grid.js"
|
|
37
40
|
},
|
|
38
41
|
"./defaultProps": {
|
|
39
|
-
"import": "./esm/defaultProps.js",
|
|
40
|
-
"require": "./cjs/defaultProps.js"
|
|
42
|
+
"import": "./dist/esm/defaultProps.js",
|
|
43
|
+
"require": "./dist/cjs/defaultProps.js"
|
|
41
44
|
}
|
|
42
45
|
},
|
|
43
46
|
"sideEffects": [
|
|
@@ -49,23 +52,24 @@
|
|
|
49
52
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
50
53
|
},
|
|
51
54
|
"engines": {
|
|
52
|
-
"
|
|
53
|
-
"node": ">=
|
|
55
|
+
"pnpm": ">=6",
|
|
56
|
+
"node": ">=16"
|
|
54
57
|
},
|
|
55
58
|
"author": "ICE MT",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
59
|
+
"jestSonar": {
|
|
60
|
+
"sonar56x": true,
|
|
61
|
+
"reportPath": "reports",
|
|
62
|
+
"reportFile": "tests.xml",
|
|
63
|
+
"indent": 4
|
|
61
64
|
},
|
|
62
65
|
"dependencies": {
|
|
63
|
-
"@elliemae/ds-
|
|
64
|
-
"@
|
|
66
|
+
"@elliemae/ds-props-helpers": "3.0.0-next.13",
|
|
67
|
+
"@elliemae/ds-system": "3.0.0-next.13",
|
|
68
|
+
"@xstyled/styled-components": "~3.1.2",
|
|
65
69
|
"react-desc": "~4.1.3"
|
|
66
70
|
},
|
|
67
71
|
"devDependencies": {
|
|
68
|
-
"@testing-library/jest-dom": "~5.
|
|
72
|
+
"@testing-library/jest-dom": "~5.16.2",
|
|
69
73
|
"@testing-library/react": "~12.1.2",
|
|
70
74
|
"@testing-library/user-event": "~13.5.0",
|
|
71
75
|
"styled-components": "~5.3.3",
|
|
@@ -80,7 +84,13 @@
|
|
|
80
84
|
},
|
|
81
85
|
"publishConfig": {
|
|
82
86
|
"access": "public",
|
|
83
|
-
"
|
|
84
|
-
|
|
87
|
+
"typeSafety": false
|
|
88
|
+
},
|
|
89
|
+
"scripts": {
|
|
90
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
91
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
92
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
93
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
94
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
85
95
|
}
|
|
86
96
|
}
|