import { forwardRef, HTMLAttributes } from 'react' import { cn } from 'ui' export const MAX_WIDTH_CLASSES = 'mx-auto w-full max-w-[1200px]' export const PADDING_CLASSES = 'px-4 @lg:px-6 @xl:px-10' export const MAX_WIDTH_CLASSES_COLUMN = 'min-w-[420px]' /** * Controls the width and padding of the UI contents. Typically used as the top level child immediately after a layout. * * e.g:``` * * * {children} * * ``` */ export const ScaffoldContainer = forwardRef< HTMLDivElement, HTMLAttributes & { bottomPadding?: boolean size?: 'small' | 'default' | 'large' | 'full' } >(({ className, bottomPadding, size = 'default', ...props }, ref) => { const maxWidthClass = { small: 'max-w-[768px]', default: 'max-w-[1200px]', large: 'max-w-[1600px]', full: 'max-w-none', }[size] return (
) }) /** * Top most header for a page * * Note: In most cases, we won't use this directly in pages. Header title and description can be controlled via * the PageLayout component, which uses the PageHeader component, and in turn uses this ScaffoldHeader component */ export const ScaffoldHeader = forwardRef>( ({ className, ...props }, ref) => { return (
) } ) /** * Title for the top most header for a page * * Note: In most cases, we won't use this directly in pages. Header title and description can be controlled via * the PageLayout component, which uses the PageHeader component, and in turn uses this ScaffoldTitle component */ export const ScaffoldTitle = forwardRef>( ({ className, ...props }, ref) => { return

} ) /** * Description for the top most header for a page * * Note: In most cases, we won't use this directly in pages. Header title and description can be controlled via * the PageLayout component, which uses the PageHeader component, and in turn uses this ScaffoldDescription component */ export const ScaffoldDescription = forwardRef< HTMLHeadingElement, HTMLAttributes >(({ className, ...props }, ref) => { return

}) export const ScaffoldSection = forwardRef< HTMLDivElement, HTMLAttributes & { isFullWidth?: boolean; topPadding?: boolean } >(({ className, isFullWidth, topPadding, ...props }, ref) => { return (

) }) /** * Horizontal divider between ScaffoldSections */ export const ScaffoldDivider = forwardRef>( ({ className, ...props }, ref) => { return
} ) /** * Title for a page section */ export const ScaffoldSectionTitle = forwardRef< HTMLHeadingElement, HTMLAttributes >(({ className, ...props }, ref) => { return

}) /** * Description for a page section */ export const ScaffoldSectionDescription = forwardRef< HTMLParagraphElement, HTMLAttributes >(({ className, ...props }, ref) => { return

}) /** * Child of ScaffoldSection - Left hand column for a section */ export const ScaffoldSectionDetail = forwardRef>( ({ className, children, title, ...props }, ref) => { return (

{title &&

{title}

} {children}
) } ) /** * Child of ScaffoldSection - Right hand column for a section */ export const ScaffoldSectionContent = forwardRef>( ({ className, ...props }, ref) => { return (
) } ) /** * TBD: Provide better JSDocs on how to use this component * * Table and filters */ export const ScaffoldFilterAndContent = forwardRef>( ({ className, ...props }, ref) => { return (
) } ) /** * TBD: Provide better JSDocs on how to use this component * * Actions Group */ export const ScaffoldActionsContainer = forwardRef>( ({ className, ...props }, ref) => { return
} ) /** * TBD: Provide better JSDocs on how to use this component * * Actions Group */ export const ScaffoldActionsGroup = forwardRef>( ({ className, ...props }, ref) => { return
} ) /** * For a single column section - currently only used for vercel integration */ export const ScaffoldColumn = forwardRef>( ({ className, ...props }, ref) => { return (
) } ) /** * For older layouts - eventually to be replaced with ScaffoldContainer component * @deprecated */ export const ScaffoldContainerLegacy = forwardRef>( ({ className, ...props }, ref) => { return (
) } ) ScaffoldHeader.displayName = 'ScaffoldHeader' ScaffoldTitle.displayName = 'ScaffoldTitle' ScaffoldDescription.displayName = 'ScaffoldDescription' ScaffoldContainer.displayName = 'ScaffoldContainer' ScaffoldDivider.displayName = 'ScaffoldDivider' ScaffoldSection.displayName = 'ScaffoldSection' ScaffoldColumn.displayName = 'ScaffoldColumn' ScaffoldSectionDetail.displayName = 'ScaffoldSectionDetail' ScaffoldSectionContent.displayName = 'ScaffoldSectionContent' ScaffoldFilterAndContent.displayName = 'ScaffoldFilterAndContent' ScaffoldActionsContainer.displayName = 'ScaffoldActionsContainer' ScaffoldActionsGroup.displayName = 'ScaffoldActionsGroup' ScaffoldContainerLegacy.displayName = 'ScaffoldContainerLegacy' ScaffoldSectionTitle.displayName = 'ScaffoldSectionTitle' ScaffoldSectionDescription.displayName = 'ScaffoldSectionDescription'