@umriss-ui/core 0.51.0 → 0.52.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,6 +4,7 @@ import { ComponentPropsWithoutRef } from 'react';
4
4
  import { CSSProperties } from 'react';
5
5
  import { DialogHTMLAttributes } from 'react';
6
6
  import { ElementType } from 'react';
7
+ import { FocusEvent as FocusEvent_2 } from 'react';
7
8
  import { HTMLAttributes } from 'react';
8
9
  import { InputHTMLAttributes } from 'react';
9
10
  import { JSX } from 'react';
@@ -151,6 +152,26 @@ export declare interface Assessment {
151
152
  deviation?: number;
152
153
  }
153
154
 
155
+ /** A mark for a person or a team: a picture, or initials. */
156
+ export declare function Avatar({ ref, name, src, initials, size, className, ...rest }: AvatarProps): JSX.Element;
157
+
158
+ /** The props of `Avatar`. */
159
+ export declare interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">, RefProp<HTMLSpanElement> {
160
+ /** The person's or the team's name: it names the mark for a screen reader
161
+ and the initials are derived from it. */
162
+ name: string;
163
+ /** A picture. When it fails to load, the initials stand in its place. */
164
+ src?: string;
165
+ /** The letters shown when there is no picture.
166
+ @default the first letters of the first and the last word of `name` */
167
+ initials?: string;
168
+ /** `sm` for a table cell, `md` for a lane's header. */
169
+ size?: AvatarSize;
170
+ }
171
+
172
+ /** The size of an avatar: `sm` for a table cell, `md` for a lane's header. */
173
+ export declare type AvatarSize = "sm" | "md";
174
+
154
175
  /** Compact status label; as a `pill` for counters. */
155
176
  export declare function Badge({ ref, tone, pill, className, children, ...rest }: BadgeProps): JSX.Element;
156
177
 
@@ -195,7 +216,7 @@ export declare interface BreadcrumbProps extends HTMLAttributes<HTMLElement>, Re
195
216
 
196
217
  /** A button with a label. `primary` once per surface; `loading` shows a
197
218
  spinner and locks it. `type` is `button` unless you say otherwise. */
198
- export declare function Button({ ref, variant, size: ownSize, loading, disabled, className, children, type, ...rest }: ButtonProps): JSX.Element;
219
+ export declare function Button({ ref, variant, size: ownSize, loading, disabled, className, children, type, onClick, ...rest }: ButtonProps): JSX.Element;
199
220
 
200
221
  /** Buttons standing side by side as one control: square inside, rounded
201
222
  outside, a hairline between them. `size` sets one height for all. */
@@ -308,7 +329,7 @@ export declare interface CardProps extends HTMLAttributes<HTMLElement>, RefProp<
308
329
 
309
330
  /** A native checkbox with its label beside it; `indeterminate` shows the mixed
310
331
  state. Inside a `FormField` it takes the field's id and description. */
311
- export declare function Checkbox({ ref, label, indeterminate, className, style, id, ...rest }: CheckboxProps): JSX.Element;
332
+ export declare function Checkbox({ ref, label, indeterminate, invalid, className, style, id, onChange, onCheckedChange, ...rest }: CheckboxProps): JSX.Element;
312
333
 
313
334
  /** The props of `Checkbox`: a native checkbox's attributes and its label. */
314
335
  export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size">, RefProp<HTMLInputElement> {
@@ -316,6 +337,12 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
316
337
  label?: ReactNode;
317
338
  /** Partially checked (e.g. "select all" with a mixed selection). */
318
339
  indeterminate?: boolean;
340
+ /** Marks the checkbox as invalid. `FormField` sets it itself as soon as it
341
+ carries an `error` - by hand only necessary without `FormField`. */
342
+ invalid?: boolean;
343
+ /** Runs with the new state on every click. `onChange` stays for the
344
+ event - what `register` and Formik read. */
345
+ onCheckedChange?: (checked: boolean) => void;
319
346
  }
320
347
 
321
348
  /** A clock face at a quarter past - the time pickers' character. */
@@ -325,11 +352,11 @@ export declare function ClockGlyph({ ref, size, ...rest }: GlyphProps): JSX.Elem
325
352
  The label of the chosen `value` is kept from the last `options` that held
326
353
  it, so a search that replaces the options does not empty the field - an
327
354
  initial `value` must stand among the first `options`. */
328
- export declare function Combobox<T extends string = string>({ ref, options: optionsGiven, value, onChange, placeholder, size: ownSize, chars, disabled, invalid, emptyText, clearable, onSearch, filter, loading, className, style, id, onKeyDown, onClick, onBlur, ...rest }: ComboboxProps<T>): JSX.Element;
355
+ export declare function Combobox<T extends string | number = string>(props: ComboboxProps<T>): JSX.Element;
329
356
 
330
357
  /** One possibility of a `Combobox`: the value it stands for and the label it
331
358
  is found by. */
332
- export declare interface ComboboxOption<T extends string = string> {
359
+ export declare interface ComboboxOption<T extends string | number = string> {
333
360
  /** What comes back when this row is chosen. */
334
361
  value: T;
335
362
  /** What stands there - and what is filtered on. Text and not a node: what
@@ -340,16 +367,19 @@ export declare interface ComboboxOption<T extends string = string> {
340
367
  }
341
368
 
342
369
  /** The props of `Combobox`. */
343
- export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLInputElement>, "onChange" | "defaultValue">, RefProp<HTMLInputElement> {
370
+ export declare interface ComboboxProps<T extends string | number = string> extends Omit<HTMLAttributes<HTMLInputElement>, "onChange" | "defaultValue">, RefProp<HTMLInputElement>, FormPostProps<T>, DeprecatedOnChange<(value: T | null) => void> {
344
371
  /** The possibilities, in their natural order. Filtered while typing; never
345
372
  reordered. */
346
373
  options: readonly ComboboxOption<T>[];
347
- /** The chosen value; `null` means none. Always controlled - the field keeps
348
- no second state beside the caller's. */
349
- value: T | null;
374
+ /** The chosen value; `null` and `undefined` mean none. With it the field is
375
+ controlled; without it the field keeps the value itself, from `defaultValue`. */
376
+ value?: T | null;
377
+ /** Uncontrolled: the value to start at.
378
+ @default null */
379
+ defaultValue?: T | null;
350
380
  /** Runs on choosing and on clearing (`null`). Not while typing: what is
351
381
  typed is a search term and not yet a value. */
352
- onChange: (value: T | null) => void;
382
+ onValueChange?: (value: T | null) => void;
353
383
  /** What stands in the empty field. */
354
384
  placeholder?: string;
355
385
  /** `sm` for a toolbar and dense forms, `md` otherwise.
@@ -384,6 +414,15 @@ export declare interface ComboboxProps<T extends string = string> extends Omit<H
384
414
  where it would show the empty text, below any `options` given, and is
385
415
  `aria-busy`. */
386
416
  loading?: boolean;
417
+ /** For string values: typed text that fits no option's label is offered as a
418
+ last row, `Add "text"`, and Enter or a click makes it the value - reported
419
+ through `onValueChange` like a choice. The field then shows the text
420
+ itself, and the form posts it.
421
+ @default false */
422
+ creatable?: boolean;
423
+ /** With `creatable`: runs when the typed text was taken as the value, so the
424
+ application can add it to `options`. */
425
+ onCreate?: (text: string) => void;
387
426
  }
388
427
 
389
428
  /** A window above the application in which one types and finds: it searches
@@ -472,6 +511,13 @@ export declare interface CommandPaletteShortcutOptions {
472
511
  * @default true
473
512
  */
474
513
  slash?: boolean;
514
+ /**
515
+ * The window the keys are bound to - an iframe's `contentWindow`, when the
516
+ * palette lives in the frame's document.
517
+ *
518
+ * @default window
519
+ */
520
+ target?: Window | null;
475
521
  }
476
522
 
477
523
  /** Compact confirmation dialog on the basis of Modal. */
@@ -483,9 +529,13 @@ export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HT
483
529
  open: boolean;
484
530
  /** Cancelling: Escape, cross, backdrop or the second button. */
485
531
  onClose: () => void;
486
- /** Agreeing. The dialog does not close itself from that – whoever wants to
487
- show a confirmation in progress still needs it. */
488
- onConfirm: () => void;
532
+ /** Agreeing. Called once per opening - a second press, however quick, does
533
+ nothing, until `loading` ends with the dialog still open. The dialog does
534
+ not close itself from that – whoever wants to show a confirmation in
535
+ progress still needs it. A promise returned from it that settles (also
536
+ by failing) with the dialog still open lets the confirmation be given
537
+ again, without `loading`. */
538
+ onConfirm: () => void | Promise<unknown>;
489
539
  /** The question, as a statement: "Delete invoice 2041?". */
490
540
  title: ReactNode;
491
541
  /** What about it cannot be taken back. The most important line of the
@@ -500,7 +550,8 @@ export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HT
500
550
  cancelLabel?: string;
501
551
  /** "danger" for destructive actions. */
502
552
  tone?: "primary" | "danger";
503
- /** Locks the actions while the confirmation is running. */
553
+ /** Locks the actions, Escape and the backdrop while the confirmation is
554
+ running. */
504
555
  loading?: boolean;
505
556
  }
506
557
 
@@ -587,7 +638,7 @@ export declare function CrossGlyph({ ref, size, ...rest }: GlyphProps): JSX.Elem
587
638
 
588
639
  /** A date selection with a calendar panel; weeks begin on Monday. The panel's
589
640
  foot takes a typed date, read in the order the formats in use write one. */
590
- export declare function DatePicker({ ref, value: valueGiven, onChange, placeholder, disabled, invalid, size: ownSize, chars, clearable, min, max, className, ...rest }: DatePickerProps): JSX.Element;
641
+ export declare function DatePicker(props: DatePickerProps): JSX.Element;
591
642
 
592
643
  /**
593
644
  * The value contract: every way - the grid, "Today", clearing - hands out
@@ -595,13 +646,16 @@ export declare function DatePicker({ ref, value: valueGiven, onChange, placehold
595
646
  * one; resolution "day"). There is no path that delivers a time of day along
596
647
  * with it.
597
648
  */
598
- export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
649
+ export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement>, FormPostProps<Date>, DeprecatedOnChange<(date: Date | null) => void> {
599
650
  /** The day, as a `Date` on midnight in the formats' zone (the reader's, unless the application names one); `null` means none. */
600
- value: Date | null;
651
+ value?: Date | null;
652
+ /** Uncontrolled: the value to start at.
653
+ @default null */
654
+ defaultValue?: Date | null;
601
655
  /** Runs as soon as a day is settled - on a click in the grid, on "Today" and
602
656
  on clearing (`null`). Every one of these ways hands out
603
657
  midnight in the formats' zone; there is none that delivers a time along with it. */
604
- onChange: (date: Date | null) => void;
658
+ onValueChange?: (date: Date | null) => void;
605
659
  /** What stands in the empty field. */
606
660
  placeholder?: string;
607
661
  /** Locks the field and the panel. */
@@ -651,21 +705,24 @@ export declare interface DateRange {
651
705
  * - Two chained months: paging on the outside, no day appears twice.
652
706
  * - The same day clicked twice = a one-day time span.
653
707
  */
654
- export declare function DateRangePicker({ ref, value: valueGiven, onChange, placeholder, disabled, invalid, size: ownSize, chars, clearable, presets, min, max, className, ...rest }: DateRangePickerProps): JSX.Element;
708
+ export declare function DateRangePicker(props: DateRangePickerProps): JSX.Element;
655
709
 
656
710
  /**
657
711
  * The value contract: both ends on midnight in the formats' zone (resolution "day"), and `from`
658
712
  * never lies after `to` - a range dragged backwards is silently turned around.
659
713
  * Both ends count inclusively. There is no error state.
660
714
  */
661
- export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
715
+ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement>, FormPostRangeProps, DeprecatedOnChange<(range: DateRange | null) => void> {
662
716
  /** The time span, both ends on midnight in the formats' zone (the reader's, unless the application names one) and both inclusive; `null`
663
717
  means none. */
664
- value: DateRange | null;
718
+ value?: DateRange | null;
719
+ /** Uncontrolled: the value to start at.
720
+ @default null */
721
+ defaultValue?: DateRange | null;
665
722
  /** Runs as soon as both ends are settled - after the second click, on a
666
723
  preset and on clearing (`null`). Ends dragged backwards swap silently;
667
724
  there is no error state to handle. */
668
- onChange: (range: DateRange | null) => void;
725
+ onValueChange?: (range: DateRange | null) => void;
669
726
  /** What stands in the empty field. */
670
727
  placeholder?: string;
671
728
  /** Locks the field and the panel. */
@@ -702,7 +759,7 @@ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLBu
702
759
  an exact instant and is reported only on "Apply", "Now" or "Clear"; the
703
760
  missing and doubled hours of a daylight-saving change are asked about, not
704
761
  guessed. */
705
- export declare function DateTimePicker({ ref, value: valueGiven, onChange, withSeconds, placeholder, disabled, size: ownSize, chars, invalid, clearable, min, max, className, ...rest }: DateTimePickerProps): JSX.Element;
762
+ export declare function DateTimePicker(props: DateTimePickerProps): JSX.Element;
706
763
 
707
764
  /**
708
765
  * The value contract: an exact instant (resolution "instant"), with seconds
@@ -712,14 +769,17 @@ export declare function DateTimePicker({ ref, value: valueGiven, onChange, withS
712
769
  * panel applies (the default being the earlier one). A value is reported only
713
770
  * with "Apply", "Now" or "Clear", not already on the click on a day.
714
771
  */
715
- export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
772
+ export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement>, FormPostProps<Date>, DeprecatedOnChange<(date: Date | null) => void> {
716
773
  /** The instant; `null` means none. The panel reads and sets its day and
717
774
  wall clock in the formats' zone (the reader's, unless the application names one). */
718
- value: Date | null;
775
+ value?: Date | null;
776
+ /** Uncontrolled: the value to start at.
777
+ @default null */
778
+ defaultValue?: Date | null;
719
779
  /** Runs only on completion - "Apply", "Now" or "Clear" - and not already on
720
780
  the click on a day: a day without a time would be a half-set value here,
721
781
  and a half value is no value. */
722
- onChange: (date: Date | null) => void;
782
+ onValueChange?: (date: Date | null) => void;
723
783
  /** Show the seconds field. */
724
784
  withSeconds?: boolean;
725
785
  /** What stands in the empty field. */
@@ -764,7 +824,7 @@ export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLBut
764
824
  * - Missing and doubled hours of the daylight-saving change are recognised per
765
825
  * end and treated honestly, as in the DateTimePicker.
766
826
  */
767
- export declare function DateTimeRangePicker({ ref, value, onChange, withSeconds, placeholder, disabled, invalid, size: ownSize, chars, clearable, presets, min, max, className, ...rest }: DateTimeRangePickerProps): JSX.Element;
827
+ export declare function DateTimeRangePicker(props: DateTimeRangePickerProps): JSX.Element;
768
828
 
769
829
  /**
770
830
  * The props resemble the union of DateRangePickerProps and DateTimePickerProps -
@@ -777,15 +837,18 @@ export declare function DateTimeRangePicker({ ref, value, onChange, withSeconds,
777
837
  * the daylight-saving change the same reservation holds as for the
778
838
  * DateTimePicker, separately per end of the range.
779
839
  */
780
- export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
840
+ export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement>, FormPostRangeProps, DeprecatedOnChange<(range: DateRange | null) => void> {
781
841
  /** The time span with times at both ends; `null` means none. The panel reads
782
842
  and sets days and wall clocks in the formats' zone (the reader's, unless
783
843
  the application names one). */
784
- value: DateRange | null;
844
+ value?: DateRange | null;
845
+ /** Uncontrolled: the value to start at.
846
+ @default null */
847
+ defaultValue?: DateRange | null;
785
848
  /** Runs only on "Apply" and on clearing (`null`), never between the two
786
849
  clicks. If the end lies before the start, both swap on applying - there is
787
850
  no error state. */
788
- onChange: (range: DateRange | null) => void;
851
+ onValueChange?: (range: DateRange | null) => void;
789
852
  /** Show the seconds fields. */
790
853
  withSeconds?: boolean;
791
854
  /** What stands in the empty field. */
@@ -845,6 +908,12 @@ export declare const DEFAULT_WORDING: Wording;
845
908
  the calculation; a compact set of tokens does not exist. */
846
909
  export declare type Density = "comfortable" | "compact";
847
910
 
911
+ /** The deprecated `onChange` alias of `onValueChange`, for a field prop type to extend. */
912
+ declare interface DeprecatedOnChange<T> {
913
+ /** The former name of `onValueChange`. @deprecated since 0.52 - use `onValueChange`; it goes in the next minor release. */
914
+ onChange?: T;
915
+ }
916
+
848
917
  /** Where the active node moves: up and down the visible rows, in and out of a
849
918
  branch, to the first or the last row. */
850
919
  export declare type Direction = "up" | "down" | "in" | "out" | "start" | "end";
@@ -900,17 +969,20 @@ export declare function EndGlyph({ ref, size, ...rest }: GlyphProps): JSX.Elemen
900
969
 
901
970
  /** A file field with a drop zone: choose or drop files, and remove them from
902
971
  the list again. Nothing is uploaded - that is the application's. */
903
- export declare function FileInput({ ref, value, onChange, invalid, accept, multiple, disabled, className, style, id, ...rest }: FileInputProps): JSX.Element;
972
+ export declare function FileInput(props: FileInputProps): JSX.Element;
904
973
 
905
974
  /** The props of `FileInput`: a native file input's attributes, with the files
906
975
  as the value. */
907
- export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size">, RefProp<HTMLInputElement> {
908
- /** Controlled: the chosen files. Uncontrolled, the input keeps its own and
909
- starts empty. */
976
+ export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size">, RefProp<HTMLInputElement>, DeprecatedOnChange<(files: File[]) => void> {
977
+ /** Controlled: the chosen files; `undefined` reads as none. Uncontrolled,
978
+ the input keeps its own, from `defaultValue`. */
910
979
  value?: readonly File[];
980
+ /** Uncontrolled: the files to start with.
981
+ @default [] */
982
+ defaultValue?: readonly File[];
911
983
  /** Reports the files after a choice, a drop or a removal - only those
912
984
  `accept` takes, and one where the input takes one. */
913
- onChange?: (files: File[]) => void;
985
+ onValueChange?: (files: File[]) => void;
914
986
  /** Marks the input as invalid. `FormField` sets it itself as soon as it
915
987
  carries an `error` - by hand only necessary without `FormField`. */
916
988
  invalid?: boolean;
@@ -1077,6 +1149,25 @@ export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement>,
1077
1149
  labelPlacement?: "top" | "start";
1078
1150
  }
1079
1151
 
1152
+ /** A field that has no native control to post its value: its `name`, and how one posted value is written. */
1153
+ declare interface FormPostProps<V> {
1154
+ /** Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. */
1155
+ name?: string;
1156
+ /** Replaces the default text a value is posted as. It is called with each value that is set - for a
1157
+ `MultiSelect` once per entry, for a range picker once per end - never for an empty field. */
1158
+ formValue?: (value: V) => string;
1159
+ }
1160
+
1161
+ /** The form participation of a range picker: two entries, `<name>Start` and `<name>End` unless named. */
1162
+ declare interface FormPostRangeProps extends FormPostProps<Date> {
1163
+ /** The name the start is posted under.
1164
+ @default `${name}Start` */
1165
+ startName?: string;
1166
+ /** The name the end is posted under.
1167
+ @default `${name}End` */
1168
+ endName?: string;
1169
+ }
1170
+
1080
1171
  /** How old a value is right now - independently of how it is judged and how far its source vouches for it. */
1081
1172
  export declare type Freshness = "fresh" | "stale" | "lost";
1082
1173
 
@@ -1204,19 +1295,33 @@ export declare interface IconButtonProps extends Omit<ButtonProps, "aria-label"
1204
1295
  /** A one-line text field. `chars` sets its width in characters, `numeric`
1205
1296
  sets figures right-aligned and tabular, `clearable` offers a cross. Inside
1206
1297
  a `FormField` it takes the field's id, description and invalid state. */
1207
- export declare function Input({ ref, size: ownSize, chars, invalid, numeric, clearable, onClear, className, style, id, disabled, ...rest }: InputProps): JSX.Element;
1298
+ export declare function Input(props: InputProps): JSX.Element;
1208
1299
 
1209
1300
  /** The props of `Input`: a native input's attributes, with `size` meaning the
1210
1301
  control's height. */
1211
- export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, RefProp<HTMLInputElement> {
1302
+ export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value">, RefProp<HTMLInputElement> {
1303
+ /** The text; `null` and `undefined` mean empty. With it the field is
1304
+ controlled; `defaultValue` starts an uncontrolled one. */
1305
+ value?: string | number | readonly string[] | null;
1306
+ /** Runs with the new text on every edit. `onChange` stays for the event -
1307
+ what `register` and Formik read. */
1308
+ onValueChange?: (value: string) => void;
1212
1309
  /** `sm` for a toolbar and dense forms, `md` otherwise.
1213
1310
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
1214
1311
  size?: "sm" | "md";
1215
1312
  /** The width in characters - room for the value; the field adds its own
1216
- padding and cross. Given, the field is that wide wherever it stands, and
1217
- never wider than its place. Without it the field fills its place, and is
1218
- 20 characters wide where the place asks - in a toolbar or a row. */
1313
+ padding, cross and a text `start` or `end` (an icon is not counted:
1314
+ `chars` makes room for it). Given, the field is that wide wherever it
1315
+ stands, and never wider than its place. Without it the field fills its
1316
+ place, and is 20 characters wide where the place asks - in a toolbar or a row. */
1219
1317
  chars?: number;
1318
+ /** Inside the frame before the value: a unit as text ("kg"), or an icon.
1319
+ Text is read with the field, as its description. */
1320
+ start?: ReactNode;
1321
+ /** Inside the frame after the value, after the cross: a unit as text ("%"),
1322
+ or an icon or an `IconButton`. Text is read with the field, as its
1323
+ description. */
1324
+ end?: ReactNode;
1220
1325
  /** Marks the field as invalid. `FormField` sets it itself as soon as it
1221
1326
  carries an `error` - by hand only necessary without `FormField`. */
1222
1327
  invalid?: boolean;
@@ -1289,7 +1394,7 @@ export declare interface LimitSet {
1289
1394
 
1290
1395
  /** A link in the size of its text; `external` opens it in a new tab with the
1291
1396
  protective attributes set. */
1292
- export declare function Link({ ref, size, external, className, children, ...rest }: LinkProps): JSX.Element;
1397
+ export declare function Link({ ref, size, external, className, children, href, ...rest }: LinkProps): JSX.Element;
1293
1398
 
1294
1399
  /** The props of `Link`. */
1295
1400
  export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, RefProp<HTMLAnchorElement> {
@@ -1340,7 +1445,7 @@ export declare function Menu({ trigger, children, align }: MenuProps): JSX.Eleme
1340
1445
 
1341
1446
  /** An entry of a `Menu` or a `ContextMenu`. It runs `onSelect` and closes the
1342
1447
  menu. */
1343
- export declare function MenuItem({ ref, onSelect, tone, className, children, onClick, ...rest }: MenuItemProps): JSX.Element;
1448
+ export declare function MenuItem({ ref, onSelect, tone, role, className, children, onClick, ...rest }: MenuItemProps): JSX.Element;
1344
1449
 
1345
1450
  /** The props of `MenuItem`: a button's attributes, with `onSelect` for what
1346
1451
  the entry does. */
@@ -1350,13 +1455,22 @@ export declare interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLBut
1350
1455
  onSelect?: () => void;
1351
1456
  /** "danger" for destructive actions. */
1352
1457
  tone?: "default" | "danger";
1458
+ /** What kind of entry it is: a plain one, one of a group of which one is chosen,
1459
+ or one that is on or off. The last two are told by `aria-checked`.
1460
+ @default "menuitem" */
1461
+ role?: "menuitem" | "menuitemradio" | "menuitemcheckbox";
1353
1462
  }
1354
1463
 
1355
1464
  /** The props of `Menu`. */
1356
1465
  export declare interface MenuProps {
1357
1466
  /** Trigger, e.g. a <Button>; must accept refs. Its own ref keeps its
1358
1467
  element: the menu holds the same one beside it. */
1359
- trigger: ReactElement<Record<string, unknown>>;
1468
+ trigger: ReactElement<{
1469
+ ref?: Ref<HTMLElement>;
1470
+ "aria-expanded"?: boolean;
1471
+ "aria-describedby"?: string;
1472
+ "aria-label"?: string;
1473
+ } & Record<string, unknown>>;
1360
1474
  /** The entries – typically `MenuItem` and `MenuSeparator`. */
1361
1475
  children: ReactNode;
1362
1476
  /** Alignment of the panel relative to the trigger. */
@@ -1402,7 +1516,8 @@ export declare type MeterTone = "neutral" | "accent" | "success" | "warning" | "
1402
1516
  export declare function MinusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
1403
1517
 
1404
1518
  /** A dialog window in the middle of the screen, on the native `<dialog>`:
1405
- focus trap, Escape and scroll lock come from the browser. Controlled through
1519
+ focus trap and Escape come from the browser, the page's scroll lock and the
1520
+ focus's return from the library. Controlled through
1406
1521
  `open` and `onClose`; inside it stand `ModalHeader`, `ModalBody` and
1407
1522
  `ModalFooter`. */
1408
1523
  export declare function Modal({ ref, size, closeOnBackdrop, ...rest }: ModalProps): JSX.Element;
@@ -1416,14 +1531,14 @@ export declare function ModalFooter({ ref, className, children, ...rest }: HTMLA
1416
1531
 
1417
1532
  /** The head of a `Modal` or `Drawer`: its title, which names the dialog for a
1418
1533
  screen reader, an optional sentence below it, and the close cross. */
1419
- export declare function ModalHeader({ ref, title, description, hideClose, className, ...rest }: ModalHeaderProps): JSX.Element;
1534
+ export declare function ModalHeader({ ref, title, description, hideClose, className, children, ...rest }: ModalHeaderProps): JSX.Element;
1420
1535
 
1421
1536
  /** The props of `ModalHeader`: a div's attributes, with `title` taking a node
1422
- instead of the HTML attribute. */
1537
+ instead of the HTML attribute; without it, the children are the heading. */
1423
1538
  export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
1424
1539
  /** The heading of the window. It names it for the screen reader at the same
1425
1540
  time – a dialog without a name says only "dialog". */
1426
- title: ReactNode;
1541
+ title?: ReactNode;
1427
1542
  /** One sentence below the heading: what is to be decided here. */
1428
1543
  description?: ReactNode;
1429
1544
  /** Hides the close button. */
@@ -1465,10 +1580,10 @@ export declare function MoreGlyph({ ref, size, ...rest }: GlyphProps): JSX.Eleme
1465
1580
  * "selected" scope, rows that have been unticked stay visible until the scope
1466
1581
  * changes, so that nothing jumps away from under the mouse pointer.
1467
1582
  */
1468
- export declare function MultiSelect<T extends string = string>({ ref, options: optionsGiven, value: valueGiven, onChange, placeholder, searchPlaceholder, emptyText, size: ownSize, chars, disabled, invalid, clearable, className, style, id, onClick, ...rest }: MultiSelectProps<T>): JSX.Element;
1583
+ export declare function MultiSelect<T extends string | number = string>(props: MultiSelectProps<T>): JSX.Element;
1469
1584
 
1470
1585
  /** One possibility of a `MultiSelect`: the value it stands for and its label. */
1471
- export declare interface MultiSelectOption<T extends string = string> {
1586
+ export declare interface MultiSelectOption<T extends string | number = string> {
1472
1587
  /** What stands in `value` when this row is ticked. */
1473
1588
  value: T;
1474
1589
  /** What is shown – in the panel and as a chip in the field. */
@@ -1479,15 +1594,19 @@ export declare interface MultiSelectOption<T extends string = string> {
1479
1594
  }
1480
1595
 
1481
1596
  /** The props of `MultiSelect`. */
1482
- export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement> {
1597
+ export declare interface MultiSelectProps<T extends string | number = string> extends Omit<HTMLAttributes<HTMLButtonElement>, "onChange" | "defaultValue">, RefProp<HTMLButtonElement>, FormPostProps<T>, DeprecatedOnChange<(value: T[]) => void> {
1483
1598
  /** The possibilities, in their natural order. The list never re-sorts –
1484
1599
  not even in the "selected" scope. */
1485
1600
  options: readonly MultiSelectOption<T>[];
1486
- /** The chosen values. Always controlled. */
1487
- value: readonly T[];
1601
+ /** The chosen values; `undefined` means none. With it the field is
1602
+ controlled; without it the field keeps the values itself, from `defaultValue`. */
1603
+ value?: readonly T[];
1604
+ /** Uncontrolled: the values to start with.
1605
+ @default [] */
1606
+ defaultValue?: readonly T[];
1488
1607
  /** Runs on every change of the selection, with the complete new list –
1489
1608
  not with the one value that moved. */
1490
- onChange: (value: T[]) => void;
1609
+ onValueChange?: (value: T[]) => void;
1491
1610
  /** What stands in the empty field. */
1492
1611
  placeholder?: string;
1493
1612
  /** What stands in the panel's search field. */
@@ -1550,20 +1669,25 @@ export declare type NumberFormat = "percent" | "count" | NumberOptions;
1550
1669
  * present on hover or focus. Holding one down repeats the step (a short
1551
1670
  * run-up, then briskly); min/max disable the respective button.
1552
1671
  */
1553
- export declare function NumberInput({ ref, value: valueGiven, onChange, min, max, step, decimals, grouping, prefix, suffix, size: ownSize, chars, invalid, disabled, className, style, id, onFocus, onBlur, onKeyDown, ...rest }: NumberInputProps): JSX.Element;
1672
+ export declare function NumberInput(props: NumberInputProps): JSX.Element;
1554
1673
 
1555
1674
  /** The props of `NumberInput`: a native input's attributes, with the value a
1556
1675
  number or `null`. */
1557
- export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "prefix" | "type">, RefProp<HTMLInputElement> {
1558
- /** The number, or `null` for "not stated". An empty field is not zero:
1559
- a quantity that was not measured is not a quantity of zero. */
1560
- value: number | null;
1676
+ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "size" | "prefix" | "type" | "name">, RefProp<HTMLInputElement>, FormPostProps<number>, DeprecatedOnChange<(value: number | null) => void> {
1677
+ /** The number, or `null` (or `undefined`) for "not stated". An empty
1678
+ field is not zero: a quantity that was not measured is not a quantity
1679
+ of zero. With it the field is controlled; without it the field keeps
1680
+ the number itself, from `defaultValue`. */
1681
+ value?: number | null;
1682
+ /** Uncontrolled: the number to start at.
1683
+ @default null */
1684
+ defaultValue?: number | null;
1561
1685
  /** Runs on every valid input, with `null` for the emptied field – and
1562
1686
  always clamped: what goes out lies between `min` and `max`, by every
1563
1687
  route, while typing included. Only the text in the field may still
1564
1688
  stand outside while typing; on leaving it is set to the clamped
1565
1689
  value. */
1566
- onChange: (value: number | null) => void;
1690
+ onValueChange?: (value: number | null) => void;
1567
1691
  /** Lower bound. Every reported value is clamped; the text in the field
1568
1692
  follows on leaving. */
1569
1693
  min?: number;
@@ -1620,7 +1744,7 @@ export declare function PlusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Eleme
1620
1744
  * elements in the panel inherit the field id of the trigger, and a click on
1621
1745
  * their label closes the panel.
1622
1746
  */
1623
- export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role, "aria-label": name, id, className, children, }: PopoverProps): ReactPortal | null;
1747
+ export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role: roleProp, "aria-label": name, id, className, closeOnTabOut, onBlur, children, }: PopoverProps): ReactPortal | null;
1624
1748
 
1625
1749
  /** The props of `Popover`. */
1626
1750
  export declare interface PopoverProps {
@@ -1653,15 +1777,26 @@ export declare interface PopoverProps {
1653
1777
  restoreFocus?: boolean;
1654
1778
  /** Close on scrolling instead of travelling along – for tooltips. */
1655
1779
  hideOnScroll?: boolean;
1656
- /** Role of the surface. Omit where an inner element carries it. */
1657
- role?: "dialog" | "listbox" | "menu" | "tooltip";
1780
+ /**
1781
+ * Role of the surface. `"none"` where an inner element carries the role.
1782
+ *
1783
+ * @default "dialog"
1784
+ */
1785
+ role?: "dialog" | "listbox" | "menu" | "tooltip" | "none";
1658
1786
  /** Accessible name of the surface. Needed as soon as it carries a `role`:
1659
- a named role without a name is a riddle for a screen reader. */
1787
+ a named role without a name is a riddle for a screen reader. Left out,
1788
+ the anchor names the surface. */
1660
1789
  "aria-label"?: string;
1661
1790
  /** Fixed id of the surface – for `aria-controls` on the trigger. */
1662
1791
  id?: string;
1663
1792
  /** Additional class on the surface. */
1664
1793
  className?: string;
1794
+ /** A Tab past the last control of the panel, or a Shift+Tab before its first, closes it and
1795
+ moves on from the anchor, so that the focus never falls to the page's end. */
1796
+ closeOnTabOut?: boolean;
1797
+ /** Runs when the focus leaves any element of the surface (it bubbles from
1798
+ the panel and from what is portalled out of it). */
1799
+ onBlur?: (event: FocusEvent_2<HTMLDivElement>) => void;
1665
1800
  /** What stands in the surface. */
1666
1801
  children: ReactNode;
1667
1802
  }
@@ -1717,21 +1852,21 @@ export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement>
1717
1852
  export declare type Quality = "good" | "uncertain" | "bad";
1718
1853
 
1719
1854
  /** One choice out of a few possibilities, all of them visible. Controlled
1720
- through `value` and `onChange`, or uncontrolled from `defaultValue`; the
1855
+ through `value` and `onValueChange`, or uncontrolled from `defaultValue`; the
1721
1856
  arrow keys move between the possibilities. */
1722
- export declare function RadioGroup<T extends string>({ ref, options, value, defaultValue, onChange, orientation, size: ownSize, disabled, name, className, onKeyDown, ...rest }: RadioGroupProps<T>): JSX.Element;
1857
+ export declare function RadioGroup<T extends string | number>(props: RadioGroupProps<T>): JSX.Element;
1723
1858
 
1724
1859
  /** The props of `RadioGroup`. */
1725
- export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
1860
+ export declare interface RadioGroupProps<T extends string | number> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement>, DeprecatedOnChange<(value: T) => void> {
1726
1861
  /** The possibilities, in the order in which they are meant to stand. */
1727
1862
  options: readonly RadioOption<T>[];
1728
1863
  /** The chosen possibility; `null` means: none yet. Together with
1729
- `onChange` the group is controlled. */
1864
+ `onValueChange` the group is controlled. */
1730
1865
  value?: T | null;
1731
1866
  /** Initial value of an uncontrolled group. Not together with `value`. */
1732
1867
  defaultValue?: T | null;
1733
1868
  /** Runs on every choice – on the one made with the arrow keys as well. */
1734
- onChange?: (value: T) => void;
1869
+ onValueChange?: (value: T) => void;
1735
1870
  /** Arrangement: one below the other, or side by side. */
1736
1871
  orientation?: "vertical" | "horizontal";
1737
1872
  /** `sm` for a toolbar and dense forms, `md` otherwise.
@@ -1747,7 +1882,7 @@ export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttr
1747
1882
 
1748
1883
  /** One possibility of a `RadioGroup`: its value, its label and an optional
1749
1884
  line of explanation. */
1750
- export declare interface RadioOption<T extends string> {
1885
+ export declare interface RadioOption<T extends string | number> {
1751
1886
  /** What comes back when this possibility is chosen. */
1752
1887
  value: T;
1753
1888
  /** What stands beside it. */
@@ -1775,12 +1910,52 @@ export declare interface RangePreset {
1775
1910
  range: () => DateRange;
1776
1911
  }
1777
1912
 
1913
+ /** Two values, a lower and an upper end, on one track between `min` and `max`; the ends never cross. */
1914
+ export declare function RangeSlider(props: RangeSliderProps): JSX.Element;
1915
+
1916
+ /** The props of `RangeSlider`. */
1917
+ export declare interface RangeSliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step" | "name">, RefProp<HTMLInputElement> {
1918
+ /** Controlled: `[from, to]`; `undefined` reads as the whole range. */
1919
+ value?: RangeSliderValue;
1920
+ /** Uncontrolled: the pair to start at.
1921
+ @default [min, max] */
1922
+ defaultValue?: RangeSliderValue;
1923
+ /** Reports every change, by pointer or key, as a pair on the step and inside the bounds, with `from <= to`. */
1924
+ onValueChange?: (value: [from: number, to: number]) => void;
1925
+ /** The smallest value. */
1926
+ min?: number;
1927
+ /** The largest value. */
1928
+ max?: number;
1929
+ /** The step both ends move by, counted from `min`. */
1930
+ step?: number;
1931
+ /** The value as text: for the readout and for the screen reader (`aria-valuetext`).
1932
+ @default the number in the formats' notation, with as many decimals as the step has */
1933
+ format?: (value: number) => string;
1934
+ /** The pair in mono beside the track. */
1935
+ showValue?: boolean;
1936
+ /** Posts the two ends in a `<form>` as `<name>Start` and `<name>End`, both overridable. */
1937
+ name?: string;
1938
+ /** The name the lower end is posted under.
1939
+ @default `${name}Start` */
1940
+ startName?: string;
1941
+ /** The name the upper end is posted under.
1942
+ @default `${name}End` */
1943
+ endName?: string;
1944
+ }
1945
+
1946
+ /** The two ends of a range on the track, `[from, to]`. */
1947
+ export declare type RangeSliderValue = readonly [from: number, to: number];
1948
+
1778
1949
  /** The `ref` of a component: the element it renders at its root. */
1779
1950
  export declare interface RefProp<E extends Element> {
1780
1951
  /** Receives the component's root element. */
1781
1952
  ref?: Ref<E> | undefined;
1782
1953
  }
1783
1954
 
1955
+ /** For tests: drops a waiting announcement and empties every region, so that no
1956
+ text carries into the next test. Call it in `afterEach`. */
1957
+ export declare function resetAnnouncer(): void;
1958
+
1784
1959
  /** What `scrollForRow` needs to know about a scroll area. */
1785
1960
  export declare interface RowPlacement {
1786
1961
  rowHeight: number;
@@ -1816,21 +1991,21 @@ export declare function scrollForRow(index: number, { rowHeight, scrollTop, view
1816
1991
 
1817
1992
  /** One choice out of a few short possibilities, drawn as one field with a
1818
1993
  segment for each - a radio group in what it says and how the keys move.
1819
- Controlled through `value` and `onChange`, or uncontrolled from
1994
+ Controlled through `value` and `onValueChange`, or uncontrolled from
1820
1995
  `defaultValue`. */
1821
- 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;
1996
+ export declare function SegmentedControl<T extends string | number>(props: SegmentedControlProps<T>): JSX.Element;
1822
1997
 
1823
1998
  /** The props of `SegmentedControl`. */
1824
- export declare interface SegmentedControlProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
1999
+ export declare interface SegmentedControlProps<T extends string | number> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement>, DeprecatedOnChange<(value: T) => void> {
1825
2000
  /** The possibilities, two to four, in the order in which they stand. */
1826
2001
  options: readonly SegmentedOption<T>[];
1827
2002
  /** The chosen possibility; `null` means: none yet. Together with
1828
- `onChange` the control is controlled. */
2003
+ `onValueChange` the control is controlled. */
1829
2004
  value?: T | null;
1830
2005
  /** Initial value of an uncontrolled control. Not together with `value`. */
1831
2006
  defaultValue?: T | null;
1832
2007
  /** Runs on every choice – on the one made with the arrow keys as well. */
1833
- onChange?: (value: T) => void;
2008
+ onValueChange?: (value: T) => void;
1834
2009
  /** `sm` for a toolbar and dense forms, `md` otherwise.
1835
2010
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
1836
2011
  size?: "sm" | "md";
@@ -1852,7 +2027,7 @@ export declare interface SegmentedControlProps<T extends string> extends Omit<HT
1852
2027
  }
1853
2028
 
1854
2029
  /** One possibility of a `SegmentedControl`: its value and its short label. */
1855
- export declare interface SegmentedOption<T extends string> {
2030
+ export declare interface SegmentedOption<T extends string | number> {
1856
2031
  /** What comes back when this possibility is chosen. */
1857
2032
  value: T;
1858
2033
  /** The segment's word - a short one; a long label ends in an ellipsis. */
@@ -1872,11 +2047,21 @@ export declare interface SegmentedOption<T extends string> {
1872
2047
  * Combobox's - and under a finger the system's picker (ADR-0043). The arrow is
1873
2048
  * drawn in CSS and therefore follows the theme tokens.
1874
2049
  */
1875
- export declare function Select({ ref, size: ownSize, chars, invalid, clearable, onClear, className, style, id, children, disabled, onPointerDown, onMouseDown, onKeyDown, onBlur, ...rest }: SelectProps): JSX.Element;
2050
+ export declare function Select<T extends string | number = string>(props: SelectProps<T>): JSX.Element;
1876
2051
 
1877
2052
  /** The props of `Select`: a native select's attributes, with `size` meaning
1878
2053
  the control's height. */
1879
- export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size">, RefProp<HTMLSelectElement> {
2054
+ export declare interface SelectProps<T extends string | number = string> extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size" | "value" | "defaultValue">, RefProp<HTMLSelectElement> {
2055
+ /** The chosen option's value; `null` and `undefined` mean the empty option.
2056
+ With it the field is controlled; `defaultValue` starts an uncontrolled one. */
2057
+ value?: T | readonly string[] | null;
2058
+ /** Uncontrolled: the value to start at. */
2059
+ defaultValue?: T | readonly string[] | null;
2060
+ /** Runs with the chosen option's value on every choice, `null` for the
2061
+ empty option. A number comes back as a number when the option is a
2062
+ `<option value={1}>` among the select's own children. Not for a
2063
+ `multiple` select, which reports through `onChange` as the platform does. */
2064
+ onValueChange?: (value: T | null) => void;
1880
2065
  /** `sm` for a toolbar and dense forms, `md` otherwise.
1881
2066
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
1882
2067
  size?: "sm" | "md";
@@ -1912,8 +2097,10 @@ export declare interface Separators {
1912
2097
 
1913
2098
  A field that formats a number must be able to read its own output back, and
1914
2099
  an application may have replaced `number` with anything. So the
1915
- separators are measured: one number with one decimal place, digits struck
1916
- out, and what remains is the notation's own punctuation. */
2100
+ separators are measured: one large number with one decimal place, digits struck
2101
+ out, and what remains is the notation's own punctuation. The number is one
2102
+ that every locale groups (Spanish and Polish leave four digits alone), and
2103
+ both minus signs, "-" and U+2212, are struck with the digits. */
1917
2104
  export declare function separatorsOf(formats: Formats): Separators;
1918
2105
 
1919
2106
  /** How seriously a violation weighs: one severity that advises and one that
@@ -1941,7 +2128,7 @@ export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>,
1941
2128
 
1942
2129
  /** One value on a track between `min` and `max`, on the native range input;
1943
2130
  `marks` set labelled points on the track. */
1944
- export declare function Slider({ ref, value: valueProp, defaultValue, onChange, min, max, step, marks, format, showValue, className, style, id, disabled, onKeyDown, ...rest }: SliderProps): JSX.Element;
2131
+ export declare function Slider(props: SliderProps): JSX.Element;
1945
2132
 
1946
2133
  /** A mark on the track: a value, or a value with the word beneath it. */
1947
2134
  export declare type SliderMark = number | {
@@ -1950,14 +2137,14 @@ export declare type SliderMark = number | {
1950
2137
  };
1951
2138
 
1952
2139
  /** The props of `Slider`. */
1953
- export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">, RefProp<HTMLInputElement> {
1954
- /** Controlled: the value. */
2140
+ export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">, RefProp<HTMLInputElement>, DeprecatedOnChange<(value: number) => void> {
2141
+ /** Controlled: the value; `undefined` reads as `min`. */
1955
2142
  value?: number;
1956
2143
  /** Uncontrolled: the value to start at.
1957
2144
  @default min */
1958
2145
  defaultValue?: number;
1959
2146
  /** Reports every change, by pointer or key, as a number on the step. */
1960
- onChange?: (value: number) => void;
2147
+ onValueChange?: (value: number) => void;
1961
2148
  /** The smallest value. */
1962
2149
  min?: number;
1963
2150
  /** The largest value. */
@@ -2142,7 +2329,7 @@ export declare interface StepperStep {
2142
2329
 
2143
2330
  /** An on/off switch that takes effect at once - a native checkbox with
2144
2331
  `role="switch"`. Where the choice waits for a Save button, use `Checkbox`. */
2145
- export declare function Switch({ ref, label, size: ownSize, invalid, className, style, id, ...rest }: SwitchProps): JSX.Element;
2332
+ export declare function Switch({ ref, label, size: ownSize, invalid, className, style, id, onChange, onCheckedChange, ...rest }: SwitchProps): JSX.Element;
2146
2333
 
2147
2334
  /** The props of `Switch`: a native checkbox's attributes and its label. */
2148
2335
  export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "role">, RefProp<HTMLInputElement> {
@@ -2154,6 +2341,9 @@ export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputE
2154
2341
  /** Marks the switch as invalid. `FormField` sets it itself as soon as it
2155
2342
  carries an `error` - by hand only necessary without `FormField`. */
2156
2343
  invalid?: boolean;
2344
+ /** Runs with the new state on every click. `onChange` stays for the
2345
+ event - what `register` and Formik read. */
2346
+ onCheckedChange?: (checked: boolean) => void;
2157
2347
  }
2158
2348
 
2159
2349
  /** One tab of a `TabList`; choosing it shows the `TabPanel` of the same
@@ -2245,11 +2435,17 @@ export { Text_2 as Text }
2245
2435
  `autoGrow` lets it grow with its content up to `maxRows`, `showCount` counts
2246
2436
  against `maxLength`. Inside a `FormField` it takes the field's id,
2247
2437
  description and invalid state. */
2248
- export declare function Textarea({ ref, size: ownSize, chars, invalid, autoGrow, maxRows, showCount, resize, className, style, id, disabled, rows, onInput, ...rest }: TextareaProps): JSX.Element;
2438
+ export declare function Textarea(props: TextareaProps): JSX.Element;
2249
2439
 
2250
2440
  /** The props of `Textarea`: a native textarea's attributes, with `chars` in
2251
2441
  place of `cols`. */
2252
- export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "cols">, RefProp<HTMLTextAreaElement> {
2442
+ export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "cols" | "value">, RefProp<HTMLTextAreaElement> {
2443
+ /** The text; `null` and `undefined` mean empty. With it the field is
2444
+ controlled; `defaultValue` starts an uncontrolled one. */
2445
+ value?: string | number | readonly string[] | null;
2446
+ /** Runs with the new text on every edit. `onChange` stays for the event -
2447
+ what `register` and Formik read. */
2448
+ onValueChange?: (value: string) => void;
2253
2449
  /** `sm` for a toolbar and dense forms, `md` otherwise.
2254
2450
  @default the size of a `ControlSizeProvider` around it, else `"md"` */
2255
2451
  size?: "sm" | "md";
@@ -2311,6 +2507,28 @@ export declare type TextTracking = "normal" | "tight" | "display" | "caps";
2311
2507
  /** A font weight of the token set. */
2312
2508
  export declare type TextWeight = "regular" | "medium" | "semibold";
2313
2509
 
2510
+ /** A time of day as hour and minute (and second) fields that type themselves onwards, the arrows count and a pasted
2511
+ "14:30" is split - the DateTimePicker's time fields, alone. The value is the text `HH:mm`, as a native time input has it. */
2512
+ export declare function TimeInput(props: TimeInputProps): JSX.Element;
2513
+
2514
+ /** The props of `TimeInput`. */
2515
+ export declare interface TimeInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size" | "name" | "min" | "max" | "step">, RefProp<HTMLInputElement>, FormPostProps<string> {
2516
+ /** Controlled: the time as `HH:mm`, or `HH:mm:ss` with `withSeconds`; `null` or `undefined` reads as empty. */
2517
+ value?: string | null;
2518
+ /** Uncontrolled: the time to start at.
2519
+ @default null */
2520
+ defaultValue?: string | null;
2521
+ /** Reports every change as `HH:mm` (`HH:mm:ss` with `withSeconds`); `null` when a form's reset empties the field. */
2522
+ onValueChange?: (value: string | null) => void;
2523
+ /** Adds a field for the seconds. */
2524
+ withSeconds?: boolean;
2525
+ /** Marks the field as invalid. Inside a `FormField` with an `error`, it is set already. */
2526
+ invalid?: boolean;
2527
+ /** The size of the fields.
2528
+ @default the size of a `ControlSizeProvider` around it, else `"md"` */
2529
+ size?: "sm" | "md";
2530
+ }
2531
+
2314
2532
  /** The one action a toast may carry, e.g. "Undo". */
2315
2533
  export declare interface ToastAction {
2316
2534
  /** A verb for what it does - "Undo", "Show". */
@@ -2406,6 +2624,14 @@ export declare interface ToastProviderProps {
2406
2624
  /** How the message turns out; `loading` is a toast still at work. */
2407
2625
  export declare type ToastTone = "neutral" | "success" | "warning" | "danger" | "loading";
2408
2626
 
2627
+ /** What a tone looks like beside its colour: a tick for success, an
2628
+ exclamation in a circle for danger, in a triangle for warning, and an "i" in
2629
+ a circle for the neutral and accent tones. The dots of ! and i are strokes of
2630
+ no length: a round cap alone is a dot as wide as the stem. */
2631
+ export declare function ToneGlyph({ ref, tone, size, ...rest }: GlyphProps & {
2632
+ tone: "neutral" | "accent" | "success" | "warning" | "danger";
2633
+ }): JSX.Element;
2634
+
2409
2635
  /** Appears on hover and keyboard focus; purely descriptive (role="tooltip"). */
2410
2636
  export declare function Tooltip({ content, children, delay }: TooltipProps): JSX.Element;
2411
2637
 
@@ -2415,7 +2641,12 @@ export declare interface TooltipProps {
2415
2641
  content: ReactNode;
2416
2642
  /** Exactly one element that triggers the tooltip (must accept refs). Its
2417
2643
  own ref keeps its element: the tooltip holds the same one beside it. */
2418
- children: ReactElement<Record<string, unknown>>;
2644
+ children: ReactElement<{
2645
+ ref?: Ref<HTMLElement>;
2646
+ "aria-expanded"?: boolean;
2647
+ "aria-describedby"?: string;
2648
+ "aria-label"?: string;
2649
+ } & Record<string, unknown>>;
2419
2650
  /** Delay in ms before the tooltip appears. */
2420
2651
  delay?: number;
2421
2652
  }
@@ -2863,7 +3094,11 @@ export declare interface Wording {
2863
3094
  /** A value the multi-select took or gave away where no checkbox had the
2864
3095
  focus to say it - Enter in the search, a chip, Backspace. */
2865
3096
  optionAdded: (label: string) => string;
3097
+ /** The last row of a creatable combobox: the typed text, offered as the value. */
3098
+ createOption: (text: string) => string;
2866
3099
  optionRemoved: (label: string) => string;
3100
+ /** Said after a bulk action of the panel: how many values are chosen now. */
3101
+ selectionCount: (count: number) => string;
2867
3102
  /** What stands in the empty field. */
2868
3103
  palettePlaceholder: string;
2869
3104
  /** Accessible name of the field. Deliberately kept apart from the
@@ -2931,6 +3166,9 @@ export declare interface Wording {
2931
3166
  /** Header of the two time columns in the range with time of day. */
2932
3167
  sideFrom: string;
2933
3168
  sideTo: string;
3169
+ /** Accessible names of the two thumbs of a RangeSlider. */
3170
+ rangeSliderFrom: string;
3171
+ rangeSliderTo: string;
2934
3172
  /** Accessible name of the time fields, per side. */
2935
3173
  startHour: string;
2936
3174
  startMinute: string;
@@ -2941,6 +3179,8 @@ export declare interface Wording {
2941
3179
  /** Stepper buttons of a time field; the label comes from above. */
2942
3180
  timeFieldIncrease: (feld: string) => string;
2943
3181
  timeFieldDecrease: (feld: string) => string;
3182
+ /** Said when a picker takes a new value; the text is the value as the field shows it. */
3183
+ pickerPicked: (value: string) => string;
2944
3184
  /** Footer of the range panels. */
2945
3185
  chooseStartDate: string;
2946
3186
  chooseEndDate: string;
@@ -3050,6 +3290,18 @@ export declare interface Wording {
3050
3290
  selectRow: (row: string) => string;
3051
3291
  /** Said after the user changes the selection of a table in grid mode: the count. */
3052
3292
  tableSelectedCount: (count: number) => string;
3293
+ /** Said after the user sorts by a column: "Sorted by Name, ascending". */
3294
+ sortedAscending: (column: string) => string;
3295
+ sortedDescending: (column: string) => string;
3296
+ /** Said when a column's sort is taken away. */
3297
+ sortRemoved: (column: string) => string;
3298
+ /** Said after the user folds or opens a group: "Berlin folded". */
3299
+ groupFolded: (name: string) => string;
3300
+ groupOpened: (name: string) => string;
3301
+ /** Said when the file of an export has been handed over. */
3302
+ exportDone: string;
3303
+ /** The name of a term of the text filter: "Term 1". */
3304
+ filterTerm: (index: number) => string;
3053
3305
  /** The selection of every row in the filtered set. */
3054
3306
  selectAllRows: string;
3055
3307
  /** The same checkbox in server mode, where the table holds one page of a server's. */
@@ -3114,6 +3366,8 @@ export declare interface Wording {
3114
3366
  not `expandRowNamed`, which names the row detail's expander on the same row. */
3115
3367
  foldBranch: (row: string) => string;
3116
3368
  unfoldBranch: (row: string) => string;
3369
+ /** The line under a branch whose rows are being loaded - also announced. */
3370
+ branchLoading: (row: string) => string;
3117
3371
  /** The first column of a tree's export. */
3118
3372
  levelColumn: string;
3119
3373
  /** A row shown only because a descendant matches the search or a filter. */
@@ -3130,6 +3384,8 @@ export declare interface Wording {
3130
3384
  entries: (count: number, formatted: string) => string;
3131
3385
  /** "3 selected" in the pagination bar and the table toolbar. */
3132
3386
  selectedCount: (count: number, formatted: string) => string;
3387
+ /** The count a bulk action names when it acts on fewer of the selected rows than are ticked, in its label: "2 of 3". */
3388
+ ofSelected: (count: string, total: string) => string;
3133
3389
  /** The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." */
3134
3390
  selectedOnPage: (count: number, formatted: string) => string;
3135
3391
  /** The button after it, for the rows the server holds: "Select all 12,400 that match". */
@@ -3187,7 +3443,7 @@ export declare interface Wording {
3187
3443
  /** The button under a server-mode table's error that sends the request once more. */
3188
3444
  tryAgain: string;
3189
3445
  /** "43 of 1.204" - the numbers come from the formats. */
3190
- filteredOfTotal: (matches: string, total: string) => string;
3446
+ filteredOfTotal: (matches: string, total: string, count: number) => string;
3191
3447
  /** The four outcomes of an assessment, as a word beside the value. Colour
3192
3448
  alone carries no meaning - the word stands here for that reason. */
3193
3449
  verdictOk: string;
@@ -3218,10 +3474,13 @@ export declare interface Wording {
3218
3474
  asOfAgo: (duration: string) => string;
3219
3475
  close: string;
3220
3476
  closeToast: string;
3221
- /** The count on the front toast of a closed deck; pressing it shows them all. */
3477
+ /** The count on the front toast of a closed deck; pressing it shows them all.
3478
+ The name starts with the visible text "1 / n". */
3222
3479
  toastDeckCount: (count: number) => string;
3223
3480
  /** The name of the toasts' region, which Alt+T moves the focus into. */
3224
3481
  toastRegion: string;
3482
+ /** The visible hint at an open deck that Alt+T moves the focus into it. */
3483
+ toastShortcutHint: string;
3225
3484
  confirm: string;
3226
3485
  cancel: string;
3227
3486
  loading: string;
@@ -3348,6 +3607,8 @@ export declare interface Wording {
3348
3607
  /** At the top of the menu, and in the name of a head the arrow keys move. */
3349
3608
  dashboardPlace: (place: number, of: number) => string;
3350
3609
  dashboardHead: (title: string, place: number, of: number) => string;
3610
+ /** The description of a head in the editing mode: what the arrow keys do. */
3611
+ dashboardHeadHint: string;
3351
3612
  /** The name of the head of a locked widget in the editing mode. */
3352
3613
  dashboardHeadLocked: (title: string, place: number, of: number) => string;
3353
3614
  /** The word beside a locked widget's size in the mode. */
@@ -3369,8 +3630,8 @@ export declare interface Wording {
3369
3630
  full: string;
3370
3631
  };
3371
3632
  /** A size's entry in a widget's menu: its name and its share of the width
3372
- (`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at. */
3373
- dashboardSizeEntry: (size: string, share: string, current: boolean) => string;
3633
+ (`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at (no longer worded: the menu's radio state says it, so an entry may ignore it). */
3634
+ dashboardSizeEntry: (size: string, share: string, current?: boolean) => string;
3374
3635
  /** The built-in heading type: its name, its sentence in the catalogue, the
3375
3636
  text a new heading starts with and the label of its text field. */
3376
3637
  dashboardHeadingLabel: string;
@@ -3423,6 +3684,8 @@ export declare interface Wording {
3423
3684
  /** Why a quantity has no number - the label is the given at the root of it,
3424
3685
  or the divisor that is zero. */
3425
3686
  calculationMissing: (label: string) => string;
3687
+ /** The same for several: every missing given, as a list. */
3688
+ calculationMissingAll: (labels: readonly string[]) => string;
3426
3689
  calculationDivisionByZero: (label: string) => string;
3427
3690
  /** The target beside the result, with the target's number and unit. */
3428
3691
  calculationAboveTarget: (target: string) => string;