Files
healthchat-web/packages/shared-components/src/resize/index.ts
T
R Midhun Suresh 2c8fafdec4 Implement new separator design (#33599)
* Remove `onFocus` and `onBlur` handlers

react-resizable-panels fixed the issue where focus-visible was not
working as expected, so we no longer need this bit of code.

* Implement new hover/focus separator

* Collapse the panel when clicking on the new focus separator

* Remove `isFocusedViaKeyboard` from snapshot

* Update tests and storybook

* Expand panel only on double click

* Add animation

* Fix tests

* Don't render border when type is bar

* Single click to expand, double click to collapse

* Change focus separator color
2026-06-03 12:29:49 +00:00

42 lines
1.0 KiB
TypeScript

/*
* Copyright 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
/**
* This is the id given to the resizable container that holds
* the left panel contents.
*/
export const LEFT_PANEL_ID = "left-panel";
export * from "./group/GroupView";
export * from "./separator/SeparatorView";
export * from "./panel/LeftResizablePanelView";
/**
* Common snapshot for GroupView, SeparatorView and LeftResizablePanelView.
*/
export interface ResizerViewSnapshot {
/**
* Whether the left panel is collapsed or not.
*/
isCollapsed: boolean;
/**
* This is the initial size of the panel if available; should be interpreted as percentage.
*/
initialSize?: number;
}
/**
* Export relevant parts of the underlying library.
*/
export {
Group as ResizableGroup,
Panel,
Separator,
type PanelSize,
type PanelImperativeHandle,
} from "react-resizable-panels";