@synerise/ds-flex-box 1.1.3 → 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 CHANGED
@@ -3,6 +3,18 @@
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
+
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)
13
+
14
+ ### Bug Fixes
15
+
16
+ - add exports field to all component packages for correct ESM detection ([6eccfde](https://github.com/Synerise/synerise-design/commit/6eccfde8f2dd73c59860793231fbd7bcd61813b4))
17
+
6
18
  ## [1.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-flex-box@1.1.2...@synerise/ds-flex-box@1.1.3) (2026-04-10)
7
19
 
8
20
  **Note:** Version bump only for package @synerise/ds-flex-box
package/dist/Flex.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { FlexProps } from './Flex.types';
3
+ export declare const Flex: React.ForwardRefExoticComponent<Omit<FlexProps, "ref"> & React.RefAttributes<HTMLElement>>;
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,3 @@
1
+ export declare const StyledFlex: import('styled-components').StyledComponent<import('react').FunctionComponent<import('@rebass/grid').FlexProps>, any, {
2
+ $gap?: number | string;
3
+ }, never>;
@@ -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
@@ -1 +1,3 @@
1
- export { Flex, Box, type BoxProps, type FlexProps } from '@rebass/grid';
1
+ export { Box, type BoxProps } from '@rebass/grid';
2
+ export { Flex } from './Flex';
3
+ export { type FlexProps } from './Flex.types';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- import { Box, Flex } from "@rebass/grid";
1
+ import { Box } from "@rebass/grid";
2
+ import { Flex } from "./Flex.js";
2
3
  export {
3
4
  Box,
4
5
  Flex
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@synerise/ds-flex-box",
3
- "version": "1.1.3",
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",
7
7
  "main": "dist/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./dist/*.js": "./dist/*.js",
15
+ "./dist/*": "./dist/*.js"
16
+ },
8
17
  "files": [
9
18
  "/dist",
10
19
  "CHANGELOG.md",
@@ -43,5 +52,5 @@
43
52
  "devDependencies": {
44
53
  "@types/rebass__grid": "^6.0.14"
45
54
  },
46
- "gitHead": "ce3c6d75efe8573a2b274853636f959b75a6cd32"
55
+ "gitHead": "f257f56d8991010593efd5ea9915335e813671a6"
47
56
  }