@payfit/unity-components
Version:
41 lines (40 loc) • 2.54 kB
TypeScript
import { default as React, PropsWithChildren } from 'react';
import { VariantProps } from '@payfit/unity-themes';
export declare const funnelLayout: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas uy:overflow-auto", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas uy:overflow-auto", unknown, unknown, undefined>>;
export interface FunnelLayoutProps extends PropsWithChildren<VariantProps<typeof funnelLayout>> {
/** The header content for the funnel layout, typically a FunnelTopBar component */
header: React.JSX.Element;
}
/**
* The `FunnelLayout` component provides a structured layout for multi-step processes and funnels.
* It creates a responsive layout with a fixed top bar and a main content area that accepts
* children components like FunnelBody, FunnelSidebar, and FunnelPage.
* @param {FunnelLayoutProps} props - The props for the `FunnelLayout` component
* @example
* ```tsx
* import { FunnelLayout, FunnelTopBar, FunnelBody, FunnelSidebar, FunnelPage } from '@payfit/unity-components'
*
* function Example() {
* return (
* <FunnelLayout header={<FunnelTopBar title="Setup Process" onBackButtonPress={handleBack} />}>
* <FunnelBody>
* <FunnelSidebar>Sidebar content</FunnelSidebar>
* <FunnelPage>Main content</FunnelPage>
* </FunnelBody>
* </FunnelLayout>
* )
* }
* ```
* @remarks
* - Provides skip navigation links for keyboard users
* - Automatically generates unique IDs for accessibility attributes
* - Creates a full viewport height layout with sticky top bar
* - Automatically sets DataDog's session replay privacy to `data-dd-privacy="mask-user-input"`
* @see {@link FunnelLayoutProps} for all available props
* @see Source code in {@link https://github.com/PayFit/hr-apps/blob/master/libs/shared/unity/components/src/components/funnel-layout GitHub}
* @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library?node-id=10802-11500&m=dev Figma}
* @see Design docs in {@link https://www.payfit.design/24f360409/p/88f9fc-funnel/b/24ca6f Payfit.design}
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/layout-funnellayout--docs unity-components.payfit.io}
*/
declare const FunnelLayout: React.ForwardRefExoticComponent<FunnelLayoutProps & React.RefAttributes<HTMLDivElement>>;
export { FunnelLayout };