import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import React__default from 'react'; /** * Surface colours the search can be themed with — the footer's thirteen-name * vocabulary (see `footerColors` in footer.tsx) plus `default`, the nswds-app * grey-100 chip that headers embed on a white surface. * * Every derived colour resolves from a single `--search-ink` token, so a * variant only declares its surface utilities and that one value. This map * replaces the FOUR parallel 14-entry cva tables in the nswds-app source * (surface / collapsed / button / focus): each of those tables was a manual * projection of the same underlying ink, so they are collapsed into the * derivations below. * * The derivations are written literally here (once) rather than per-variant: * Tailwind scans source text for class names, so a template-built arbitrary * property would never be emitted. Mirrors footer.tsx (`--footer-*`) and * link.tsx (`--link-halo`). * * Expanded text/surface pairs are the ones verified for footer.tsx: every * light pair clears WCAG 2.2 AA (1.4.3, 4.5:1) — the worst are `primary-600` * (4.57:1) and `accent-600` (5.18:1) — and in dark mode all clear AAA (worst * 13.6:1). The collapsed chip renders no text, only the icon, which paints in * the same ink. */ declare const expandableSearchVariants: (props?: ({ variant?: "default" | "white" | "primary-800" | "primary-600" | "primary-400" | "primary-200" | "grey-800" | "grey-600" | "grey-400" | "grey-200" | "accent-800" | "accent-600" | "accent-400" | "accent-200" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type ExpandableSearchVariant = NonNullable['variant']>; type ExpandableSearchProps = React__default.ComponentPropsWithoutRef<'form'> & VariantProps & { /** * Called with the current query when the form submits (Enter in the field * or a click on the search button). Not called if a supplied `onSubmit` * prevented the event's default. */ onAction?: (value: string) => void; /** Initial query. A non-empty value renders the field expanded. */ defaultValue?: string; ref?: React__default.Ref; }; type ExpandableSearchButtonProps = Omit, 'type'> & { [key: `data-${string}`]: string | number | boolean | undefined; }; type ExpandableSearchFieldProps = Omit, 'type' | 'value' | 'defaultValue'> & { /** * Accessible name for the input, rendered as a visually-hidden `