UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

50 lines (49 loc) 1.87 kB
"use client"; import { jsx as a } from "react/jsx-runtime"; import { PanelResizeHandle as i, Panel as n, PanelGroup as o } from "../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"; import { cn as t } from "../../lib/utils.js"; import d from "../../node_modules/lucide-react/dist/esm/icons/grip-vertical.js"; function p({ className: e, ...r }) { return /* @__PURE__ */ a( o, { "data-slot": "resizable-panel-group", className: t( "flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e ), ...r } ); } function b({ ...e }) { return /* @__PURE__ */ a(n, { "data-slot": "resizable-panel", ...e }); } function g({ withHandle: e, className: r, ...l }) { return /* @__PURE__ */ a( i, { "data-slot": "resizable-handle", className: t( "bg-d-border focus-visible:ring-d-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90", r ), ...l, children: e && /* @__PURE__ */ a("div", { className: "bg-d-border border-d-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ a(d, { className: "size-2.5" }) }) } ); } export { g as ResizableHandle, b as ResizablePanel, p as ResizablePanelGroup };