Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"playwright": "1.57.0",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-resizable-panels": "^3.0.6",
"react-resizable-panels": "^4.3.1",
"react-zoom-pan-pinch": "^3.7.0",
"rimraf": "^6.1.2",
"sass": "^1.94.2",
Expand Down Expand Up @@ -112,7 +112,7 @@
"overlap-area": "^1.1.0",
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0",
"react-resizable-panels": "^3.0.3",
"react-resizable-panels": "^3.0.3 || ^4.0.0",
"react-zoom-pan-pinch": "^3.6.1",
"sonner": "^2.0.7"
},
Expand Down
12 changes: 6 additions & 6 deletions src/components/d-resizable/DResizable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ export const Dashboard = () => {
<ContextStoreProvider
services={[[flowTypeStore, flowTypeService], [fileTabsStore, fileTabsService], [dataTypeStore, dataTypeService], [functionStore, functionService], [flowStore, flowService]]}>
<DLayout>
<DResizablePanelGroup direction={"horizontal"}>
<DResizablePanel id={"1"} order={1} defaultSize={20}>
<DResizablePanelGroup orientation={"horizontal"}>
<DResizablePanel id={"1"} defaultSize={"20%"}>
<Folder/>
</DResizablePanel>
<DResizableHandle/>
<DResizablePanel id={"2"} order={2}>
<DResizablePanel id={"2"}>
<DLayout rightContent={
<Flex p={0.35} style={{flexDirection: "column", gap: "0.7rem"}}>
<Button onClick={() => setShow(prevState => !prevState)} variant={"none"} paddingSize={"xs"}>
Expand All @@ -163,14 +163,14 @@ export const Dashboard = () => {
</Button>
</Flex>
}>
<DResizablePanelGroup direction={"horizontal"}>
<DResizablePanel id={"2"} order={2}>
<DResizablePanelGroup orientation={"horizontal"}>
<DResizablePanel id={"2"}>
<DFlow flowId={"gid://sagittarius/Flow/1"} namespaceId={undefined} projectId={undefined}/>
</DResizablePanel>
{show && (
<>
<DResizableHandle/>
<DResizablePanel id={"3"} order={3} defaultSize={25}>
<DResizablePanel id={"3"} defaultSize={"25%"}>
<DFlowTabs flowId={"gid://sagittarius/Flow/1"} namespaceId={undefined}
projectId={undefined}/>
</DResizablePanel>
Expand Down
9 changes: 5 additions & 4 deletions src/components/d-resizable/DResizable.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@
display: flex;
align-items: center;
justify-content: center;
background: helpers.borderColor();
outline: none;

&[data-panel-group-direction=horizontal] {
&[aria-orientation=vertical] {
width: 1px;
height: 100%;
background: helpers.borderColor();
}

&[data-panel-group-direction=vertical] {
height: 1rem;
&[aria-orientation=horizontal] {
height: 1px;
width: 100%;
}
}
Expand Down
24 changes: 8 additions & 16 deletions src/components/d-resizable/DResizable.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
"use client"

import * as React from "react"
import {Code0ComponentProps} from "../../utils/types";
import {mergeCode0Props} from "../../utils/utils";
import {
Panel,
PanelGroup,
PanelGroupProps,
PanelProps,
PanelResizeHandle,
PanelResizeHandleProps
} from "react-resizable-panels";
import {Code0ComponentProps} from "../../utils";
import {mergeCode0Props} from "../../utils";
import {Group, GroupProps, Panel, PanelProps, Separator, SeparatorProps} from "react-resizable-panels";
import "./DResizable.style.scss"
import {IconFolder, IconGripVertical} from "@tabler/icons-react";

type DResizablePanelGroupProps = Code0ComponentProps & PanelGroupProps
type DResizablePanelGroupProps = Code0ComponentProps & GroupProps
type DResizablePanelProps = Code0ComponentProps & PanelProps
type DResizableHandleProps = Code0ComponentProps & PanelResizeHandleProps
type DResizableHandleProps = Code0ComponentProps & SeparatorProps

export const DResizablePanelGroup: React.FC<DResizablePanelGroupProps> = (props) => {
return <PanelGroup
return <Group
data-slot="resizable-panel-group"
{...(mergeCode0Props("d-resizable", props) as DResizablePanelGroupProps)}
/>
Expand All @@ -31,11 +23,11 @@ export const DResizablePanel: React.FC<DResizablePanelProps> = (props) => {
}

export const DResizableHandle: React.FC<DResizableHandleProps> = (props) => {
return <PanelResizeHandle
return <Separator
data-slot="resizable-handle"
{...mergeCode0Props("d-resizable__handle", props)}>
<div className={"d-resizable__handle-bar"}/>
</PanelResizeHandle>
</Separator>

}