@synerise/ds-flex-box 1.1.4 → 1.2.0
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 +6 -0
- package/dist/Flex.d.ts +3 -0
- package/dist/Flex.js +11 -0
- package/dist/Flex.styles.d.ts +3 -0
- package/dist/Flex.styles.js +25 -0
- package/dist/Flex.types.d.ts +14 -0
- package/dist/Flex.types.js +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
# [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-flex-box@1.1.4...@synerise/ds-flex-box@1.2.0) (2026-05-22)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **modal:** migration from antd ([3588b65](https://github.com/Synerise/synerise-design/commit/3588b65fbe67838fed4ee5125090ad47d334e04b))
|
|
11
|
+
|
|
6
12
|
## [1.1.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-flex-box@1.1.3...@synerise/ds-flex-box@1.1.4) (2026-05-04)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/dist/Flex.d.ts
ADDED
package/dist/Flex.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { StyledFlex } from "./Flex.styles.js";
|
|
4
|
+
const Flex = forwardRef(({
|
|
5
|
+
gap,
|
|
6
|
+
...rest
|
|
7
|
+
}, ref) => /* @__PURE__ */ jsx(StyledFlex, { ref, $gap: gap, ...rest }));
|
|
8
|
+
Flex.displayName = "Flex";
|
|
9
|
+
export {
|
|
10
|
+
Flex
|
|
11
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Flex } from "@rebass/grid";
|
|
3
|
+
const resolveGap = (gap, space) => {
|
|
4
|
+
if (gap === void 0) {
|
|
5
|
+
return void 0;
|
|
6
|
+
}
|
|
7
|
+
if (typeof gap === "string") {
|
|
8
|
+
return gap;
|
|
9
|
+
}
|
|
10
|
+
const scaled = space?.[gap];
|
|
11
|
+
return `${scaled ?? gap}px`;
|
|
12
|
+
};
|
|
13
|
+
const StyledFlex = /* @__PURE__ */ styled(Flex).withConfig({
|
|
14
|
+
displayName: "Flexstyles__StyledFlex",
|
|
15
|
+
componentId: "sc-2ccfg7-0"
|
|
16
|
+
})(["", ""], ({
|
|
17
|
+
$gap,
|
|
18
|
+
theme
|
|
19
|
+
}) => {
|
|
20
|
+
const value = resolveGap($gap, theme?.space);
|
|
21
|
+
return value ? `gap: ${value};` : "";
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
StyledFlex
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FlexProps as RebassFlexProps } from '@rebass/grid';
|
|
2
|
+
export type FlexProps = RebassFlexProps & {
|
|
3
|
+
/**
|
|
4
|
+
* CSS `gap` between flex items.
|
|
5
|
+
*
|
|
6
|
+
* - `number` — index into the theme's `space` scale
|
|
7
|
+
* (e.g. `gap={2}` resolves to `12px` with the default scale
|
|
8
|
+
* `[0, 8, 12, 16, 24, 32, 48, 64]`). Out-of-range values fall back to `${gap}px`.
|
|
9
|
+
* - `string` — passed through verbatim (e.g. `gap="1rem"`, `gap="8px 16px"`).
|
|
10
|
+
*
|
|
11
|
+
* Omit to leave the property unset.
|
|
12
|
+
*/
|
|
13
|
+
gap?: number | string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-flex-box",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "FlexBox UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/rebass__grid": "^6.0.14"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "f257f56d8991010593efd5ea9915335e813671a6"
|
|
56
56
|
}
|