its-just-ui
Version:
ITS Just UI - React 18 & React 19 UI component library. 36+ accessible, TypeScript-native components with Tailwind CSS. Zero-config Material UI alternative for SaaS dashboards and enterprise apps.
105 lines (103 loc) • 4.02 kB
TypeScript
import { default as React } from 'react';
import { AnchorVariant, AnchorSize, AnchorDirection, AnchorPosition, ScrollBehavior, EasingFunction, RenderLinkFunction, RenderGroupFunction, RenderIndicatorFunction } from './types';
export interface AnchorProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange' | 'onClick' | 'onScrollEnd' | 'onScrollStart'> {
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;