@elliemae/ds-grid 2.4.1 → 2.4.2-rc.9
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/cjs/GridItem.js +2 -2
- package/cjs/react-desc-prop-types.js +4 -1
- package/cjs/utils/constants.js +2 -0
- package/esm/GridItem.js +4 -4
- package/esm/react-desc-prop-types.js +5 -2
- package/esm/utils/constants.js +2 -1
- package/package.json +2 -2
- package/types/react-desc-prop-types.d.ts +4 -0
- package/types/tests/DSGrid.test.d.ts +1 -0
- package/types/utils/constants.d.ts +1 -0
package/cjs/GridItem.js
CHANGED
|
@@ -14,7 +14,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
14
14
|
/* eslint-disable max-lines */
|
|
15
15
|
const GridItem = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
16
16
|
componentId: "sc-1ch24x4-0"
|
|
17
|
-
})(["display:grid;display:-ms-grid;column-gap:", ";row-gap:", ";", " ", " ", " ", " ", " ", " ", " ", " ", ""], _ref => {
|
|
17
|
+
})(["display:grid;display:-ms-grid;column-gap:", ";row-gap:", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], _ref => {
|
|
18
18
|
let {
|
|
19
19
|
gutter
|
|
20
20
|
} = _ref;
|
|
@@ -24,6 +24,6 @@ const GridItem = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
24
24
|
gutter
|
|
25
25
|
} = _ref2;
|
|
26
26
|
return dsSystem.mapGap(gutter);
|
|
27
|
-
}, styledComponents.grids, styledComponents.flexboxes, styledComponents.sizing, styledComponents.space, styledComponents.height, styledComponents.width, styles.manageCols, styles.manageRows, styles.manageSpan);
|
|
27
|
+
}, styledComponents.grids, styledComponents.flexboxes, styledComponents.sizing, styledComponents.space, styledComponents.height, styledComponents.width, styles.manageCols, styles.manageRows, styles.manageSpan, styledComponents.boxShadow, dsSystem.backgroundColorSetter);
|
|
28
28
|
|
|
29
29
|
exports.GridItem = GridItem;
|
|
@@ -51,7 +51,10 @@ const DSGridPropTypes = _objectSpread(_objectSpread(_objectSpread({}, dsPropsHel
|
|
|
51
51
|
gutter: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.number, dsPropsHelpers.PropTypes.string]).description('Space between cells prop').defaultValue(0),
|
|
52
52
|
wrap: dsPropsHelpers.PropTypes.oneOf(constants.wrap).description('Wrap type').defaultValue(constants.wrap[0]),
|
|
53
53
|
height: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.number, dsPropsHelpers.PropTypes.string]).description('Grid height.'),
|
|
54
|
-
width: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.number, dsPropsHelpers.PropTypes.string]).description('Grid width.')
|
|
54
|
+
width: dsPropsHelpers.PropTypes.oneOfType([dsPropsHelpers.PropTypes.number, dsPropsHelpers.PropTypes.string]).description('Grid width.'),
|
|
55
|
+
backgroundColor: dsPropsHelpers.PropTypes.string.description('Sets background color.'),
|
|
56
|
+
bg: dsPropsHelpers.PropTypes.string.description('Sets background color.'),
|
|
57
|
+
boxShadow: dsPropsHelpers.PropTypes.oneOf(constants.boxShadow).description('Sets background color.')
|
|
55
58
|
});
|
|
56
59
|
|
|
57
60
|
exports.DSGridPropTypes = DSGridPropTypes;
|
package/cjs/utils/constants.js
CHANGED
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const justifyPlacement = ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'];
|
|
6
6
|
const alignItemsPlacement = ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'];
|
|
7
7
|
const wrap = ['wrap', 'nowrap', 'wrap-reverse'];
|
|
8
|
+
const boxShadow = ['xs', 's', 'm', 'l', 'xl'];
|
|
8
9
|
|
|
9
10
|
exports.alignItemsPlacement = alignItemsPlacement;
|
|
11
|
+
exports.boxShadow = boxShadow;
|
|
10
12
|
exports.justifyPlacement = justifyPlacement;
|
|
11
13
|
exports.wrap = wrap;
|
package/esm/GridItem.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { grids, flexboxes, sizing, space, height, width } from '@xstyled/styled-components';
|
|
3
|
-
import { mapGap } from '@elliemae/ds-system';
|
|
2
|
+
import { grids, flexboxes, sizing, space, height, width, boxShadow } from '@xstyled/styled-components';
|
|
3
|
+
import { mapGap, backgroundColorSetter } from '@elliemae/ds-system';
|
|
4
4
|
import { manageCols, manageRows, manageSpan } from './utils/styles.js';
|
|
5
5
|
|
|
6
6
|
/* eslint-disable max-lines */
|
|
7
7
|
const GridItem = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
componentId: "sc-1ch24x4-0"
|
|
9
|
-
})(["display:grid;display:-ms-grid;column-gap:", ";row-gap:", ";", " ", " ", " ", " ", " ", " ", " ", " ", ""], _ref => {
|
|
9
|
+
})(["display:grid;display:-ms-grid;column-gap:", ";row-gap:", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], _ref => {
|
|
10
10
|
let {
|
|
11
11
|
gutter
|
|
12
12
|
} = _ref;
|
|
@@ -16,6 +16,6 @@ const GridItem = /*#__PURE__*/styled.div.withConfig({
|
|
|
16
16
|
gutter
|
|
17
17
|
} = _ref2;
|
|
18
18
|
return mapGap(gutter);
|
|
19
|
-
}, grids, flexboxes, sizing, space, height, width, manageCols, manageRows, manageSpan);
|
|
19
|
+
}, grids, flexboxes, sizing, space, height, width, manageCols, manageRows, manageSpan, boxShadow, backgroundColorSetter);
|
|
20
20
|
|
|
21
21
|
export { GridItem };
|
|
@@ -5,7 +5,7 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
5
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';
|
|
8
|
-
import { alignItemsPlacement, justifyPlacement, wrap } from './utils/constants.js';
|
|
8
|
+
import { alignItemsPlacement, justifyPlacement, wrap, boxShadow } from './utils/constants.js';
|
|
9
9
|
|
|
10
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
11
|
|
|
@@ -43,7 +43,10 @@ const DSGridPropTypes = _objectSpread(_objectSpread(_objectSpread({}, globalAttr
|
|
|
43
43
|
gutter: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Space between cells prop').defaultValue(0),
|
|
44
44
|
wrap: PropTypes.oneOf(wrap).description('Wrap type').defaultValue(wrap[0]),
|
|
45
45
|
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid height.'),
|
|
46
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid width.')
|
|
46
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Grid width.'),
|
|
47
|
+
backgroundColor: PropTypes.string.description('Sets background color.'),
|
|
48
|
+
bg: PropTypes.string.description('Sets background color.'),
|
|
49
|
+
boxShadow: PropTypes.oneOf(boxShadow).description('Sets background color.')
|
|
47
50
|
});
|
|
48
51
|
|
|
49
52
|
export { DSGridPropTypes, defaultProps };
|
package/esm/utils/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const justifyPlacement = ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'];
|
|
2
2
|
const alignItemsPlacement = ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'];
|
|
3
3
|
const wrap = ['wrap', 'nowrap', 'wrap-reverse'];
|
|
4
|
+
const boxShadow = ['xs', 's', 'm', 'l', 'xl'];
|
|
4
5
|
|
|
5
|
-
export { alignItemsPlacement, justifyPlacement, wrap };
|
|
6
|
+
export { alignItemsPlacement, boxShadow, justifyPlacement, wrap };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-grid",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2-rc.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Grid",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"build": "node ../../scripts/build/build.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@elliemae/ds-system": "2.4.
|
|
59
|
+
"@elliemae/ds-system": "2.4.2-rc.9",
|
|
60
60
|
"@xstyled/styled-components": "~3.1.1",
|
|
61
61
|
"react-desc": "~4.1.3"
|
|
62
62
|
},
|
|
@@ -7,6 +7,7 @@ export declare namespace DSGridT {
|
|
|
7
7
|
medium?: string | number[];
|
|
8
8
|
large?: string | number[];
|
|
9
9
|
}
|
|
10
|
+
type Shadow = 'xs' | 's' | 'm' | 'l' | 'xs';
|
|
10
11
|
interface SpanBreakpoints {
|
|
11
12
|
small?: number;
|
|
12
13
|
medium?: number;
|
|
@@ -41,6 +42,9 @@ export declare namespace DSGridT {
|
|
|
41
42
|
isSpanParent: boolean;
|
|
42
43
|
span?: number | SpanBreakpoints;
|
|
43
44
|
ref: React.ForwardedRef<HTMLDivElement>;
|
|
45
|
+
boxShadow?: Shadow;
|
|
46
|
+
backgroundColor?: string;
|
|
47
|
+
bg?: string;
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
export declare const defaultProps: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|