@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 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 | Description | Type | Default | |
32
- |------------|-------------------------------------------|-----------------------------|---------|---|
33
- | `radius` | Border radius of the panel in pixels | `number` | `8` | |
34
- | `p` | Padding applied to the panel | `string \ number` | `8` | |
35
- | `children` | Panel content | `React.ReactNode` | - | |
36
- | `ref` | Forward ref to the underlying DOM element | `React.Ref<HTMLDivElement>` | - | |
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 standard `BoxProps` from `@rebass/grid`, including:
46
+ **Note:** Panel also accepts all `BoxProps` from `@synerise/ds-flex-box` (via `@rebass/grid`), including:
@@ -1,2 +1,6 @@
1
- export var DEFAULT_RADIUS = 8;
2
- export var DEFAULT_PADDING = 8;
1
+ const DEFAULT_RADIUS = 8;
2
+ const DEFAULT_PADDING = 8;
3
+ export {
4
+ DEFAULT_PADDING,
5
+ DEFAULT_RADIUS
6
+ };
package/dist/Panel.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import type { PanelProps } from './Panel.types';
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
- var _excluded = ["children", "radius"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React, { forwardRef } from 'react';
5
- import { DEFAULT_PADDING, DEFAULT_RADIUS } from './Panel.const';
6
- import * as S from './Panel.styles';
7
- var Panel = /*#__PURE__*/forwardRef(function (_ref, ref) {
8
- var children = _ref.children,
9
- _ref$radius = _ref.radius,
10
- radius = _ref$radius === void 0 ? DEFAULT_RADIUS : _ref$radius,
11
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
12
- return /*#__PURE__*/React.createElement(S.PanelWrapper, _extends({
13
- ref: ref,
14
- p: DEFAULT_PADDING,
15
- $radius: radius
16
- }, props), children);
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 default Panel;
21
+ export {
22
+ Panel as default
23
+ };
@@ -1,4 +1,5 @@
1
- export declare const PanelWrapper: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@synerise/ds-flex-box").BoxProps>, any, {
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>;
@@ -1,12 +1,16 @@
1
- import styled from 'styled-components';
2
- import { Box } from '@synerise/ds-flex-box';
3
- export var PanelWrapper = styled(Box).withConfig({
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;"], function (props) {
7
- return props.theme.palette.white;
8
- }, function (props) {
9
- return props.greyBackground ? "\n box-shadow: 0 4px 12px 0 rgba(35, 41, 54, 0.04);" : "\n border: solid 1px " + props.theme.palette['grey-200'] + ";";
10
- }, function (props) {
11
- return props.$radius;
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
+ };
@@ -1,5 +1,6 @@
1
- import { type BoxProps } from '@synerise/ds-flex-box';
2
- export type PanelProps = BoxProps & {
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
  };
@@ -1 +1 @@
1
- export {};
1
+
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './Panel';
1
+ import { default as default2 } from "./Panel.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
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.1",
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": "pnpm run build:js && pnpm run build:css && pnpm run defs",
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": "pnpm run build:js -- --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.0"
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": "4ffbd56e9bf6277c4507efeaf000b66b9bb09781"
46
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
45
47
  }