import type { IntentName } from "@charcuterie/tokens"; import type { ComponentPropsWithRef, ReactNode } from "react"; /** * Two ways a link sits in a layout, and the difference is real rather * than decorative. * * - `inline` lives **inside a sentence**. It is `display: inline`, so * it wraps across lines with the prose around it, it inherits the * surrounding font size rather than declaring one, and it is * underlined — because inside a paragraph, colour alone is the * thing WCAG 1.4.1 says cannot carry the meaning on its own. * - `standalone` is **its own element**: a back-link, a nav item, a * "view all" beside a heading. It is an inline flex box so an * `iconStart` sits on the text's centre line with a real gap, and * it underlines on hover instead of permanently — a column of * permanently-underlined nav items reads as a mistake. */ export type TextLinkAppearance = "inline" | "standalone"; export type TextLinkProps = Omit, "href"> & { appearance?: TextLinkAppearance; /** * Required, and required even when disabled — a navigation that * cannot say where it goes is a button wearing a link's clothes. */ href: string; iconEnd?: ReactNode; /** * The back-arrow, supplied by the app. The library ships no glyphs * — see * `docs/decisions/2026-07-29-ship-no-icons-and-no-symbol-glyphs.md` * — and the seven repos that hand-roll a `← Back` today already own * the character they want. */ iconStart?: ReactNode; intent?: IntentName; isDisabled?: boolean; isExternal?: boolean; /** What `isExternal` announces. Not shown. */ newTabLabel?: string; }; /** * Navigation that looks like a link. * * The fleet has **seven repos** hand-rolling a back-link — each with * its own `←`, its own hover rule, and its own idea of whether focus * is visible — and points-market's header title is a clickable * `
`. This is the thing to reach for instead, and the reason the * split with `ButtonLink` exists at all: the two differ in **paint, * not semantics**. Both render a real ``; picking between * them is picking how it looks, which is a decision an agent can make * correctly from the name alone * ([decision](../../../docs/decisions/2026-08-10-buttons-are-actions-links-are-navigation.md)). * * What it does not do is as load-bearing as what it does: * * - **No `onClick`-only mode.** If it does not navigate, it is a * `Button` with `appearance="ghost"`, not a link. * - **No `size`.** Text takes the size of the text around it. A * standalone link that wants `text-sm` gets it from the block it * sits in, or from `className`. * - **No colour change on hover.** See `TEXT_LINK_BASE_CLASS`. * * `isDisabled` drops `href` rather than shipping a focusable anchor * that ignores clicks; `role="link"` + `aria-disabled` keeps it * announced. Rarer here than on `ButtonLink` — a dead link in a * sentence is usually better written as plain text. */ export declare const TextLink: ({ appearance, children, className, href, iconEnd, iconStart, intent, isDisabled, isExternal, newTabLabel, ...anchorProps }: TextLinkProps) => ReactNode; //# sourceMappingURL=TextLink.d.ts.map