UNPKG

its-just-ui

Version:

ITS Just UI - The easiest and best React UI component library. Modern, accessible, and customizable components built with TypeScript and Tailwind CSS. Simple to use, production-ready components for building beautiful user interfaces with ease.

105 lines (103 loc) 3.99 kB
import { default as React } from 'react'; import { AnchorVariant, AnchorSize, AnchorDirection, AnchorPosition, ScrollBehavior, EasingFunction, RenderLinkFunction, RenderGroupFunction, RenderIndicatorFunction } from './types'; export interface AnchorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onClick'> { children?: React.ReactNode; activeId?: string | null; defaultActiveId?: string | null; onChange?: (activeId: string | null) => void; variant?: AnchorVariant; size?: AnchorSize; direction?: AnchorDirection; position?: AnchorPosition; offset?: number; scrollBehavior?: ScrollBehavior; easing?: EasingFunction; duration?: number; hashSync?: boolean; scrollSpy?: boolean; targetIds?: string[]; _renderLink?: RenderLinkFunction; _renderGroup?: RenderGroupFunction; _renderIndicator?: RenderIndicatorFunction; onClick?: (id: string, href: string) => void; onScrollStart?: (targetId: string) => void; onScrollEnd?: (targetId: string) => void; onActiveChange?: (activeId: string | null, previousId: string | null) => void; fontSize?: string; fontWeight?: string; textColor?: string; hoverColor?: string; activeColor?: string; visitedColor?: string; borderStyle?: string; borderColor?: string; borderWidth?: string; borderRadius?: string; backgroundColor?: string; hoverBackgroundColor?: string; indicatorColor?: string; lineColor?: string; dotColor?: string; focusRingColor?: string; _focusRingWidth?: string; focusOutline?: string; boxShadow?: string; gap?: string; padding?: string; paddingX?: string; paddingY?: string; margin?: string; underlineWidth?: string; underlineHeight?: string; underlineOffset?: string; 'aria-label'?: string; 'aria-describedby'?: string; role?: string; } declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<HTMLDivElement>>; export interface AnchorLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'onClick'> { children?: React.ReactNode; href: string; disabled?: boolean; level?: number; icon?: React.ReactNode; active?: boolean; onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void; onMouseEnter?: () => void; onMouseLeave?: () => void; } declare const AnchorLink: React.ForwardRefExoticComponent<AnchorLinkProps & React.RefAttributes<HTMLAnchorElement>>; export interface AnchorGroupProps extends React.HTMLAttributes<HTMLDivElement> { children?: React.ReactNode; title?: string; level?: number; collapsible?: boolean; defaultExpanded?: boolean; expanded?: boolean; onExpandedChange?: (expanded: boolean) => void; } declare const AnchorGroup: React.ForwardRefExoticComponent<AnchorGroupProps & React.RefAttributes<HTMLDivElement>>; export interface AnchorIndicatorProps extends React.HTMLAttributes<HTMLDivElement> { position?: 'left' | 'right'; animated?: boolean; width?: string; color?: string; } declare const AnchorIndicator: React.ForwardRefExoticComponent<AnchorIndicatorProps & React.RefAttributes<HTMLDivElement>>; export interface AnchorContentProps extends React.HTMLAttributes<HTMLDivElement> { children?: React.ReactNode; anchorId: string; title?: string; level?: 1 | 2 | 3 | 4 | 5 | 6; offset?: number; } declare const AnchorContent: React.ForwardRefExoticComponent<AnchorContentProps & React.RefAttributes<HTMLDivElement>>; interface AnchorComponent extends React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<HTMLDivElement>> { Link: typeof AnchorLink; Group: typeof AnchorGroup; Indicator: typeof AnchorIndicator; Content: typeof AnchorContent; } declare const AnchorCompound: AnchorComponent; export { Anchor, AnchorLink, AnchorGroup, AnchorIndicator, AnchorContent }; export default AnchorCompound;