"use client"; import { cn } from "cn"; import * as React from "react"; import { type Elevation, type ElevationLevel, SurfaceProvider, useElevation, } from "@/registry/edmi/ui/elevation"; // ✦ Edmi addition (DESIGN §4.8, v4): the header sits on the shell (--muted, level 0); the body is a --card // plate inset 2px from the shell (left/right/bottom) with its own full radius; with a footer the body keeps a // 0 bottom gap and the footer sits on the shell without a divider. // ✦ depth: raised = the body plate bevels; floating = the shell also gets the soft drop; sunken = the shell is a well. const insetPanelElevation = { sunken: { root: "border-sk-bd bg-sk-bg shadow-sunken", body: "" }, flat: { root: "", body: "" }, raised: { root: "", body: "border-transparent shadow-raised" }, floating: { root: "border-transparent shadow-[0_0_1.5px_var(--bv-out),var(--bv-float)]", body: "border-transparent shadow-raised", }, }; const InsetPanelContext = React.createContext("flat"); function InsetPanel({ className, elevation, children, ...props }: React.ComponentProps<"div"> & { /** ✦ depth: sunken -1, flat 0, raised +1 (body plate bevels), floating +2 (shell also drops). */ elevation?: Elevation; }) { const level = useElevation(elevation, "surface"); return (
{children}
); } function InsetPanelHeader({ className, ...props }: React.ComponentProps<"div">) { return (
); } function InsetPanelBody({ className, fade = false, ...props }: React.ComponentProps<"div"> & { fade?: boolean }) { const level = React.useContext(InsetPanelContext); return (
); } function InsetPanelFooter({ className, ...props }: React.ComponentProps<"div">) { return (
); } export { InsetPanel, InsetPanelBody, InsetPanelFooter, InsetPanelHeader };