@synerise/ds-panel 1.2.1 → 1.2.3
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 +11 -0
- package/README.md +14 -7
- package/dist/Panel.const.js +6 -2
- package/dist/Panel.d.ts +2 -2
- package/dist/Panel.js +22 -17
- package/dist/Panel.styles.d.ts +2 -1
- package/dist/Panel.styles.js +14 -10
- package/dist/Panel.types.d.ts +3 -2
- package/dist/Panel.types.js +1 -1
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-panel@1.2.2...@synerise/ds-panel@1.2.3) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-panel
|
|
9
|
+
|
|
10
|
+
## [1.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-panel@1.2.1...@synerise/ds-panel@1.2.2) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- panel regressions ([c88aad5](https://github.com/Synerise/synerise-design/commit/c88aad5c4584a172c41c50dd8d64e5f86784de65))
|
|
15
|
+
- **panel:** add lebel above ([0c9606b](https://github.com/Synerise/synerise-design/commit/0c9606bb99acb5848b7434b5b3d689fcf70f82ae))
|
|
16
|
+
|
|
6
17
|
## [1.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-panel@1.2.0...@synerise/ds-panel@1.2.1) (2026-02-26)
|
|
7
18
|
|
|
8
19
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ Panel UI Component
|
|
|
10
10
|
npm i @synerise/ds-panel
|
|
11
11
|
or
|
|
12
12
|
yarn add @synerise/ds-panel
|
|
13
|
+
or
|
|
14
|
+
pnpm add @synerise/ds-panel
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## Usage
|
|
@@ -28,12 +30,17 @@ import Panel from '@synerise/ds-panel'
|
|
|
28
30
|
|
|
29
31
|
### PanelProps
|
|
30
32
|
|
|
31
|
-
| Property
|
|
32
|
-
|
|
33
|
-
| `radius`
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
33
|
+
| Property | Description | Type | Default |
|
|
34
|
+
|-------------------|--------------------------------------------------------------------------------------------------|-----------------------------|-------------|
|
|
35
|
+
| `radius` | Border radius of the panel in pixels | `number` | `8` |
|
|
36
|
+
| `greyBackground` | When `true`, renders with a drop shadow instead of a border | `boolean` | - |
|
|
37
|
+
| `label` | Label text/node rendered above the panel via `FormFieldLabel` | `React.ReactNode` | - |
|
|
38
|
+
| `tooltip` | Tooltip content shown next to the label | `React.ReactNode` | - |
|
|
39
|
+
| `tooltipConfig` | Extra configuration for the label tooltip | `TooltipProps` | - |
|
|
40
|
+
| `children` | Panel content | `React.ReactNode` | - |
|
|
41
|
+
| `className` | CSS class applied to the outer wrapper div | `string` | - |
|
|
42
|
+
| `style` | Inline styles applied to the outer wrapper div | `React.CSSProperties` | - |
|
|
37
43
|
|
|
44
|
+
The component uses `forwardRef` — pass a `ref` to access the outer `div` element.
|
|
38
45
|
|
|
39
|
-
**Note:** Panel also accepts all
|
|
46
|
+
**Note:** Panel also accepts all `BoxProps` from `@synerise/ds-flex-box` (via `@rebass/grid`), including:
|
package/dist/Panel.const.js
CHANGED
package/dist/Panel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PanelProps } from './Panel.types';
|
|
3
3
|
declare const Panel: React.ForwardRefExoticComponent<Omit<PanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default Panel;
|
package/dist/Panel.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { FormFieldLabel } from "@synerise/ds-form-field";
|
|
4
|
+
import { DEFAULT_RADIUS, DEFAULT_PADDING } from "./Panel.const.js";
|
|
5
|
+
import { PanelContainer, PanelWrapper } from "./Panel.styles.js";
|
|
6
|
+
const Panel = forwardRef(({
|
|
7
|
+
children,
|
|
8
|
+
radius = DEFAULT_RADIUS,
|
|
9
|
+
label,
|
|
10
|
+
tooltip,
|
|
11
|
+
tooltipConfig,
|
|
12
|
+
className,
|
|
13
|
+
style,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
return /* @__PURE__ */ jsxs(PanelContainer, { ref, className, style, children: [
|
|
17
|
+
label && /* @__PURE__ */ jsx(FormFieldLabel, { label, tooltip, tooltipConfig }),
|
|
18
|
+
/* @__PURE__ */ jsx(PanelWrapper, { p: DEFAULT_PADDING, $radius: radius, ...props, children })
|
|
19
|
+
] });
|
|
17
20
|
});
|
|
18
|
-
export
|
|
21
|
+
export {
|
|
22
|
+
Panel as default
|
|
23
|
+
};
|
package/dist/Panel.styles.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const PanelWrapper: import(
|
|
1
|
+
export declare const PanelWrapper: import('styled-components').StyledComponent<import('react').FunctionComponent<import('@synerise/ds-flex-box').BoxProps>, any, {
|
|
2
2
|
$radius: number;
|
|
3
3
|
greyBackground?: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
+
export declare const PanelContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/Panel.styles.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { Box } from
|
|
3
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Box } from "@synerise/ds-flex-box";
|
|
3
|
+
const PanelWrapper = /* @__PURE__ */ styled(Box).withConfig({
|
|
4
4
|
displayName: "Panelstyles__PanelWrapper",
|
|
5
5
|
componentId: "sc-xt9txn-0"
|
|
6
|
-
})(["background-color:", ";", " border-radius:", "px;"],
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
6
|
+
})(["background-color:", ";", " border-radius:", "px;"], (props) => props.theme.palette.white, (props) => props.greyBackground ? `
|
|
7
|
+
box-shadow: 0 4px 12px 0 rgba(35, 41, 54, 0.04);` : `
|
|
8
|
+
border: solid 1px ${props.theme.palette["grey-200"]};`, (props) => props.$radius);
|
|
9
|
+
const PanelContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
10
|
+
displayName: "Panelstyles__PanelContainer",
|
|
11
|
+
componentId: "sc-xt9txn-1"
|
|
12
|
+
})(["display:flex;gap:8px;flex-direction:column;"]);
|
|
13
|
+
export {
|
|
14
|
+
PanelContainer,
|
|
15
|
+
PanelWrapper
|
|
16
|
+
};
|
package/dist/Panel.types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BoxProps } from '@synerise/ds-flex-box';
|
|
2
|
+
import { BaseLabelProps } from '@synerise/ds-form-field';
|
|
3
|
+
export type PanelProps = Omit<BoxProps, 'label'> & BaseLabelProps & {
|
|
3
4
|
radius?: number;
|
|
4
5
|
greyBackground?: boolean;
|
|
5
6
|
};
|
package/dist/Panel.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-panel",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Panel UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"prepublish": "pnpm run build",
|
|
25
25
|
"types": "tsc --noEmit",
|
|
@@ -35,11 +35,13 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-flex-box": "^1.1.
|
|
38
|
+
"@synerise/ds-flex-box": "^1.1.2",
|
|
39
|
+
"@synerise/ds-form-field": "^1.3.10"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"@synerise/ds-core": "*",
|
|
42
|
-
"react": ">=16.9.0 <= 18.3.1"
|
|
43
|
+
"react": ">=16.9.0 <= 18.3.1",
|
|
44
|
+
"styled-components": "^5.3.3"
|
|
43
45
|
},
|
|
44
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
45
47
|
}
|