import { AnchorHTMLAttributes } from 'react'; import { ButtonHTMLAttributes } from 'react'; import { ComponentPropsWithoutRef } from 'react'; import { CSSProperties } from 'react'; import { DialogHTMLAttributes } from 'react'; import { ElementType } from 'react'; import { FocusEvent as FocusEvent_2 } from 'react'; import { HTMLAttributes } from 'react'; import { InputHTMLAttributes } from 'react'; import { JSX } from 'react'; import { KeyboardEvent as KeyboardEvent_2 } from 'react'; import { MouseEvent as MouseEvent_2 } from 'react'; import { PointerEvent as PointerEvent_2 } from 'react'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { ReactPortal } from 'react'; import { Ref } from 'react'; import { RefObject } from 'react'; import { SelectHTMLAttributes } from 'react'; import { SVGAttributes } from 'react'; import { SVGProps } from 'react'; import { TextareaHTMLAttributes } from 'react'; /** Sections behind headers that open and close: one at a time (`single`) or any number (`multiple`). The arrow keys move between the headers. */ export declare function Accordion({ ref, type, value: valueProp, defaultValue, onValueChange, headingLevel, className, onKeyDown, children, ...rest }: AccordionProps): JSX.Element; /** One section of an `Accordion`: its header and the content it opens. */ export declare function AccordionItem({ ref, value, title, disabled, className, children, ...rest }: AccordionItemProps): JSX.Element; /** The props of `AccordionItem`: a div's attributes, with `title` taking the header's node instead of the HTML attribute. */ export declare interface AccordionItemProps extends Omit, "title">, RefProp { /** What names the section in the accordion's `value`. */ value: string; /** The header's text. It names the section's region too. */ title: ReactNode; /** A section that cannot be opened now; its header stays in the list. */ disabled?: boolean; } /** The props of `Accordion`. */ export declare interface AccordionProps extends Omit, "onChange" | "defaultValue">, RefProp { /** `single` keeps at most one section open, `multiple` any number. */ type?: "single" | "multiple"; /** Controlled: the values of the open sections. A list for both types, so that switching the type changes nothing else. */ value?: readonly string[]; /** Uncontrolled: the sections open at the start. */ defaultValue?: readonly string[]; /** Reports the open sections after a header's click. Controlled, the accordion follows once `value` does; uncontrolled it is a message. */ onValueChange?: (value: string[]) => void; /** The level of the heading each header stands in - the one that fits the page's outline. */ headingLevel?: 2 | 3 | 4 | 5 | 6; } /** * The age of an as-of time at the reference time, in milliseconds. * * Never negative: an as-of time in the future is real - the clocks of source * and screen drift apart - and does not mean that a value is about to become * true, but that it is true right now. It counts as zero old. * * `null` where there is no computable age: without an as-of time there is * none. */ export declare function age(asOf: FreshnessInstant, now: FreshnessInstant): number | null; /** A message that stays put in the page - for what a toast would carry away too soon. Warning and danger interrupt the screen reader, the other tones report politely. */ export declare function Alert({ ref, tone, title, actions, onDismiss, dismissLabel, className, children, ...rest }: AlertProps): JSX.Element; /** The props of `Alert`: a div's attributes, with `title` taking a heading node instead of the HTML attribute. */ export declare interface AlertProps extends Omit, "title">, RefProp { /** How urgent the message is. Only `warning` and `danger` interrupt the screen reader - the other two report politely. */ tone?: AlertTone; /** Heading; without it the body text carries the message on its own. */ title?: ReactNode; /** Actions below the text, e.g. "Try again". */ actions?: ReactNode; /** Shows a dismiss cross and calls this. */ onDismiss?: () => void; /** Label of the dismiss cross. @default the wording's "Close message" */ dismissLabel?: string; } /** How urgent an alert is; it also decides whether a screen reader is interrupted. */ export declare type AlertTone = "neutral" | "accent" | "success" | "warning" | "danger"; /** @deprecated since 0.58 - use PopoverAlign. */ export declare type Align = PopoverAlign; /** Every loaded branch with content. Empty ones stay out because expanding them showed nothing; unloaded ones stay out because one click would otherwise trigger a thousand requests (ADR-0005). */ export declare function allBranches(roots: readonly K[], reader: NodeReader): S[]; /** The chevron that expands and collapses a branch. Drawn pointing right; rotate it by 90 degrees for an open branch. */ export declare function AngleGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** * The library's one voice: says `text` in a polite live region, for what * happened without a visible change in the place a reader is at - a copy made, * a count after a filter. Use it instead of a region of your own: there is one * region, so two announcements never speak over each other. * * Says `text` once announcements have rested for `ANNOUNCE_REST`; a later call * within the rest replaces an earlier one. * * `at` is the element that speaks. Inside a modal `` everything else * is inert and a region there is silent, so the region is the dialog's own - * the portal target's rule, without the provider's setting: that decides where * a surface is laid out, and a region is laid out nowhere. */ export declare function announce(text: string, at?: Element | null): void; /** * What the value is, given the limit set. A pure function of the two. * * A missing or non-finite value yields `unknown` - and nothing else: nobody * knows the deviation of a value nobody has. * * Where several bounds are violated the most severe wins, and among equally * severe ones the one with the greatest excess. A warning must not hide an * alarm, even where the value lies further beyond the warning. * * No hysteresis: that would need the previous state, and a function of a * single value has none. */ export declare function assess(value: number | null | undefined, set?: LimitSet): Assessment; /** The verdict and what led to it. */ export declare interface Assessment { verdict: Verdict; /** The violated limit - the same object the caller passed in. Absent where none is violated. */ limit?: Limit; /** The amount beyond the bound, always positive. Absent where none is violated. */ excess?: number; /** The signed distance from the target. Absent where none is set: no target means no deviation, not a deviation of zero. */ deviation?: number; } /** A mark for a person or a team: a picture, or initials. */ export declare function Avatar({ ref, name, src, initials, size, className, ...rest }: AvatarProps): JSX.Element; /** The props of `Avatar`. */ export declare interface AvatarProps extends Omit, "children">, RefProp { /** The person's or the team's name: it names the mark for a screen reader and the initials are derived from it. */ name: string; /** A picture. When it fails to load, the initials stand in its place. */ src?: string; /** The letters shown when there is no picture. @default the first letters of the first and the last word of `name` */ initials?: string; /** `sm` for a table cell, `md` for a lane's header. */ size?: AvatarSize; } /** The size of an avatar: `sm` for a table cell, `md` for a lane's header. */ export declare type AvatarSize = "sm" | "md"; /** Compact status label; as a `pill` for counters. */ export declare function Badge({ ref, tone, pill, className, children, ...rest }: BadgeProps): JSX.Element; /** The props of `Badge`. */ export declare interface BadgeProps extends HTMLAttributes, RefProp { /** What the badge stands for. There is always a word beside it: a colour on its own is not a statement. */ tone?: BadgeTone; /** Fully rounded pill shape - for counters and key figures. The default is the slightly rounded badge shape for status labels. */ pill?: boolean; } /** What a badge stands for - never the only statement, a word stands beside it. */ export declare type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger"; /** Where a page stands: the trail from the root to the current page. Where it is wider than its place, the middle levels fold into a menu. */ export declare function Breadcrumb({ ref, items, className, ...rest }: BreadcrumbProps): JSX.Element; /** One level of the trail. */ export declare interface BreadcrumbEntry { /** The level's name, as the trail and the menu of folded levels show it. */ label: ReactNode; /** The level's address. Alone, the browser follows it. */ href?: string; /** Routing is the caller's: given, it runs instead of the browser's navigation - on the link and in the menu of folded levels. A level with `onSelect` and no `href` is a button. In the menu a level is a menu entry, not a link: an `href` alone (http, https, mailto or tel) is followed there by `location.assign`, without a new tab or a middle click - whoever needs those routes through `onSelect`. */ onSelect?: () => void; } /** The props of `Breadcrumb`. */ export declare interface BreadcrumbProps extends HTMLAttributes, RefProp { /** The trail from the root to the current page; the last is the page. */ items: readonly BreadcrumbEntry[]; } /** A button with a label. `primary` once per surface; `loading` shows a spinner and locks it. `type` is `button` unless you say otherwise. */ export declare function Button({ ref, variant, size: ownSize, loading, disabled, className, children, type, onClick, ...rest }: ButtonProps): JSX.Element; /** Buttons standing side by side as one control: square inside, rounded outside, a hairline between them. `size` sets one height for all. */ export declare function ButtonGroup({ ref, size, className, children, ...rest }: ButtonGroupProps): JSX.Element; /** The props of `ButtonGroup`. */ export declare interface ButtonGroupProps extends HTMLAttributes, RefProp { /** Label of the group for the screen reader. */ "aria-label"?: string; /** The size of the buttons in it that do not say their own - one group, one height. @default the size around it, else `"md"` */ size?: ButtonSize; } /** The props of `Button`: a native button's attributes and its look. */ export declare interface ButtonProps extends ButtonHTMLAttributes, RefProp { /** How loud the button is. `primary` exactly once per surface - two main actions side by side are no longer a main action. `ghost` is quiet in the accent, `plain` quiet and neutral. */ variant?: ButtonVariant; /** `sm` for buttons in header bars and table rows, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: ButtonSize; /** Shows a loading indicator and locks the button. */ loading?: boolean; } /** A button's two heights - the controls' (`ControlSize`). */ export declare type ButtonSize = ControlSize; /** How loud a button is: `primary` for the one main action, `secondary` by default, `ghost` quiet in the accent, `plain` quiet and neutral, `danger` for a destructive action. */ export declare type ButtonVariant = "primary" | "secondary" | "ghost" | "plain" | "danger"; /** * The cadence at which a display has to re-judge itself, in milliseconds - * derived from the ages, not from a fixed second. A tile that goes stale after * five minutes must not look sixty times a minute. * * A tenth of the smaller age: the change then appears late by at most ten per * cent of that age. Clamped to at most once a second and at least once a * minute. * * Where no age ever takes effect - infinite, not a number - or where both took * effect at once, the state no longer changes by itself; the slowest cadence * is then enough. */ export declare function cadence(ages: FreshnessAges): number; /** A calendar leaf: a sheet with its header and two rings. With `range`, a bar across the sheet stands for the span a range picker chooses. */ export declare function CalendarGlyph({ ref, size, range, ...rest }: CalendarGlyphProps): JSX.Element; /** The props of `CalendarGlyph`. */ export declare interface CalendarGlyphProps extends GlyphProps { /** Draws a bar across the sheet for the span a range picker chooses. @default false */ range?: boolean; } /** A surface that groups content under a head: `CardHeader` and `CardBody` inside a `section`. With `collapsible` the header gets a key that folds the body away. */ export declare function Card({ ref, collapsible, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, className, children, ...rest }: CardProps): JSX.Element; /** The content of a `Card`; the part that folds away in a collapsible card. `flush` removes the padding for a table or a log. */ export declare function CardBody({ ref, flush, className, children, ...rest }: CardBodyProps): JSX.Element; /** The props of `CardBody`. */ export declare interface CardBodyProps extends HTMLAttributes, RefProp { /** Removes the inner padding, e.g. for flush tables. */ flush?: boolean; } /** The head of a `Card`: title, an optional eyebrow and actions on the right. In a collapsible card it carries the fold key. */ export declare function CardHeader({ ref, title, eyebrow, actions, divider, className, ...rest }: CardHeaderProps): JSX.Element; /** The props of `CardHeader`: a div's attributes, with `title` taking a node instead of the HTML attribute. */ export declare interface CardHeaderProps extends Omit, "title">, RefProp { /** The heading of the card. A node and not merely text, so that an identifier with markup can stand in it too. */ title: ReactNode; /** Small all-caps label above the title, e.g. a category. */ eyebrow?: ReactNode; /** Right-aligned area, e.g. buttons or badges. */ actions?: ReactNode; /** * A dividing line below the head. Only set it where the body needs it - * typically with flush data (flush tables, logs). With normal content the * white space carries the hierarchy on its own. */ divider?: boolean; } /** The props of `Card`. */ export declare interface CardProps extends HTMLAttributes, RefProp { /** Allows collapsing and expanding the body through the header. */ collapsible?: boolean; /** Initial state of the collapse mechanism; afterwards it belongs to the card. Only effective together with `collapsible`. */ defaultCollapsed?: boolean; /** Controlled: whether the body is folded away - for a card folded from outside, or one whose state is kept in an address. Only effective together with `collapsible`. */ collapsed?: boolean; /** Reports the wish of the header's button. Controlled, the card folds only once `collapsed` follows; uncontrolled it is merely a message. */ onCollapsedChange?: (collapsed: boolean) => void; } /** A native checkbox with its label beside it; `indeterminate` shows the mixed state. Inside a `FormField` it takes the field's id and description. */ export declare function Checkbox({ ref, label, indeterminate, invalid, className, style, id, onChange, onCheckedChange, ...rest }: CheckboxProps): JSX.Element; /** The props of `Checkbox`: a native checkbox's attributes and its label. */ export declare interface CheckboxProps extends Omit, "type" | "size">, RefProp { /** Label to the right of the checkbox. */ label?: ReactNode; /** Partially checked (e.g. "select all" with a mixed selection). */ indeterminate?: boolean; /** Marks the checkbox as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** Runs with the new state on every click. `onChange` stays for the event - what `register` and Formik read. */ onCheckedChange?: (checked: boolean) => void; } /** A clock face at a quarter past - the time pickers' character. */ export declare function ClockGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** A colour field: a trigger with the colour's swatch and hex value, and a panel with the saturation and brightness square, the hue strip, the hex field, the red, green and blue fields, the eyedropper where the browser has one, the application's own swatches, the contrast against light and dark surfaces, the colour as it was when the panel opened beside the colour now, Cancel and Done. */ export declare function ColorPicker(props: ColorPickerProps): JSX.Element; /** The props of `ColorPicker`: the field's value contract (ADR-0081) with a hex colour for the value. */ export declare interface ColorPickerProps extends Omit, "onChange" | "defaultValue">, RefProp, FormPostProps { /** The colour as a hex string - `#2563eb`, `2563EB` and `#26e` are read; `null` means none. Anything else warns in development and reads as `null`. It leaves as lowercase `#rrggbb`. */ value?: string | null; /** Uncontrolled: the colour to start at. @default null */ defaultValue?: string | null; /** Runs on every settled step - a hex value as soon as it is a whole colour - and once more with the colour the panel opened with when Cancel or Escape put it back. */ onValueChange?: (value: string | null) => void; /** What stands in the empty field. */ placeholder?: string; /** A cross on the trigger and Clear in the panel set `null`. @default false */ clearable?: boolean; /** Locks the field and the panel. */ disabled?: boolean; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the value; the field adds its own padding, swatch and chevron. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as a hex value. */ chars?: number; /** The application's own colours as one-click choices in the panel, named for a screen reader and on hover; the one matching the colour is pressed. @default no default */ swatches?: readonly ColorSwatch[]; /** The surfaces the panel measures the colour against, each with its contrast ratio and Pass or Fail at 3:1 (WCAG 1.4.11 - for marks and lines, not text). An empty list hides the readout. @default core's light and dark surface */ contrastAgainst?: readonly ColorSwatch[]; } /** A named colour: an entry of `swatches`, or a surface in `contrastAgainst`. */ export declare interface ColorSwatch { /** What the colour is called: said by a screen reader and shown on hover (swatch), or the surface's name in the readout. */ name: string; /** A hex colour, `#2563eb` or `2563EB`. */ value: string; } /** A searchable select field (the combobox pattern with a listbox panel). The label of the chosen `value` is kept from the last `options` that held it, so a search that replaces the options does not empty the field - an initial `value` must stand among the first `options`. */ export declare function Combobox(props: ComboboxProps): JSX.Element; /** One possibility of a `Combobox`: the value it stands for and the label it is found by. */ export declare interface ComboboxOption { /** What comes back when this row is chosen. */ value: T; /** What stands there - and what is filtered on. Text and not a node: what cannot be searched is something nobody finds in a combobox. */ label: string; /** Shows the row but does not let it be chosen. */ disabled?: boolean; } /** The props of `Combobox`. */ export declare interface ComboboxProps extends Omit, "onChange" | "defaultValue">, RefProp, FormPostProps { /** The possibilities, in their natural order. Filtered while typing; never reordered. */ options: readonly ComboboxOption[]; /** The chosen value; `null` and `undefined` mean none. With it the field is controlled; without it the field keeps the value itself, from `defaultValue`. */ value?: T | null; /** Uncontrolled: the value to start at. @default null */ defaultValue?: T | null; /** Runs on choosing and on clearing (`null`). Not while typing: what is typed is a search term and not yet a value. */ onValueChange?: (value: T | null) => void; /** What stands in the empty field. */ placeholder?: string; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the typed text and the chosen option; the field adds its own padding, chevron and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and is 20 characters wide where the place asks - in a toolbar or a row. The panel is never narrower than the field. */ chars?: number; /** Locks field and panel. */ disabled?: boolean; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** Text shown for an empty search result. */ emptyText?: string; /** Shows a cross on selection or input that clears field and selection. */ clearable?: boolean; /** Runs on every change of the typed text - the clearing cross's too, with `""` - and not on opening or closing. For an application that fetches the matches itself: debounce and cancelling stale requests are yours. */ onSearch?: (text: string) => void; /** With `false` the field filters nothing: `options` are shown as given, in their order - the server's ranking. The active option returns to the first when they change while the panel is open. @default true */ filter?: boolean; /** Results are on their way: the list shows the wording's "Loading" line where it would show the empty text, below any `options` given, and is `aria-busy`. */ loading?: boolean; /** For string values: typed text that fits no option's label is offered as a last row, `Add "text"`, and Enter or a click makes it the value - reported through `onValueChange` like a choice. The field then shows the text itself, and the form posts it. @default false */ creatable?: boolean; /** With `creatable`: runs when the typed text was taken as the value, so the application can add it to `options`. */ onCreate?: (text: string) => void; } /** A window above the application in which one types and finds: it searches `items` by subsequence, ranks and marks the matches, and reports the chosen candidate's `id` to `onSelect`. Controlled through `open` and `onClose`. */ export declare function CommandPalette({ ref, open, onClose, items, onSelect, onChoose, restingItems, maxFinds, className, onCancel, onMouseDown, onKeyDown: callerKeyDown, onKeyDownCapture, ...rest }: CommandPaletteProps): JSX.Element; /** A candidate the palette can find - the outside of the term CONTEXT.md lists under "Finding" as a Candidate. */ export declare interface CommandPaletteItem { /** What is reported on choosing. */ id: string; /** What is searched and displayed. */ label: string; /** The heading the candidate stands under. It is searched as well. */ group?: string; /** * The part of `group` that is searched, where not all of it should be: a * prefix every candidate of a set shares - `core · ` before `core · Inputs` - * would otherwise let its few letters find the whole set. * * @default the whole `group` */ searchedGroup?: string; /** Optional glyph on the left of the row. */ icon?: ReactNode; /** * Added to the rank. With it frequency or recency can be expressed - the * library deliberately keeps no memory for that. */ weight?: number; /** * More words the candidate is found by, such as synonyms - searched but never * shown. Only when neither `label` nor `group` matched, only for a query of * three characters or more, and as a contiguous run, not as a subsequence. A * find through them stands behind every find in a label or a group and marks * nothing. */ keywords?: readonly string[]; } /** The props of `CommandPalette`. */ export declare interface CommandPaletteProps extends Omit, "open" | "onClose" | "onSelect" | "children">, RefProp { /** Controlled like the modal: opening is the caller's decision. */ open: boolean; /** Reports every wish to close - Escape, an outside click, the close button - and never a choice: `onSelect` closes the palette itself where the choice ends the work. */ onClose: () => void; /** The candidates that are searched. They belong to the caller: the palette keeps no memory and does not reorder them. */ items: readonly CommandPaletteItem[]; /** Reports the `id` of the chosen candidate. What happens next is the caller's decision - that is exactly what keeps places and commands together. */ onSelect?: (id: string) => void; /** The old name of `onSelect`. @deprecated since 0.58 - use onSelect. */ onChoose?: (id: string) => void; /** * What stands there as long as nothing is typed. Without a value: nothing, * and the window is only the field. * * A LIST and not a switch, because the interesting question is not "all or * none" but "which". Whoever really wants to show everything passes * `restingItems={items}`; whoever wants to show the five most recently used * passes those - and a switch cannot do that. With long lists "all" is also * exactly the state this component did away with: a list that is already * full can only shrink. * * The rows stand in THIS order and without marks: without a query there is * no rank and nothing to mark. Rank and weight therefore play no part here; * the order belongs to the caller. */ restingItems?: readonly CommandPaletteItem[]; /** * The most finds that stand at once - the best by rank. A last line says how * many more there are, and typing on narrows them. For a long list of * candidates, where a single letter finds hundreds and drawing them all * would make every keystroke wait. * * @default every find */ maxFinds?: number; } /** Options of `useCommandPaletteShortcut`. */ export declare interface CommandPaletteShortcutOptions { /** * Whether "/" opens the palette (WCAG 2.1.4: offer the user a way to turn a single-key shortcut off). Cmd+K / Ctrl+K is unaffected. * @default true */ slash?: boolean; /** * The window the keys are bound to - an iframe's `contentWindow`, when the * palette lives in the frame's document. * * @default window */ target?: Window | null; } /** Compact confirmation dialog on the basis of Modal. */ export declare function ConfirmDialog({ ref, open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, tone, loading, ...rest }: ConfirmDialogProps): JSX.Element; /** The props of `ConfirmDialog`. */ export declare interface ConfirmDialogProps extends Omit, "open" | "onClose" | "title" | "children">, RefProp { /** Whether the query stands. */ open: boolean; /** Cancelling: Escape, cross, backdrop or the second button. */ onClose: () => void; /** Agreeing. Called once per opening - a second press, however quick, does nothing, until `loading` ends with the dialog still open. The dialog does not close itself from that – whoever wants to show a confirmation in progress still needs it. A promise returned from it that settles (also by failing) with the dialog still open lets the confirmation be given again, without `loading`. */ onConfirm: () => void | Promise; /** The question, as a statement: "Delete invoice 2041?". */ title: ReactNode; /** What about it cannot be taken back. The most important line of the dialog. */ description?: ReactNode; /** Label of the agreeing button. Better is the verb of the action: "Delete" says what is about to happen. @default the wording's "Confirm" */ confirmLabel?: string; /** Label of the cancelling button. @default the wording's "Cancel" */ cancelLabel?: string; /** "danger" for destructive actions. */ tone?: "primary" | "danger"; /** Locks the actions, Escape and the backdrop while the confirmation is running. */ loading?: boolean; } /** * A menu that opens at a point instead of under a trigger – for a right-click * on something that is not a button: a canvas, a row, a subtask. Open it with * `useContextMenuTrigger`, which also covers the context-menu key and a long * press, the only way on iOS. * * It hangs from an invisible anchor that stands at the point, so the one * popover does the placing, the dismissal and the portal. The focus goes to * the first entry and, on closing, back to where it was when the menu opened. */ export declare function ContextMenu({ open, onOpenChange, position, "aria-label": name, children }: ContextMenuProps): JSX.Element; declare interface ContextMenuBase { /** Accessible name of the menu: what it acts on. A context menu has no trigger whose label could name it. */ "aria-label"?: string; /** Whether the menu stands. Controlled, like `Popover`: a right-click opens it only because the caller says so. */ open: boolean; /** Reports every wish to change the state – an entry chosen, Escape, an outside click. */ onOpenChange: (open: boolean) => void; /** Where the menu opens, in client coordinates – the point that `useContextMenuTrigger` hands to its callback (right-click, context-menu key or long press), or any `clientX` and `clientY` of your own. At a window edge the panel flips and clamps as every popover does. */ position: { x: number; y: number; }; /** The entries – `MenuItem` and `MenuSeparator`, as in `Menu`. */ children: ReactNode; } /** The props of `ContextMenu`. The menu is named by what it acts on - it has no trigger whose label could name it: `aria-label` is required. */ export declare type ContextMenuProps = ContextMenuBase & { /** Accessible name of the menu: what it acts on. */ "aria-label": string; }; /** What `useContextMenuTrigger` returns: spread it on the target. */ export declare interface ContextMenuTriggerProps extends LongPressHandlers { /** Opens at the pointer on a right-click; a finger's own `contextmenu` is held back. */ onContextMenu: (event: MouseEvent_2) => void; /** Opens at the target's box on the context-menu key or Shift+F10. */ onKeyDown: (event: KeyboardEvent_2) => void; /** Keeps the system from selecting text or showing its callout under the held finger. */ style: CSSProperties; } /** The two heights of a control: `sm` for a toolbar and dense forms, `md` otherwise. */ export declare type ControlSize = "sm" | "md"; /** Sets the size of the controls inside it - every control with `size` takes it unless it says its own. A popover, dialog or tooltip opened from inside starts without it. */ export declare function ControlSizeProvider({ size, children }: ControlSizeProviderProps): JSX.Element; /** The props of `ControlSizeProvider`. */ export declare interface ControlSizeProviderProps { /** The size of every control inside that does not say its own. */ size: ControlSize; /** The place the size holds for. */ children: ReactNode; } /** * The one long-press detector, a plain function over pointer events so that * code outside React can use it. `onPress` fires once, with the finger's point * in client coordinates, when a touch pointer has been held 500 ms within 10 px; * `onEnd` fires when a press that has fired is lifted or cancelled. A move * beyond 10 px, a lift and `pointercancel` before the hold cancel it silently. */ export declare function createLongPress(onPress: (at: PressPoint) => void, onEnd?: () => void): LongPress; /** The cross that clears a field, removes a tag or a chip, and closes a dialog, a toast or an alert - one drawing at the size of its place. */ export declare function CrossGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** A date selection with a calendar panel; weeks begin on Monday. The panel's foot takes a typed date, read in the order the formats in use write one. */ export declare function DatePicker(props: DatePickerProps): JSX.Element; /** * The value contract: every way - the grid, "Today", clearing - hands out * midnight in the formats' zone (the reader's, unless the application names * one; resolution "day"). There is no path that delivers a time of day along * with it. */ export declare interface DatePickerProps extends Omit, "onChange" | "defaultValue">, RefProp, FormPostProps { /** The day, as a `Date` on midnight in the formats' zone (the reader's, unless the application names one); `null` means none. */ value?: Date | null; /** Uncontrolled: the value to start at. @default null */ defaultValue?: Date | null; /** Runs as soon as a day is settled - on a click in the grid, on "Today" and on clearing (`null`). Every one of these ways hands out midnight in the formats' zone; there is none that delivers a time along with it. */ onValueChange?: (date: Date | null) => void; /** What stands in the empty field. */ placeholder?: string; /** Locks the field and the panel. */ disabled?: boolean; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates. */ chars?: number; /** Shows a cross where a value is set, which fades in on hover/focus and clears the value, and the open panel offers Clear. Without it no way to empty the value is offered. */ clearable?: boolean; /** The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. */ min?: Date; /** The latest day the picker offers, inclusive; read as `min` is. */ max?: Date; } /** A span between two dates, both ends included - the value of `DateRangePicker` and `DateTimeRangePicker`. */ export declare interface DateRange { from: Date; to: Date; } /** * The time span selection - the convenience component of the library. * * The interaction logic (designed for a minimal number of clicks and zero * mis-operation): * - The first click sets the start, the second click the end; the panel applies * immediately and closes. No "Apply" click needed. * - If the second click lies BEFORE the start, both swap silently - a time span * is never "the wrong way round", there is no error state. * - After the first click, sweeping shows the arising range as a preview band, * and the foot line counts the days along live. * - The presets on the left choose common time spans with one click; the preset * that currently matches is marked. * - Two chained months: paging on the outside, no day appears twice. * - The same day clicked twice = a one-day time span. */ export declare function DateRangePicker(props: DateRangePickerProps): JSX.Element; /** * The value contract: both ends on midnight in the formats' zone (resolution "day"), and `from` * never lies after `to` - a range dragged backwards is silently turned around. * Both ends count inclusively. There is no error state. */ export declare interface DateRangePickerProps extends Omit, "onChange" | "defaultValue">, RefProp, FormPostRangeProps { /** The time span, both ends on midnight in the formats' zone (the reader's, unless the application names one) and both inclusive; `null` means none. */ value?: DateRange | null; /** Uncontrolled: the value to start at. @default null */ defaultValue?: DateRange | null; /** Runs as soon as both ends are settled - after the second click, on a preset and on clearing (`null`). Ends dragged backwards swap silently; there is no error state to handle. */ onValueChange?: (range: DateRange | null) => void; /** What stands in the empty field. */ placeholder?: string; /** Locks the field and the panel. */ disabled?: boolean; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates. */ chars?: number; /** Shows a cross where a value is set, which fades in on hover/focus and clears the value, and the open panel offers Clear. Without it no way to empty the value is offered. */ clearable?: boolean; /** * The quick-select column in the panel. An empty array hides the column. * * @default `DEFAULT_PRESETS`, in the wording's labels */ presets?: readonly RangePreset[]; /** The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. */ min?: Date; /** The latest day the picker offers, inclusive; read as `min` is. */ max?: Date; } /** A date and a time of day in one field, with a calendar panel. The value is an exact instant and is reported only on "Apply", "Now" or "Clear"; the missing and doubled hours of a daylight-saving change are asked about, not guessed. */ export declare function DateTimePicker(props: DateTimePickerProps): JSX.Element; /** * The value contract: an exact instant (resolution "instant"), with seconds * depending on `withSeconds`. If the entered wall-clock time falls into a * change of daylight saving time, the instant handed out can deviate from it: a * skipped hour is pushed forward, and for a doubled hour the choice made in the * panel applies (the default being the earlier one). A value is reported only * with "Apply", "Now" or "Clear", not already on the click on a day. */ export declare interface DateTimePickerProps extends Omit, "onChange" | "defaultValue">, RefProp, FormPostProps { /** The instant; `null` means none. The panel reads and sets its day and wall clock in the formats' zone (the reader's, unless the application names one). */ value?: Date | null; /** Uncontrolled: the value to start at. @default null */ defaultValue?: Date | null; /** Runs only on completion - "Apply", "Now" or "Clear" - and not already on the click on a day: a day without a time would be a half-set value here, and a half value is no value. */ onValueChange?: (date: Date | null) => void; /** Show the seconds field. */ withSeconds?: boolean; /** What stands in the empty field. */ placeholder?: string; /** Locks the field and the panel. */ disabled?: boolean; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates. */ chars?: number; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** Shows a cross where a value is set, which fades in on hover/focus and clears the value, and the open panel offers Clear. Without it no way to empty the value is offered. */ clearable?: boolean; /** The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. */ min?: Date; /** The latest day the picker offers, inclusive; read as `min` is. */ max?: Date; } /** * A time span with times at both ends - the same interaction logic as the * DateRangePicker, extended by times, without sacrificing the lightness: * - Two clicks set the days (backwards allowed, the ends swap silently), after * which the focus jumps straight into the first time field: type 0800, slide * on, type 1700, Enter - done. * - "All day" (the default with an empty value) sets 00:00-23:59 and turns the * whole thing back into the two-click selection: after the second click the * focus lies on "Apply", and Enter completes it. * - The foot line counts along live: days during the selection of days, the * exact duration as soon as both times are settled. * - If the end lies in time before the start, both swap on applying - there is * no error state. * - Missing and doubled hours of the daylight-saving change are recognised per * end and treated honestly, as in the DateTimePicker. */ export declare function DateTimeRangePicker(props: DateTimeRangePickerProps): JSX.Element; /** * The props resemble the union of DateRangePickerProps and DateTimePickerProps - * the promises expressly do NOT. * * The value contract: exact instants (resolution "instant"), not midnight. * `from` never lies after `to`. Presets mean the same days as in the * DateRangePicker, but express the end as the last representable moment of the * day (23:59 or 23:59:59 depending on `withSeconds`) instead of as midnight. For * the daylight-saving change the same reservation holds as for the * DateTimePicker, separately per end of the range. */ export declare interface DateTimeRangePickerProps extends Omit, "onChange" | "defaultValue">, RefProp, FormPostRangeProps { /** The time span with times at both ends; `null` means none. The panel reads and sets days and wall clocks in the formats' zone (the reader's, unless the application names one). */ value?: DateRange | null; /** Uncontrolled: the value to start at. @default null */ defaultValue?: DateRange | null; /** Runs only on "Apply" and on clearing (`null`), never between the two clicks. If the end lies before the start, both swap on applying - there is no error state. */ onValueChange?: (range: DateRange | null) => void; /** Show the seconds fields. */ withSeconds?: boolean; /** What stands in the empty field. */ placeholder?: string; /** Locks the field and the panel. */ disabled?: boolean; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates. */ chars?: number; /** Shows a cross where a value is set, which fades in on hover/focus and clears the value, and the open panel offers Clear. Without it no way to empty the value is offered. */ clearable?: boolean; /** * The quick-select column in the panel; presets apply for the whole day and * close immediately. An empty array hides the column. * * @default `DEFAULT_PRESETS`, in the wording's labels */ presets?: readonly RangePreset[]; /** The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. */ min?: Date; /** The latest day the picker offers, inclusive; read as `min` is. */ max?: Date; } /** The instance shipped by default: English notation on a 24-hour clock (ADR-0024). German is `GERMAN_FORMATS` in `@umriss-ui/core/wording/de`. */ export declare const DEFAULT_FORMATS: Formats; /** English formats and English wording - what every component uses without a `LanguageProvider`. */ export declare const DEFAULT_LANGUAGE: Language; /** The same time spans with the preset labels. */ export declare const DEFAULT_PRESETS: RangePreset[]; /** The separators of the default notation. */ export declare const DEFAULT_SEPARATORS: Separators; /** The instance shipped by default. English; German is `GERMAN_WORDING` in `@umriss-ui/core/wording/de` (ADR-0019). */ export declare const DEFAULT_WORDING: Wording; /** How densely the library builds. A component with a density of its own takes it through `useDensityFor` as the default for its `density` - in @umriss-ui/table the table, in @umriss-ui/calculation the calculation; a compact set of tokens does not exist. */ export declare type Density = "regular" | "compact"; /** @deprecated since 0.58 - use TreeDirection. */ export declare type Direction = TreeDirection; /** A line between rows or columns; with `label` a named separator. */ export declare function Divider({ ref, orientation, strong, label, className, ...rest }: DividerProps): JSX.Element; /** The props of `Divider`. */ export declare interface DividerProps extends HTMLAttributes, RefProp { /** Horizontally it separates rows, vertically it separates columns. */ orientation?: "horizontal" | "vertical"; /** A stronger line - for section boundaries rather than row separation. */ strong?: boolean; /** A label in the middle. It makes the line a named separator. */ label?: ReactNode; } /** A `Modal` that stands at an edge of the window and enters from it - the same dialog with the same head, body and foot. Its width is the token `--u-drawer-width`. */ export declare function Drawer({ ref, side, className, ...rest }: DrawerProps): JSX.Element; /** The props of `Drawer`: a `Modal`'s, with `side` in place of `size`. */ export declare interface DrawerProps extends Omit { /** The edge the drawer stands at and enters from. */ side?: "right" | "left"; } /** An eyedropper: a pipette with its bulb at the top and its tip at the bottom left. */ export declare function DropperGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** The first key that occurs twice, otherwise null. Two nodes with the same key break the cascade and the active node silently - `useTree` reports that during development. */ export declare function duplicateKey(roots: readonly K[], reader: NodeReader): S | null; /** An empty surface as an invitation to act - not as a dead end. */ export declare function EmptyState({ ref, title, description, action, icon, className, ...rest }: EmptyStateProps): JSX.Element; /** The props of `EmptyState`: a div's attributes, with `title` taking a node instead of the HTML attribute. */ export declare interface EmptyStateProps extends Omit, "title">, RefProp { /** What is missing here - as a statement, not as an apology. */ title: ReactNode; /** One sentence on why nothing is here and what would put something here. */ description?: ReactNode; /** The way into the next action, e.g. a button. */ action?: ReactNode; /** Optional symbol above the title. */ icon?: ReactNode; } /** The chevron against a bar: the last step of a sequence. Drawn pointing right; turn it by 180 degrees for the first. */ export declare function EndGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** A file field with a drop zone: choose or drop files, and remove them from the list again. Nothing is uploaded - that is the application's. */ export declare function FileInput(props: FileInputProps): JSX.Element; /** The props of `FileInput`: a native file input's attributes, with the files as the value. */ export declare interface FileInputProps extends Omit, "type" | "value" | "defaultValue" | "onChange" | "size">, RefProp { /** Controlled: the chosen files; `undefined` reads as none. Uncontrolled, the input keeps its own, from `defaultValue`. */ value?: readonly File[]; /** Uncontrolled: the files to start with. @default [] */ defaultValue?: readonly File[]; /** Reports the files after a choice, a drop or a removal - only those `accept` takes, and one where the input takes one. */ onValueChange?: (files: File[]) => void; /** Marks the input as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; } /** One visible node of a tree, with everything a row needs to be drawn and read out: level, branch or leaf, check state, search state and position among its siblings. */ export declare interface FlatteningEntry { node: K; key: S; /** Roots stand at 0. Drives the indentation and what is read out. */ level: number; /** The node's text; here, so that typeahead can be a pure function over the flattening and needs no reader. */ label: string; branch: boolean; /** Branch without content: expanding it showed nothing. An unloaded branch is not empty - it could have children. */ empty: boolean; /** May not be checked (ADR-0005). It stays navigable. */ disabled: boolean; /** Could have children that are not present. For checking exactly the same as disabled: whatever has to reach its descendants may not act on it. */ unloaded: boolean; expanded: boolean; checked: boolean; /** Derived: not checked itself, but at least one descendant is. */ indeterminate: boolean; active: boolean; /** Matched the search itself. Without a search text every entry matches, so that the surface needs no special case. */ matches: boolean; /** Stands there only because a descendant matches - a signpost. The surface dims these and only these. A child under a matching branch is neither a match nor a signpost but context: it stays normal. */ pathOnly: boolean; /** 1-based, among the siblings that survive the filter. */ position: number; siblings: number; } /** * A span as hours and minutes from the wording's short units ("1 hr 30 min"). * The span is rounded to the whole minute, so 1 h 29 min 40 s reads as * 1 hr 30 min everywhere; a span of no minutes reads "0 min", a negative one * as its size. With `days` the whole days lead and the hours stay below 24. */ export declare function formatDuration(ms: number, wording: Wording, options?: { days?: boolean; }): string; /** Everything the library knows about formatting. */ export declare interface Formats { /** The language tag the set was built in: "en-GB". */ locale: string; /** The IANA name of the time zone instants are written in, or `undefined` for the reader's own. */ timeZone: string | undefined; /** The zone's generic name in the set's locale: "Central European Time". Empty until the page has hydrated where no zone is named. */ timeZoneName: (d: Date) => string; /** Date as displayed: 17/03/2026 */ date: (d: Date) => string; /** Short form without the year, in the range footer: 17/03 */ dateShort: (d: Date) => string; /** The calendar's month header: March 2026 */ month: (d: Date) => string; /** The month alone, in the calendar head's month list: March */ monthName: (d: Date) => string; /** Accessible name of a calendar cell: Tuesday, 17 March 2026 */ dateLong: (d: Date) => string; /** The first day of the calendars' week, ISO-numbered: 1 = Monday ... 7 = Sunday. */ weekStart: number; /** Time of day, optionally with seconds: 09:05 or 09:05:03 */ time: (d: Date, withSeconds: boolean) => string; /** Date and time together: 17/03/2026, 09:05 */ dateTime: (d: Date, withSeconds: boolean) => string; /** Short form of the UTC offset: GMT+2 */ offset: (d: Date) => string; /** * A number in the set's notation. Without a digit count the value stands to * the tenth decimal place, and a non-zero value that would read 0 there is * written in scientific notation; with one it is padded and rounded to * exactly that many places. */ number: (n: number, decimals?: number) => string; /** * A number written with Intl's own options in the set's locale: a currency, * a year without grouping, scientific notation. Pure Intl options - the * `decimals` shorthand is expanded by `writeNumber` before it. Like the * others it writes no negative zero unless the options set `signDisplay`. */ numberWith: (n: number, options: Intl.NumberFormatOptions) => string; /** * A count. Kept apart from `number` because it makes a different promise: a * count is whole, and Intl's own rounding (at most three decimal places) is * right for it and wrong for a measurement. */ count: (n: number) => string; /** A share from 0 to 1 as whole per cent: 74 % */ percent: (share: number) => string; /** The ordering of two texts by the set's collation. */ compareText: (a: string, b: string) => number; /** An elapsed duration as a phrase: "3 minutes ago". The amount comes in milliseconds, counted back from now. */ relative: (ms: number) => string; } /** Every format of one locale, built once. The options are the product's, not the locale's: two-digit day and month, the month written out with its year, a 24-hour clock, per cent without decimals. What the locale decides is the order of the parts and the separators - 17/03/2026 against 17.03.2026 - and the words of the month, the weekday and "3 minutes ago". */ export declare function formatsFor(locale: string, timeZone?: string): Formats; /** A label, a hint or error and the control they belong to. The control inside takes the field's id, description, required and invalid state by itself - no wiring by hand. */ export declare function FormField({ ref, label, hint, error, required, fieldId, labelPlacement, className, children, ...rest }: FormFieldProps): JSX.Element; /** * Resets the FormField context. For the innards of panels (search field, * option checkboxes) that are rendered through a portal inside a FormField: * without a boundary they inherit its field id - a click on an option label * then activates the field's trigger through htmlFor and closes the panel * again immediately. */ export declare function FormFieldBoundary({ children }: FormFieldBoundaryProps): JSX.Element; /** The props of `FormFieldBoundary`. */ export declare interface FormFieldBoundaryProps { /** What stands outside the field's wiring. */ children: ReactNode; } /** What `useFormField` returns: the wiring a field inside a FormField reads. */ export declare interface FormFieldContextValue { id: string; /** The label's own id. `label htmlFor` names only what HTML can label - an input, a select, a button; a group (`role="radiogroup"`) is named through `aria-labelledby` with this. */ labelId: string; describedBy?: string; invalid: boolean; /** A required field. Every field whose role carries it turns this into `aria-required` - just as it does with `aria-describedby` and `aria-invalid`. */ required: boolean; } /** The props of `FormField`. */ export declare interface FormFieldProps extends HTMLAttributes, RefProp { /** The label of the field. It is mandatory: a field without a name is a field without a question for a screen reader. */ label: ReactNode; /** Help text below the field. Replaced by `error`. */ hint?: ReactNode; /** Error message; it marks the field as invalid at the same time. */ error?: ReactNode; /** Sets the required mark on the label and `aria-required` on the field - on Input, Select, Textarea, NumberInput, Combobox, RadioGroup and Checkbox. The triggers of the pickers and of the MultiSelect are buttons, on which `aria-required` is not a permitted attribute; there the mark carries it alone. It validates nothing - validation belongs to the caller (ADR-0060). */ required?: boolean; /** Optional: a fixed id for the input element (instead of a generated one). */ fieldId?: string; /** Where the label stands: `"top"` above the field (the default) or `"start"` beside it, in a column as wide as `--u-label-width`, level on the first baseline. `"start"` is for a column of fields and fills its place; where the row cannot hold the label and 12rem of field, the field wraps under the label. A `Grid` of fields keeps `"top"`. */ labelPlacement?: "top" | "start"; } /** A field that has no native control to post its value: its `name`, and how one posted value is written. */ declare interface FormPostProps { /** Posts the value under this name in a `
` (a hidden input), as a native control would; empty posts `""`. */ name?: string; /** Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. */ formValue?: (value: V) => string; } /** The form participation of a range picker: two entries, `Start` and `End` unless named. */ declare interface FormPostRangeProps extends FormPostProps { /** The name the start is posted under. @default `${name}Start` */ startName?: string; /** The name the end is posted under. @default `${name}End` */ endName?: string; } /** How old a value is right now - independently of how it is judged and how far its source vouches for it. */ export declare type Freshness = "fresh" | "stale" | "lost"; /** * The freshness of a value: its as-of time, measured against a reference time, * placed against the two ages. * * A missing as-of time yields `lost`, and that is decided rather than * computed: `stale` presupposes that we know the age. Where we do not know it, * nothing covers the value, and that is the same statement as a broken * connection. The check therefore stands before any arithmetic and not inside * it. * * What the value means - good, critical, whatever - is not at issue here and * is not touched by this function. */ export declare function freshness(asOf: FreshnessInstant, now: FreshnessInstant, ages: FreshnessAges): Freshness; /** * The two ages at which a value changes its state, in milliseconds. Both * bounds belong to the older state: exactly five minutes old is already * `stale`. * * `alt <= lost` is the sensible order. Stated the other way round, the * harder statement still wins - the middle state simply falls away. */ export declare interface FreshnessAges { /** From this age on the value counts as stale, but keeps its verdict. */ stale: number; /** From this age on the connection counts as disconnected. */ lost: number; } /** What may come in as an as-of time or a reference time. */ export declare type FreshnessInstant = Date | number | null | undefined; /** What `useFreshness` returns: how fresh the value is, how old, and the time the reading was taken at. */ export declare interface FreshnessReading { /** `fresh`, `stale` or `lost` - never a verdict. */ freshness: Freshness; /** Age in milliseconds, never negative; `null` without an as-of time. For the wording. */ age: number | null; /** The reference time of this reading, in milliseconds since the epoch. */ now: number; } /** The props of a glyph: an SVG's attributes and its edge length. */ export declare interface GlyphProps extends Omit, "viewBox" | "children">, RefProp { /** * Edge length in pixels. Each glyph has the size it is drawn at in the * components. */ size?: number; } /** Children in a grid: a fixed number of columns, a list of column widths, or as many columns as fit at `minItemWidth`. */ export declare function Grid({ ref, columns, minItemWidth, gap, className, style, children, ...rest }: GridProps): JSX.Element; /** The width of one column in `Grid`'s list: a number in pixels, or `"fill"` for a share of what the other columns leave. */ export declare type GridColumnWidth = number | "fill"; /** The grid laid over an area. Two by two lines; the frame is missing on purpose, otherwise it would be a window. */ export declare function GridGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** The props of `Grid`. */ export declare interface GridProps extends HTMLAttributes, RefProp { /** How many columns, all of one width - or a list with one width per column: a number in pixels, or `"fill"` for a share of what is left. Overridden by minItemWidth. */ columns?: number | readonly GridColumnWidth[]; /** Responsive: as many columns as fit at this minimum width; wins over `columns`, a list included. */ minItemWidth?: string; /** Spacing as a step of the 4 px spacing steps (1–8); applies in both directions. */ gap?: SpaceStep; } /** The grip a drag is taken by: two grooves. Dots are fill, and point 4 of the specification draws with the stroke. */ export declare function GripGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** A heading whose level and size are independent: a small heading can still be the second level of the page. */ export declare function Heading({ ref, level, size, weight, tone, className, children, ...rest }: HeadingProps): JSX.Element; /** The props of `Heading`. */ export declare interface HeadingProps extends HTMLAttributes, RefProp { /** The page's outline level (h1–h6). */ level?: 1 | 2 | 3 | 4 | 5 | 6; /** Optical size; independent of the level. @default the size matching the level */ size?: TextSize; /** Font weight from the token set. */ weight?: TextWeight; /** How loud the heading is. */ tone?: TextTone; } /** A button that shows only an icon: square, named by its `aria-label`, and that name shown as a tooltip. Everything else is a `Button`'s. */ export declare function IconButton({ ref, variant, className, ...rest }: IconButtonProps): JSX.Element; /** The props of `IconButton`: a `Button`'s, with a required `aria-label` and the icon as its only child. */ export declare interface IconButtonProps extends Omit { /** The name: what a screen reader announces and the tooltip shows. Required - an icon alone names nothing. */ "aria-label": string; /** The icon: an SVG, a glyph of the set or an icon font's element. The button sets its size - `--u-icon-size`, `--u-icon-size-sm` at `sm`. */ children: ReactNode; /** How loud the button is; `plain` is quiet and neutral, and the rest mean what they mean on a `Button`. */ variant?: ButtonVariant; } /** A one-line text field. `chars` sets its width in characters, `numeric` sets figures right-aligned and tabular, `clearable` offers a cross. Inside a `FormField` it takes the field's id, description and invalid state. */ export declare function Input(props: InputProps): JSX.Element; /** The props of `Input`: a native input's attributes, with `size` meaning the control's height. */ export declare interface InputProps extends Omit, "size" | "value">, RefProp { /** The text; `null` and `undefined` mean empty. With it the field is controlled; `defaultValue` starts an uncontrolled one. */ value?: string | null; /** Runs with the new text on every edit. `onChange` stays for the event - what `register` and Formik read. */ onValueChange?: (value: string) => void; /** `sm` for a toolbar and dense forms, `md` otherwise. @default the size of a `ControlSizeProvider` around it, else `"md"` */ size?: "sm" | "md"; /** The width in characters - room for the value; the field adds its own padding, cross and a text `start` or `end` (an icon is not counted: `chars` makes room for it). Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and is 20 characters wide where the place asks - in a toolbar or a row. */ chars?: number; /** Inside the frame before the value: a unit as text ("kg"), or an icon. Text is read with the field, as its description. */ start?: ReactNode; /** Inside the frame after the value, after the cross: a unit as text ("%"), or an icon or an `IconButton`. Text is read with the field, as its description. */ end?: ReactNode; /** Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. */ invalid?: boolean; /** Right-aligned tabular figures in Geist Mono, e.g. for key figures. */ numeric?: boolean; /** * Shows a gently appearing cross where there is content, which clears the * field, controlled or not, and reports the empty text through * `onValueChange` and `onChange`. */ clearable?: boolean; /** The old way to clear: called after the cross has cleared the field. @deprecated since 0.58 - use onValueChange. */ onClear?: () => void; } /** @deprecated since 0.58 - use TreeKey. */ export declare type Key = TreeKey; /** A complete language: the formats for numbers and dates, and the wording. */ export declare interface Language { formats: Formats; wording: Wording; } /** What an application can pass in for formatting and wording. */ export declare interface LanguageOptions { /** How numbers, dates and durations are written. Overridden entry by entry; what is left out keeps writing as `DEFAULT_FORMATS` does - in English notation, whatever the wording says (ADR-0024). */ formats?: Partial; /** The presets are a register of their own and are likewise overridden entry by entry. */ wording?: Partial> & { presets?: Partial; }; } /** * Sets formatting and wording for the subtree below. Used by the root provider, * and usable directly for a section as well. */ export declare function LanguageProvider({ formats, wording, children }: LanguageProviderProps): JSX.Element; /** The props of `LanguageProvider`: the parts of the formats and the wording that differ from the default. */ export declare interface LanguageProviderProps extends LanguageOptions { children: ReactNode; } /** A bound: a value, a side, a severity. No tolerance band as input. A band is derived - two limits of equal severity on opposite sides enclose one - and as an input type it would force a `null` on one edge in the one-sided case. */ export declare interface Limit { value: number; side: LimitSide; severity: Severity; } /** The set a value is read against. The target stands beside the limits and is not one: it is missed, never violated, and it is never the edge of a region. */ export declare interface LimitSet { /** In any order; none, one or several. */ limits?: readonly Limit[]; target?: number; } /** Whether a limit is an upper or a lower bound. */ export declare type LimitSide = "upper" | "lower"; /** A link in the size of its text; `external` opens it in a new tab with the protective attributes set. */ export declare function Link({ ref, size, external, className, children, href, ...rest }: LinkProps): JSX.Element; /** The props of `Link`. */ export declare interface LinkProps extends AnchorHTMLAttributes, RefProp { /** Size from the token set – a link has to match its body text. */ size?: TextSize; /** Opens in a new tab and sets the necessary protective attributes. */ external?: boolean; } /** A press detector over pointer events; see `createLongPress`. */ export declare interface LongPress { /** Arms the press when the pointer is a finger; a mouse and a pen never press. */ pointerDown(event: PressPointer): void; /** Cancels a press that is not yet held once the finger has left its 10 px. */ pointerMove(event: PressPointer): void; /** Ends a press: a held one calls `onEnd`, and its click is then swallowed. */ pointerUp(): void; /** As `pointerUp`, for `pointercancel`. */ pointerCancel(): void; /** Whether this click belongs to a press and must not reach the target: true once for the click that ends a held press. Call `preventDefault` and `stopPropagation` on the event when it is. */ swallows(): boolean; /** Whether the last pointer was a finger - the `contextmenu` of such a pointer is the press's, not a right-click. */ touching(): boolean; /** Drops the timer. Call it when the target goes away. */ dispose(): void; } /** The handlers of a press, to spread on the pressed element. */ declare interface LongPressHandlers { onPointerDown: (event: PointerEvent_2) => void; onPointerMove: (event: PointerEvent_2) => void; onPointerUp: (event: PointerEvent_2) => void; onPointerCancel: (event: PointerEvent_2) => void; onClickCapture: (event: MouseEvent_2) => void; } /** Measuring: a line with two end marks. Not a ruler with a scale: the teeth would be a grey stripe at ten nominal units. */ export declare function MeasureGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element; /** A dropdown menu: `trigger` opens a panel of `MenuItem`s below it. The arrow keys, Home and End move between the entries; Escape and an outside click close it. */ export declare function Menu({ trigger, children, align }: MenuProps): JSX.Element; /** An entry of a `Menu` or a `ContextMenu`. It runs `onSelect` and closes the menu. */ export declare function MenuItem({ ref, onSelect, tone, role, className, children, onClick, ...rest }: MenuItemProps): JSX.Element; /** The props of `MenuItem`: a button's attributes, with `onSelect` for what the entry does. */ export declare interface MenuItemProps extends Omit, "onSelect">, RefProp { /** What the entry does. The menu closes afterwards by itself: a menu that stays open after something has happened hides the result. */ onSelect?: () => void; /** "danger" for destructive actions. */ tone?: "neutral" | "danger" | /** @deprecated since 0.58 - use "neutral". */ "default"; /** What kind of entry it is: a plain one, one of a group of which one is chosen, or one that is on or off. The last two are told by `aria-checked`. @default "menuitem" */ role?: "menuitem" | "menuitemradio" | "menuitemcheckbox"; } /** The props of `Menu`. */ export declare interface MenuProps { /** Trigger, e.g. a