import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import React__default from 'react'; declare const linkVariants: (props?: ({ variant?: "primary" | "secondary" | "white" | "unstyled" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type LinkComponent = React__default.ElementType; /** * Object form of a link target, mirroring the `UrlObject` accepted by framework * link components such as next/link. Used for `Link`'s `href` when a custom * element/component is supplied via `as` / `LinkProvider`; a plain anchor still * takes a string. * * Fields are optional, matching next/link. Typing the *shape* — rather than the * previous bare `object` — rejects unrelated values like arrays and functions * (both carry a numeric `length`, which is incompatible with `length?: never`). */ type LinkUrlObject = { pathname?: string | null; query?: string | Record | null; hash?: string | null; search?: string | null; host?: string | null; hostname?: string | null; port?: string | number | null; protocol?: string | null; /** Brand that excludes arrays/functions (which have a numeric `length`). */ length?: never; }; type LinkProps = Omit, 'href'> & VariantProps & { as?: LinkComponent; href: React__default.ComponentPropsWithoutRef<'a'>['href'] | LinkUrlObject; ref?: React__default.Ref; }; declare function LinkProvider({ children, component, }: { children: React__default.ReactNode; component: LinkComponent; }): React__default.JSX.Element; declare function Link({ as, variant, className, ref, ...props }: LinkProps): React__default.ReactElement>; type ExternalLinkProps = LinkProps & { /** * Screen-reader suffix announced after the link text. Defaults to * `"(opens in a new tab)"`. Pass an empty string to suppress. */ newTabLabel?: string; /** * Custom trailing icon. Pass `null` to hide the icon entirely. If omitted, * the default open-in-new glyph is rendered. */ icon?: React__default.ReactNode | null; }; /** * Anchor preconfigured for cross-origin / new-tab navigation. Sets * `target="_blank"` and `rel="noopener noreferrer"` by default, renders a * trailing open-in-new icon, and appends a visually-hidden suffix so screen * readers announce that the link opens a new tab. * * All `Link` props are forwarded — `variant`, `as`, `className`, etc. — * and any of `target`, `rel`, `icon`, or `newTabLabel` can be overridden. */ declare function ExternalLink({ children, icon, newTabLabel, target, rel, ref, ...props }: ExternalLinkProps): React__default.JSX.Element; export { ExternalLink, type ExternalLinkProps, Link, type LinkComponent, type LinkProps, LinkProvider, type LinkUrlObject, linkVariants };