@lax-wp/design-system 0.14.3 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),w=require("../../../_virtual/index.cjs.js"),R=require("framer-motion"),l=require("react"),I=require("react-dom"),T=require("re-resizable"),q=require("../../../hooks/useResponsiveWidth.cjs.js"),B=()=>t.jsx("div",{className:"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]",children:t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("mask",{id:"mask0_36675_12",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:t.jsx("rect",{y:"20",width:"20",height:"20",transform:"rotate(-90 0 20)",fill:"#D9D9D9"})}),t.jsx("g",{mask:"url(#mask0_36675_12)",children:t.jsx("path",{d:"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z",fill:"white"})})]})}),H=(e,i)=>{const r=document.getElementById(e);r?i(r):requestAnimationFrame(()=>{const s=document.getElementById(e);s&&i(s)})},U=(e,i)=>{if(e.current){if(i)localStorage.setItem("resizable-sidebar-width-before-fullscreen",String(e.current.size?.width));else{const r=localStorage.getItem("resizable-sidebar-width-before-fullscreen");if(r){e.current.updateSize({width:r,height:"100%"});return}}e.current.updateSize({width:i?"100vw":"",height:"100%"})}},Z=(e,i,r,s,o,b)=>{const[c,a]=l.useState(!1),[d,n]=l.useState(null);return l.useEffect(()=>{if(!e||typeof window>"u"){n(null);return}H(e,n)},[e]),l.useEffect(()=>{U(o,r)},[r]),l.useEffect(()=>{if(e&&i){const u=requestAnimationFrame(()=>{a(!0)});return()=>{cancelAnimationFrame(u),a(!1)}}e||a(!0),i||a(!1)},[i,e]),l.useEffect(()=>{o.current?.size?.width&&s&&s(o.current.size.width)},[o.current?.size?.width,s]),{shouldRenderSidebar:c,portalTarget:d}},$=({isOpen:e,header:i,id:r,ref:s,className:o,containerClassName:b,headerClassName:c,widthStyle:a,heightStyle:d,motionVariants:n,resizableRef:u,fullScreen:f,maxResizableWidth:g,minWidth:x,handleKey:h,onDragEnd:p,onResize:v,children:y})=>t.jsx(R.AnimatePresence,{children:e&&t.jsx(R.motion.div,{ref:s,id:r,initial:n.initial,animate:n.animate,exit:n.exit,transition:{type:"tween",duration:.3},className:w("flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700",f?"fixed w-full transition translate-x-4 duration-300":"sticky",o),style:{width:a,height:d},children:t.jsx(T.Resizable,{onResize:m=>{m.stopPropagation();const j=u.current?.size?.width;v&&v(j||x)},onResizeStart:m=>{m.stopPropagation()},ref:u,maxWidth:f?g:g*.75,minWidth:x,minHeight:d,maxHeight:d,enable:f?{}:{[h]:!0},handleClasses:{[h]:w("relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700")},handleComponent:{[h]:t.jsx("div",{className:w("absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",h==="left"&&"-right-2.5 -left-auto"),children:t.jsx(B,{})})},className:"!h-full",onResizeStop:p||void 0,children:t.jsxs("div",{className:w("h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border",b),children:[i?t.jsx("div",{className:w("py-4 px-6",c),children:i||null}):null,t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:y})]})})})}),D=l.forwardRef(({isOpen:e,children:i,fullScreen:r=!1,defaultSize:s=void 0,minWidth:o=400,onDragEnd:b=null,onResize:c,className:a,placement:d="right",parentContainer:n,header:u,id:f,containerClassName:g,headerClassName:x,ignoreParentContainerHeight:h=!1,height:p,isMainSidebarExpanded:v=!1,mainSidebarExpandedWidth:y=280,mainSidebarCollapsedWidth:m=80,navbarHeight:j=64},E)=>{const L=v?y:m,k=l.useRef(null),{shouldRenderSidebar:C,portalTarget:z}=Z(n,e,r,c,k),N=typeof window<"u"?window.innerWidth-L:0,W=q.useResponsiveWidth(o),M=q.useResponsiveWidth(s),S=d==="right",P=p||(n&&!h?"100%":`calc(100vh - ${j}px)`),_={initial:{x:S?"100%":"-100%"},animate:{x:0},exit:{x:S?"100%":"-100%"}},A=S?"left":"right",F=t.jsx($,{isOpen:e,header:u,id:f,ref:E,className:a,containerClassName:g,headerClassName:x,widthStyle:M,heightStyle:P,motionVariants:_,resizableRef:k,fullScreen:r,maxResizableWidth:N,minWidth:W,handleKey:A,onDragEnd:b,onResize:c,children:i});return n?!C||!z?null:I.createPortal(F,z):C?F:null});D.displayName="ResizableSidebar";exports.ResizableSidebar=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),w=require("../../../_virtual/index.cjs.js"),R=require("framer-motion"),l=require("react"),I=require("react-dom"),T=require("re-resizable"),q=require("../../../hooks/useResponsiveWidth.cjs.js"),B=()=>t.jsx("div",{className:"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]",children:t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("mask",{id:"mask0_36675_12",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:t.jsx("rect",{y:"20",width:"20",height:"20",transform:"rotate(-90 0 20)",fill:"#D9D9D9"})}),t.jsx("g",{mask:"url(#mask0_36675_12)",children:t.jsx("path",{d:"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z",fill:"white"})})]})}),H=(e,i)=>{const r=document.getElementById(e);r?i(r):requestAnimationFrame(()=>{const s=document.getElementById(e);s&&i(s)})},U=(e,i)=>{if(e.current){if(i)localStorage.setItem("resizable-sidebar-width-before-fullscreen",String(e.current.size?.width));else{const r=localStorage.getItem("resizable-sidebar-width-before-fullscreen");if(r){e.current.updateSize({width:r,height:"100%"});return}}e.current.updateSize({width:i?"100vw":"",height:"100%"})}},Z=(e,i,r,s,o,g)=>{const[u,a]=l.useState(!1),[d,n]=l.useState(null);return l.useEffect(()=>{if(!e||typeof window>"u"){n(null);return}H(e,n)},[e]),l.useEffect(()=>{U(o,r)},[r]),l.useEffect(()=>{if(e&&i){const h=requestAnimationFrame(()=>{a(!0)});return()=>{cancelAnimationFrame(h),a(!1)}}e||a(!0),i||a(!1)},[i,e]),l.useEffect(()=>{o.current?.size?.width&&s&&s(o.current.size.width)},[o.current?.size?.width,s]),{shouldRenderSidebar:u,portalTarget:d}},$=({isOpen:e,header:i,id:r,ref:s,className:o,containerClassName:g,headerClassName:u,widthStyle:a,heightStyle:d,motionVariants:n,resizableRef:h,fullScreen:f,maxResizableWidth:b,minWidth:x,handleKey:c,onDragEnd:p,onResize:v,children:y})=>t.jsx(R.AnimatePresence,{children:e&&t.jsx(R.motion.div,{ref:s,id:r,initial:n.initial,animate:n.animate,exit:n.exit,transition:{type:"tween",duration:.3},className:w("flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700",f?"fixed w-full transition translate-x-4 duration-300":"sticky",o),style:{width:a,height:d},children:t.jsx(T.Resizable,{onResize:m=>{m.stopPropagation();const j=h.current?.size?.width;v&&v(j||x)},onResizeStart:m=>{m.stopPropagation()},ref:h,maxWidth:f?b:b*.75,minWidth:x,minHeight:d,maxHeight:d,enable:f?{}:{[c]:!0},handleClasses:{[c]:w("relative w-6 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700",c==="left"?"-left-1":"-right-1")},handleComponent:{[c]:t.jsx("div",{className:w("absolute top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",c==="left"?"-left-2.5":"-right-2.5"),children:t.jsx(B,{})})},className:"!h-full",onResizeStop:p||void 0,children:t.jsxs("div",{className:w("h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border",g),children:[i?t.jsx("div",{className:w("py-4 px-6",u),children:i||null}):null,t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:y})]})})})}),D=l.forwardRef(({isOpen:e,children:i,fullScreen:r=!1,defaultSize:s=void 0,minWidth:o=400,onDragEnd:g=null,onResize:u,className:a,placement:d="right",parentContainer:n,header:h,id:f,containerClassName:b,headerClassName:x,ignoreParentContainerHeight:c=!1,height:p,isMainSidebarExpanded:v=!1,mainSidebarExpandedWidth:y=280,mainSidebarCollapsedWidth:m=80,navbarHeight:j=64},E)=>{const L=v?y:m,k=l.useRef(null),{shouldRenderSidebar:C,portalTarget:z}=Z(n,e,r,u,k),N=typeof window<"u"?window.innerWidth-L:0,W=q.useResponsiveWidth(o),M=q.useResponsiveWidth(s),S=d==="right",P=p||(n&&!c?"100%":`calc(100vh - ${j}px)`),_={initial:{x:S?"100%":"-100%"},animate:{x:0},exit:{x:S?"100%":"-100%"}},A=S?"left":"right",F=t.jsx($,{isOpen:e,header:h,id:f,ref:E,className:a,containerClassName:b,headerClassName:x,widthStyle:M,heightStyle:P,motionVariants:_,resizableRef:k,fullScreen:r,maxResizableWidth:N,minWidth:W,handleKey:A,onDragEnd:g,onResize:u,children:i});return n?!C||!z?null:I.createPortal(F,z):C?F:null});D.displayName="ResizableSidebar";exports.ResizableSidebar=D;
2
2
  //# sourceMappingURL=ResizableSidebar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableSidebar.cjs.js","sources":["../../../../src/components/data-display/resizable-sidebar/ResizableSidebar.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Resizable } from \"re-resizable\";\n\nimport { useResponsiveWidth } from \"../../../hooks/useResponsiveWidth\";\n\n/**\n * Sidebar placement options\n */\nexport type ResizableSidebarPlacement = \"left\" | \"right\";\n\n/**\n * Props for the ResizableSidebar component\n */\nexport interface ResizableSidebarProps {\n /** Whether the sidebar is open */\n isOpen: boolean;\n /** Content to display in the sidebar */\n children: React.ReactNode;\n /** Whether to display in full screen mode */\n fullScreen?: boolean;\n /** Callback when drag/resize ends */\n onDragEnd?: (() => void) | null;\n /** Callback when resize occurs */\n onResize?: (width: number) => void;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Default size of the sidebar */\n defaultSize?: string;\n /** Minimum width of the sidebar */\n minWidth?: number;\n /** Placement of the sidebar */\n placement?: ResizableSidebarPlacement;\n /** Parent container ID for portal rendering */\n parentContainer?: string;\n /** Header content */\n header?: React.ReactNode;\n /** Unique ID for the sidebar */\n id?: string;\n /** Additional CSS classes for the container */\n containerClassName?: string;\n /** Additional CSS classes for the header wrapper */\n headerClassName?: string;\n /** Whether to ignore parent container height */\n ignoreParentContainerHeight?: boolean;\n /** Custom height */\n height?: string;\n /** Whether the main sidebar is expanded (affects max width calculation) */\n isMainSidebarExpanded?: boolean;\n /** Width of the main sidebar when expanded */\n mainSidebarExpandedWidth?: number;\n /** Width of the main sidebar when collapsed */\n mainSidebarCollapsedWidth?: number;\n /** Height offset for navbar */\n navbarHeight?: number;\n}\n\n/**\n * Drag handle component for the resizable sidebar\n */\nconst DragHandle = () => {\n return (\n <div className=\"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <mask id=\"mask0_36675_12\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"20\" height=\"20\">\n <rect y=\"20\" width=\"20\" height=\"20\" transform=\"rotate(-90 0 20)\" fill=\"#D9D9D9\" />\n </mask>\n <g mask=\"url(#mask0_36675_12)\">\n <path\n d=\"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n );\n};\n\n/**\n * ResizableSidebar component displays a resizable sidebar panel\n *\n * @example\n * ```tsx\n * <ResizableSidebar\n * isOpen={isOpen}\n * onClose={() => setIsOpen(false)}\n * placement=\"right\"\n * minWidth={300}\n * >\n * <div>Sidebar content</div>\n * </ResizableSidebar>\n * ```\n */\n// Helper functions to reduce cognitive complexity\nconst findParentContainer = (parentContainer: string, setPortalTarget: (target: HTMLElement | null) => void) => {\n const el = document.getElementById(parentContainer);\n if (el) {\n setPortalTarget(el);\n } else {\n requestAnimationFrame(() => {\n const retryEl = document.getElementById(parentContainer);\n if (retryEl) setPortalTarget(retryEl);\n });\n }\n};\n\nconst handleFullScreenToggle = (resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>, fullScreen: boolean) => {\n if (!resizableRef.current) return;\n\n if (fullScreen) {\n localStorage.setItem(\"resizable-sidebar-width-before-fullscreen\", String(resizableRef.current.size?.width));\n } else {\n const width = localStorage.getItem(\"resizable-sidebar-width-before-fullscreen\");\n if (width) {\n resizableRef.current.updateSize({ width: width, height: \"100%\" });\n return;\n }\n }\n resizableRef.current.updateSize({\n width: fullScreen ? \"100vw\" : \"\",\n height: \"100%\",\n });\n};\n\nconst useSidebarEffects = (\n parentContainer: string | undefined,\n isOpen: boolean,\n fullScreen: boolean,\n onResize: ((width: number) => void) | undefined,\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>,\n _minWidth: number\n) => {\n const [shouldRenderSidebar, setShouldRenderSidebar] = useState(false);\n const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!parentContainer || typeof window === \"undefined\") {\n setPortalTarget(null);\n return;\n }\n findParentContainer(parentContainer, setPortalTarget);\n }, [parentContainer]);\n\n useEffect(() => {\n handleFullScreenToggle(resizableRef, fullScreen);\n }, [fullScreen]);\n\n useEffect(() => {\n if (parentContainer && isOpen) {\n const frame = requestAnimationFrame(() => {\n setShouldRenderSidebar(true);\n });\n return () => {\n cancelAnimationFrame(frame);\n setShouldRenderSidebar(false);\n };\n }\n\n if (!parentContainer) {\n setShouldRenderSidebar(true);\n }\n\n if (!isOpen) {\n setShouldRenderSidebar(false);\n }\n }, [isOpen, parentContainer]);\n\n useEffect(() => {\n if (resizableRef.current?.size?.width && onResize) {\n onResize(resizableRef.current.size.width);\n }\n }, [resizableRef.current?.size?.width, onResize]);\n\n return { shouldRenderSidebar, portalTarget };\n};\n\nconst SidebarContent = ({\n isOpen,\n header,\n id,\n ref,\n className,\n containerClassName,\n headerClassName,\n widthStyle,\n heightStyle,\n motionVariants,\n resizableRef,\n fullScreen,\n maxResizableWidth,\n minWidth,\n handleKey,\n onDragEnd,\n onResize,\n children,\n}: {\n isOpen: boolean;\n header?: React.ReactNode;\n id?: string;\n ref: React.Ref<HTMLDivElement>;\n className?: string;\n containerClassName?: string;\n headerClassName?: string;\n widthStyle?: string | number;\n heightStyle: string;\n motionVariants: any;\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>;\n fullScreen: boolean;\n maxResizableWidth: number;\n minWidth: number;\n handleKey: string;\n onDragEnd?: (() => void) | null;\n onResize?: (width: number) => void;\n children: React.ReactNode;\n}) => (\n <AnimatePresence>\n {isOpen && (\n <motion.div\n ref={ref}\n id={id}\n initial={motionVariants.initial}\n animate={motionVariants.animate}\n exit={motionVariants.exit}\n transition={{ type: \"tween\", duration: 0.3 }}\n className={cn(\n \"flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700\",\n fullScreen ? \"fixed w-full transition translate-x-4 duration-300\" : \"sticky\",\n className,\n )}\n style={{\n width: widthStyle,\n height: heightStyle,\n }}\n >\n <Resizable\n onResize={(e) => {\n e.stopPropagation();\n const width = resizableRef.current?.size?.width;\n if (onResize) {\n onResize(width || minWidth);\n }\n }}\n onResizeStart={(e) => {\n e.stopPropagation();\n }}\n ref={resizableRef}\n maxWidth={fullScreen ? maxResizableWidth : maxResizableWidth * 0.75}\n minWidth={minWidth}\n minHeight={heightStyle}\n maxHeight={heightStyle}\n enable={fullScreen ? {} : { [handleKey]: true }}\n handleClasses={{\n [handleKey]: cn(\n \"relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700\",\n ),\n }}\n handleComponent={{\n [handleKey]: (\n <div\n className={cn(\n \"absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]\",\n handleKey === \"left\" && \"-right-2.5 -left-auto\",\n )}\n >\n <DragHandle />\n </div>\n ),\n }}\n className=\"!h-full\"\n onResizeStop={onDragEnd || undefined}\n >\n <div\n className={cn(\n \"h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border\",\n containerClassName,\n )}\n >\n {header ? <div className={cn(\"py-4 px-6\", headerClassName)}>{header || null}</div> : null}\n <div className=\"flex-1 overflow-y-auto overflow-x-hidden\">{children}</div>\n </div>\n </Resizable>\n </motion.div>\n )} \n </AnimatePresence>\n);\n\nexport const ResizableSidebar = forwardRef<HTMLDivElement, ResizableSidebarProps>(\n (\n {\n isOpen,\n children,\n fullScreen = false,\n defaultSize = undefined,\n minWidth = 400,\n onDragEnd = null,\n onResize,\n className,\n placement = \"right\",\n parentContainer,\n header,\n id,\n containerClassName,\n headerClassName,\n ignoreParentContainerHeight = false,\n height,\n isMainSidebarExpanded = false,\n mainSidebarExpandedWidth = 280,\n mainSidebarCollapsedWidth = 80,\n navbarHeight = 64,\n },\n ref\n ) => {\n const mainSidebarWidth = isMainSidebarExpanded ? mainSidebarExpandedWidth : mainSidebarCollapsedWidth;\n const resizableRef = useRef<React.ElementRef<typeof Resizable>>(null);\n const { shouldRenderSidebar, portalTarget } = useSidebarEffects(\n parentContainer,\n isOpen,\n fullScreen,\n onResize,\n resizableRef,\n minWidth\n );\n\n const maxResizableWidth = typeof window !== \"undefined\" ? window.innerWidth - mainSidebarWidth : 0;\n\n // Passed sizes are the desktop maximum; both the drag floor and the open\n // width shrink by viewport breakpoint.\n const responsiveMinWidth = useResponsiveWidth(minWidth);\n const responsiveDefaultSize = useResponsiveWidth(defaultSize);\n\n const widthStyle = responsiveDefaultSize;\n const isRight = placement === \"right\";\n const heightStyle = height || (parentContainer && !ignoreParentContainerHeight ? \"100%\" : `calc(100vh - ${navbarHeight}px)`);\n\n const motionVariants = {\n initial: { x: isRight ? \"100%\" : \"-100%\" },\n animate: { x: 0 },\n exit: { x: isRight ? \"100%\" : \"-100%\" },\n };\n\n const handleKey = isRight ? \"left\" : \"right\";\n\n const sidebarContent = (\n <SidebarContent\n isOpen={isOpen}\n header={header}\n id={id}\n ref={ref}\n className={className}\n containerClassName={containerClassName}\n headerClassName={headerClassName}\n widthStyle={widthStyle}\n heightStyle={heightStyle}\n motionVariants={motionVariants}\n resizableRef={resizableRef}\n fullScreen={fullScreen}\n maxResizableWidth={maxResizableWidth}\n minWidth={responsiveMinWidth}\n handleKey={handleKey}\n onDragEnd={onDragEnd}\n onResize={onResize}\n >\n {children}\n </SidebarContent>\n );\n\n if (parentContainer) {\n if (!shouldRenderSidebar || !portalTarget) return null;\n return ReactDOM.createPortal(sidebarContent, portalTarget);\n }\n\n if (!shouldRenderSidebar) return null;\n\n return sidebarContent;\n }\n);\n\nResizableSidebar.displayName = \"ResizableSidebar\";\n"],"names":["DragHandle","jsx","jsxs","findParentContainer","parentContainer","setPortalTarget","el","retryEl","handleFullScreenToggle","resizableRef","fullScreen","width","useSidebarEffects","isOpen","onResize","_minWidth","shouldRenderSidebar","setShouldRenderSidebar","useState","portalTarget","useEffect","frame","SidebarContent","header","id","ref","className","containerClassName","headerClassName","widthStyle","heightStyle","motionVariants","maxResizableWidth","minWidth","handleKey","onDragEnd","children","AnimatePresence","motion","cn","Resizable","e","ResizableSidebar","forwardRef","defaultSize","placement","ignoreParentContainerHeight","height","isMainSidebarExpanded","mainSidebarExpandedWidth","mainSidebarCollapsedWidth","navbarHeight","mainSidebarWidth","useRef","responsiveMinWidth","useResponsiveWidth","isRight","sidebarContent","ReactDOM"],"mappings":"sTA8DMA,EAAa,IAEfC,EAAAA,IAAC,MAAA,CAAI,UAAU,mJACb,SAAAC,EAAAA,KAAC,MAAA,CACC,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BAEN,SAAA,CAAAD,EAAAA,IAAC,OAAA,CAAK,GAAG,iBAAiB,UAAU,iBAAiB,EAAE,IAAI,EAAE,IAAI,MAAM,KAAK,OAAO,KACjF,SAAAA,EAAAA,IAAC,OAAA,CAAK,EAAE,KAAK,MAAM,KAAK,OAAO,KAAK,UAAU,mBAAmB,KAAK,SAAA,CAAU,CAAA,CAClF,EACAA,EAAAA,IAAC,IAAA,CAAE,KAAK,uBACN,SAAAA,EAAAA,IAAC,OAAA,CACC,EAAE,yiCACF,KAAK,OAAA,CAAA,CACP,CACF,CAAA,CAAA,CAAA,EAEJ,EAoBEE,EAAsB,CAACC,EAAyBC,IAA0D,CAC9G,MAAMC,EAAK,SAAS,eAAeF,CAAe,EAC9CE,EACFD,EAAgBC,CAAE,EAElB,sBAAsB,IAAM,CAC1B,MAAMC,EAAU,SAAS,eAAeH,CAAe,EACnDG,KAAyBA,CAAO,CACtC,CAAC,CAEL,EAEMC,EAAyB,CAACC,EAAmEC,IAAwB,CACzH,GAAKD,EAAa,QAElB,IAAIC,EACF,aAAa,QAAQ,4CAA6C,OAAOD,EAAa,QAAQ,MAAM,KAAK,CAAC,MACrG,CACL,MAAME,EAAQ,aAAa,QAAQ,2CAA2C,EAC9E,GAAIA,EAAO,CACTF,EAAa,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AAC,EACA,SAAArB,EAEC,SAAAsB,CAAA,CAAA,EAIL,OAAIhC,EACE,CAACY,GAAuB,CAACG,EAAqB,KAC3CuC,EAAS,aAAaD,EAAgBtC,CAAY,EAGtDH,EAEEyC,EAF0B,IAGnC,CACF,EAEAf,EAAiB,YAAc"}
1
+ {"version":3,"file":"ResizableSidebar.cjs.js","sources":["../../../../src/components/data-display/resizable-sidebar/ResizableSidebar.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Resizable } from \"re-resizable\";\n\nimport { useResponsiveWidth } from \"../../../hooks/useResponsiveWidth\";\n\n/**\n * Sidebar placement options\n */\nexport type ResizableSidebarPlacement = \"left\" | \"right\";\n\n/**\n * Props for the ResizableSidebar component\n */\nexport interface ResizableSidebarProps {\n /** Whether the sidebar is open */\n isOpen: boolean;\n /** Content to display in the sidebar */\n children: React.ReactNode;\n /** Whether to display in full screen mode */\n fullScreen?: boolean;\n /** Callback when drag/resize ends */\n onDragEnd?: (() => void) | null;\n /** Callback when resize occurs */\n onResize?: (width: number) => void;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Default size of the sidebar */\n defaultSize?: string;\n /** Minimum width of the sidebar */\n minWidth?: number;\n /** Placement of the sidebar */\n placement?: ResizableSidebarPlacement;\n /** Parent container ID for portal rendering */\n parentContainer?: string;\n /** Header content */\n header?: React.ReactNode;\n /** Unique ID for the sidebar */\n id?: string;\n /** Additional CSS classes for the container */\n containerClassName?: string;\n /** Additional CSS classes for the header wrapper */\n headerClassName?: string;\n /** Whether to ignore parent container height */\n ignoreParentContainerHeight?: boolean;\n /** Custom height */\n height?: string;\n /** Whether the main sidebar is expanded (affects max width calculation) */\n isMainSidebarExpanded?: boolean;\n /** Width of the main sidebar when expanded */\n mainSidebarExpandedWidth?: number;\n /** Width of the main sidebar when collapsed */\n mainSidebarCollapsedWidth?: number;\n /** Height offset for navbar */\n navbarHeight?: number;\n}\n\n/**\n * Drag handle component for the resizable sidebar\n */\nconst DragHandle = () => {\n return (\n <div className=\"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <mask id=\"mask0_36675_12\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"20\" height=\"20\">\n <rect y=\"20\" width=\"20\" height=\"20\" transform=\"rotate(-90 0 20)\" fill=\"#D9D9D9\" />\n </mask>\n <g mask=\"url(#mask0_36675_12)\">\n <path\n d=\"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n );\n};\n\n/**\n * ResizableSidebar component displays a resizable sidebar panel\n *\n * @example\n * ```tsx\n * <ResizableSidebar\n * isOpen={isOpen}\n * onClose={() => setIsOpen(false)}\n * placement=\"right\"\n * minWidth={300}\n * >\n * <div>Sidebar content</div>\n * </ResizableSidebar>\n * ```\n */\n// Helper functions to reduce cognitive complexity\nconst findParentContainer = (parentContainer: string, setPortalTarget: (target: HTMLElement | null) => void) => {\n const el = document.getElementById(parentContainer);\n if (el) {\n setPortalTarget(el);\n } else {\n requestAnimationFrame(() => {\n const retryEl = document.getElementById(parentContainer);\n if (retryEl) setPortalTarget(retryEl);\n });\n }\n};\n\nconst handleFullScreenToggle = (resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>, fullScreen: boolean) => {\n if (!resizableRef.current) return;\n\n if (fullScreen) {\n localStorage.setItem(\"resizable-sidebar-width-before-fullscreen\", String(resizableRef.current.size?.width));\n } else {\n const width = localStorage.getItem(\"resizable-sidebar-width-before-fullscreen\");\n if (width) {\n resizableRef.current.updateSize({ width: width, height: \"100%\" });\n return;\n }\n }\n resizableRef.current.updateSize({\n width: fullScreen ? \"100vw\" : \"\",\n height: \"100%\",\n });\n};\n\nconst useSidebarEffects = (\n parentContainer: string | undefined,\n isOpen: boolean,\n fullScreen: boolean,\n onResize: ((width: number) => void) | undefined,\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>,\n _minWidth: number\n) => {\n const [shouldRenderSidebar, setShouldRenderSidebar] = useState(false);\n const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!parentContainer || typeof window === \"undefined\") {\n setPortalTarget(null);\n return;\n }\n findParentContainer(parentContainer, setPortalTarget);\n }, [parentContainer]);\n\n useEffect(() => {\n handleFullScreenToggle(resizableRef, fullScreen);\n }, [fullScreen]);\n\n useEffect(() => {\n if (parentContainer && isOpen) {\n const frame = requestAnimationFrame(() => {\n setShouldRenderSidebar(true);\n });\n return () => {\n cancelAnimationFrame(frame);\n setShouldRenderSidebar(false);\n };\n }\n\n if (!parentContainer) {\n setShouldRenderSidebar(true);\n }\n\n if (!isOpen) {\n setShouldRenderSidebar(false);\n }\n }, [isOpen, parentContainer]);\n\n useEffect(() => {\n if (resizableRef.current?.size?.width && onResize) {\n onResize(resizableRef.current.size.width);\n }\n }, [resizableRef.current?.size?.width, onResize]);\n\n return { shouldRenderSidebar, portalTarget };\n};\n\nconst SidebarContent = ({\n isOpen,\n header,\n id,\n ref,\n className,\n containerClassName,\n headerClassName,\n widthStyle,\n heightStyle,\n motionVariants,\n resizableRef,\n fullScreen,\n maxResizableWidth,\n minWidth,\n handleKey,\n onDragEnd,\n onResize,\n children,\n}: {\n isOpen: boolean;\n header?: React.ReactNode;\n id?: string;\n ref: React.Ref<HTMLDivElement>;\n className?: string;\n containerClassName?: string;\n headerClassName?: string;\n widthStyle?: string | number;\n heightStyle: string;\n motionVariants: any;\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>;\n fullScreen: boolean;\n maxResizableWidth: number;\n minWidth: number;\n handleKey: string;\n onDragEnd?: (() => void) | null;\n onResize?: (width: number) => void;\n children: React.ReactNode;\n}) => (\n <AnimatePresence>\n {isOpen && (\n <motion.div\n ref={ref}\n id={id}\n initial={motionVariants.initial}\n animate={motionVariants.animate}\n exit={motionVariants.exit}\n transition={{ type: \"tween\", duration: 0.3 }}\n className={cn(\n \"flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700\",\n fullScreen ? \"fixed w-full transition translate-x-4 duration-300\" : \"sticky\",\n className,\n )}\n style={{\n width: widthStyle,\n height: heightStyle,\n }}\n >\n <Resizable\n onResize={(e) => {\n e.stopPropagation();\n const width = resizableRef.current?.size?.width;\n if (onResize) {\n onResize(width || minWidth);\n }\n }}\n onResizeStart={(e) => {\n e.stopPropagation();\n }}\n ref={resizableRef}\n maxWidth={fullScreen ? maxResizableWidth : maxResizableWidth * 0.75}\n minWidth={minWidth}\n minHeight={heightStyle}\n maxHeight={heightStyle}\n enable={fullScreen ? {} : { [handleKey]: true }}\n handleClasses={{\n [handleKey]: cn(\n \"relative w-6 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700\",\n // Offset must match the resized edge so it aligns with re-resizable's positioning.\n handleKey === \"left\" ? \"-left-1\" : \"-right-1\",\n ),\n }}\n handleComponent={{\n [handleKey]: (\n <div\n className={cn(\n \"absolute top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]\",\n handleKey === \"left\" ? \"-left-2.5\" : \"-right-2.5\",\n )}\n >\n <DragHandle />\n </div>\n ),\n }}\n className=\"!h-full\"\n onResizeStop={onDragEnd || undefined}\n >\n <div\n className={cn(\n \"h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border\",\n containerClassName,\n )}\n >\n {header ? <div className={cn(\"py-4 px-6\", headerClassName)}>{header || null}</div> : null}\n <div className=\"flex-1 overflow-y-auto overflow-x-hidden\">{children}</div>\n </div>\n </Resizable>\n </motion.div>\n )} \n </AnimatePresence>\n);\n\nexport const ResizableSidebar = forwardRef<HTMLDivElement, ResizableSidebarProps>(\n (\n {\n isOpen,\n children,\n fullScreen = false,\n defaultSize = undefined,\n minWidth = 400,\n onDragEnd = null,\n onResize,\n className,\n placement = \"right\",\n parentContainer,\n header,\n id,\n containerClassName,\n headerClassName,\n ignoreParentContainerHeight = false,\n height,\n isMainSidebarExpanded = false,\n mainSidebarExpandedWidth = 280,\n mainSidebarCollapsedWidth = 80,\n navbarHeight = 64,\n },\n ref\n ) => {\n const mainSidebarWidth = isMainSidebarExpanded ? mainSidebarExpandedWidth : mainSidebarCollapsedWidth;\n const resizableRef = useRef<React.ElementRef<typeof Resizable>>(null);\n const { shouldRenderSidebar, portalTarget } = useSidebarEffects(\n parentContainer,\n isOpen,\n fullScreen,\n onResize,\n resizableRef,\n minWidth\n );\n\n const maxResizableWidth = typeof window !== \"undefined\" ? window.innerWidth - mainSidebarWidth : 0;\n\n // Passed sizes are the desktop maximum; both the drag floor and the open\n // width shrink by viewport breakpoint.\n const responsiveMinWidth = useResponsiveWidth(minWidth);\n const responsiveDefaultSize = useResponsiveWidth(defaultSize);\n\n const widthStyle = responsiveDefaultSize;\n const isRight = placement === \"right\";\n const heightStyle = height || (parentContainer && !ignoreParentContainerHeight ? \"100%\" : `calc(100vh - ${navbarHeight}px)`);\n\n const motionVariants = {\n initial: { x: isRight ? \"100%\" : \"-100%\" },\n animate: { x: 0 },\n exit: { x: isRight ? \"100%\" : \"-100%\" },\n };\n\n const handleKey = isRight ? \"left\" : \"right\";\n\n const sidebarContent = (\n <SidebarContent\n isOpen={isOpen}\n header={header}\n id={id}\n ref={ref}\n className={className}\n containerClassName={containerClassName}\n headerClassName={headerClassName}\n widthStyle={widthStyle}\n heightStyle={heightStyle}\n motionVariants={motionVariants}\n resizableRef={resizableRef}\n fullScreen={fullScreen}\n maxResizableWidth={maxResizableWidth}\n minWidth={responsiveMinWidth}\n handleKey={handleKey}\n onDragEnd={onDragEnd}\n onResize={onResize}\n >\n {children}\n </SidebarContent>\n );\n\n if (parentContainer) {\n if (!shouldRenderSidebar || !portalTarget) return null;\n return ReactDOM.createPortal(sidebarContent, portalTarget);\n }\n\n if (!shouldRenderSidebar) return null;\n\n return sidebarContent;\n }\n);\n\nResizableSidebar.displayName = \"ResizableSidebar\";\n"],"names":["DragHandle","jsx","jsxs","findParentContainer","parentContainer","setPortalTarget","el","retryEl","handleFullScreenToggle","resizableRef","fullScreen","width","useSidebarEffects","isOpen","onResize","_minWidth","shouldRenderSidebar","setShouldRenderSidebar","useState","portalTarget","useEffect","frame","SidebarContent","header","id","ref","className","containerClassName","headerClassName","widthStyle","heightStyle","motionVariants","maxResizableWidth","minWidth","handleKey","onDragEnd","children","AnimatePresence","motion","cn","Resizable","e","ResizableSidebar","forwardRef","defaultSize","placement","ignoreParentContainerHeight","height","isMainSidebarExpanded","mainSidebarExpandedWidth","mainSidebarCollapsedWidth","navbarHeight","mainSidebarWidth","useRef","responsiveMinWidth","useResponsiveWidth","isRight","sidebarContent","ReactDOM"],"mappings":"sTA8DMA,EAAa,IAEfC,EAAAA,IAAC,MAAA,CAAI,UAAU,mJACb,SAAAC,EAAAA,KAAC,MAAA,CACC,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BAEN,SAAA,CAAAD,EAAAA,IAAC,OAAA,CAAK,GAAG,iBAAiB,UAAU,iBAAiB,EAAE,IAAI,EAAE,IAAI,MAAM,KAAK,OAAO,KACjF,SAAAA,EAAAA,IAAC,OAAA,CAAK,EAAE,KAAK,MAAM,KAAK,OAAO,KAAK,UAAU,mBAAmB,KAAK,SAAA,CAAU,CAAA,CAClF,EACAA,EAAAA,IAAC,IAAA,CAAE,KAAK,uBACN,SAAAA,EAAAA,IAAC,OAAA,CACC,EAAE,yiCACF,KAAK,OAAA,CAAA,CACP,CACF,CAAA,CAAA,CAAA,EAEJ,EAoBEE,EAAsB,CAACC,EAAyBC,IAA0D,CAC9G,MAAMC,EAAK,SAAS,eAAeF,CAAe,EAC9CE,EACFD,EAAgBC,CAAE,EAElB,sBAAsB,IAAM,CAC1B,MAAMC,EAAU,SAAS,eAAeH,CAAe,EACnDG,KAAyBA,CAAO,CACtC,CAAC,CAEL,EAEMC,EAAyB,CAACC,EAAmEC,IAAwB,CACzH,GAAKD,EAAa,QAElB,IAAIC,EACF,aAAa,QAAQ,4CAA6C,OAAOD,EAAa,QAAQ,MAAM,KAAK,CAAC,MACrG,CACL,MAAME,EAAQ,aAAa,QAAQ,2CAA2C,EAC9E,GAAIA,EAAO,CACTF,EAAa,QAAQ,WAAW,CAAE,MAA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,EACA,UAAAC,EACA,SAAArB,EAEC,SAAAsB,CAAA,CAAA,EAIL,OAAIhC,EACE,CAACY,GAAuB,CAACG,EAAqB,KAC3CuC,EAAS,aAAaD,EAAgBtC,CAAY,EAGtDH,EAEEyC,EAF0B,IAGnC,CACF,EAEAf,EAAiB,YAAc"}
@@ -47,7 +47,7 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
47
47
  });
48
48
  }
49
49
  }, G = (e, t, i, n, s, w) => {
50
- const [d, a] = L(!1), [l, o] = L(null);
50
+ const [c, a] = L(!1), [l, o] = L(null);
51
51
  return v(() => {
52
52
  if (!e || typeof window > "u") {
53
53
  o(null);
@@ -58,17 +58,17 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
58
58
  $(s, i);
59
59
  }, [i]), v(() => {
60
60
  if (e && t) {
61
- const c = requestAnimationFrame(() => {
61
+ const h = requestAnimationFrame(() => {
62
62
  a(!0);
63
63
  });
64
64
  return () => {
65
- cancelAnimationFrame(c), a(!1);
65
+ cancelAnimationFrame(h), a(!1);
66
66
  };
67
67
  }
68
68
  e || a(!0), t || a(!1);
69
69
  }, [t, e]), v(() => {
70
70
  s.current?.size?.width && n && n(s.current.size.width);
71
- }, [s.current?.size?.width, n]), { shouldRenderSidebar: d, portalTarget: l };
71
+ }, [s.current?.size?.width, n]), { shouldRenderSidebar: c, portalTarget: l };
72
72
  }, J = ({
73
73
  isOpen: e,
74
74
  header: t,
@@ -76,15 +76,15 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
76
76
  ref: n,
77
77
  className: s,
78
78
  containerClassName: w,
79
- headerClassName: d,
79
+ headerClassName: c,
80
80
  widthStyle: a,
81
81
  heightStyle: l,
82
82
  motionVariants: o,
83
- resizableRef: c,
83
+ resizableRef: h,
84
84
  fullScreen: u,
85
85
  maxResizableWidth: g,
86
86
  minWidth: b,
87
- handleKey: h,
87
+ handleKey: d,
88
88
  onDragEnd: x,
89
89
  onResize: p,
90
90
  children: y
@@ -111,30 +111,32 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
111
111
  {
112
112
  onResize: (f) => {
113
113
  f.stopPropagation();
114
- const k = c.current?.size?.width;
114
+ const k = h.current?.size?.width;
115
115
  p && p(k || b);
116
116
  },
117
117
  onResizeStart: (f) => {
118
118
  f.stopPropagation();
119
119
  },
120
- ref: c,
120
+ ref: h,
121
121
  maxWidth: u ? g : g * 0.75,
122
122
  minWidth: b,
123
123
  minHeight: l,
124
124
  maxHeight: l,
125
- enable: u ? {} : { [h]: !0 },
125
+ enable: u ? {} : { [d]: !0 },
126
126
  handleClasses: {
127
- [h]: m(
128
- "relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700"
127
+ [d]: m(
128
+ "relative w-6 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700",
129
+ // Offset must match the resized edge so it aligns with re-resizable's positioning.
130
+ d === "left" ? "-left-1" : "-right-1"
129
131
  )
130
132
  },
131
133
  handleComponent: {
132
- [h]: /* @__PURE__ */ r(
134
+ [d]: /* @__PURE__ */ r(
133
135
  "div",
134
136
  {
135
137
  className: m(
136
- "absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",
137
- h === "left" && "-right-2.5 -left-auto"
138
+ "absolute top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",
139
+ d === "left" ? "-left-2.5" : "-right-2.5"
138
140
  ),
139
141
  children: /* @__PURE__ */ r(U, {})
140
142
  }
@@ -150,7 +152,7 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
150
152
  w
151
153
  ),
152
154
  children: [
153
- t ? /* @__PURE__ */ r("div", { className: m("py-4 px-6", d), children: t || null }) : null,
155
+ t ? /* @__PURE__ */ r("div", { className: m("py-4 px-6", c), children: t || null }) : null,
154
156
  /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto overflow-x-hidden", children: y })
155
157
  ]
156
158
  }
@@ -166,15 +168,15 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
166
168
  defaultSize: n = void 0,
167
169
  minWidth: s = 400,
168
170
  onDragEnd: w = null,
169
- onResize: d,
171
+ onResize: c,
170
172
  className: a,
171
173
  placement: l = "right",
172
174
  parentContainer: o,
173
- header: c,
175
+ header: h,
174
176
  id: u,
175
177
  containerClassName: g,
176
178
  headerClassName: b,
177
- ignoreParentContainerHeight: h = !1,
179
+ ignoreParentContainerHeight: d = !1,
178
180
  height: x,
179
181
  isMainSidebarExpanded: p = !1,
180
182
  mainSidebarExpandedWidth: y = 280,
@@ -185,13 +187,13 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
185
187
  o,
186
188
  e,
187
189
  i,
188
- d,
190
+ c,
189
191
  S
190
- ), P = typeof window < "u" ? window.innerWidth - E : 0, _ = N(s), A = N(n), C = l === "right", I = x || (o && !h ? "100%" : `calc(100vh - ${k}px)`), D = /* @__PURE__ */ r(
192
+ ), P = typeof window < "u" ? window.innerWidth - E : 0, _ = N(s), A = N(n), C = l === "right", I = x || (o && !d ? "100%" : `calc(100vh - ${k}px)`), D = /* @__PURE__ */ r(
191
193
  J,
192
194
  {
193
195
  isOpen: e,
194
- header: c,
196
+ header: h,
195
197
  id: u,
196
198
  ref: j,
197
199
  className: a,
@@ -210,7 +212,7 @@ const U = () => /* @__PURE__ */ r("div", { className: "cursor-ew-resize flex ite
210
212
  minWidth: _,
211
213
  handleKey: C ? "left" : "right",
212
214
  onDragEnd: w,
213
- onResize: d,
215
+ onResize: c,
214
216
  children: t
215
217
  }
216
218
  );
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableSidebar.es.js","sources":["../../../../src/components/data-display/resizable-sidebar/ResizableSidebar.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Resizable } from \"re-resizable\";\n\nimport { useResponsiveWidth } from \"../../../hooks/useResponsiveWidth\";\n\n/**\n * Sidebar placement options\n */\nexport type ResizableSidebarPlacement = \"left\" | \"right\";\n\n/**\n * Props for the ResizableSidebar component\n */\nexport interface ResizableSidebarProps {\n /** Whether the sidebar is open */\n isOpen: boolean;\n /** Content to display in the sidebar */\n children: React.ReactNode;\n /** Whether to display in full screen mode */\n fullScreen?: boolean;\n /** Callback when drag/resize ends */\n onDragEnd?: (() => void) | null;\n /** Callback when resize occurs */\n onResize?: (width: number) => void;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Default size of the sidebar */\n defaultSize?: string;\n /** Minimum width of the sidebar */\n minWidth?: number;\n /** Placement of the sidebar */\n placement?: ResizableSidebarPlacement;\n /** Parent container ID for portal rendering */\n parentContainer?: string;\n /** Header content */\n header?: React.ReactNode;\n /** Unique ID for the sidebar */\n id?: string;\n /** Additional CSS classes for the container */\n containerClassName?: string;\n /** Additional CSS classes for the header wrapper */\n headerClassName?: string;\n /** Whether to ignore parent container height */\n ignoreParentContainerHeight?: boolean;\n /** Custom height */\n height?: string;\n /** Whether the main sidebar is expanded (affects max width calculation) */\n isMainSidebarExpanded?: boolean;\n /** Width of the main sidebar when expanded */\n mainSidebarExpandedWidth?: number;\n /** Width of the main sidebar when collapsed */\n mainSidebarCollapsedWidth?: number;\n /** Height offset for navbar */\n navbarHeight?: number;\n}\n\n/**\n * Drag handle component for the resizable sidebar\n */\nconst DragHandle = () => {\n return (\n <div className=\"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <mask id=\"mask0_36675_12\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"20\" height=\"20\">\n <rect y=\"20\" width=\"20\" height=\"20\" transform=\"rotate(-90 0 20)\" fill=\"#D9D9D9\" />\n </mask>\n <g mask=\"url(#mask0_36675_12)\">\n <path\n d=\"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n );\n};\n\n/**\n * ResizableSidebar component displays a resizable sidebar panel\n *\n * @example\n * ```tsx\n * <ResizableSidebar\n * isOpen={isOpen}\n * onClose={() => setIsOpen(false)}\n * placement=\"right\"\n * minWidth={300}\n * >\n * <div>Sidebar content</div>\n * </ResizableSidebar>\n * ```\n */\n// Helper functions to reduce cognitive complexity\nconst findParentContainer = (parentContainer: string, setPortalTarget: (target: HTMLElement | null) => void) => {\n const el = document.getElementById(parentContainer);\n if (el) {\n setPortalTarget(el);\n } else {\n requestAnimationFrame(() => {\n const retryEl = document.getElementById(parentContainer);\n if (retryEl) setPortalTarget(retryEl);\n });\n }\n};\n\nconst handleFullScreenToggle = (resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>, fullScreen: boolean) => {\n if (!resizableRef.current) return;\n\n if (fullScreen) {\n localStorage.setItem(\"resizable-sidebar-width-before-fullscreen\", String(resizableRef.current.size?.width));\n } else {\n const width = localStorage.getItem(\"resizable-sidebar-width-before-fullscreen\");\n if (width) {\n resizableRef.current.updateSize({ width: width, height: \"100%\" });\n return;\n }\n }\n resizableRef.current.updateSize({\n width: fullScreen ? \"100vw\" : \"\",\n height: \"100%\",\n });\n};\n\nconst useSidebarEffects = (\n parentContainer: string | undefined,\n isOpen: boolean,\n fullScreen: boolean,\n onResize: ((width: number) => void) | undefined,\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>,\n _minWidth: number\n) => {\n const [shouldRenderSidebar, setShouldRenderSidebar] = useState(false);\n const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!parentContainer || typeof window === \"undefined\") {\n setPortalTarget(null);\n return;\n }\n findParentContainer(parentContainer, setPortalTarget);\n }, [parentContainer]);\n\n useEffect(() => {\n handleFullScreenToggle(resizableRef, fullScreen);\n }, [fullScreen]);\n\n useEffect(() => {\n if (parentContainer && isOpen) {\n const frame = requestAnimationFrame(() => {\n setShouldRenderSidebar(true);\n });\n return () => {\n cancelAnimationFrame(frame);\n setShouldRenderSidebar(false);\n };\n }\n\n if (!parentContainer) {\n setShouldRenderSidebar(true);\n }\n\n if (!isOpen) {\n setShouldRenderSidebar(false);\n }\n }, [isOpen, parentContainer]);\n\n useEffect(() => {\n if (resizableRef.current?.size?.width && onResize) {\n onResize(resizableRef.current.size.width);\n }\n }, [resizableRef.current?.size?.width, onResize]);\n\n return { shouldRenderSidebar, portalTarget };\n};\n\nconst SidebarContent = ({\n isOpen,\n header,\n id,\n ref,\n className,\n containerClassName,\n headerClassName,\n widthStyle,\n heightStyle,\n motionVariants,\n resizableRef,\n fullScreen,\n maxResizableWidth,\n minWidth,\n handleKey,\n onDragEnd,\n onResize,\n children,\n}: {\n isOpen: boolean;\n header?: React.ReactNode;\n id?: string;\n ref: React.Ref<HTMLDivElement>;\n className?: string;\n containerClassName?: string;\n headerClassName?: string;\n widthStyle?: string | number;\n heightStyle: string;\n motionVariants: any;\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>;\n fullScreen: boolean;\n maxResizableWidth: number;\n minWidth: number;\n handleKey: string;\n onDragEnd?: (() => void) | null;\n onResize?: (width: number) => void;\n children: React.ReactNode;\n}) => (\n <AnimatePresence>\n {isOpen && (\n <motion.div\n ref={ref}\n id={id}\n initial={motionVariants.initial}\n animate={motionVariants.animate}\n exit={motionVariants.exit}\n transition={{ type: \"tween\", duration: 0.3 }}\n className={cn(\n \"flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700\",\n fullScreen ? \"fixed w-full transition translate-x-4 duration-300\" : \"sticky\",\n className,\n )}\n style={{\n width: widthStyle,\n height: heightStyle,\n }}\n >\n <Resizable\n onResize={(e) => {\n e.stopPropagation();\n const width = resizableRef.current?.size?.width;\n if (onResize) {\n onResize(width || minWidth);\n }\n }}\n onResizeStart={(e) => {\n e.stopPropagation();\n }}\n ref={resizableRef}\n maxWidth={fullScreen ? maxResizableWidth : maxResizableWidth * 0.75}\n minWidth={minWidth}\n minHeight={heightStyle}\n maxHeight={heightStyle}\n enable={fullScreen ? {} : { [handleKey]: true }}\n handleClasses={{\n [handleKey]: cn(\n \"relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700\",\n ),\n }}\n handleComponent={{\n [handleKey]: (\n <div\n className={cn(\n \"absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]\",\n handleKey === \"left\" && \"-right-2.5 -left-auto\",\n )}\n >\n <DragHandle />\n </div>\n ),\n }}\n className=\"!h-full\"\n onResizeStop={onDragEnd || undefined}\n >\n <div\n className={cn(\n \"h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border\",\n containerClassName,\n )}\n >\n {header ? <div className={cn(\"py-4 px-6\", headerClassName)}>{header || null}</div> : null}\n <div className=\"flex-1 overflow-y-auto overflow-x-hidden\">{children}</div>\n </div>\n </Resizable>\n </motion.div>\n )} \n </AnimatePresence>\n);\n\nexport const ResizableSidebar = forwardRef<HTMLDivElement, ResizableSidebarProps>(\n (\n {\n isOpen,\n children,\n fullScreen = false,\n defaultSize = undefined,\n minWidth = 400,\n onDragEnd = null,\n onResize,\n className,\n placement = \"right\",\n parentContainer,\n header,\n id,\n containerClassName,\n headerClassName,\n ignoreParentContainerHeight = false,\n height,\n isMainSidebarExpanded = false,\n mainSidebarExpandedWidth = 280,\n mainSidebarCollapsedWidth = 80,\n navbarHeight = 64,\n },\n ref\n ) => {\n const mainSidebarWidth = isMainSidebarExpanded ? mainSidebarExpandedWidth : mainSidebarCollapsedWidth;\n const resizableRef = useRef<React.ElementRef<typeof Resizable>>(null);\n const { shouldRenderSidebar, portalTarget } = useSidebarEffects(\n parentContainer,\n isOpen,\n fullScreen,\n onResize,\n resizableRef,\n minWidth\n );\n\n const maxResizableWidth = typeof window !== \"undefined\" ? window.innerWidth - mainSidebarWidth : 0;\n\n // Passed sizes are the desktop maximum; both the drag floor and the open\n // width shrink by viewport breakpoint.\n const responsiveMinWidth = useResponsiveWidth(minWidth);\n const responsiveDefaultSize = useResponsiveWidth(defaultSize);\n\n const widthStyle = responsiveDefaultSize;\n const isRight = placement === \"right\";\n const heightStyle = height || (parentContainer && !ignoreParentContainerHeight ? \"100%\" : `calc(100vh - ${navbarHeight}px)`);\n\n const motionVariants = {\n initial: { x: isRight ? \"100%\" : \"-100%\" },\n animate: { x: 0 },\n exit: { x: isRight ? \"100%\" : \"-100%\" },\n };\n\n const handleKey = isRight ? \"left\" : \"right\";\n\n const sidebarContent = (\n <SidebarContent\n isOpen={isOpen}\n header={header}\n id={id}\n ref={ref}\n className={className}\n containerClassName={containerClassName}\n headerClassName={headerClassName}\n widthStyle={widthStyle}\n heightStyle={heightStyle}\n motionVariants={motionVariants}\n resizableRef={resizableRef}\n fullScreen={fullScreen}\n maxResizableWidth={maxResizableWidth}\n minWidth={responsiveMinWidth}\n handleKey={handleKey}\n onDragEnd={onDragEnd}\n onResize={onResize}\n >\n {children}\n </SidebarContent>\n );\n\n if (parentContainer) {\n if (!shouldRenderSidebar || !portalTarget) return null;\n return ReactDOM.createPortal(sidebarContent, portalTarget);\n }\n\n if (!shouldRenderSidebar) return null;\n\n return sidebarContent;\n }\n);\n\nResizableSidebar.displayName = \"ResizableSidebar\";\n"],"names":["DragHandle","jsx","jsxs","findParentContainer","parentContainer","setPortalTarget","el","retryEl","handleFullScreenToggle","resizableRef","fullScreen","width","useSidebarEffects","isOpen","onResize","_minWidth","shouldRenderSidebar","setShouldRenderSidebar","useState","portalTarget","useEffect","frame","SidebarContent","header","id","ref","className","containerClassName","headerClassName","widthStyle","heightStyle","motionVariants","maxResizableWidth","minWidth","handleKey","onDragEnd","children","AnimatePresence","motion","cn","Resizable","e","ResizableSidebar","forwardRef","defaultSize","placement","ignoreParentContainerHeight","height","isMainSidebarExpanded","mainSidebarExpandedWidth","mainSidebarCollapsedWidth","navbarHeight","mainSidebarWidth","useRef","responsiveMinWidth","useRespons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AEF,GAEMuB,IAAoB,OAAO,SAAW,MAAc,OAAO,aAAaoB,IAAmB,GAI3FE,IAAqBC,EAAmBtB,CAAQ,GAGhDJ,IAFwB0B,EAAmBX,CAAW,GAGtDY,IAAUX,MAAc,SACxBf,IAAciB,MAAW3C,KAAmB,CAAC0C,IAA8B,SAAS,gBAAgBK,CAAY,QAUhHM,IACJ,gBAAAxD;AAAA,MAACqB;AAAA,MAAA;AAAA,QACC,QAAAT;AAAA,QACA,QAAAU;AAAA,QACA,IAAAC;AAAA,QACA,KAAAC;AAAA,QACA,WAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,iBAAAC;AAAA,QACA,YAAAC;AAAA,QACA,aAAAC;AAAA,QACA,gBAnBmB;AAAA,UACrB,SAAS,EAAE,GAAG0B,IAAU,SAAS,QAAA;AAAA,UACjC,SAAS,EAAE,GAAG,EAAA;AAAA,UACd,MAAM,EAAE,GAAGA,IAAU,SAAS,QAAA;AAAA,QAAQ;AAAA,QAiBpC,cAAA/C;AAAA,QACA,YAAAC;AAAA,QACA,mBAAAsB;AAAA,QACA,UAAUsB;AAAA,QACV,WAlBcE,IAAU,SAAS;AAAA,QAmBjC,WAAArB;AAAA,QACA,UAAArB;AAAA,QAEC,UAAAsB;AAAA,MAAA;AAAA,IAAA;AAIL,WAAIhC,IACE,CAACY,KAAuB,CAACG,IAAqB,OAC3CuC,EAAS,aAAaD,GAAgBtC,CAAY,IAGtDH,IAEEyC,IAF0B;AAAA,EAGnC;AACF;AAEAf,EAAiB,cAAc;"}
1
+ {"version":3,"file":"ResizableSidebar.es.js","sources":["../../../../src/components/data-display/resizable-sidebar/ResizableSidebar.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Resizable } from \"re-resizable\";\n\nimport { useResponsiveWidth } from \"../../../hooks/useResponsiveWidth\";\n\n/**\n * Sidebar placement options\n */\nexport type ResizableSidebarPlacement = \"left\" | \"right\";\n\n/**\n * Props for the ResizableSidebar component\n */\nexport interface ResizableSidebarProps {\n /** Whether the sidebar is open */\n isOpen: boolean;\n /** Content to display in the sidebar */\n children: React.ReactNode;\n /** Whether to display in full screen mode */\n fullScreen?: boolean;\n /** Callback when drag/resize ends */\n onDragEnd?: (() => void) | null;\n /** Callback when resize occurs */\n onResize?: (width: number) => void;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Default size of the sidebar */\n defaultSize?: string;\n /** Minimum width of the sidebar */\n minWidth?: number;\n /** Placement of the sidebar */\n placement?: ResizableSidebarPlacement;\n /** Parent container ID for portal rendering */\n parentContainer?: string;\n /** Header content */\n header?: React.ReactNode;\n /** Unique ID for the sidebar */\n id?: string;\n /** Additional CSS classes for the container */\n containerClassName?: string;\n /** Additional CSS classes for the header wrapper */\n headerClassName?: string;\n /** Whether to ignore parent container height */\n ignoreParentContainerHeight?: boolean;\n /** Custom height */\n height?: string;\n /** Whether the main sidebar is expanded (affects max width calculation) */\n isMainSidebarExpanded?: boolean;\n /** Width of the main sidebar when expanded */\n mainSidebarExpandedWidth?: number;\n /** Width of the main sidebar when collapsed */\n mainSidebarCollapsedWidth?: number;\n /** Height offset for navbar */\n navbarHeight?: number;\n}\n\n/**\n * Drag handle component for the resizable sidebar\n */\nconst DragHandle = () => {\n return (\n <div className=\"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <mask id=\"mask0_36675_12\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"20\" height=\"20\">\n <rect y=\"20\" width=\"20\" height=\"20\" transform=\"rotate(-90 0 20)\" fill=\"#D9D9D9\" />\n </mask>\n <g mask=\"url(#mask0_36675_12)\">\n <path\n d=\"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n );\n};\n\n/**\n * ResizableSidebar component displays a resizable sidebar panel\n *\n * @example\n * ```tsx\n * <ResizableSidebar\n * isOpen={isOpen}\n * onClose={() => setIsOpen(false)}\n * placement=\"right\"\n * minWidth={300}\n * >\n * <div>Sidebar content</div>\n * </ResizableSidebar>\n * ```\n */\n// Helper functions to reduce cognitive complexity\nconst findParentContainer = (parentContainer: string, setPortalTarget: (target: HTMLElement | null) => void) => {\n const el = document.getElementById(parentContainer);\n if (el) {\n setPortalTarget(el);\n } else {\n requestAnimationFrame(() => {\n const retryEl = document.getElementById(parentContainer);\n if (retryEl) setPortalTarget(retryEl);\n });\n }\n};\n\nconst handleFullScreenToggle = (resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>, fullScreen: boolean) => {\n if (!resizableRef.current) return;\n\n if (fullScreen) {\n localStorage.setItem(\"resizable-sidebar-width-before-fullscreen\", String(resizableRef.current.size?.width));\n } else {\n const width = localStorage.getItem(\"resizable-sidebar-width-before-fullscreen\");\n if (width) {\n resizableRef.current.updateSize({ width: width, height: \"100%\" });\n return;\n }\n }\n resizableRef.current.updateSize({\n width: fullScreen ? \"100vw\" : \"\",\n height: \"100%\",\n });\n};\n\nconst useSidebarEffects = (\n parentContainer: string | undefined,\n isOpen: boolean,\n fullScreen: boolean,\n onResize: ((width: number) => void) | undefined,\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>,\n _minWidth: number\n) => {\n const [shouldRenderSidebar, setShouldRenderSidebar] = useState(false);\n const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!parentContainer || typeof window === \"undefined\") {\n setPortalTarget(null);\n return;\n }\n findParentContainer(parentContainer, setPortalTarget);\n }, [parentContainer]);\n\n useEffect(() => {\n handleFullScreenToggle(resizableRef, fullScreen);\n }, [fullScreen]);\n\n useEffect(() => {\n if (parentContainer && isOpen) {\n const frame = requestAnimationFrame(() => {\n setShouldRenderSidebar(true);\n });\n return () => {\n cancelAnimationFrame(frame);\n setShouldRenderSidebar(false);\n };\n }\n\n if (!parentContainer) {\n setShouldRenderSidebar(true);\n }\n\n if (!isOpen) {\n setShouldRenderSidebar(false);\n }\n }, [isOpen, parentContainer]);\n\n useEffect(() => {\n if (resizableRef.current?.size?.width && onResize) {\n onResize(resizableRef.current.size.width);\n }\n }, [resizableRef.current?.size?.width, onResize]);\n\n return { shouldRenderSidebar, portalTarget };\n};\n\nconst SidebarContent = ({\n isOpen,\n header,\n id,\n ref,\n className,\n containerClassName,\n headerClassName,\n widthStyle,\n heightStyle,\n motionVariants,\n resizableRef,\n fullScreen,\n maxResizableWidth,\n minWidth,\n handleKey,\n onDragEnd,\n onResize,\n children,\n}: {\n isOpen: boolean;\n header?: React.ReactNode;\n id?: string;\n ref: React.Ref<HTMLDivElement>;\n className?: string;\n containerClassName?: string;\n headerClassName?: string;\n widthStyle?: string | number;\n heightStyle: string;\n motionVariants: any;\n resizableRef: React.RefObject<React.ElementRef<typeof Resizable>>;\n fullScreen: boolean;\n maxResizableWidth: number;\n minWidth: number;\n handleKey: string;\n onDragEnd?: (() => void) | null;\n onResize?: (width: number) => void;\n children: React.ReactNode;\n}) => (\n <AnimatePresence>\n {isOpen && (\n <motion.div\n ref={ref}\n id={id}\n initial={motionVariants.initial}\n animate={motionVariants.animate}\n exit={motionVariants.exit}\n transition={{ type: \"tween\", duration: 0.3 }}\n className={cn(\n \"flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700\",\n fullScreen ? \"fixed w-full transition translate-x-4 duration-300\" : \"sticky\",\n className,\n )}\n style={{\n width: widthStyle,\n height: heightStyle,\n }}\n >\n <Resizable\n onResize={(e) => {\n e.stopPropagation();\n const width = resizableRef.current?.size?.width;\n if (onResize) {\n onResize(width || minWidth);\n }\n }}\n onResizeStart={(e) => {\n e.stopPropagation();\n }}\n ref={resizableRef}\n maxWidth={fullScreen ? maxResizableWidth : maxResizableWidth * 0.75}\n minWidth={minWidth}\n minHeight={heightStyle}\n maxHeight={heightStyle}\n enable={fullScreen ? {} : { [handleKey]: true }}\n handleClasses={{\n [handleKey]: cn(\n \"relative w-6 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700\",\n // Offset must match the resized edge so it aligns with re-resizable's positioning.\n handleKey === \"left\" ? \"-left-1\" : \"-right-1\",\n ),\n }}\n handleComponent={{\n [handleKey]: (\n <div\n className={cn(\n \"absolute top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]\",\n handleKey === \"left\" ? \"-left-2.5\" : \"-right-2.5\",\n )}\n >\n <DragHandle />\n </div>\n ),\n }}\n className=\"!h-full\"\n onResizeStop={onDragEnd || undefined}\n >\n <div\n className={cn(\n \"h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border\",\n containerClassName,\n )}\n >\n {header ? <div className={cn(\"py-4 px-6\", headerClassName)}>{header || null}</div> : null}\n <div className=\"flex-1 overflow-y-auto overflow-x-hidden\">{children}</div>\n </div>\n </Resizable>\n </motion.div>\n )} \n </AnimatePresence>\n);\n\nexport const ResizableSidebar = forwardRef<HTMLDivElement, ResizableSidebarProps>(\n (\n {\n isOpen,\n children,\n fullScreen = false,\n defaultSize = undefined,\n minWidth = 400,\n onDragEnd = null,\n onResize,\n className,\n placement = \"right\",\n parentContainer,\n header,\n id,\n containerClassName,\n headerClassName,\n ignoreParentContainerHeight = false,\n height,\n isMainSidebarExpanded = false,\n mainSidebarExpandedWidth = 280,\n mainSidebarCollapsedWidth = 80,\n navbarHeight = 64,\n },\n ref\n ) => {\n const mainSidebarWidth = isMainSidebarExpanded ? mainSidebarExpandedWidth : mainSidebarCollapsedWidth;\n const resizableRef = useRef<React.ElementRef<typeof Resizable>>(null);\n const { shouldRenderSidebar, portalTarget } = useSidebarEffects(\n parentContainer,\n isOpen,\n fullScreen,\n onResize,\n resizableRef,\n minWidth\n );\n\n const maxResizableWidth = typeof window !== \"undefined\" ? window.innerWidth - mainSidebarWidth : 0;\n\n // Passed sizes are the desktop maximum; both the drag floor and the open\n // width shrink by viewport breakpoint.\n const responsiveMinWidth = useResponsiveWidth(minWidth);\n const responsiveDefaultSize = useResponsiveWidth(defaultSize);\n\n const widthStyle = responsiveDefaultSize;\n const isRight = placement === \"right\";\n const heightStyle = height || (parentContainer && !ignoreParentContainerHeight ? \"100%\" : `calc(100vh - ${navbarHeight}px)`);\n\n const motionVariants = {\n initial: { x: isRight ? \"100%\" : \"-100%\" },\n animate: { x: 0 },\n exit: { x: isRight ? \"100%\" : \"-100%\" },\n };\n\n const handleKey = isRight ? \"left\" : \"right\";\n\n const sidebarContent = (\n <SidebarContent\n isOpen={isOpen}\n header={header}\n id={id}\n ref={ref}\n className={className}\n containerClassName={containerClassName}\n headerClassName={headerClassName}\n widthStyle={widthStyle}\n heightStyle={heightStyle}\n motionVariants={motionVariants}\n resizableRef={resizableRef}\n fullScreen={fullScreen}\n maxResizableWidth={maxResizableWidth}\n minWidth={responsiveMinWidth}\n handleKey={handleKey}\n onDragEnd={onDragEnd}\n onResize={onResize}\n >\n {children}\n </SidebarContent>\n );\n\n if (parentContainer) {\n if (!shouldRenderSidebar || !portalTarget) return null;\n return ReactDOM.createPortal(sidebarContent, portalTarget);\n }\n\n if (!shouldRenderSidebar) return null;\n\n return sidebarContent;\n }\n);\n\nResizableSidebar.displayName = \"ResizableSidebar\";\n"],"names":["DragHandle","jsx","jsxs","findParentContainer","parentContainer","setPortalTarget","el","retryEl","handleFullScreenToggle","resizableRef","fullScreen","width","useSidebarEffects","isOpen","onResize","_minWidth","shouldRenderSidebar","setShouldRenderSidebar","useState","portalTarget","useEffect","frame","SidebarContent","header","id","ref","className","containerClassName","headerClassName","widthStyle","heightStyle","motionVariants","maxResizableWidth","minWidth","handleKey","onDragEnd","children","AnimatePresence","motion","cn","Resizable","e","ResizableSidebar","forwardRef","defaultSize","placement","ignoreParentContainerHeight","height","isMainSidebarExpanded","mainSidebarExpandedWidth","mainSidebarCollapsedWidth","navbarHeight","mainSidebarWidth","useRef","responsiveMinWidth","useResponsiveWidth","isRight","sidebarContent","ReactDOM"],"mappings":";;;;;;;AA8DA,MAAMA,IAAa,MAEf,gBAAAC,EAAC,OAAA,EAAI,WAAU,oJACb,UAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,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SAAS,gBAAgBK,CAAY,QAUhHM,IACJ,gBAAAxD;AAAA,MAACqB;AAAA,MAAA;AAAA,QACC,QAAAT;AAAA,QACA,QAAAU;AAAA,QACA,IAAAC;AAAA,QACA,KAAAC;AAAA,QACA,WAAAC;AAAA,QACA,oBAAAC;AAAA,QACA,iBAAAC;AAAA,QACA,YAAAC;AAAA,QACA,aAAAC;AAAA,QACA,gBAnBmB;AAAA,UACrB,SAAS,EAAE,GAAG0B,IAAU,SAAS,QAAA;AAAA,UACjC,SAAS,EAAE,GAAG,EAAA;AAAA,UACd,MAAM,EAAE,GAAGA,IAAU,SAAS,QAAA;AAAA,QAAQ;AAAA,QAiBpC,cAAA/C;AAAA,QACA,YAAAC;AAAA,QACA,mBAAAsB;AAAA,QACA,UAAUsB;AAAA,QACV,WAlBcE,IAAU,SAAS;AAAA,QAmBjC,WAAArB;AAAA,QACA,UAAArB;AAAA,QAEC,UAAAsB;AAAA,MAAA;AAAA,IAAA;AAIL,WAAIhC,IACE,CAACY,KAAuB,CAACG,IAAqB,OAC3CuC,EAAS,aAAaD,GAAgBtC,CAAY,IAGtDH,IAEEyC,IAF0B;AAAA,EAGnC;AACF;AAEAf,EAAiB,cAAc;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lax-wp/design-system",
3
3
  "private": false,
4
- "version": "0.14.3",
4
+ "version": "0.14.4",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",