"use client"; /* eslint-disable react/jsx-handler-names */ import {GripVertical} from "lucide-react"; import * as React from "react"; import type {GroupImperativeHandle, PanelImperativeHandle} from "react-resizable-panels"; import * as ResizablePrimitive from "react-resizable-panels"; import {cn} from "@/lib/utilities"; import styles from "./resizable.module.css"; export type {GroupImperativeHandle, PanelImperativeHandle}; /** * Props for the {@link ResizablePanelGroup} component. */ export type ResizablePanelGroupProps = React.ComponentProps; /** * Props for the {@link ResizablePanel} component. */ export type ResizablePanelProps = React.ComponentProps; /** * Props for the {@link ResizableHandle} component. * * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs} */ export interface ResizableHandleProps extends React.ComponentProps { /** * Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized. * * @default false * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs} */ withHandle?: boolean; } /** * Wraps `react-resizable-panels` panel groups with shared styles. * * @remarks * - Third-party wrapper component (v4 API: `Group` with `orientation` prop) * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * ... * ``` * * @see {@link ResizablePanelGroupProps} for available props * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs} */ function ResizablePanelGroup({className, ...props}: Readonly): React.JSX.Element { return ( ); } /** * Re-exports the underlying resizable panel primitive for consistent composition. * * @remarks * - Third-party wrapper component * - Styling is applied by parent panel group and handles * * @example * ```tsx * Content * ``` * * @see {@link ResizablePanelProps} for available props * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs} */ const ResizablePanel = ResizablePrimitive.Panel; /** * Renders a draggable resize handle between resizable panels. * * @remarks * - Third-party wrapper component (v4 API: `Separator`) * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * * ``` * * @see {@link ResizableHandleProps} for available props * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs} */ function ResizableHandle({withHandle = false, className, children, ...props}: Readonly): React.JSX.Element { return ( {Boolean(withHandle) && (
)} {children}
); } ResizablePanelGroup.displayName = "ResizablePanelGroup"; ResizablePanel.displayName = "ResizablePanel"; ResizableHandle.displayName = "ResizableHandle"; export {ResizableHandle, ResizablePanel, ResizablePanelGroup};