@synerise/ds-grid 0.3.77 → 0.4.1
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 +19 -0
- package/dist/Grid.d.ts +1 -1
- package/dist/Grid.js +3 -6
- package/dist/Grid.types.d.ts +1 -0
- package/dist/GridItem/GridItem.d.ts +1 -1
- package/dist/GridItem/GridItem.js +2 -10
- package/dist/modules.d.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.4.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.4.0...@synerise/ds-grid@0.4.1) (2025-02-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-grid
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.3.77...@synerise/ds-grid@0.4.0) (2025-01-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* antd@4.24 react@18 ([d97a667](https://github.com/Synerise/synerise-design/commit/d97a667b1f33aed3177e1851de3b6f60be2d46a6))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.3.77](https://github.com/Synerise/synerise-design/compare/@synerise/ds-grid@0.3.76...@synerise/ds-grid@0.3.77) (2024-11-21)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-grid
|
package/dist/Grid.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export declare const GridContext: React.Context<{
|
|
|
9
9
|
export declare const DEFAULT_COLUMNS_NUMBER = 24;
|
|
10
10
|
declare const Grid: {
|
|
11
11
|
({ children, gutter, style }: GridProps): React.JSX.Element;
|
|
12
|
-
Item:
|
|
12
|
+
Item: ({ children, contentWrapper, ...props }: import("./Grid.types").GridItemProps) => React.JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
export default Grid;
|
package/dist/Grid.js
CHANGED
|
@@ -10,14 +10,12 @@ export var GridContext = React.createContext({
|
|
|
10
10
|
});
|
|
11
11
|
var DEFAULT_GUTTER = 24;
|
|
12
12
|
export var DEFAULT_COLUMNS_NUMBER = 24;
|
|
13
|
-
|
|
14
13
|
var Grid = function Grid(_ref) {
|
|
15
14
|
var _breakpointData$break;
|
|
16
|
-
|
|
17
15
|
var children = _ref.children,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
_ref$gutter = _ref.gutter,
|
|
17
|
+
gutter = _ref$gutter === void 0 ? DEFAULT_GUTTER : _ref$gutter,
|
|
18
|
+
style = _ref.style;
|
|
21
19
|
var breakpointData = useBreakpoint();
|
|
22
20
|
return /*#__PURE__*/React.createElement(S.GridContainer, {
|
|
23
21
|
style: style,
|
|
@@ -28,6 +26,5 @@ var Grid = function Grid(_ref) {
|
|
|
28
26
|
value: breakpointData
|
|
29
27
|
}, children));
|
|
30
28
|
};
|
|
31
|
-
|
|
32
29
|
Grid.Item = Item;
|
|
33
30
|
export default Grid;
|
package/dist/Grid.types.d.ts
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
var _excluded = ["children", "contentWrapper"];
|
|
2
|
-
|
|
3
2
|
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; }
|
|
4
|
-
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import * as S from '../Grid.styles';
|
|
7
5
|
import { DEFAULT_COLUMNS_NUMBER, GridContext } from '../Grid';
|
|
8
6
|
var BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
|
9
|
-
|
|
10
7
|
var Item = function Item(_ref) {
|
|
11
8
|
var _breakpointData$break2;
|
|
12
|
-
|
|
13
9
|
var children = _ref.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
contentWrapper = _ref.contentWrapper,
|
|
11
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
17
12
|
var breakpointData = React.useContext(GridContext);
|
|
18
13
|
var definedBreakpoints = React.useMemo(function () {
|
|
19
14
|
return BREAKPOINTS.filter(function (breakpoint) {
|
|
@@ -35,12 +30,10 @@ var Item = function Item(_ref) {
|
|
|
35
30
|
});
|
|
36
31
|
return nextAvailableBreakpoint ? props[nextAvailableBreakpoint.name] : undefined;
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
return undefined;
|
|
40
34
|
}, [breakpointData.breakpoint, definedBreakpoints, props]);
|
|
41
35
|
var getColumns = React.useMemo(function () {
|
|
42
36
|
var _breakpointData$break;
|
|
43
|
-
|
|
44
37
|
if (breakpointColumns !== undefined) return breakpointColumns;
|
|
45
38
|
return ((_breakpointData$break = breakpointData.breakpoint) == null ? void 0 : _breakpointData$break.columns) || DEFAULT_COLUMNS_NUMBER;
|
|
46
39
|
}, [breakpointColumns, breakpointData]);
|
|
@@ -51,5 +44,4 @@ var Item = function Item(_ref) {
|
|
|
51
44
|
contentWrapper: Boolean(contentWrapper)
|
|
52
45
|
}, children);
|
|
53
46
|
};
|
|
54
|
-
|
|
55
47
|
export default Item;
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-grid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Grid UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-utils": "^0.
|
|
37
|
+
"@synerise/ds-utils": "^0.32.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@synerise/ds-core": "*",
|
|
41
|
-
"react": ">=16.9.0 <=
|
|
42
|
-
"styled-components": "5.
|
|
41
|
+
"react": ">=16.9.0 <= 18.3.1",
|
|
42
|
+
"styled-components": "^5.3.3"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "38cb22e1c46d175306dd87e10649410eb93a4e44"
|
|
45
45
|
}
|