import type { CSSProperties, VNodeChild } from "vue"; import type { XySemanticClassNames, XySemanticStyles } from "../core"; export type XyAnchorContainer = HTMLElement | Window; export type XyAnchorDirection = "horizontal" | "vertical"; export type XyAnchorScrollBehavior = "auto" | "smooth"; export type XyAnchorSemanticDom = "indicator" | "item" | "itemTitle" | "items" | "root" | "title"; export interface XyAnchorSemanticProps { activeLink: string; direction: XyAnchorDirection; hasItems: boolean; hasTitle: boolean; } export type XyAnchorClassNames = XySemanticClassNames; export type XyAnchorStyles = XySemanticStyles; export interface XyAnchorItem { children?: readonly XyAnchorItem[]; className?: string; disabled?: boolean; href: string; key?: string | number; onClick?: (event: MouseEvent, item: XyAnchorItem) => void; replace?: boolean; style?: CSSProperties; target?: string; targetOffset?: number; text?: string; title?: string; } export interface XyAnchorProps { activeLink?: string; affix?: boolean; ariaLabel?: string; bounds?: number; classNames?: XyAnchorClassNames; defaultActiveLink?: string; direction?: XyAnchorDirection; getContainer?: () => XyAnchorContainer | null | undefined; getCurrentAnchor?: (activeLink: string) => string; items?: readonly XyAnchorItem[]; offsetTop?: number; replace?: boolean; scrollBehavior?: XyAnchorScrollBehavior; showInkInFixed?: boolean; styles?: XyAnchorStyles; targetOffset?: number; title?: string; } export interface XyAnchorItemSlotProps { active: boolean; depth: number; index: number; item: XyAnchorItem; } export interface XyAnchorSlots { default?: () => VNodeChild; item?: (props: XyAnchorItemSlotProps) => VNodeChild; }