@elliemae/ds-grid 3.0.0-next.45 → 3.0.0-next.48

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 CHANGED
@@ -21,7 +21,6 @@ var __spreadValues = (a, b) => {
21
21
  return a;
22
22
  };
23
23
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
24
  var __objRest = (source, exclude) => {
26
25
  var target = {};
27
26
  for (var prop in source)
@@ -38,28 +37,23 @@ var __export = (target, all) => {
38
37
  for (var name in all)
39
38
  __defProp(target, name, { get: all[name], enumerable: true });
40
39
  };
41
- var __reExport = (target, module2, copyDefault, desc) => {
42
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
43
- for (let key of __getOwnPropNames(module2))
44
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
45
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
40
+ var __copyProps = (to, from, except, desc) => {
41
+ if (from && typeof from === "object" || typeof from === "function") {
42
+ for (let key of __getOwnPropNames(from))
43
+ if (!__hasOwnProp.call(to, key) && key !== except)
44
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
45
  }
47
- return target;
48
- };
49
- var __toESM = (module2, isNodeMode) => {
50
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
46
+ return to;
51
47
  };
52
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
53
- return (module2, temp) => {
54
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
55
- };
56
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
48
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
49
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57
50
  var Grid_exports = {};
58
51
  __export(Grid_exports, {
59
52
  DSGridWithSchema: () => DSGridWithSchema,
60
53
  Grid: () => Grid,
61
54
  default: () => Grid_default
62
55
  });
56
+ module.exports = __toCommonJS(Grid_exports);
63
57
  var React = __toESM(require("react"));
64
58
  var import_react = __toESM(require("react"));
65
59
  var import_ds_utilities = require("@elliemae/ds-utilities");
@@ -105,5 +99,4 @@ Grid.propTypes = import_react_desc_prop_types.DSGridPropTypes;
105
99
  const DSGridWithSchema = (0, import_ds_utilities.describe)(Grid);
106
100
  DSGridWithSchema.propTypes = import_react_desc_prop_types.DSGridPropTypes;
107
101
  var Grid_default = Grid;
108
- module.exports = __toCommonJS(Grid_exports);
109
102
  //# sourceMappingURL=Grid.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Grid.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAAuD;AACvD,oBAAoB;AACpB,uBAA+B;AAC/B,mCAAuD;AACvD,sBAAyB;AAEzB,MAAM,OAAO,qBAAM,WAA0C,CAAC,OAAO,QAAQ;AAC3E,QAA8C,YAAtC,eAAsC,IAAzB,iCAAyB,IAAzB,CAAb;AACR,QAAM,oBAAoB,sDAA6B,sBAAsB,yCAAY;AAEzF,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,QAA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AAM,OAAO,WAAoB,IAAT,iBAAS,IAAT,CAA5E,QAAM,QAAM,cAAY,aAAW,WAAS,UAAQ,QAAM,SAAO;AAEzE,MAAI,eAAe;AAEnB,QAAM,iBAAiB,qBAAM,SAAS,IAAI,UAAU,CAAC,UAA2B;AAC9E,QACE,uBAAI,OAAO,iBAAiB,MAAM,UAClC,uBAAI,OAAO,kBAAkB,MAAM,UACnC,SAAS,uBAAI,OAAO,cAAc,CAAC,GAAa,EAAE,IAAI,GACtD;AACA,YAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAU,MAA6B;AACtE,UAAI,CAAC;AAAM,uBAAe;AAE1B,aAAO,qBAAM,aAAa,OAA6B,iCACjD,MAA6B,QADoB;AAAA,QAErD,OAAO,qCAAe,EAAE;AAAA,QACxB,QAAQ,qCAAe,EAAE;AAAA,MAC3B,EAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT,CAAC;AAED,SACE,mDAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,qBAAM,SAAS,MAAM,QAAQ;AAAA,IAC1C;AAAA,KACI,OAXL;AAAA,IAYC,GAAG;AAAA,IACH,GAAG;AAAA,MAEF,cACH;AAEJ,CAAC;AAGD,KAAK,cAAc;AAEnB,KAAK,YAAY;AACjB,MAAM,mBAAmB,kCAAS,IAAI;AACtC,iBAAiB,YAAY;AAE7B,IAAO,eAAQ;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var GridItem_exports = {};
29
22
  __export(GridItem_exports, {
30
23
  GridItem: () => GridItem
31
24
  });
25
+ module.exports = __toCommonJS(GridItem_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_styled_components = __toESM(require("styled-components"));
34
28
  var import_styled_components2 = require("@xstyled/styled-components");
@@ -51,5 +45,4 @@ const GridItem = import_styled_components.default.div`
51
45
  ${import_styled_components2.boxShadow}
52
46
  ${import_ds_system.backgroundColorSetter}
53
47
  `;
54
- module.exports = __toCommonJS(GridItem_exports);
55
48
  //# sourceMappingURL=GridItem.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/GridItem.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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 boxShadow,\n} from '@xstyled/styled-components';\nimport { mapGap, backgroundColorSetter } 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 ${boxShadow}\n ${backgroundColorSetter}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,+BAAmB;AACnB,gCAWO;AACP,uBAA8C;AAC9C,oBAAmD;AAG5C,MAAM,WAAW,iCAAO;AAAA;AAAA;AAAA,gBAGf,CAAC,EAAE,aAAa,6BAAO,MAAM;AAAA,aAChC,CAAC,EAAE,aAAa,6BAAO,MAAM;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,+BAAmB;AACnB,gCAWO;AACP,uBAA8C;AAC9C,oBAAmD;AAG5C,MAAM,WAAW,iCAAO;AAAA;AAAA;AAAA,gBAGf,CAAC,EAAE,aAAa,6BAAO,MAAM;AAAA,aAChC,CAAC,EAAE,aAAa,6BAAO,MAAM;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var src_exports = {};
29
22
  __export(src_exports, {
30
23
  DSGridWithSchema: () => import_Grid.DSGridWithSchema,
@@ -33,7 +26,7 @@ __export(src_exports, {
33
26
  GridItem: () => import_Grid.default,
34
27
  default: () => import_Grid.default
35
28
  });
29
+ module.exports = __toCommonJS(src_exports);
36
30
  var React = __toESM(require("react"));
37
31
  var import_Grid = __toESM(require("./Grid"));
38
- module.exports = __toCommonJS(src_exports);
39
32
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kBAA+F;",
6
6
  "names": []
7
7
  }
@@ -21,32 +21,26 @@ var __spreadValues = (a, b) => {
21
21
  return a;
22
22
  };
23
23
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
24
  var __export = (target, all) => {
26
25
  for (var name in all)
27
26
  __defProp(target, name, { get: all[name], enumerable: true });
28
27
  };
29
- var __reExport = (target, module2, copyDefault, desc) => {
30
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
31
- for (let key of __getOwnPropNames(module2))
32
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
33
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
33
  }
35
- return target;
34
+ return to;
36
35
  };
37
- var __toESM = (module2, isNodeMode) => {
38
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
39
- };
40
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
41
- return (module2, temp) => {
42
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
43
- };
44
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
45
38
  var react_desc_prop_types_exports = {};
46
39
  __export(react_desc_prop_types_exports, {
47
40
  DSGridPropTypes: () => DSGridPropTypes,
48
41
  defaultProps: () => defaultProps
49
42
  });
43
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
50
44
  var React = __toESM(require("react"));
51
45
  var import_ds_utilities = require("@elliemae/ds-utilities");
52
46
  var import_constants = require("./utils/constants");
@@ -91,5 +85,4 @@ const DSGridPropTypes = __spreadProps(__spreadValues(__spreadValues({}, import_d
91
85
  bg: import_ds_utilities.PropTypes.string.description("Sets background color."),
92
86
  boxShadow: import_ds_utilities.PropTypes.oneOf(import_constants.boxShadow).description("Sets background color.")
93
87
  });
94
- module.exports = __toCommonJS(react_desc_prop_types_exports);
95
88
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React, { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\nimport { alignItemsPlacement, justifyPlacement, wrap, boxShadow } 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 type Shadow = 'xs' | 's' | 'm' | 'l' | 'xs';\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 boxShadow?: Shadow;\n backgroundColor?: string;\n bg?: string;\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 backgroundColor: PropTypes.string.description('Sets background color.'),\n bg: PropTypes.string.description('Sets background color.'),\n boxShadow: PropTypes.oneOf(boxShadow).description('Sets background color.'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAMO;AACP,uBAAuE;AAqDhE,MAAM,eAAe;AAAA,EAC1B,MAAM,CAAC;AAAA,EACP,MAAM,CAAC;AAAA,EACP,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AACR;AAKA,MAAM,oBAAoB,8BAAU,MAAM;AAAA,EACxC,OAAO,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AAAA,EAClF,QAAQ,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AAAA,EACnF,OAAO,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,kBAAkB,8BAAU,MAAM;AAAA,EACtC,OAAO,8BAAU;AAAA,EACjB,QAAQ,8BAAU;AAAA,EAClB,OAAO,8BAAU;AACnB,CAAC;AAEM,MAAM,kBAAkB,gDAC1B,gDACA,uCAF0B;AAAA,EAG7B,MAAM,8BAAU,UAAU;AAAA,IACxB,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AAAA,IAC3E;AAAA,EACF,CAAC,EACE,YAAY,kBAAkB,EAC9B,aAAa,C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WAAW,EAAE,aAAa,EAAE;AAAA,EACpE,gBAAgB,8BAAU,MAAM,iCAAgB,EAC7C,YAAY,wBAAwB,EACpC,aAAa,kCAAiB,EAAE;AAAA,EACnC,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAC7D,YAAY,0BAA0B,EACtC,aAAa,CAAC;AAAA,EACjB,MAAM,8BAAU,MAAM,qBAAI,EAAE,YAAY,WAAW,EAAE,aAAa,sBAAK,EAAE;AAAA,EACzE,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAAY,cAAc;AAAA,EAC5F,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAAY,aAAa;AAAA,EAC1F,iBAAiB,8BAAU,OAAO,YAAY,wBAAwB;AAAA,EACtE,IAAI,8BAAU,OAAO,YAAY,wBAAwB;AAAA,EACzD,WAAW,8BAAU,MAAM,0BAAS,EAAE,YAAY,wBAAwB;AAC5E;",
6
6
  "names": []
7
7
  }
package/dist/cjs/types.js CHANGED
@@ -4,24 +4,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
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 });
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from))
10
+ if (!__hasOwnProp.call(to, key) && key !== except)
11
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
12
  }
14
- return target;
13
+ return to;
15
14
  };
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);
15
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
16
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
17
  var types_exports = {};
25
- var React = __toESM(require("react"));
26
18
  module.exports = __toCommonJS(types_exports);
19
+ var React = __toESM(require("react"));
27
20
  //# sourceMappingURL=types.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var constants_exports = {};
29
22
  __export(constants_exports, {
30
23
  alignItemsPlacement: () => alignItemsPlacement,
@@ -32,10 +25,10 @@ __export(constants_exports, {
32
25
  justifyPlacement: () => justifyPlacement,
33
26
  wrap: () => wrap
34
27
  });
28
+ module.exports = __toCommonJS(constants_exports);
35
29
  var React = __toESM(require("react"));
36
30
  const justifyPlacement = ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"];
37
31
  const alignItemsPlacement = ["flex-start", "center", "flex-end", "stretch", "baseline"];
38
32
  const wrap = ["wrap", "nowrap", "wrap-reverse"];
39
33
  const boxShadow = ["xs", "s", "m", "l", "xl"];
40
- module.exports = __toCommonJS(constants_exports);
41
34
  //# sourceMappingURL=constants.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/constants.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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\nexport const boxShadow = ['xs', 's', 'm', 'l', 'xl'];\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB,CAAC,cAAc,UAAU,YAAY,iBAAiB,gBAAgB,cAAc;AAE7G,MAAM,sBAAsB,CAAC,cAAc,UAAU,YAAY,WAAW,UAAU;AAEtF,MAAM,OAAO,CAAC,QAAQ,UAAU,cAAc;AAE9C,MAAM,YAAY,CAAC,MAAM,KAAK,KAAK,KAAK,IAAI;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB,CAAC,cAAc,UAAU,YAAY,iBAAiB,gBAAgB,cAAc;AAE7G,MAAM,sBAAsB,CAAC,cAAc,UAAU,YAAY,WAAW,UAAU;AAEtF,MAAM,OAAO,CAAC,QAAQ,UAAU,cAAc;AAE9C,MAAM,YAAY,CAAC,MAAM,KAAK,KAAK,KAAK,IAAI;",
6
6
  "names": []
7
7
  }
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var styles_exports = {};
29
22
  __export(styles_exports, {
30
23
  manageCols: () => manageCols,
31
24
  manageRows: () => manageRows,
32
25
  manageSpan: () => manageSpan
33
26
  });
27
+ module.exports = __toCommonJS(styles_exports);
34
28
  var React = __toESM(require("react"));
35
29
  var import_ds_system = require("@elliemae/ds-system");
36
30
  const manageSpan = import_ds_system.css`
@@ -174,5 +168,4 @@ const manageRows = import_ds_system.css`
174
168
  return "";
175
169
  }}
176
170
  `;
177
- module.exports = __toCommonJS(styles_exports);
178
171
  //# sourceMappingURL=styles.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,uBAAqC;AAG9B,MAAM,aAAa;AAAA,IACtB,CAAC,EAAE,cAAc,MAAM,YAAY;AACnC,MAAI,CAAC;AAAc,WAAO;AAE1B,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,uCAC0B;AAAA,mCACJ;AAAA,EAC/B;AAEA,MAAI,OAAO,SAAS;AAAU,WAAO;AAIrC,MAAI,OAAO;AACX,SAAO,KAAK,MAAM,KAAK,EAAE,QAAQ,CAAC,QAAQ;AAExC,UAAM,SAAS;AACf,UAAM,YAAY,KAAK;AAEvB,QAAI,CAAC,C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AA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-grid",
3
- "version": "3.0.0-next.45",
3
+ "version": "3.0.0-next.48",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Grid",
6
6
  "files": [
@@ -63,14 +63,14 @@
63
63
  "indent": 4
64
64
  },
65
65
  "dependencies": {
66
- "@elliemae/ds-system": "3.0.0-next.29",
67
- "@elliemae/ds-utilities": "3.0.0-next.45",
66
+ "@elliemae/ds-system": "3.0.0-next.48",
67
+ "@elliemae/ds-utilities": "3.0.0-next.48",
68
68
  "@xstyled/styled-components": "~3.1.2",
69
69
  "react-desc": "~4.1.3"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@testing-library/jest-dom": "~5.16.2",
73
- "@testing-library/react": "~12.1.2",
73
+ "@testing-library/react": "~12.1.4",
74
74
  "@testing-library/user-event": "~13.5.0",
75
75
  "styled-components": "~5.3.3",
76
76
  "styled-system": "~5.1.5"