@payfit/unity-components
Version:
84 lines (83 loc) • 3.28 kB
TypeScript
import { VariantProps } from '@payfit/unity-themes';
import { PropsWithChildren } from 'react';
export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
isSticky: {
true: string;
false: string;
};
position: {
sticky: string[];
static: string[];
fixed: string[];
};
}, undefined, string[], {
isSticky: {
true: string;
false: string;
};
position: {
sticky: string[];
static: string[];
fixed: string[];
};
}, undefined, import('tailwind-variants').TVReturnType<{
isSticky: {
true: string;
false: string;
};
position: {
sticky: string[];
static: string[];
fixed: string[];
};
}, undefined, string[], unknown, unknown, undefined>>;
export interface FunnelSidebarProps extends PropsWithChildren<VariantProps<typeof funnelSidebar>> {
/**
* Whether the sidebar is sticky or not
* `@deprecated` use position="sticky" instead
*/
isSticky?: VariantProps<typeof funnelSidebar>['isSticky'];
/**
* The sidebar's positioning scheme. It can be one of three values:
* - `static`: the sidebar does not scroll horizontally with the content
* - `sticky`: When scrolling down, the sidebar sticks close to the top bar
* - `fixed`: the sidebar always stays in the same position when scrolling down
* @default 'sticky'
*/
position?: VariantProps<typeof funnelSidebar>['position'];
'aria-label'?: string;
}
/**
* The `FunnelSidebar` component provides an optional sidebar area in the funnel layout.
* It displays process steps or additional navigation content with proper accessibility
* attributes and responsive sizing that adapts to the layout structure.
* @param {FunnelSidebarProps} props - The props for the `FunnelSidebar` component
* @example
* ```tsx
* import { FunnelSidebar } from '@payfit/unity-components'
*
* function Example() {
* return (
* <FunnelSidebar>
* <TaskMenu>
* <RawTask>
* <TaskTitle>Task 1</TaskTitle>
* </RawTask>
* </TaskMenu>
* </FunnelSidebar>
* )
* }
* ```
* @remarks
* - Automatically receives accessibility attributes from FunnelLayout context
* - Supports sticky positioning for better navigation experience
* - Provides responsive sizing that adapts to content and screen size
* - Automatically sets DataDog's session replay privacy to `data-dd-privacy="allow"`
* @see {@link FunnelSidebarProps} 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/parts 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-funnelsidebar--docs unity-components.payfit.io}
*/
declare const FunnelSidebar: import('react').ForwardRefExoticComponent<FunnelSidebarProps & import('react').RefAttributes<HTMLElement>>;
export { FunnelSidebar };