@synerise/ds-sidebar 2.0.12 → 2.1.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 +11 -0
- package/CLAUDE.md +1 -1
- package/dist/Collapse/Collapse.styles.d.ts +1 -1
- package/dist/Collapse/Collapse.styles.js +4 -4
- package/dist/DragOverlayPanel/DragOverlayPanel.js +2 -3
- package/dist/PanelContent/PanelContent.js +1 -2
- package/dist/Sidebar.js +2 -4
- package/dist/Sidebar.styles.js +2 -2
- package/dist/SidebarWithButton/SidebarWithButton.styles.js +1 -1
- package/package.json +8 -8
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
|
+
# [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sidebar@2.0.12...@synerise/ds-sidebar@2.1.0) (2026-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.0.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sidebar@2.0.11...@synerise/ds-sidebar@2.0.12) (2026-10-28)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-sidebar
|
package/CLAUDE.md
CHANGED
|
@@ -101,7 +101,7 @@ import Sidebar from '@synerise/ds-sidebar';
|
|
|
101
101
|
|
|
102
102
|
## Styling
|
|
103
103
|
|
|
104
|
-
`StyledCollapse` in `Sidebar.styles.ts` styles the DS accordion DOM via its `.ant-collapse-*` class hooks (retained for ui-tests / interim external CSS; `ds-sidebar-*` emitted alongside). Header padding is `18px 24px`. Content padding is `16px 24px`.
|
|
104
|
+
`StyledCollapse` in `Sidebar.styles.ts` styles the DS accordion DOM via its `.ant-collapse-*` class hooks (retained for ui-tests / interim external CSS; `ds-sidebar-*` emitted alongside). Header padding is `18px 24px`. Content padding is `16px 24px`. The accordion root background is `var(--ds-color-background-brand-subtle)` (`CollapseRoot` in `Collapse/Collapse.styles.ts`). The drag handle (`SidebarHandle`) is `cursor: grabbing` and positioned absolutely on the left of the header.
|
|
105
105
|
|
|
106
106
|
## Key dependencies
|
|
107
107
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollapseExpandIconPosition } from './Collapse.types';
|
|
2
|
-
export declare const headerStyle: import('styled-components').
|
|
2
|
+
export declare const headerStyle: import('styled-components').FlattenSimpleInterpolation;
|
|
3
3
|
export declare const expandIconStyle: import('styled-components').FlattenSimpleInterpolation;
|
|
4
4
|
export declare const CollapseRoot: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const PanelItem: import('styled-components').StyledComponent<"div", any, {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
const headerStyle = /* @__PURE__ */ css(["padding:18px 24px;color:
|
|
2
|
+
const headerStyle = /* @__PURE__ */ css(["padding:18px 24px;color:var(--ds-color-text-base-subtle);font-weight:500;font-size:14px;background:var(--ds-color-background-base-default);position:relative;cursor:pointer;&:hover{color:var(--ds-color-text-base-default);}"]);
|
|
3
3
|
const expandIconStyle = /* @__PURE__ */ css(["position:absolute;right:24px;top:50%;transform:translateY(-50%);"]);
|
|
4
4
|
const CollapseRoot = /* @__PURE__ */ styled.div.withConfig({
|
|
5
5
|
displayName: "Collapsestyles__CollapseRoot",
|
|
6
6
|
componentId: "sc-1eq1yr7-0"
|
|
7
|
-
})(["background-color:
|
|
7
|
+
})(["background-color:var(--ds-color-background-brand-subtle);border:none;"]);
|
|
8
8
|
const PanelItem = /* @__PURE__ */ styled.div.withConfig({
|
|
9
9
|
displayName: "Collapsestyles__PanelItem",
|
|
10
10
|
componentId: "sc-1eq1yr7-1"
|
|
11
|
-
})(["position:relative;border-top:solid 1px
|
|
11
|
+
})(["position:relative;border-top:solid 1px var(--ds-color-border-base-default);border-bottom:none;", ""], (props) => props.$isDragOverlay && css(["box-shadow:var(--ds-shadows-shadow-2);z-index:10;"]));
|
|
12
12
|
const PanelHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
13
13
|
displayName: "Collapsestyles__PanelHeader",
|
|
14
14
|
componentId: "sc-1eq1yr7-2"
|
|
@@ -20,7 +20,7 @@ const PanelExpandIcon = /* @__PURE__ */ styled.span.withConfig({
|
|
|
20
20
|
const PanelContent = /* @__PURE__ */ styled.div.withConfig({
|
|
21
21
|
displayName: "Collapsestyles__PanelContent",
|
|
22
22
|
componentId: "sc-1eq1yr7-4"
|
|
23
|
-
})(["background-color:
|
|
23
|
+
})(["background-color:var(--ds-color-background-base-default);border-radius:0;border:none;display:grid;grid-template-rows:", ";transition:grid-template-rows 0.24s ease;overflow:hidden;"], (props) => props.$isActive ? "1fr" : "0fr");
|
|
24
24
|
const PanelContentBox = /* @__PURE__ */ styled.div.withConfig({
|
|
25
25
|
displayName: "Collapsestyles__PanelContentBox",
|
|
26
26
|
componentId: "sc-1eq1yr7-5"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from "@synerise/ds-core";
|
|
3
2
|
import Icon, { DragHandleM, AngleUpS, AngleDownS } from "@synerise/ds-icon";
|
|
4
3
|
import { DragOverlay, DragOverlayHeader, SidebarHeader, SidebarHandle, ExpandIcon, DragOverlayContent, SidebarContentWrapper } from "../Sidebar.styles.js";
|
|
5
4
|
const DragOverlayPanel = ({
|
|
@@ -12,8 +11,8 @@ const DragOverlayPanel = ({
|
|
|
12
11
|
return /* @__PURE__ */ jsxs(DragOverlay, { children: [
|
|
13
12
|
/* @__PURE__ */ jsx(DragOverlayHeader, { children: /* @__PURE__ */ jsxs(SidebarHeader, { children: [
|
|
14
13
|
/* @__PURE__ */ jsx("span", { children: header }),
|
|
15
|
-
/* @__PURE__ */ jsx(SidebarHandle, { "data-testid": "ds-sidebar-header-handle", children: /* @__PURE__ */ jsx(Icon, { color:
|
|
16
|
-
/* @__PURE__ */ jsx(ExpandIcon, { children: /* @__PURE__ */ jsx(Icon, { color:
|
|
14
|
+
/* @__PURE__ */ jsx(SidebarHandle, { "data-testid": "ds-sidebar-header-handle", children: /* @__PURE__ */ jsx(Icon, { color: "var(--ds-color-icon-base-muted)", component: /* @__PURE__ */ jsx(DragHandleM, {}) }) }),
|
|
15
|
+
/* @__PURE__ */ jsx(ExpandIcon, { children: /* @__PURE__ */ jsx(Icon, { color: "var(--ds-color-icon-base-default)", component: isActive ? /* @__PURE__ */ jsx(AngleUpS, {}) : /* @__PURE__ */ jsx(AngleDownS, {}) }) })
|
|
17
16
|
] }) }),
|
|
18
17
|
(isActive || forceRender) && /* @__PURE__ */ jsx(DragOverlayContent, { children: /* @__PURE__ */ jsx(SidebarContentWrapper, { children }) })
|
|
19
18
|
] }, `sidebar-drag-overlay-${id}`);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from "@synerise/ds-core";
|
|
3
2
|
import Icon, { DragHandleM } from "@synerise/ds-icon";
|
|
4
3
|
import { CollapsePanel } from "../Collapse/CollapsePanel.js";
|
|
5
4
|
import { SidebarContentWrapper, SidebarHeader, SidebarHandle } from "../Sidebar.styles.js";
|
|
@@ -13,7 +12,7 @@ const PanelContent = ({
|
|
|
13
12
|
}) => {
|
|
14
13
|
return /* @__PURE__ */ jsx(CollapsePanel, { header: /* @__PURE__ */ jsxs(SidebarHeader, { children: [
|
|
15
14
|
/* @__PURE__ */ jsx("span", { "data-testid": `header-${id}`, children: header }),
|
|
16
|
-
draggable && /* @__PURE__ */ jsx(SidebarHandle, { "data-testid": "ds-sidebar-header-handle", ...dragHandleProps, children: /* @__PURE__ */ jsx(Icon, { color:
|
|
15
|
+
draggable && /* @__PURE__ */ jsx(SidebarHandle, { "data-testid": "ds-sidebar-header-handle", ...dragHandleProps, children: /* @__PURE__ */ jsx(Icon, { color: "var(--ds-color-icon-base-muted)", component: /* @__PURE__ */ jsx(DragHandleM, {}) }) })
|
|
17
16
|
] }), isDragOverlay: id === "-1", ...props, children: /* @__PURE__ */ jsx(SidebarContentWrapper, { children }) }, id);
|
|
18
17
|
};
|
|
19
18
|
export {
|
package/dist/Sidebar.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useRef, useMemo, useCallback, Children, createElement } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
|
-
import { useTheme } from "@synerise/ds-core";
|
|
6
5
|
import Icon, { AngleUpS, AngleDownS } from "@synerise/ds-icon";
|
|
7
6
|
import { DragOverlay, SortableContainer } from "@synerise/ds-sortable";
|
|
8
7
|
import { Collapse } from "./Collapse/Collapse.js";
|
|
@@ -22,7 +21,6 @@ const Sidebar = ({
|
|
|
22
21
|
}) => {
|
|
23
22
|
const [draggedItem, setDraggedItem] = useState();
|
|
24
23
|
const isSortable = Array.isArray(order) && order.length > 0 && !!onChangeOrder;
|
|
25
|
-
const theme = useTheme();
|
|
26
24
|
const wrapperRef = useRef(null);
|
|
27
25
|
const [activeKeys, setActiveKeys] = useState(() => {
|
|
28
26
|
if (!activeKey && !defaultActiveKey) {
|
|
@@ -74,10 +72,10 @@ const Sidebar = ({
|
|
|
74
72
|
"is-drag-drop": isSortable
|
|
75
73
|
}, className), expandIconPosition: "end", expandIcon: ({
|
|
76
74
|
isActive
|
|
77
|
-
}) => /* @__PURE__ */ jsx(Icon, { color:
|
|
75
|
+
}) => /* @__PURE__ */ jsx(Icon, { color: "var(--ds-color-icon-base-default)", component: isActive ? /* @__PURE__ */ jsx(AngleUpS, {}) : /* @__PURE__ */ jsx(AngleDownS, {}) }), onChange: handleOnChange, ...collapseProps, children: isSortable ? sortedChildren : children }),
|
|
78
76
|
wrapperRef.current && getPopupContainer ? createPortal(dragOverlay, getPopupContainer(wrapperRef.current)) : dragOverlay
|
|
79
77
|
] });
|
|
80
|
-
}, [draggedItem, isDraggedPanelActive, activeKey, defaultActiveKey, isSortable, className, handleOnChange, collapseProps, sortedChildren, children, getPopupContainer
|
|
78
|
+
}, [draggedItem, isDraggedPanelActive, activeKey, defaultActiveKey, isSortable, className, handleOnChange, collapseProps, sortedChildren, children, getPopupContainer]);
|
|
81
79
|
return isSortable ? /* @__PURE__ */ jsx(SortableContainer, { axis: "y", items: sortableItems, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragCancel: handleDragEnd, onOrderChange: handleOrderChange, children: /* @__PURE__ */ jsx(SidebarContext.Provider, { value: {
|
|
82
80
|
isSortable
|
|
83
81
|
}, children: collapseContent }) }) : collapseContent;
|
package/dist/Sidebar.styles.js
CHANGED
|
@@ -23,11 +23,11 @@ const DragOverlay = /* @__PURE__ */ styled.div.withConfig({
|
|
|
23
23
|
const DragOverlayHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
24
24
|
displayName: "Sidebarstyles__DragOverlayHeader",
|
|
25
25
|
componentId: "sc-19um1hw-5"
|
|
26
|
-
})(["border-top:1px solid
|
|
26
|
+
})(["border-top:1px solid var(--ds-color-border-base-default);", " user-select:none;"], headerStyle);
|
|
27
27
|
const DragOverlayContent = /* @__PURE__ */ styled.div.withConfig({
|
|
28
28
|
displayName: "Sidebarstyles__DragOverlayContent",
|
|
29
29
|
componentId: "sc-19um1hw-6"
|
|
30
|
-
})(["background-color:
|
|
30
|
+
})(["background-color:var(--ds-color-background-base-default);padding:16px 24px;"]);
|
|
31
31
|
const ExpandIcon = /* @__PURE__ */ styled.div.withConfig({
|
|
32
32
|
displayName: "Sidebarstyles__ExpandIcon",
|
|
33
33
|
componentId: "sc-19um1hw-7"
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const SidebarWithButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "SidebarWithButtonstyles__SidebarWithButtonWrapper",
|
|
4
4
|
componentId: "sc-1h2ysa0-0"
|
|
5
|
-
})(["display:flex;align-items:center;justify-content:center;padding:12px;font-weight:500;color:
|
|
5
|
+
})(["display:flex;align-items:center;justify-content:center;padding:12px;font-weight:500;color:var(--ds-color-text-base-subtle);"]);
|
|
6
6
|
const TextWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "SidebarWithButtonstyles__TextWrapper",
|
|
8
8
|
componentId: "sc-1h2ysa0-1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-sidebar",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Sidebar UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-button": "^2.
|
|
46
|
-
"@synerise/ds-dropdown": "^2.
|
|
47
|
-
"@synerise/ds-icon": "^2.
|
|
48
|
-
"@synerise/ds-list-item": "^2.
|
|
49
|
-
"@synerise/ds-sortable": "^2.0
|
|
50
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-button": "^2.2.0",
|
|
46
|
+
"@synerise/ds-dropdown": "^2.2.0",
|
|
47
|
+
"@synerise/ds-icon": "^2.3.0",
|
|
48
|
+
"@synerise/ds-list-item": "^2.3.0",
|
|
49
|
+
"@synerise/ds-sortable": "^2.1.0",
|
|
50
|
+
"@synerise/ds-utils": "^2.3.0",
|
|
51
51
|
"classnames": "^2.5.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react-dom": ">=16.9.0 <= 18.3.1",
|
|
60
60
|
"styled-components": "^5.3.3"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
|
|
63
63
|
}
|