@synerise/ds-grid 0.3.1 → 0.3.5
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/CHANGELOG.md +32 -0
- package/dist/Grid.js +2 -2
- package/dist/Grid.styles.js +2 -2
- package/dist/GridItem/GridItem.js +3 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.3.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.3.4...@synerise/ds-grid@0.3.5) (2021-12-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-grid
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.3.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.3.3...@synerise/ds-grid@0.3.4) (2021-11-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-grid
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.3.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.3.2...@synerise/ds-grid@0.3.3) (2021-11-22)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @synerise/ds-grid
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.3.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.3.1...@synerise/ds-grid@0.3.2) (2021-11-16)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @synerise/ds-grid
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.3.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.2.42...@synerise/ds-grid@0.3.1) (2021-11-09)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @synerise/ds-grid
|
package/dist/Grid.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { useBreakpoint } from '@synerise/ds-utils';
|
|
3
3
|
import * as S from './Grid.styles';
|
|
4
4
|
import Item from './GridItem/GridItem';
|
|
5
|
-
export var GridContext =
|
|
5
|
+
export var GridContext = React.createContext({
|
|
6
6
|
dimensions: {
|
|
7
7
|
width: window.innerWidth,
|
|
8
8
|
height: window.innerHeight
|
|
@@ -22,7 +22,7 @@ var Grid = function Grid(_ref) {
|
|
|
22
22
|
return /*#__PURE__*/React.createElement(S.GridContainer, {
|
|
23
23
|
style: style,
|
|
24
24
|
className: "ds-grid",
|
|
25
|
-
columns: ((_breakpointData$break = breakpointData.breakpoint)
|
|
25
|
+
columns: ((_breakpointData$break = breakpointData.breakpoint) == null ? void 0 : _breakpointData$break.columns) || DEFAULT_COLUMNS_NUMBER,
|
|
26
26
|
gutter: gutter
|
|
27
27
|
}, /*#__PURE__*/React.createElement(GridContext.Provider, {
|
|
28
28
|
value: breakpointData
|
package/dist/Grid.styles.js
CHANGED
|
@@ -5,9 +5,9 @@ export var GridContainer = styled.div.withConfig({
|
|
|
5
5
|
})(["width:100%;display:grid;grid-template-columns:repeat(", ",1fr);grid-row-gap:", ";grid-column-gap:", ";"], function (props) {
|
|
6
6
|
return props.columns;
|
|
7
7
|
}, function (props) {
|
|
8
|
-
return
|
|
8
|
+
return props.gutter + "px";
|
|
9
9
|
}, function (props) {
|
|
10
|
-
return
|
|
10
|
+
return props.gutter + "px";
|
|
11
11
|
});
|
|
12
12
|
export var GridItem = styled.div.withConfig({
|
|
13
13
|
displayName: "Gridstyles__GridItem",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var _excluded = ["children", "contentWrapper"];
|
|
2
2
|
|
|
3
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
|
|
5
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
4
|
|
|
7
5
|
import * as React from 'react';
|
|
@@ -14,7 +12,7 @@ var Item = function Item(_ref) {
|
|
|
14
12
|
|
|
15
13
|
var children = _ref.children,
|
|
16
14
|
contentWrapper = _ref.contentWrapper,
|
|
17
|
-
props =
|
|
15
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
18
16
|
|
|
19
17
|
var breakpointData = React.useContext(GridContext);
|
|
20
18
|
var definedBreakpoints = React.useMemo(function () {
|
|
@@ -44,12 +42,12 @@ var Item = function Item(_ref) {
|
|
|
44
42
|
var _breakpointData$break;
|
|
45
43
|
|
|
46
44
|
if (breakpointColumns !== undefined) return breakpointColumns;
|
|
47
|
-
return ((_breakpointData$break = breakpointData.breakpoint)
|
|
45
|
+
return ((_breakpointData$break = breakpointData.breakpoint) == null ? void 0 : _breakpointData$break.columns) || DEFAULT_COLUMNS_NUMBER;
|
|
48
46
|
}, [breakpointColumns, breakpointData]);
|
|
49
47
|
return /*#__PURE__*/React.createElement(S.GridItem, {
|
|
50
48
|
className: "ds-grid-item",
|
|
51
49
|
columns: getColumns,
|
|
52
|
-
maxColumns: (breakpointData
|
|
50
|
+
maxColumns: (breakpointData == null ? void 0 : (_breakpointData$break2 = breakpointData.breakpoint) == null ? void 0 : _breakpointData$break2.columns) || getColumns,
|
|
53
51
|
contentWrapper: Boolean(contentWrapper)
|
|
54
52
|
}, children);
|
|
55
53
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-grid",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Grid UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-utils": "^0.21.
|
|
35
|
+
"@synerise/ds-utils": "^0.21.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@synerise/ds-core": "*",
|
|
39
39
|
"react": ">=16.9.0 < 17.0.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "7ddae11318ca2906145c9f48e74df41ca5f15d49"
|
|
42
42
|
}
|