@umriss-ui/core 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,15 +4,13 @@ import { ComponentPropsWithoutRef } from 'react';
4
4
  import { CSSProperties } from 'react';
5
5
  import { DialogHTMLAttributes } from 'react';
6
6
  import { ElementType } from 'react';
7
- import { ForwardedRef } from 'react';
8
- import { ForwardRefExoticComponent } from 'react';
9
7
  import { HTMLAttributes } from 'react';
10
8
  import { InputHTMLAttributes } from 'react';
11
9
  import { JSX } from 'react';
12
10
  import { ReactElement } from 'react';
13
11
  import { ReactNode } from 'react';
14
12
  import { ReactPortal } from 'react';
15
- import { RefAttributes } from 'react';
13
+ import { Ref } from 'react';
16
14
  import { RefObject } from 'react';
17
15
  import { SelectHTMLAttributes } from 'react';
18
16
  import { SVGAttributes } from 'react';
@@ -21,14 +19,14 @@ import { TextareaHTMLAttributes } from 'react';
21
19
 
22
20
  /** Sections behind headers that open and close: one at a time (`single`) or
23
21
  any number (`multiple`). The arrow keys move between the headers. */
24
- export declare const Accordion: ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>>;
22
+ export declare function Accordion({ ref, type, value: valueProp, defaultValue, onChange, headingLevel, className, onKeyDown, children, ...rest }: AccordionProps): JSX.Element;
25
23
 
26
24
  /** One section of an `Accordion`: its header and the content it opens. */
27
- export declare const AccordionItem: ForwardRefExoticComponent<AccordionItemProps & RefAttributes<HTMLDivElement>>;
25
+ export declare function AccordionItem({ ref, value, title, disabled, className, children, ...rest }: AccordionItemProps): JSX.Element;
28
26
 
29
27
  /** The props of `AccordionItem`: a div's attributes, with `title` taking the
30
28
  header's node instead of the HTML attribute. */
31
- export declare interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
29
+ export declare interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
32
30
  /** What names the section in the accordion's `value`. */
33
31
  value: string;
34
32
  /** The header's text. It names the section's region too. */
@@ -38,7 +36,7 @@ export declare interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivE
38
36
  }
39
37
 
40
38
  /** The props of `Accordion`. */
41
- export declare interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
39
+ export declare interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
42
40
  /** `single` keeps at most one section open, `multiple` any number. */
43
41
  type?: "single" | "multiple";
44
42
  /** Controlled: the values of the open sections. A list for both types, so
@@ -69,11 +67,11 @@ export declare function age(asOf: Instant, now: Instant): number | null;
69
67
  /** A message that stays put in the page - for what a toast would carry away
70
68
  too soon. Warning and danger interrupt the screen reader, the other tones
71
69
  report politely. */
72
- export declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>;
70
+ export declare function Alert({ ref, tone, title, actions, onDismiss, dismissLabel, className, children, ...rest }: AlertProps): JSX.Element;
73
71
 
74
72
  /** The props of `Alert`: a div's attributes, with `title` taking a heading
75
73
  node instead of the HTML attribute. */
76
- export declare interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
74
+ export declare interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
77
75
  /** How urgent the message is. Only `warning` and `danger` interrupt the
78
76
  screen reader - the other two report politely. */
79
77
  tone?: AlertTone;
@@ -102,7 +100,7 @@ export declare function allBranches<K, S extends Key = string>(roots: readonly K
102
100
 
103
101
  /** The chevron that expands and collapses a branch. Drawn pointing right;
104
102
  rotate it by 90 degrees for an open branch. */
105
- export declare const AngleGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
103
+ export declare function AngleGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
106
104
 
107
105
  /**
108
106
  * The library's one voice: says `text` in a polite live region, for what
@@ -151,10 +149,10 @@ export declare interface Assessment {
151
149
  }
152
150
 
153
151
  /** Compact status label; as a `pill` for counters. */
154
- export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
152
+ export declare function Badge({ ref, tone, pill, className, children, ...rest }: BadgeProps): JSX.Element;
155
153
 
156
154
  /** The props of `Badge`. */
157
- export declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
155
+ export declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
158
156
  /** What the badge stands for. There is always a word beside it: a colour on
159
157
  its own is not a statement. */
160
158
  tone?: BadgeTone;
@@ -169,7 +167,7 @@ export declare type BadgeTone = "neutral" | "accent" | "success" | "warning" | "
169
167
 
170
168
  /** Where a page stands: the trail from the root to the current page. Where it
171
169
  is wider than its place, the middle levels fold into a menu. */
172
- export declare const Breadcrumb: ForwardRefExoticComponent<BreadcrumbProps & RefAttributes<HTMLElement>>;
170
+ export declare function Breadcrumb({ ref, items, className, ...rest }: BreadcrumbProps): JSX.Element;
173
171
 
174
172
  /** One level of the trail. */
175
173
  export declare interface BreadcrumbEntry {
@@ -187,21 +185,21 @@ export declare interface BreadcrumbEntry {
187
185
  }
188
186
 
189
187
  /** The props of `Breadcrumb`. */
190
- export declare interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
188
+ export declare interface BreadcrumbProps extends HTMLAttributes<HTMLElement>, RefProp<HTMLElement> {
191
189
  /** The trail from the root to the current page; the last is the page. */
192
190
  items: readonly BreadcrumbEntry[];
193
191
  }
194
192
 
195
193
  /** A button with a label. `primary` once per surface; `loading` shows a
196
194
  spinner and locks it. `type` is `button` unless you say otherwise. */
197
- export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
195
+ export declare function Button({ ref, variant, size: ownSize, loading, disabled, className, children, type, ...rest }: ButtonProps): JSX.Element;
198
196
 
199
197
  /** Buttons standing side by side as one control: square inside, rounded
200
198
  outside, a hairline between them. `size` sets one height for all. */
201
- export declare const ButtonGroup: ForwardRefExoticComponent<ButtonGroupProps & RefAttributes<HTMLDivElement>>;
199
+ export declare function ButtonGroup({ ref, size, className, children, ...rest }: ButtonGroupProps): JSX.Element;
202
200
 
203
201
  /** The props of `ButtonGroup`. */
204
- export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
202
+ export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
205
203
  /** Label of the group for the screen reader. */
206
204
  "aria-label"?: string;
207
205
  /** The size of the buttons in it that do not say their own - one group,
@@ -211,7 +209,7 @@ export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement>
211
209
  }
212
210
 
213
211
  /** The props of `Button`: a native button's attributes and its look. */
214
- export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
212
+ export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, RefProp<HTMLButtonElement> {
215
213
  /** How loud the button is. `primary` exactly once per surface - two main
216
214
  actions side by side are no longer a main action. `ghost` is quiet in the
217
215
  accent, `plain` quiet and neutral. */
@@ -248,32 +246,32 @@ export declare function cadence(ages: FreshnessAges): number;
248
246
 
249
247
  /** A calendar leaf: a sheet with its header and two rings. With `range`, a
250
248
  bar across the sheet stands for the span a range picker chooses. */
251
- export declare const CalendarGlyph: ForwardRefExoticComponent<Omit<GlyphProps & {
252
- range?: boolean;
253
- }, "ref"> & RefAttributes<SVGSVGElement>>;
249
+ export declare function CalendarGlyph({ ref, size, range, ...rest }: GlyphProps & {
250
+ range?: boolean;
251
+ }): JSX.Element;
254
252
 
255
253
  /** A surface that groups content under a head: `CardHeader` and `CardBody`
256
254
  inside a `section`. With `collapsible` the header gets a key that folds the
257
255
  body away. */
258
- export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLElement>>;
256
+ export declare function Card({ ref, collapsible, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, className, children, ...rest }: CardProps): JSX.Element;
259
257
 
260
258
  /** The content of a `Card`; the part that folds away in a collapsible card.
261
259
  `flush` removes the padding for a table or a log. */
262
- export declare const CardBody: ForwardRefExoticComponent<CardBodyProps & RefAttributes<HTMLDivElement>>;
260
+ export declare function CardBody({ ref, flush, className, children, ...rest }: CardBodyProps): JSX.Element;
263
261
 
264
262
  /** The props of `CardBody`. */
265
- export declare interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
263
+ export declare interface CardBodyProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
266
264
  /** Removes the inner padding, e.g. for flush tables. */
267
265
  flush?: boolean;
268
266
  }
269
267
 
270
268
  /** The head of a `Card`: title, an optional eyebrow and actions on the right.
271
269
  In a collapsible card it carries the fold key. */
272
- export declare const CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>;
270
+ export declare function CardHeader({ ref, title, eyebrow, actions, divider, className, ...rest }: CardHeaderProps): JSX.Element;
273
271
 
274
272
  /** The props of `CardHeader`: a div's attributes, with `title` taking a node
275
273
  instead of the HTML attribute. */
276
- export declare interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
274
+ export declare interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
277
275
  /** The heading of the card. A node and not merely text, so that an
278
276
  identifier with markup can stand in it too. */
279
277
  title: ReactNode;
@@ -290,7 +288,7 @@ export declare interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElem
290
288
  }
291
289
 
292
290
  /** The props of `Card`. */
293
- export declare interface CardProps extends HTMLAttributes<HTMLElement> {
291
+ export declare interface CardProps extends HTMLAttributes<HTMLElement>, RefProp<HTMLElement> {
294
292
  /** Allows collapsing and expanding the body through the header. */
295
293
  collapsible?: boolean;
296
294
  /** Initial state of the collapse mechanism; afterwards it belongs to the
@@ -307,10 +305,10 @@ export declare interface CardProps extends HTMLAttributes<HTMLElement> {
307
305
 
308
306
  /** A native checkbox with its label beside it; `indeterminate` shows the mixed
309
307
  state. Inside a `FormField` it takes the field's id and description. */
310
- export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
308
+ export declare function Checkbox({ ref, label, indeterminate, className, style, id, ...rest }: CheckboxProps): JSX.Element;
311
309
 
312
310
  /** The props of `Checkbox`: a native checkbox's attributes and its label. */
313
- export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
311
+ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size">, RefProp<HTMLInputElement> {
314
312
  /** Label to the right of the checkbox. */
315
313
  label?: ReactNode;
316
314
  /** Partially checked (e.g. "select all" with a mixed selection). */
@@ -318,12 +316,10 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
318
316
  }
319
317
 
320
318
  /** A clock face at a quarter past - the time pickers' character. */
321
- export declare const ClockGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
319
+ export declare function ClockGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
322
320
 
323
321
  /** A searchable select field (the combobox pattern with a listbox panel). */
324
- export declare const Combobox: <T extends string = string>(props: ComboboxProps<T> & {
325
- ref?: ForwardedRef<HTMLDivElement>;
326
- }) => ReactElement;
322
+ export declare function Combobox<T extends string = string>({ ref, options, value, onChange, placeholder, size: ownSize, chars, disabled, invalid, emptyText, clearable, className, style, onKeyDown, onKeyDownCapture, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ComboboxProps<T>): JSX.Element;
327
323
 
328
324
  /** One possibility of a `Combobox`: the value it stands for and the label it
329
325
  is found by. */
@@ -338,7 +334,7 @@ export declare interface ComboboxOption<T extends string = string> {
338
334
  }
339
335
 
340
336
  /** The props of `Combobox`. */
341
- export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
337
+ export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
342
338
  /** The possibilities, in their natural order. Filtered while typing; never
343
339
  reordered. */
344
340
  options: readonly ComboboxOption<T>[];
@@ -374,7 +370,7 @@ export declare interface ComboboxProps<T extends string = string> extends Omit<H
374
370
  /** A window above the application in which one types and finds: it searches
375
371
  `items` by subsequence, ranks and marks the matches, and reports the chosen
376
372
  candidate's `id` to `onChoose`. Controlled through `open` and `onClose`. */
377
- export declare const CommandPalette: ForwardRefExoticComponent<CommandPaletteProps & RefAttributes<HTMLDialogElement>>;
373
+ export declare function CommandPalette({ ref, open, onClose, items, onChoose, restingItems, maxFinds, className, onCancel, onMouseDown, onKeyDown: callerKeyDown, onKeyDownCapture, ...rest }: CommandPaletteProps): JSX.Element;
378
374
 
379
375
  /** A candidate the palette can find - the outside of the term CONTEXT.md lists
380
376
  under "Finding" as a Candidate. */
@@ -411,7 +407,7 @@ export declare interface CommandPaletteItem {
411
407
  }
412
408
 
413
409
  /** The props of `CommandPalette`. */
414
- export declare interface CommandPaletteProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "children"> {
410
+ export declare interface CommandPaletteProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "children">, RefProp<HTMLDialogElement> {
415
411
  /** Controlled like the modal: opening is the caller's decision. */
416
412
  open: boolean;
417
413
  /** Reports every wish to close - Escape, an outside click, a choice. */
@@ -451,10 +447,10 @@ export declare interface CommandPaletteProps extends Omit<DialogHTMLAttributes<H
451
447
  }
452
448
 
453
449
  /** Compact confirmation dialog on the basis of Modal. */
454
- export declare const ConfirmDialog: ForwardRefExoticComponent<ConfirmDialogProps & RefAttributes<HTMLDialogElement>>;
450
+ export declare function ConfirmDialog({ ref, open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, tone, loading, ...rest }: ConfirmDialogProps): JSX.Element;
455
451
 
456
452
  /** The props of `ConfirmDialog`. */
457
- export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "title" | "children"> {
453
+ export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "title" | "children">, RefProp<HTMLDialogElement> {
458
454
  /** Whether the query stands. */
459
455
  open: boolean;
460
456
  /** Cancelling: Escape, cross, backdrop or the second button. */
@@ -531,17 +527,17 @@ export declare interface ControlSizeProviderProps {
531
527
 
532
528
  /** The cross that clears a field, removes a tag or a chip, and closes a
533
529
  dialog, a toast or an alert - one drawing at the size of its place. */
534
- export declare const CrossGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
530
+ export declare function CrossGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
535
531
 
536
532
  /** A date selection with a calendar panel; weeks begin on Monday. */
537
- export declare const DatePicker: ForwardRefExoticComponent<DatePickerProps & RefAttributes<HTMLSpanElement>>;
533
+ export declare function DatePicker({ ref, value, onChange, placeholder, disabled, invalid, size: ownSize, chars, clearable, className, ...rest }: DatePickerProps): JSX.Element;
538
534
 
539
535
  /**
540
536
  * The value contract: every way - the grid, "Today", clearing - hands out local
541
537
  * midnight (resolution "day"). There is no path that delivers a time of day
542
538
  * along with it.
543
539
  */
544
- export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
540
+ export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
545
541
  /** The day, as a `Date` on local midnight; `null` means none. */
546
542
  value: Date | null;
547
543
  /** Runs as soon as a day is settled - on a click in the grid, on "Today" and
@@ -592,14 +588,14 @@ export declare interface DateRange {
592
588
  * - Two chained months: paging on the outside, no day appears twice.
593
589
  * - The same day clicked twice = a one-day time span.
594
590
  */
595
- export declare const DateRangePicker: ForwardRefExoticComponent<DateRangePickerProps & RefAttributes<HTMLSpanElement>>;
591
+ export declare function DateRangePicker({ ref, value, onChange, placeholder, disabled, invalid, size: ownSize, chars, clearable, presets, className, ...rest }: DateRangePickerProps): JSX.Element;
596
592
 
597
593
  /**
598
594
  * The value contract: both ends on local midnight (resolution "day"), and `from`
599
595
  * never lies after `to` - a range dragged backwards is silently turned around.
600
596
  * Both ends count inclusively. There is no error state.
601
597
  */
602
- export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
598
+ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
603
599
  /** The time span, both ends on local midnight and both inclusive; `null`
604
600
  means none. */
605
601
  value: DateRange | null;
@@ -638,7 +634,7 @@ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSp
638
634
  an exact instant and is reported only on "Apply", "Now" or "Clear"; the
639
635
  missing and doubled hours of a daylight-saving change are asked about, not
640
636
  guessed. */
641
- export declare const DateTimePicker: ForwardRefExoticComponent<DateTimePickerProps & RefAttributes<HTMLSpanElement>>;
637
+ export declare function DateTimePicker({ ref, value, onChange, withSeconds, placeholder, disabled, size: ownSize, chars, invalid, clearable, className, ...rest }: DateTimePickerProps): JSX.Element;
642
638
 
643
639
  /**
644
640
  * The value contract: an exact instant (resolution "instant"), with seconds
@@ -648,7 +644,7 @@ export declare const DateTimePicker: ForwardRefExoticComponent<DateTimePickerPro
648
644
  * panel applies (the default being the earlier one). A value is reported only
649
645
  * with "Apply", "Now" or "Clear", not already on the click on a day.
650
646
  */
651
- export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
647
+ export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
652
648
  /** The instant; `null` means none. */
653
649
  value: Date | null;
654
650
  /** Runs only on completion - "Apply", "Now" or "Clear" - and not already on
@@ -694,7 +690,7 @@ export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpa
694
690
  * - Missing and doubled hours of the daylight-saving change are recognised per
695
691
  * end and treated honestly, as in the DateTimePicker.
696
692
  */
697
- export declare const DateTimeRangePicker: ForwardRefExoticComponent<DateTimeRangePickerProps & RefAttributes<HTMLSpanElement>>;
693
+ export declare function DateTimeRangePicker({ ref, value, onChange, withSeconds, placeholder, disabled, invalid, size: ownSize, chars, clearable, presets, className, ...rest }: DateTimeRangePickerProps): JSX.Element;
698
694
 
699
695
  /**
700
696
  * The props resemble the union of DateRangePickerProps and DateTimePickerProps -
@@ -707,7 +703,7 @@ export declare const DateTimeRangePicker: ForwardRefExoticComponent<DateTimeRang
707
703
  * the daylight-saving change the same reservation holds as for the
708
704
  * DateTimePicker, separately per end of the range.
709
705
  */
710
- export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
706
+ export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
711
707
  /** The time span with times at both ends; `null` means none. */
712
708
  value: DateRange | null;
713
709
  /** Runs only on "Apply" and on clearing (`null`), never between the two
@@ -773,10 +769,10 @@ export declare type Density = "comfortable" | "compact";
773
769
  export declare type Direction = "up" | "down" | "in" | "out" | "start" | "end";
774
770
 
775
771
  /** A line between rows or columns; with `label` a named separator. */
776
- export declare const Divider: ForwardRefExoticComponent<DividerProps & RefAttributes<HTMLDivElement>>;
772
+ export declare function Divider({ ref, orientation, strong, label, className, ...rest }: DividerProps): JSX.Element;
777
773
 
778
774
  /** The props of `Divider`. */
779
- export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
775
+ export declare interface DividerProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
780
776
  /** Horizontally it separates rows, vertically it separates columns. */
781
777
  orientation?: "horizontal" | "vertical";
782
778
  /** A stronger line - for section boundaries rather than row separation. */
@@ -788,7 +784,7 @@ export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
788
784
  /** A `Modal` that stands at an edge of the window and enters from it - the
789
785
  same dialog with the same head, body and foot. Its width is the token
790
786
  `--u-drawer-width`. */
791
- export declare const Drawer: ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLDialogElement>>;
787
+ export declare function Drawer({ ref, side, className, ...rest }: DrawerProps): JSX.Element;
792
788
 
793
789
  /** The props of `Drawer`: a `Modal`'s, with `side` in place of `size`. */
794
790
  export declare interface DrawerProps extends Omit<ModalProps, "size"> {
@@ -802,11 +798,11 @@ export declare interface DrawerProps extends Omit<ModalProps, "size"> {
802
798
  export declare function duplicateKey<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>): S | null;
803
799
 
804
800
  /** An empty surface as an invitation to act - not as a dead end. */
805
- export declare const EmptyState: ForwardRefExoticComponent<EmptyStateProps & RefAttributes<HTMLDivElement>>;
801
+ export declare function EmptyState({ ref, title, description, action, icon, className, ...rest }: EmptyStateProps): JSX.Element;
806
802
 
807
803
  /** The props of `EmptyState`: a div's attributes, with `title` taking a node
808
804
  instead of the HTML attribute. */
809
- export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
805
+ export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
810
806
  /** What is missing here - as a statement, not as an apology. */
811
807
  title: ReactNode;
812
808
  /** One sentence on why nothing is here and what would put something here. */
@@ -819,11 +815,11 @@ export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElem
819
815
 
820
816
  /** A file field with a drop zone: choose or drop files, and remove them from
821
817
  the list again. Nothing is uploaded - that is the application's. */
822
- export declare const FileInput: ForwardRefExoticComponent<FileInputProps & RefAttributes<HTMLInputElement>>;
818
+ export declare function FileInput({ ref, value, onChange, invalid, accept, multiple, disabled, className, style, id, ...rest }: FileInputProps): JSX.Element;
823
819
 
824
820
  /** The props of `FileInput`: a native file input's attributes, with the files
825
821
  as the value. */
826
- export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size"> {
822
+ export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size">, RefProp<HTMLInputElement> {
827
823
  /** Controlled: the chosen files. Uncontrolled, the input keeps its own and
828
824
  starts empty. */
829
825
  value?: readonly File[];
@@ -912,7 +908,7 @@ export declare interface Formats {
912
908
  /** A label, a hint or error and the control they belong to. The control
913
909
  inside takes the field's id, description, required and invalid state by
914
910
  itself - no wiring by hand. */
915
- export declare const FormField: ForwardRefExoticComponent<FormFieldProps & RefAttributes<HTMLDivElement>>;
911
+ export declare function FormField({ ref, label, hint, error, required, fieldId, className, children, ...rest }: FormFieldProps): JSX.Element;
916
912
 
917
913
  /**
918
914
  * Resets the FormField context. For the innards of panels (search field,
@@ -940,7 +936,7 @@ declare interface FormFieldContextValue {
940
936
  }
941
937
 
942
938
  /** The props of `FormField`. */
943
- export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
939
+ export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
944
940
  /** The label of the field. It is mandatory: a field without a name is a
945
941
  field without a question for a screen reader. */
946
942
  label: ReactNode;
@@ -1005,7 +1001,7 @@ export declare interface FreshnessReading {
1005
1001
  }
1006
1002
 
1007
1003
  /** The props of a glyph: an SVG's attributes and its edge length. */
1008
- export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children"> {
1004
+ export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children">, RefProp<SVGSVGElement> {
1009
1005
  /**
1010
1006
  * Edge length in pixels. The default is the size the glyph is drawn at in
1011
1007
  * the components.
@@ -1015,7 +1011,7 @@ export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewB
1015
1011
 
1016
1012
  /** Children in a grid: a fixed number of columns, a list of column widths,
1017
1013
  or as many columns as fit at `minItemWidth`. */
1018
- export declare const Grid: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>>;
1014
+ export declare function Grid({ ref, columns, minItemWidth, gap, className, style, children, ...rest }: GridProps): JSX.Element;
1019
1015
 
1020
1016
  /** The width of one column in `Grid`'s list: a number in pixels, or
1021
1017
  `"fill"` for a share of what the other columns leave. */
@@ -1023,10 +1019,10 @@ export declare type GridColumnWidth = number | "fill";
1023
1019
 
1024
1020
  /** The grid laid over an area. Two by two lines; the frame is missing on
1025
1021
  purpose, otherwise it would be a window. */
1026
- export declare const GridGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
1022
+ export declare function GridGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1027
1023
 
1028
1024
  /** The props of `Grid`. */
1029
- export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
1025
+ export declare interface GridProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
1030
1026
  /** How many columns, all of one width - or a list with one width per
1031
1027
  column: a number in pixels, or `"fill"` for a share of what is left.
1032
1028
  Overridden by minItemWidth. */
@@ -1041,14 +1037,14 @@ export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
1041
1037
 
1042
1038
  /** The grip a drag is taken by: two grooves. Dots are fill, and point 4 of
1043
1039
  the specification draws with the stroke. */
1044
- export declare const GripGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
1040
+ export declare function GripGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1045
1041
 
1046
1042
  /** A heading whose level and size are independent: a small heading can still
1047
1043
  be the second level of the page. */
1048
- export declare const Heading: ForwardRefExoticComponent<HeadingProps & RefAttributes<HTMLHeadingElement>>;
1044
+ export declare function Heading({ ref, level, size, weight, tone, className, children, ...rest }: HeadingProps): JSX.Element;
1049
1045
 
1050
1046
  /** The props of `Heading`. */
1051
- export declare interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
1047
+ export declare interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>, RefProp<HTMLHeadingElement> {
1052
1048
  /** The page's outline level (h1–h6). */
1053
1049
  level?: 1 | 2 | 3 | 4 | 5 | 6;
1054
1050
  /** Optical size; independent of the level.
@@ -1062,7 +1058,7 @@ export declare interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>
1062
1058
 
1063
1059
  /** A button that shows only an icon: square, named by its `aria-label`, and
1064
1060
  that name shown as a tooltip. Everything else is a `Button`'s. */
1065
- export declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttributes<HTMLButtonElement>>;
1061
+ export declare function IconButton({ ref, variant, className, ...rest }: IconButtonProps): JSX.Element;
1066
1062
 
1067
1063
  /** The props of `IconButton`: a `Button`'s, with a required `aria-label` and
1068
1064
  the icon as its only child. */
@@ -1081,11 +1077,11 @@ export declare interface IconButtonProps extends Omit<ButtonProps, "aria-label"
1081
1077
  /** A one-line text field. `chars` sets its width in characters, `numeric`
1082
1078
  sets figures right-aligned and tabular, `clearable` offers a cross. Inside
1083
1079
  a `FormField` it takes the field's id, description and invalid state. */
1084
- export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
1080
+ export declare function Input({ ref, size: ownSize, chars, invalid, numeric, clearable, onClear, className, style, id, disabled, ...rest }: InputProps): JSX.Element;
1085
1081
 
1086
1082
  /** The props of `Input`: a native input's attributes, with `size` meaning the
1087
1083
  control's height. */
1088
- export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
1084
+ export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, RefProp<HTMLInputElement> {
1089
1085
  /** `sm` for a toolbar and dense forms, `md` otherwise.
1090
1086
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
1091
1087
  size?: "sm" | "md";
@@ -1169,10 +1165,10 @@ export declare interface LimitSet {
1169
1165
 
1170
1166
  /** A link in the size of its text; `external` opens it in a new tab with the
1171
1167
  protective attributes set. */
1172
- export declare const Link: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;
1168
+ export declare function Link({ ref, size, external, className, children, ...rest }: LinkProps): JSX.Element;
1173
1169
 
1174
1170
  /** The props of `Link`. */
1175
- export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
1171
+ export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, RefProp<HTMLAnchorElement> {
1176
1172
  /** Size from the token set – a link has to match its body text. */
1177
1173
  size?: TextSize;
1178
1174
  /** Opens in a new tab and sets the necessary protective attributes. */
@@ -1181,7 +1177,7 @@ export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElemen
1181
1177
 
1182
1178
  /** Measuring: a line with two end marks. Not a ruler with a scale: the teeth
1183
1179
  would be a grey stripe at ten nominal units. */
1184
- export declare const MeasureGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
1180
+ export declare function MeasureGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1185
1181
 
1186
1182
  /** A dropdown menu: `trigger` opens a panel of `MenuItem`s below it. The arrow
1187
1183
  keys, Home and End move between the entries; Escape and an outside click
@@ -1190,11 +1186,11 @@ export declare function Menu({ trigger, children, align }: MenuProps): JSX.Eleme
1190
1186
 
1191
1187
  /** An entry of a `Menu` or a `ContextMenu`. It runs `onSelect` and closes the
1192
1188
  menu. */
1193
- export declare const MenuItem: ForwardRefExoticComponent<MenuItemProps & RefAttributes<HTMLButtonElement>>;
1189
+ export declare function MenuItem({ ref, onSelect, tone, className, children, onClick, ...rest }: MenuItemProps): JSX.Element;
1194
1190
 
1195
1191
  /** The props of `MenuItem`: a button's attributes, with `onSelect` for what
1196
1192
  the entry does. */
1197
- export declare interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"> {
1193
+ export declare interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">, RefProp<HTMLButtonElement> {
1198
1194
  /** What the entry does. The menu closes afterwards by itself: a menu that
1199
1195
  stays open after something has happened hides the result. */
1200
1196
  onSelect?: () => void;
@@ -1214,16 +1210,16 @@ export declare interface MenuProps {
1214
1210
  }
1215
1211
 
1216
1212
  /** Fine dividing line between groups of menu entries. */
1217
- export declare const MenuSeparator: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
1213
+ export declare function MenuSeparator({ ref, className, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
1218
1214
 
1219
1215
  /** Builds a complete instance from the default and a partial value. */
1220
1216
  export declare function mergeLanguage(options: LanguageOptions | undefined): Language;
1221
1217
 
1222
1218
  /** A narrow fill-level bar, e.g. for utilisation in table cells. */
1223
- export declare const Meter: ForwardRefExoticComponent<MeterProps & RefAttributes<HTMLSpanElement>>;
1219
+ export declare function Meter({ ref, value, tone, showLabel, label, className, ...rest }: MeterProps): JSX.Element;
1224
1220
 
1225
1221
  /** The props of `Meter`. */
1226
- export declare interface MeterProps extends HTMLAttributes<HTMLSpanElement> {
1222
+ export declare interface MeterProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
1227
1223
  /** Fill level from 0 to 1. */
1228
1224
  value: number;
1229
1225
  /** The colour of the bar. It comes from an assessment and not from taste:
@@ -1249,28 +1245,28 @@ export declare interface MeterProps extends HTMLAttributes<HTMLSpanElement> {
1249
1245
  export declare type MeterTone = "neutral" | "accent" | "success" | "warning" | "danger";
1250
1246
 
1251
1247
  /** The minus of `NumberInput`'s step buttons. */
1252
- export declare const MinusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
1248
+ export declare function MinusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1253
1249
 
1254
1250
  /** A dialog window in the middle of the screen, on the native `<dialog>`:
1255
1251
  focus trap, Escape and scroll lock come from the browser. Controlled through
1256
1252
  `open` and `onClose`; inside it stand `ModalHeader`, `ModalBody` and
1257
1253
  `ModalFooter`. */
1258
- export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDialogElement>>;
1254
+ export declare function Modal({ ref, size, closeOnBackdrop, ...rest }: ModalProps): JSX.Element;
1259
1255
 
1260
1256
  /** The content of a `Modal` or `Drawer` - the part that scrolls while head and
1261
1257
  foot stand fast. */
1262
- export declare const ModalBody: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
1258
+ export declare function ModalBody({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
1263
1259
 
1264
1260
  /** The foot of a `Modal` or `Drawer`, for its buttons; they stand at the end. */
1265
- export declare const ModalFooter: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
1261
+ export declare function ModalFooter({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
1266
1262
 
1267
1263
  /** The head of a `Modal` or `Drawer`: its title, which names the dialog for a
1268
1264
  screen reader, an optional sentence below it, and the close cross. */
1269
- export declare const ModalHeader: ForwardRefExoticComponent<ModalHeaderProps & RefAttributes<HTMLDivElement>>;
1265
+ export declare function ModalHeader({ ref, title, description, hideClose, className, ...rest }: ModalHeaderProps): JSX.Element;
1270
1266
 
1271
1267
  /** The props of `ModalHeader`: a div's attributes, with `title` taking a node
1272
1268
  instead of the HTML attribute. */
1273
- export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
1269
+ export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
1274
1270
  /** The heading of the window. It names it for the screen reader at the same
1275
1271
  time – a dialog without a name says only "dialog". */
1276
1272
  title: ReactNode;
@@ -1282,7 +1278,7 @@ export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivEle
1282
1278
 
1283
1279
  /** The props of `Modal`: a native dialog's attributes, controlled through
1284
1280
  `open` and `onClose`. */
1285
- export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "onClose"> {
1281
+ export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "onClose">, RefProp<HTMLDialogElement> {
1286
1282
  /** Whether the window stands. Controlled: the opening is the caller's
1287
1283
  decision, and only the caller knows whether something may be open. */
1288
1284
  open: boolean;
@@ -1311,9 +1307,7 @@ export declare type ModalSize = "sm" | "md" | "lg";
1311
1307
  * "selected" scope, rows that have been unticked stay visible until the scope
1312
1308
  * changes, so that nothing jumps away from under the mouse pointer.
1313
1309
  */
1314
- export declare const MultiSelect: <T extends string = string>(props: MultiSelectProps<T> & {
1315
- ref?: ForwardedRef<HTMLDivElement>;
1316
- }) => ReactElement;
1310
+ export declare function MultiSelect<T extends string = string>({ ref, options, value, onChange, placeholder, searchPlaceholder, emptyText, size: ownSize, chars, disabled, invalid, clearable, className, style, onClick, onKeyDown, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: MultiSelectProps<T>): JSX.Element;
1317
1311
 
1318
1312
  /** One possibility of a `MultiSelect`: the value it stands for and its label. */
1319
1313
  export declare interface MultiSelectOption<T extends string = string> {
@@ -1327,7 +1321,7 @@ export declare interface MultiSelectOption<T extends string = string> {
1327
1321
  }
1328
1322
 
1329
1323
  /** The props of `MultiSelect`. */
1330
- export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
1324
+ export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
1331
1325
  /** The possibilities, in their natural order. The list never re-sorts –
1332
1326
  not even in the "selected" scope. */
1333
1327
  options: readonly MultiSelectOption<T>[];
@@ -1395,11 +1389,11 @@ export declare interface NodeReader<K, S extends Key = string> {
1395
1389
  * present on hover or focus. Holding one down repeats the step (a short
1396
1390
  * run-up, then briskly); min/max disable the respective button.
1397
1391
  */
1398
- export declare const NumberInput: ForwardRefExoticComponent<NumberInputProps & RefAttributes<HTMLInputElement>>;
1392
+ export declare function NumberInput({ ref, value, onChange, min, max, step, decimals, prefix, suffix, size: ownSize, chars, invalid, disabled, className, style, id, onFocus, onBlur, onKeyDown, ...rest }: NumberInputProps): JSX.Element;
1399
1393
 
1400
1394
  /** The props of `NumberInput`: a native input's attributes, with the value a
1401
1395
  number or `null`. */
1402
- export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "prefix" | "type"> {
1396
+ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "prefix" | "type">, RefProp<HTMLInputElement> {
1403
1397
  /** The number, or `null` for "not stated". An empty field is not zero:
1404
1398
  a quantity that was not measured is not a quantity of zero. */
1405
1399
  value: number | null;
@@ -1438,7 +1432,7 @@ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLI
1438
1432
  }
1439
1433
 
1440
1434
  /** The plus of `NumberInput`'s step buttons. */
1441
- export declare const PlusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
1435
+ export declare function PlusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1442
1436
 
1443
1437
  /**
1444
1438
  * The one closable, anchored surface. It owns: the portal, the position
@@ -1512,10 +1506,10 @@ export declare type PortalTarget = HTMLElement | (() => HTMLElement | null) | nu
1512
1506
 
1513
1507
  /** How far a task has come, from 0 to 1 - or, without a value, that it runs.
1514
1508
  It has no tone: a measured value judged against limits is a `Meter`. */
1515
- export declare const ProgressBar: ForwardRefExoticComponent<ProgressBarProps & RefAttributes<HTMLDivElement>>;
1509
+ export declare function ProgressBar({ ref, value, label, valueText, showLabel, className, ...rest }: ProgressBarProps): JSX.Element;
1516
1510
 
1517
1511
  /** The props of `ProgressBar`. */
1518
- export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
1512
+ export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
1519
1513
  /** How far the task has come, from 0 to 1. Left out, the bar is
1520
1514
  indeterminate: the task runs, and nobody knows how far it is. */
1521
1515
  value?: number;
@@ -1537,12 +1531,10 @@ export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement>
1537
1531
  /** One choice out of a few possibilities, all of them visible. Controlled
1538
1532
  through `value` and `onChange`, or uncontrolled from `defaultValue`; the
1539
1533
  arrow keys move between the possibilities. */
1540
- export declare const RadioGroup: <T extends string>(props: RadioGroupProps<T> & {
1541
- ref?: React.ForwardedRef<HTMLDivElement>;
1542
- }) => React.ReactElement;
1534
+ export declare function RadioGroup<T extends string>({ ref, options, value, defaultValue, onChange, orientation, size: ownSize, disabled, name, className, onKeyDown, ...rest }: RadioGroupProps<T>): JSX.Element;
1543
1535
 
1544
1536
  /** The props of `RadioGroup`. */
1545
- export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
1537
+ export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
1546
1538
  /** The possibilities, in the order in which they are meant to stand. */
1547
1539
  options: readonly RadioOption<T>[];
1548
1540
  /** The chosen possibility; `null` means: none yet. Together with
@@ -1595,6 +1587,12 @@ export declare interface RangePreset {
1595
1587
  range: () => DateRange;
1596
1588
  }
1597
1589
 
1590
+ /** The `ref` of a component: the element it renders at its root. */
1591
+ export declare interface RefProp<E extends Element> {
1592
+ /** Receives the component's root element. */
1593
+ ref?: Ref<E>;
1594
+ }
1595
+
1598
1596
  /** What `scrollForRow` needs to know about a scroll area. */
1599
1597
  export declare interface RowPlacement {
1600
1598
  rowHeight: number;
@@ -1632,12 +1630,10 @@ export declare function scrollForRow(index: number, { rowHeight, scrollTop, view
1632
1630
  segment for each - a radio group in what it says and how the keys move.
1633
1631
  Controlled through `value` and `onChange`, or uncontrolled from
1634
1632
  `defaultValue`. */
1635
- export declare const SegmentedControl: <T extends string>(props: SegmentedControlProps<T> & {
1636
- ref?: React.ForwardedRef<HTMLDivElement>;
1637
- }) => React.ReactElement;
1633
+ export declare function SegmentedControl<T extends string>({ ref, options, value, defaultValue, onChange, size: ownSize, variant, fill, disabled, name, className, onKeyDown, ...rest }: SegmentedControlProps<T>): JSX.Element;
1638
1634
 
1639
1635
  /** The props of `SegmentedControl`. */
1640
- export declare interface SegmentedControlProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
1636
+ export declare interface SegmentedControlProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
1641
1637
  /** The possibilities, two to four, in the order in which they stand. */
1642
1638
  options: readonly SegmentedOption<T>[];
1643
1639
  /** The chosen possibility; `null` means: none yet. Together with
@@ -1688,11 +1684,11 @@ export declare interface SegmentedOption<T extends string> {
1688
1684
  * Combobox's - and under a finger the system's picker (ADR-0043). The arrow is
1689
1685
  * drawn in CSS and therefore follows the theme tokens.
1690
1686
  */
1691
- export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
1687
+ export declare function Select({ ref, size: ownSize, chars, invalid, clearable, onClear, className, style, id, children, disabled, onPointerDown, onMouseDown, onKeyDown, onBlur, ...rest }: SelectProps): JSX.Element;
1692
1688
 
1693
1689
  /** The props of `Select`: a native select's attributes, with `size` meaning
1694
1690
  the control's height. */
1695
- export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
1691
+ export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size">, RefProp<HTMLSelectElement> {
1696
1692
  /** `sm` for a toolbar and dense forms, `md` otherwise.
1697
1693
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
1698
1694
  size?: "sm" | "md";
@@ -1741,10 +1737,10 @@ export declare type Severity = "warning" | "alarm";
1741
1737
  export declare type Side = "upper" | "lower";
1742
1738
 
1743
1739
  /** Loading placeholder with a restrained pulse; respects prefers-reduced-motion. */
1744
- export declare const Skeleton: ForwardRefExoticComponent<SkeletonProps & RefAttributes<HTMLSpanElement>>;
1740
+ export declare function Skeleton({ ref, width, height, circle, className, style, ...rest }: SkeletonProps): JSX.Element;
1745
1741
 
1746
1742
  /** The props of `Skeleton`. */
1747
- export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
1743
+ export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
1748
1744
  /** Width, e.g. "120px" or "60%".
1749
1745
  @default "100%" */
1750
1746
  width?: string | number;
@@ -1757,7 +1753,7 @@ export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
1757
1753
 
1758
1754
  /** One value on a track between `min` and `max`, on the native range input;
1759
1755
  `marks` set labelled points on the track. */
1760
- export declare const Slider: ForwardRefExoticComponent<SliderProps & RefAttributes<HTMLInputElement>>;
1756
+ export declare function Slider({ ref, value: valueProp, defaultValue, onChange, min, max, step, marks, format, showValue, className, style, id, disabled, onKeyDown, ...rest }: SliderProps): JSX.Element;
1761
1757
 
1762
1758
  /** A mark on the track: a value, or a value with the word beneath it. */
1763
1759
  export declare type SliderMark = number | {
@@ -1766,7 +1762,7 @@ export declare type SliderMark = number | {
1766
1762
  };
1767
1763
 
1768
1764
  /** The props of `Slider`. */
1769
- export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step"> {
1765
+ export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">, RefProp<HTMLInputElement> {
1770
1766
  /** Controlled: the value. */
1771
1767
  value?: number;
1772
1768
  /** Uncontrolled: the value to start at.
@@ -1797,10 +1793,10 @@ export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputE
1797
1793
  export declare type SpaceStep = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
1798
1794
 
1799
1795
  /** A miniature trend line for table cells; the end point carries the accent. */
1800
- export declare const Sparkline: ForwardRefExoticComponent<SparklineProps & RefAttributes<HTMLSpanElement>>;
1796
+ export declare function Sparkline({ ref, data, width, height, tone, className, ...rest }: SparklineProps): JSX.Element | null;
1801
1797
 
1802
1798
  /** The props of `Sparkline`. */
1803
- export declare interface SparklineProps extends HTMLAttributes<HTMLSpanElement> {
1799
+ export declare interface SparklineProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
1804
1800
  /** Values in chronological order; at least two. */
1805
1801
  data: readonly number[];
1806
1802
  /** Width in pixels; the default is a row width, not a chart width. `"fill"`
@@ -1817,10 +1813,10 @@ export declare interface SparklineProps extends HTMLAttributes<HTMLSpanElement>
1817
1813
  }
1818
1814
 
1819
1815
  /** Restrained loading indicator; inherits the text colour of its context. */
1820
- export declare const Spinner: ForwardRefExoticComponent<SpinnerProps & RefAttributes<SVGSVGElement>>;
1816
+ export declare function Spinner({ ref, size, className, ...rest }: SpinnerProps): JSX.Element;
1821
1817
 
1822
1818
  /** The props of `Spinner`. */
1823
- export declare interface SpinnerProps extends SVGAttributes<SVGSVGElement> {
1819
+ export declare interface SpinnerProps extends SVGAttributes<SVGSVGElement>, RefProp<SVGSVGElement> {
1824
1820
  /** Edge length in pixels. */
1825
1821
  size?: number;
1826
1822
  }
@@ -1828,7 +1824,7 @@ export declare interface SpinnerProps extends SVGAttributes<SVGSVGElement> {
1828
1824
  /** A main action with a menu of its variants: the button on the left runs
1829
1825
  `onClick`, the arrow on the right opens `menu`. The ref goes to the main
1830
1826
  button. */
1831
- export declare const SplitButton: ForwardRefExoticComponent<SplitButtonProps & RefAttributes<HTMLButtonElement>>;
1827
+ export declare function SplitButton({ ref, children, menu, variant, size: ownSize, menuLabel, align, disabled, className, ...rest }: SplitButtonProps): JSX.Element;
1832
1828
 
1833
1829
  /** The props of `SplitButton`: a `Button`'s for the main action, plus the
1834
1830
  menu's entries. */
@@ -1853,10 +1849,10 @@ export declare interface SplitButtonProps extends Omit<ButtonProps, "children" |
1853
1849
 
1854
1850
  /** Two panes and the line between them. The line can be dragged, moved with
1855
1851
  the arrow keys, and Enter collapses the first pane and brings it back. */
1856
- export declare const Splitter: ForwardRefExoticComponent<SplitterProps & RefAttributes<HTMLDivElement>>;
1852
+ export declare function Splitter({ ref, orientation, value: valueProp, defaultValue, onChange, min, max, step, separatorLabel, className, style, onKeyDown, children, ...rest }: SplitterProps): JSX.Element;
1857
1853
 
1858
1854
  /** The props of `Splitter`. */
1859
- export declare interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children"> {
1855
+ export declare interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children">, RefProp<HTMLDivElement> {
1860
1856
  /** How the two panes stand: `horizontal` side by side, `vertical` one
1861
1857
  above the other - a trend above, its alarms below. */
1862
1858
  orientation?: "horizontal" | "vertical";
@@ -1881,10 +1877,10 @@ export declare interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElemen
1881
1877
 
1882
1878
  /** Children below or beside one another, spaced by a step of the spacing
1883
1879
  scale. */
1884
- export declare const Stack: ForwardRefExoticComponent<StackProps & RefAttributes<HTMLDivElement>>;
1880
+ export declare function Stack({ ref, direction, gap, align, justify, wrap, className, style, children, ...rest }: StackProps): JSX.Element;
1885
1881
 
1886
1882
  /** The props of `Stack`. */
1887
- export declare interface StackProps extends HTMLAttributes<HTMLDivElement> {
1883
+ export declare interface StackProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
1888
1884
  /** Below one another or beside one another. Below is the direction content
1889
1885
  stands in anyway, without being asked. */
1890
1886
  direction?: "row" | "column";
@@ -1899,10 +1895,10 @@ export declare interface StackProps extends HTMLAttributes<HTMLDivElement> {
1899
1895
  }
1900
1896
 
1901
1897
  /** Metric tile: one value, read against its limits. */
1902
- export declare const Stat: ForwardRefExoticComponent<StatProps & RefAttributes<HTMLDivElement>>;
1898
+ export declare function Stat({ ref, label, value, unit, decimals, limits, history, asOf, ages, className, ...rest }: StatProps): JSX.Element;
1903
1899
 
1904
1900
  /** The props of `Stat`. */
1905
- export declare interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1901
+ export declare interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">, RefProp<HTMLDivElement> {
1906
1902
  /** What is being measured. */
1907
1903
  label: string;
1908
1904
  /** The measured value. Absent or non-finite gives the verdict `unknown` –
@@ -1927,10 +1923,10 @@ export declare interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>,
1927
1923
 
1928
1924
  /** Where a procedure stands: its steps in order, done, current, upcoming or
1929
1925
  failed. Moving on is yours - `current` is a prop. */
1930
- export declare const Stepper: ForwardRefExoticComponent<StepperProps & RefAttributes<HTMLOListElement>>;
1926
+ export declare function Stepper({ ref, steps, current, orientation, className, ...rest }: StepperProps): JSX.Element;
1931
1927
 
1932
1928
  /** The props of `Stepper`. */
1933
- export declare interface StepperProps extends HTMLAttributes<HTMLOListElement> {
1929
+ export declare interface StepperProps extends HTMLAttributes<HTMLOListElement>, RefProp<HTMLOListElement> {
1934
1930
  /** The steps in the order they are walked. */
1935
1931
  steps: readonly StepperStep[];
1936
1932
  /** The index of the step being worked on. The steps before it are done,
@@ -1954,10 +1950,10 @@ export declare interface StepperStep {
1954
1950
 
1955
1951
  /** An on/off switch that takes effect at once - a native checkbox with
1956
1952
  `role="switch"`. Where the choice waits for a Save button, use `Checkbox`. */
1957
- export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLInputElement>>;
1953
+ export declare function Switch({ ref, label, size: ownSize, invalid, className, style, id, ...rest }: SwitchProps): JSX.Element;
1958
1954
 
1959
1955
  /** The props of `Switch`: a native checkbox's attributes and its label. */
1960
- export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "role"> {
1956
+ export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "role">, RefProp<HTMLInputElement> {
1961
1957
  /** Label to the right of the switch. */
1962
1958
  label?: ReactNode;
1963
1959
  /** `sm` for a toolbar and dense forms, `md` otherwise.
@@ -1970,18 +1966,18 @@ export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputE
1970
1966
 
1971
1967
  /** One tab of a `TabList`; choosing it shows the `TabPanel` of the same
1972
1968
  `value`. */
1973
- export declare const Tab: ForwardRefExoticComponent<TabProps & RefAttributes<HTMLButtonElement>>;
1969
+ export declare function Tab({ ref, value, className, children, onClick, ...rest }: TabProps): JSX.Element;
1974
1970
 
1975
1971
  /** The row of `Tab`s inside `Tabs`. The arrow keys, Home and End move
1976
1972
  between the tabs and choose them. */
1977
- export declare const TabList: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
1973
+ export declare function TabList({ ref, className, children, onKeyDown, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
1978
1974
 
1979
1975
  /** The content of one tab. Only the panel whose `value` is chosen stands in
1980
1976
  the document. */
1981
- export declare const TabPanel: ForwardRefExoticComponent<TabPanelProps & RefAttributes<HTMLDivElement>>;
1977
+ export declare function TabPanel({ ref, value, className, children, ...rest }: TabPanelProps): JSX.Element | null;
1982
1978
 
1983
1979
  /** The props of `TabPanel`. */
1984
- export declare interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
1980
+ export declare interface TabPanelProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
1985
1981
  /** The value of the tab this panel belongs to. Only the matching panel
1986
1982
  stands in the document – a hidden panel would keep focus, scroll
1987
1983
  position and live regions that nobody sees. */
@@ -1989,17 +1985,17 @@ export declare interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
1989
1985
  }
1990
1986
 
1991
1987
  /** The props of `Tab`. */
1992
- export declare interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1988
+ export declare interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement>, RefProp<HTMLButtonElement> {
1993
1989
  /** The value this tab reports – and under which its panel stands. */
1994
1990
  value: string;
1995
1991
  }
1996
1992
 
1997
1993
  /** Tabs: a `TabList` of `Tab`s and one `TabPanel` per value. Controlled
1998
1994
  through `value` and `onChange`, or uncontrolled from `defaultValue`. */
1999
- export declare const Tabs: ForwardRefExoticComponent<TabsProps & RefAttributes<HTMLDivElement>>;
1995
+ export declare function Tabs({ ref, value, defaultValue, onChange, className, children, ...rest }: TabsProps): JSX.Element;
2000
1996
 
2001
1997
  /** The props of `Tabs`. */
2002
- export declare interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
1998
+ export declare interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
2003
1999
  /** The value of the visible tab. Controlled, `Tabs` remember nothing, so
2004
2000
  that the tab can come out of an address. */
2005
2001
  value?: string;
@@ -2014,20 +2010,20 @@ export declare interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>,
2014
2010
  /** A short label with a tone; with `onRemove` it carries a cross that removes
2015
2011
  it. Inside a `TagGroup` it is a list entry, and Delete or Backspace remove
2016
2012
  it too. */
2017
- export declare const Tag: ForwardRefExoticComponent<TagProps & RefAttributes<HTMLSpanElement>>;
2013
+ export declare function Tag({ ref, tone, children, onRemove, removeLabel, disabled, className, onKeyDown, ...rest }: TagProps): JSX.Element;
2018
2014
 
2019
2015
  /** A list of `Tag`s with one tab stop: the arrow keys move between them, and
2020
2016
  the focus stays in the group when one is removed. */
2021
- export declare const TagGroup: ForwardRefExoticComponent<TagGroupProps & RefAttributes<HTMLDivElement>>;
2017
+ export declare function TagGroup({ ref, className, children, onKeyDown, onFocus, ...rest }: TagGroupProps): JSX.Element;
2022
2018
 
2023
2019
  /** The props of `TagGroup`: a div's attributes, with a required name. */
2024
- export declare interface TagGroupProps extends HTMLAttributes<HTMLDivElement> {
2020
+ export declare interface TagGroupProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
2025
2021
  /** Label of the group for the screen reader. */
2026
2022
  "aria-label": string;
2027
2023
  }
2028
2024
 
2029
2025
  /** The props of `Tag`. */
2030
- export declare interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onRemove"> {
2026
+ export declare interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onRemove">, RefProp<HTMLSpanElement> {
2031
2027
  /** What the label stands for. The tone is never the only information: the
2032
2028
  text beside it says the same thing once more. */
2033
2029
  tone?: TagTone;
@@ -2050,18 +2046,18 @@ export declare type TagTone = "neutral" | "accent" | "success" | "warning" | "da
2050
2046
 
2051
2047
  /** Body text from the token set; `as` chooses the element, independent of the
2052
2048
  size. */
2053
- declare const Text_2: ForwardRefExoticComponent<TextProps & RefAttributes<HTMLElement>>;
2049
+ declare function Text_2({ ref, as: Element, size, weight, tone, mono, tracking, leading, className, children, ...rest }: TextProps): JSX.Element;
2054
2050
  export { Text_2 as Text }
2055
2051
 
2056
2052
  /** A text field for several lines. `chars` sets the length of a line,
2057
2053
  `autoGrow` lets it grow with its content up to `maxRows`, `showCount` counts
2058
2054
  against `maxLength`. Inside a `FormField` it takes the field's id,
2059
2055
  description and invalid state. */
2060
- export declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>;
2056
+ export declare function Textarea({ ref, size: ownSize, chars, invalid, autoGrow, maxRows, showCount, resize, className, style, id, disabled, rows, onInput, ...rest }: TextareaProps): JSX.Element;
2061
2057
 
2062
2058
  /** The props of `Textarea`: a native textarea's attributes, with `chars` in
2063
2059
  place of `cols`. */
2064
- export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "cols"> {
2060
+ export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "cols">, RefProp<HTMLTextAreaElement> {
2065
2061
  /** `sm` for a toolbar and dense forms, `md` otherwise.
2066
2062
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
2067
2063
  size?: "sm" | "md";
@@ -2089,7 +2085,7 @@ export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLT
2089
2085
  export declare type TextLeading = "normal" | "tight";
2090
2086
 
2091
2087
  /** The props of `Text`. */
2092
- export declare interface TextProps extends HTMLAttributes<HTMLElement> {
2088
+ export declare interface TextProps extends HTMLAttributes<HTMLElement>, RefProp<HTMLElement> {
2093
2089
  /** Element to render as. */
2094
2090
  as?: ElementType;
2095
2091
  /** Type size from the token set. It is independent of the element: a `p`
@@ -2319,9 +2315,7 @@ export declare interface TreeOptions<K, S extends Key = string> {
2319
2315
 
2320
2316
  /** The search field of a tree: an `Input` that writes into the tree's search
2321
2317
  text, so that the `TreeView` filters on it. */
2322
- export declare const TreeSearch: <K, S extends Key = string>(props: TreeSearchProps<K, S> & {
2323
- ref?: ForwardedRef<HTMLInputElement>;
2324
- }) => ReactNode;
2318
+ export declare function TreeSearch<K, S extends Key = string>({ ref, tree, placeholder, ...rest }: TreeSearchProps<K, S>): JSX.Element;
2325
2319
 
2326
2320
  /** The props of `TreeSearch`: an `Input`'s, with the tree in place of `value`
2327
2321
  and `onChange`. */
@@ -2348,12 +2342,10 @@ export declare interface TreeSnapshot<S extends Key = string> {
2348
2342
  /** The tree as a control: draws the nodes of a `Tree` from `useTree` as a
2349
2343
  `tree` with keyboard navigation, typeahead and, with `checkable`, ticks.
2350
2344
  What a node says is yours - `children` renders it. */
2351
- export declare const TreeView: <K, S extends Key = string>(props: TreeViewProps<K, S> & {
2352
- ref?: ForwardedRef<HTMLDivElement>;
2353
- }) => ReactNode;
2345
+ export declare function TreeView<K, S extends Key = string>({ ref, tree, ariaLabel, checkable, children, className, onKeyDown, onFocus, onBlur, onScroll, ...rest }: TreeViewProps<K, S>): JSX.Element;
2354
2346
 
2355
2347
  /** The props of `TreeView`. */
2356
- export declare interface TreeViewProps<K, S extends Key = string> extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
2348
+ export declare interface TreeViewProps<K, S extends Key = string> extends Omit<HTMLAttributes<HTMLDivElement>, "children">, RefProp<HTMLDivElement> {
2357
2349
  /** The tree from `useTree`. It is the whole state: flattening, active node,
2358
2350
  checks, anchor. The view holds nothing beside it. */
2359
2351
  tree: Tree<K, S>;
@@ -2552,9 +2544,7 @@ export declare function visibleWindow({ count, rowHeight, scrollTop, viewportHei
2552
2544
 
2553
2545
  /** Content for the screen reader only: out of sight, but read out. With
2554
2546
  `focusable` it shows once it has the focus - a skip link. */
2555
- export declare const VisuallyHidden: <E extends ElementType = "span">(props: VisuallyHiddenProps<E> & {
2556
- ref?: ForwardedRef<HTMLElement>;
2557
- }) => React.ReactElement;
2547
+ export declare function VisuallyHidden<E extends ElementType = "span">({ ref, as, focusable, className, children, ...rest }: VisuallyHiddenProps<E>): JSX.Element;
2558
2548
 
2559
2549
  /** The props of `VisuallyHidden`: those of the element `as` names, `span` by
2560
2550
  default. */
@@ -2564,7 +2554,7 @@ export declare type VisuallyHiddenProps<E extends ElementType = "span"> = {
2564
2554
  as?: E;
2565
2555
  /** Becomes visible as soon as the content receives the focus (skip link). */
2566
2556
  focusable?: boolean;
2567
- } & Omit<ComponentPropsWithoutRef<E>, "as">;
2557
+ } & Omit<ComponentPropsWithoutRef<E>, "as" | "ref"> & RefProp<HTMLElement>;
2568
2558
 
2569
2559
  /** What `visibleWindow` needs to know about a scroll area and its rows. */
2570
2560
  export declare interface WindowInput {