@umriss-ui/core 0.50.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/API.md +1415 -0
- package/CHANGELOG.md +71 -0
- package/README.md +82 -6
- package/dist/core.css +1 -1
- package/dist/core.js +5013 -4257
- package/dist/de.d.ts +48 -4
- package/dist/formats--E1bx2-N.js +104 -0
- package/dist/index.d.ts +369 -90
- package/dist/wording/de.js +29 -8
- package/docs/llms-full.md +5678 -4738
- package/package.json +2 -16
- package/dist/formats-dd9LbvXt.js +0 -102
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>(
|
|
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`
|
|
348
|
-
|
|
349
|
-
value
|
|
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
|
-
|
|
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.
|
|
487
|
-
|
|
488
|
-
|
|
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
|
|
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(
|
|
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
|
|
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
|
-
|
|
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(
|
|
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
|
|
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
|
-
|
|
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(
|
|
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
|
|
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
|
-
|
|
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(
|
|
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
|
|
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
|
-
|
|
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";
|
|
@@ -894,19 +963,26 @@ export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
894
963
|
icon?: ReactNode;
|
|
895
964
|
}
|
|
896
965
|
|
|
966
|
+
/** The chevron against a bar: the last step of a sequence. Drawn pointing
|
|
967
|
+
right; turn it by 180 degrees for the first. */
|
|
968
|
+
export declare function EndGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
969
|
+
|
|
897
970
|
/** A file field with a drop zone: choose or drop files, and remove them from
|
|
898
971
|
the list again. Nothing is uploaded - that is the application's. */
|
|
899
|
-
export declare function FileInput(
|
|
972
|
+
export declare function FileInput(props: FileInputProps): JSX.Element;
|
|
900
973
|
|
|
901
974
|
/** The props of `FileInput`: a native file input's attributes, with the files
|
|
902
975
|
as the value. */
|
|
903
|
-
export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size">, RefProp<HTMLInputElement> {
|
|
904
|
-
/** Controlled: the chosen files
|
|
905
|
-
|
|
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`. */
|
|
906
979
|
value?: readonly File[];
|
|
980
|
+
/** Uncontrolled: the files to start with.
|
|
981
|
+
@default [] */
|
|
982
|
+
defaultValue?: readonly File[];
|
|
907
983
|
/** Reports the files after a choice, a drop or a removal - only those
|
|
908
984
|
`accept` takes, and one where the input takes one. */
|
|
909
|
-
|
|
985
|
+
onValueChange?: (files: File[]) => void;
|
|
910
986
|
/** Marks the input as invalid. `FormField` sets it itself as soon as it
|
|
911
987
|
carries an `error` - by hand only necessary without `FormField`. */
|
|
912
988
|
invalid?: boolean;
|
|
@@ -1073,6 +1149,25 @@ export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement>,
|
|
|
1073
1149
|
labelPlacement?: "top" | "start";
|
|
1074
1150
|
}
|
|
1075
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
|
+
|
|
1076
1171
|
/** How old a value is right now - independently of how it is judged and how far its source vouches for it. */
|
|
1077
1172
|
export declare type Freshness = "fresh" | "stale" | "lost";
|
|
1078
1173
|
|
|
@@ -1200,19 +1295,33 @@ export declare interface IconButtonProps extends Omit<ButtonProps, "aria-label"
|
|
|
1200
1295
|
/** A one-line text field. `chars` sets its width in characters, `numeric`
|
|
1201
1296
|
sets figures right-aligned and tabular, `clearable` offers a cross. Inside
|
|
1202
1297
|
a `FormField` it takes the field's id, description and invalid state. */
|
|
1203
|
-
export declare function Input(
|
|
1298
|
+
export declare function Input(props: InputProps): JSX.Element;
|
|
1204
1299
|
|
|
1205
1300
|
/** The props of `Input`: a native input's attributes, with `size` meaning the
|
|
1206
1301
|
control's height. */
|
|
1207
|
-
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;
|
|
1208
1309
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
1209
1310
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
1210
1311
|
size?: "sm" | "md";
|
|
1211
1312
|
/** The width in characters - room for the value; the field adds its own
|
|
1212
|
-
padding and
|
|
1213
|
-
|
|
1214
|
-
|
|
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. */
|
|
1215
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;
|
|
1216
1325
|
/** Marks the field as invalid. `FormField` sets it itself as soon as it
|
|
1217
1326
|
carries an `error` - by hand only necessary without `FormField`. */
|
|
1218
1327
|
invalid?: boolean;
|
|
@@ -1285,7 +1394,7 @@ export declare interface LimitSet {
|
|
|
1285
1394
|
|
|
1286
1395
|
/** A link in the size of its text; `external` opens it in a new tab with the
|
|
1287
1396
|
protective attributes set. */
|
|
1288
|
-
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;
|
|
1289
1398
|
|
|
1290
1399
|
/** The props of `Link`. */
|
|
1291
1400
|
export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, RefProp<HTMLAnchorElement> {
|
|
@@ -1336,7 +1445,7 @@ export declare function Menu({ trigger, children, align }: MenuProps): JSX.Eleme
|
|
|
1336
1445
|
|
|
1337
1446
|
/** An entry of a `Menu` or a `ContextMenu`. It runs `onSelect` and closes the
|
|
1338
1447
|
menu. */
|
|
1339
|
-
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;
|
|
1340
1449
|
|
|
1341
1450
|
/** The props of `MenuItem`: a button's attributes, with `onSelect` for what
|
|
1342
1451
|
the entry does. */
|
|
@@ -1346,13 +1455,22 @@ export declare interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLBut
|
|
|
1346
1455
|
onSelect?: () => void;
|
|
1347
1456
|
/** "danger" for destructive actions. */
|
|
1348
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";
|
|
1349
1462
|
}
|
|
1350
1463
|
|
|
1351
1464
|
/** The props of `Menu`. */
|
|
1352
1465
|
export declare interface MenuProps {
|
|
1353
1466
|
/** Trigger, e.g. a <Button>; must accept refs. Its own ref keeps its
|
|
1354
1467
|
element: the menu holds the same one beside it. */
|
|
1355
|
-
trigger: ReactElement<
|
|
1468
|
+
trigger: ReactElement<{
|
|
1469
|
+
ref?: Ref<HTMLElement>;
|
|
1470
|
+
"aria-expanded"?: boolean;
|
|
1471
|
+
"aria-describedby"?: string;
|
|
1472
|
+
"aria-label"?: string;
|
|
1473
|
+
} & Record<string, unknown>>;
|
|
1356
1474
|
/** The entries – typically `MenuItem` and `MenuSeparator`. */
|
|
1357
1475
|
children: ReactNode;
|
|
1358
1476
|
/** Alignment of the panel relative to the trigger. */
|
|
@@ -1398,7 +1516,8 @@ export declare type MeterTone = "neutral" | "accent" | "success" | "warning" | "
|
|
|
1398
1516
|
export declare function MinusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
1399
1517
|
|
|
1400
1518
|
/** A dialog window in the middle of the screen, on the native `<dialog>`:
|
|
1401
|
-
focus trap
|
|
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
|
|
1402
1521
|
`open` and `onClose`; inside it stand `ModalHeader`, `ModalBody` and
|
|
1403
1522
|
`ModalFooter`. */
|
|
1404
1523
|
export declare function Modal({ ref, size, closeOnBackdrop, ...rest }: ModalProps): JSX.Element;
|
|
@@ -1412,14 +1531,14 @@ export declare function ModalFooter({ ref, className, children, ...rest }: HTMLA
|
|
|
1412
1531
|
|
|
1413
1532
|
/** The head of a `Modal` or `Drawer`: its title, which names the dialog for a
|
|
1414
1533
|
screen reader, an optional sentence below it, and the close cross. */
|
|
1415
|
-
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;
|
|
1416
1535
|
|
|
1417
1536
|
/** The props of `ModalHeader`: a div's attributes, with `title` taking a node
|
|
1418
|
-
instead of the HTML attribute. */
|
|
1537
|
+
instead of the HTML attribute; without it, the children are the heading. */
|
|
1419
1538
|
export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
|
|
1420
1539
|
/** The heading of the window. It names it for the screen reader at the same
|
|
1421
1540
|
time – a dialog without a name says only "dialog". */
|
|
1422
|
-
title
|
|
1541
|
+
title?: ReactNode;
|
|
1423
1542
|
/** One sentence below the heading: what is to be decided here. */
|
|
1424
1543
|
description?: ReactNode;
|
|
1425
1544
|
/** Hides the close button. */
|
|
@@ -1461,10 +1580,10 @@ export declare function MoreGlyph({ ref, size, ...rest }: GlyphProps): JSX.Eleme
|
|
|
1461
1580
|
* "selected" scope, rows that have been unticked stay visible until the scope
|
|
1462
1581
|
* changes, so that nothing jumps away from under the mouse pointer.
|
|
1463
1582
|
*/
|
|
1464
|
-
export declare function MultiSelect<T extends string = string>(
|
|
1583
|
+
export declare function MultiSelect<T extends string | number = string>(props: MultiSelectProps<T>): JSX.Element;
|
|
1465
1584
|
|
|
1466
1585
|
/** One possibility of a `MultiSelect`: the value it stands for and its label. */
|
|
1467
|
-
export declare interface MultiSelectOption<T extends string = string> {
|
|
1586
|
+
export declare interface MultiSelectOption<T extends string | number = string> {
|
|
1468
1587
|
/** What stands in `value` when this row is ticked. */
|
|
1469
1588
|
value: T;
|
|
1470
1589
|
/** What is shown – in the panel and as a chip in the field. */
|
|
@@ -1475,15 +1594,19 @@ export declare interface MultiSelectOption<T extends string = string> {
|
|
|
1475
1594
|
}
|
|
1476
1595
|
|
|
1477
1596
|
/** The props of `MultiSelect`. */
|
|
1478
|
-
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> {
|
|
1479
1598
|
/** The possibilities, in their natural order. The list never re-sorts –
|
|
1480
1599
|
not even in the "selected" scope. */
|
|
1481
1600
|
options: readonly MultiSelectOption<T>[];
|
|
1482
|
-
/** The chosen values
|
|
1483
|
-
|
|
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[];
|
|
1484
1607
|
/** Runs on every change of the selection, with the complete new list –
|
|
1485
1608
|
not with the one value that moved. */
|
|
1486
|
-
|
|
1609
|
+
onValueChange?: (value: T[]) => void;
|
|
1487
1610
|
/** What stands in the empty field. */
|
|
1488
1611
|
placeholder?: string;
|
|
1489
1612
|
/** What stands in the panel's search field. */
|
|
@@ -1546,20 +1669,25 @@ export declare type NumberFormat = "percent" | "count" | NumberOptions;
|
|
|
1546
1669
|
* present on hover or focus. Holding one down repeats the step (a short
|
|
1547
1670
|
* run-up, then briskly); min/max disable the respective button.
|
|
1548
1671
|
*/
|
|
1549
|
-
export declare function NumberInput(
|
|
1672
|
+
export declare function NumberInput(props: NumberInputProps): JSX.Element;
|
|
1550
1673
|
|
|
1551
1674
|
/** The props of `NumberInput`: a native input's attributes, with the value a
|
|
1552
1675
|
number or `null`. */
|
|
1553
|
-
export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "prefix" | "type">, RefProp<HTMLInputElement> {
|
|
1554
|
-
/** The number, or `null` for "not stated". An empty
|
|
1555
|
-
a quantity that was not measured is not a quantity
|
|
1556
|
-
|
|
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;
|
|
1557
1685
|
/** Runs on every valid input, with `null` for the emptied field – and
|
|
1558
1686
|
always clamped: what goes out lies between `min` and `max`, by every
|
|
1559
1687
|
route, while typing included. Only the text in the field may still
|
|
1560
1688
|
stand outside while typing; on leaving it is set to the clamped
|
|
1561
1689
|
value. */
|
|
1562
|
-
|
|
1690
|
+
onValueChange?: (value: number | null) => void;
|
|
1563
1691
|
/** Lower bound. Every reported value is clamped; the text in the field
|
|
1564
1692
|
follows on leaving. */
|
|
1565
1693
|
min?: number;
|
|
@@ -1616,7 +1744,7 @@ export declare function PlusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Eleme
|
|
|
1616
1744
|
* elements in the panel inherit the field id of the trigger, and a click on
|
|
1617
1745
|
* their label closes the panel.
|
|
1618
1746
|
*/
|
|
1619
|
-
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;
|
|
1620
1748
|
|
|
1621
1749
|
/** The props of `Popover`. */
|
|
1622
1750
|
export declare interface PopoverProps {
|
|
@@ -1649,15 +1777,26 @@ export declare interface PopoverProps {
|
|
|
1649
1777
|
restoreFocus?: boolean;
|
|
1650
1778
|
/** Close on scrolling instead of travelling along – for tooltips. */
|
|
1651
1779
|
hideOnScroll?: boolean;
|
|
1652
|
-
/**
|
|
1653
|
-
|
|
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";
|
|
1654
1786
|
/** Accessible name of the surface. Needed as soon as it carries a `role`:
|
|
1655
|
-
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. */
|
|
1656
1789
|
"aria-label"?: string;
|
|
1657
1790
|
/** Fixed id of the surface – for `aria-controls` on the trigger. */
|
|
1658
1791
|
id?: string;
|
|
1659
1792
|
/** Additional class on the surface. */
|
|
1660
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;
|
|
1661
1800
|
/** What stands in the surface. */
|
|
1662
1801
|
children: ReactNode;
|
|
1663
1802
|
}
|
|
@@ -1713,21 +1852,21 @@ export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement>
|
|
|
1713
1852
|
export declare type Quality = "good" | "uncertain" | "bad";
|
|
1714
1853
|
|
|
1715
1854
|
/** One choice out of a few possibilities, all of them visible. Controlled
|
|
1716
|
-
through `value` and `
|
|
1855
|
+
through `value` and `onValueChange`, or uncontrolled from `defaultValue`; the
|
|
1717
1856
|
arrow keys move between the possibilities. */
|
|
1718
|
-
export declare function RadioGroup<T extends string>(
|
|
1857
|
+
export declare function RadioGroup<T extends string | number>(props: RadioGroupProps<T>): JSX.Element;
|
|
1719
1858
|
|
|
1720
1859
|
/** The props of `RadioGroup`. */
|
|
1721
|
-
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> {
|
|
1722
1861
|
/** The possibilities, in the order in which they are meant to stand. */
|
|
1723
1862
|
options: readonly RadioOption<T>[];
|
|
1724
1863
|
/** The chosen possibility; `null` means: none yet. Together with
|
|
1725
|
-
`
|
|
1864
|
+
`onValueChange` the group is controlled. */
|
|
1726
1865
|
value?: T | null;
|
|
1727
1866
|
/** Initial value of an uncontrolled group. Not together with `value`. */
|
|
1728
1867
|
defaultValue?: T | null;
|
|
1729
1868
|
/** Runs on every choice – on the one made with the arrow keys as well. */
|
|
1730
|
-
|
|
1869
|
+
onValueChange?: (value: T) => void;
|
|
1731
1870
|
/** Arrangement: one below the other, or side by side. */
|
|
1732
1871
|
orientation?: "vertical" | "horizontal";
|
|
1733
1872
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
@@ -1743,7 +1882,7 @@ export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttr
|
|
|
1743
1882
|
|
|
1744
1883
|
/** One possibility of a `RadioGroup`: its value, its label and an optional
|
|
1745
1884
|
line of explanation. */
|
|
1746
|
-
export declare interface RadioOption<T extends string> {
|
|
1885
|
+
export declare interface RadioOption<T extends string | number> {
|
|
1747
1886
|
/** What comes back when this possibility is chosen. */
|
|
1748
1887
|
value: T;
|
|
1749
1888
|
/** What stands beside it. */
|
|
@@ -1771,12 +1910,52 @@ export declare interface RangePreset {
|
|
|
1771
1910
|
range: () => DateRange;
|
|
1772
1911
|
}
|
|
1773
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
|
+
|
|
1774
1949
|
/** The `ref` of a component: the element it renders at its root. */
|
|
1775
1950
|
export declare interface RefProp<E extends Element> {
|
|
1776
1951
|
/** Receives the component's root element. */
|
|
1777
1952
|
ref?: Ref<E> | undefined;
|
|
1778
1953
|
}
|
|
1779
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
|
+
|
|
1780
1959
|
/** What `scrollForRow` needs to know about a scroll area. */
|
|
1781
1960
|
export declare interface RowPlacement {
|
|
1782
1961
|
rowHeight: number;
|
|
@@ -1812,21 +1991,21 @@ export declare function scrollForRow(index: number, { rowHeight, scrollTop, view
|
|
|
1812
1991
|
|
|
1813
1992
|
/** One choice out of a few short possibilities, drawn as one field with a
|
|
1814
1993
|
segment for each - a radio group in what it says and how the keys move.
|
|
1815
|
-
Controlled through `value` and `
|
|
1994
|
+
Controlled through `value` and `onValueChange`, or uncontrolled from
|
|
1816
1995
|
`defaultValue`. */
|
|
1817
|
-
export declare function SegmentedControl<T extends string>(
|
|
1996
|
+
export declare function SegmentedControl<T extends string | number>(props: SegmentedControlProps<T>): JSX.Element;
|
|
1818
1997
|
|
|
1819
1998
|
/** The props of `SegmentedControl`. */
|
|
1820
|
-
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> {
|
|
1821
2000
|
/** The possibilities, two to four, in the order in which they stand. */
|
|
1822
2001
|
options: readonly SegmentedOption<T>[];
|
|
1823
2002
|
/** The chosen possibility; `null` means: none yet. Together with
|
|
1824
|
-
`
|
|
2003
|
+
`onValueChange` the control is controlled. */
|
|
1825
2004
|
value?: T | null;
|
|
1826
2005
|
/** Initial value of an uncontrolled control. Not together with `value`. */
|
|
1827
2006
|
defaultValue?: T | null;
|
|
1828
2007
|
/** Runs on every choice – on the one made with the arrow keys as well. */
|
|
1829
|
-
|
|
2008
|
+
onValueChange?: (value: T) => void;
|
|
1830
2009
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
1831
2010
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
1832
2011
|
size?: "sm" | "md";
|
|
@@ -1848,7 +2027,7 @@ export declare interface SegmentedControlProps<T extends string> extends Omit<HT
|
|
|
1848
2027
|
}
|
|
1849
2028
|
|
|
1850
2029
|
/** One possibility of a `SegmentedControl`: its value and its short label. */
|
|
1851
|
-
export declare interface SegmentedOption<T extends string> {
|
|
2030
|
+
export declare interface SegmentedOption<T extends string | number> {
|
|
1852
2031
|
/** What comes back when this possibility is chosen. */
|
|
1853
2032
|
value: T;
|
|
1854
2033
|
/** The segment's word - a short one; a long label ends in an ellipsis. */
|
|
@@ -1868,11 +2047,21 @@ export declare interface SegmentedOption<T extends string> {
|
|
|
1868
2047
|
* Combobox's - and under a finger the system's picker (ADR-0043). The arrow is
|
|
1869
2048
|
* drawn in CSS and therefore follows the theme tokens.
|
|
1870
2049
|
*/
|
|
1871
|
-
export declare function Select
|
|
2050
|
+
export declare function Select<T extends string | number = string>(props: SelectProps<T>): JSX.Element;
|
|
1872
2051
|
|
|
1873
2052
|
/** The props of `Select`: a native select's attributes, with `size` meaning
|
|
1874
2053
|
the control's height. */
|
|
1875
|
-
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;
|
|
1876
2065
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
1877
2066
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
1878
2067
|
size?: "sm" | "md";
|
|
@@ -1908,8 +2097,10 @@ export declare interface Separators {
|
|
|
1908
2097
|
|
|
1909
2098
|
A field that formats a number must be able to read its own output back, and
|
|
1910
2099
|
an application may have replaced `number` with anything. So the
|
|
1911
|
-
separators are measured: one number with one decimal place, digits struck
|
|
1912
|
-
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. */
|
|
1913
2104
|
export declare function separatorsOf(formats: Formats): Separators;
|
|
1914
2105
|
|
|
1915
2106
|
/** How seriously a violation weighs: one severity that advises and one that
|
|
@@ -1937,7 +2128,7 @@ export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>,
|
|
|
1937
2128
|
|
|
1938
2129
|
/** One value on a track between `min` and `max`, on the native range input;
|
|
1939
2130
|
`marks` set labelled points on the track. */
|
|
1940
|
-
export declare function Slider(
|
|
2131
|
+
export declare function Slider(props: SliderProps): JSX.Element;
|
|
1941
2132
|
|
|
1942
2133
|
/** A mark on the track: a value, or a value with the word beneath it. */
|
|
1943
2134
|
export declare type SliderMark = number | {
|
|
@@ -1946,14 +2137,14 @@ export declare type SliderMark = number | {
|
|
|
1946
2137
|
};
|
|
1947
2138
|
|
|
1948
2139
|
/** The props of `Slider`. */
|
|
1949
|
-
export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">, RefProp<HTMLInputElement> {
|
|
1950
|
-
/** 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`. */
|
|
1951
2142
|
value?: number;
|
|
1952
2143
|
/** Uncontrolled: the value to start at.
|
|
1953
2144
|
@default min */
|
|
1954
2145
|
defaultValue?: number;
|
|
1955
2146
|
/** Reports every change, by pointer or key, as a number on the step. */
|
|
1956
|
-
|
|
2147
|
+
onValueChange?: (value: number) => void;
|
|
1957
2148
|
/** The smallest value. */
|
|
1958
2149
|
min?: number;
|
|
1959
2150
|
/** The largest value. */
|
|
@@ -2138,7 +2329,7 @@ export declare interface StepperStep {
|
|
|
2138
2329
|
|
|
2139
2330
|
/** An on/off switch that takes effect at once - a native checkbox with
|
|
2140
2331
|
`role="switch"`. Where the choice waits for a Save button, use `Checkbox`. */
|
|
2141
|
-
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;
|
|
2142
2333
|
|
|
2143
2334
|
/** The props of `Switch`: a native checkbox's attributes and its label. */
|
|
2144
2335
|
export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "role">, RefProp<HTMLInputElement> {
|
|
@@ -2150,6 +2341,9 @@ export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputE
|
|
|
2150
2341
|
/** Marks the switch as invalid. `FormField` sets it itself as soon as it
|
|
2151
2342
|
carries an `error` - by hand only necessary without `FormField`. */
|
|
2152
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;
|
|
2153
2347
|
}
|
|
2154
2348
|
|
|
2155
2349
|
/** One tab of a `TabList`; choosing it shows the `TabPanel` of the same
|
|
@@ -2241,11 +2435,17 @@ export { Text_2 as Text }
|
|
|
2241
2435
|
`autoGrow` lets it grow with its content up to `maxRows`, `showCount` counts
|
|
2242
2436
|
against `maxLength`. Inside a `FormField` it takes the field's id,
|
|
2243
2437
|
description and invalid state. */
|
|
2244
|
-
export declare function Textarea(
|
|
2438
|
+
export declare function Textarea(props: TextareaProps): JSX.Element;
|
|
2245
2439
|
|
|
2246
2440
|
/** The props of `Textarea`: a native textarea's attributes, with `chars` in
|
|
2247
2441
|
place of `cols`. */
|
|
2248
|
-
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;
|
|
2249
2449
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
2250
2450
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
2251
2451
|
size?: "sm" | "md";
|
|
@@ -2307,6 +2507,28 @@ export declare type TextTracking = "normal" | "tight" | "display" | "caps";
|
|
|
2307
2507
|
/** A font weight of the token set. */
|
|
2308
2508
|
export declare type TextWeight = "regular" | "medium" | "semibold";
|
|
2309
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
|
+
|
|
2310
2532
|
/** The one action a toast may carry, e.g. "Undo". */
|
|
2311
2533
|
export declare interface ToastAction {
|
|
2312
2534
|
/** A verb for what it does - "Undo", "Show". */
|
|
@@ -2402,6 +2624,14 @@ export declare interface ToastProviderProps {
|
|
|
2402
2624
|
/** How the message turns out; `loading` is a toast still at work. */
|
|
2403
2625
|
export declare type ToastTone = "neutral" | "success" | "warning" | "danger" | "loading";
|
|
2404
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
|
+
|
|
2405
2635
|
/** Appears on hover and keyboard focus; purely descriptive (role="tooltip"). */
|
|
2406
2636
|
export declare function Tooltip({ content, children, delay }: TooltipProps): JSX.Element;
|
|
2407
2637
|
|
|
@@ -2411,7 +2641,12 @@ export declare interface TooltipProps {
|
|
|
2411
2641
|
content: ReactNode;
|
|
2412
2642
|
/** Exactly one element that triggers the tooltip (must accept refs). Its
|
|
2413
2643
|
own ref keeps its element: the tooltip holds the same one beside it. */
|
|
2414
|
-
children: ReactElement<
|
|
2644
|
+
children: ReactElement<{
|
|
2645
|
+
ref?: Ref<HTMLElement>;
|
|
2646
|
+
"aria-expanded"?: boolean;
|
|
2647
|
+
"aria-describedby"?: string;
|
|
2648
|
+
"aria-label"?: string;
|
|
2649
|
+
} & Record<string, unknown>>;
|
|
2415
2650
|
/** Delay in ms before the tooltip appears. */
|
|
2416
2651
|
delay?: number;
|
|
2417
2652
|
}
|
|
@@ -2859,7 +3094,11 @@ export declare interface Wording {
|
|
|
2859
3094
|
/** A value the multi-select took or gave away where no checkbox had the
|
|
2860
3095
|
focus to say it - Enter in the search, a chip, Backspace. */
|
|
2861
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;
|
|
2862
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;
|
|
2863
3102
|
/** What stands in the empty field. */
|
|
2864
3103
|
palettePlaceholder: string;
|
|
2865
3104
|
/** Accessible name of the field. Deliberately kept apart from the
|
|
@@ -2927,6 +3166,9 @@ export declare interface Wording {
|
|
|
2927
3166
|
/** Header of the two time columns in the range with time of day. */
|
|
2928
3167
|
sideFrom: string;
|
|
2929
3168
|
sideTo: string;
|
|
3169
|
+
/** Accessible names of the two thumbs of a RangeSlider. */
|
|
3170
|
+
rangeSliderFrom: string;
|
|
3171
|
+
rangeSliderTo: string;
|
|
2930
3172
|
/** Accessible name of the time fields, per side. */
|
|
2931
3173
|
startHour: string;
|
|
2932
3174
|
startMinute: string;
|
|
@@ -2937,6 +3179,8 @@ export declare interface Wording {
|
|
|
2937
3179
|
/** Stepper buttons of a time field; the label comes from above. */
|
|
2938
3180
|
timeFieldIncrease: (feld: string) => string;
|
|
2939
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;
|
|
2940
3184
|
/** Footer of the range panels. */
|
|
2941
3185
|
chooseStartDate: string;
|
|
2942
3186
|
chooseEndDate: string;
|
|
@@ -2978,6 +3222,8 @@ export declare interface Wording {
|
|
|
2978
3222
|
pagination: string;
|
|
2979
3223
|
rows: string;
|
|
2980
3224
|
rowsPerPage: string;
|
|
3225
|
+
/** The page-size choice that leaves the page to the frame. */
|
|
3226
|
+
fit: string;
|
|
2981
3227
|
/** "Page 2 of 7". `formatted` carries both numbers in the provider's
|
|
2982
3228
|
formats, where the caller has them - a table over a server has "Page 1 of
|
|
2983
3229
|
100,000". */
|
|
@@ -2985,8 +3231,18 @@ export declare interface Wording {
|
|
|
2985
3231
|
page: string;
|
|
2986
3232
|
total: string;
|
|
2987
3233
|
}) => string;
|
|
3234
|
+
/** "13–24 of 120" in the pagination bar. `formatted` carries the three
|
|
3235
|
+
numbers in the provider's formats, where the caller has them. */
|
|
3236
|
+
pageRange: (from: number, to: number, total: number, formatted?: {
|
|
3237
|
+
from: string;
|
|
3238
|
+
to: string;
|
|
3239
|
+
total: string;
|
|
3240
|
+
}) => string;
|
|
3241
|
+
/** The names of the four steps of the pagination bar. */
|
|
3242
|
+
firstPage: string;
|
|
2988
3243
|
previousPage: string;
|
|
2989
3244
|
nextPage: string;
|
|
3245
|
+
lastPage: string;
|
|
2990
3246
|
/** The two buttons in the column filter's footer. */
|
|
2991
3247
|
filterReset: string;
|
|
2992
3248
|
filterDone: string;
|
|
@@ -3034,6 +3290,18 @@ export declare interface Wording {
|
|
|
3034
3290
|
selectRow: (row: string) => string;
|
|
3035
3291
|
/** Said after the user changes the selection of a table in grid mode: the count. */
|
|
3036
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;
|
|
3037
3305
|
/** The selection of every row in the filtered set. */
|
|
3038
3306
|
selectAllRows: string;
|
|
3039
3307
|
/** The same checkbox in server mode, where the table holds one page of a server's. */
|
|
@@ -3098,6 +3366,8 @@ export declare interface Wording {
|
|
|
3098
3366
|
not `expandRowNamed`, which names the row detail's expander on the same row. */
|
|
3099
3367
|
foldBranch: (row: string) => string;
|
|
3100
3368
|
unfoldBranch: (row: string) => string;
|
|
3369
|
+
/** The line under a branch whose rows are being loaded - also announced. */
|
|
3370
|
+
branchLoading: (row: string) => string;
|
|
3101
3371
|
/** The first column of a tree's export. */
|
|
3102
3372
|
levelColumn: string;
|
|
3103
3373
|
/** A row shown only because a descendant matches the search or a filter. */
|
|
@@ -3114,6 +3384,8 @@ export declare interface Wording {
|
|
|
3114
3384
|
entries: (count: number, formatted: string) => string;
|
|
3115
3385
|
/** "3 selected" in the pagination bar and the table toolbar. */
|
|
3116
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;
|
|
3117
3389
|
/** The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." */
|
|
3118
3390
|
selectedOnPage: (count: number, formatted: string) => string;
|
|
3119
3391
|
/** The button after it, for the rows the server holds: "Select all 12,400 that match". */
|
|
@@ -3171,7 +3443,7 @@ export declare interface Wording {
|
|
|
3171
3443
|
/** The button under a server-mode table's error that sends the request once more. */
|
|
3172
3444
|
tryAgain: string;
|
|
3173
3445
|
/** "43 of 1.204" - the numbers come from the formats. */
|
|
3174
|
-
filteredOfTotal: (matches: string, total: string) => string;
|
|
3446
|
+
filteredOfTotal: (matches: string, total: string, count: number) => string;
|
|
3175
3447
|
/** The four outcomes of an assessment, as a word beside the value. Colour
|
|
3176
3448
|
alone carries no meaning - the word stands here for that reason. */
|
|
3177
3449
|
verdictOk: string;
|
|
@@ -3202,10 +3474,13 @@ export declare interface Wording {
|
|
|
3202
3474
|
asOfAgo: (duration: string) => string;
|
|
3203
3475
|
close: string;
|
|
3204
3476
|
closeToast: string;
|
|
3205
|
-
/** 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". */
|
|
3206
3479
|
toastDeckCount: (count: number) => string;
|
|
3207
3480
|
/** The name of the toasts' region, which Alt+T moves the focus into. */
|
|
3208
3481
|
toastRegion: string;
|
|
3482
|
+
/** The visible hint at an open deck that Alt+T moves the focus into it. */
|
|
3483
|
+
toastShortcutHint: string;
|
|
3209
3484
|
confirm: string;
|
|
3210
3485
|
cancel: string;
|
|
3211
3486
|
loading: string;
|
|
@@ -3332,6 +3607,8 @@ export declare interface Wording {
|
|
|
3332
3607
|
/** At the top of the menu, and in the name of a head the arrow keys move. */
|
|
3333
3608
|
dashboardPlace: (place: number, of: number) => string;
|
|
3334
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;
|
|
3335
3612
|
/** The name of the head of a locked widget in the editing mode. */
|
|
3336
3613
|
dashboardHeadLocked: (title: string, place: number, of: number) => string;
|
|
3337
3614
|
/** The word beside a locked widget's size in the mode. */
|
|
@@ -3353,8 +3630,8 @@ export declare interface Wording {
|
|
|
3353
3630
|
full: string;
|
|
3354
3631
|
};
|
|
3355
3632
|
/** A size's entry in a widget's menu: its name and its share of the width
|
|
3356
|
-
(`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at. */
|
|
3357
|
-
dashboardSizeEntry: (size: string, share: string, current
|
|
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;
|
|
3358
3635
|
/** The built-in heading type: its name, its sentence in the catalogue, the
|
|
3359
3636
|
text a new heading starts with and the label of its text field. */
|
|
3360
3637
|
dashboardHeadingLabel: string;
|
|
@@ -3407,6 +3684,8 @@ export declare interface Wording {
|
|
|
3407
3684
|
/** Why a quantity has no number - the label is the given at the root of it,
|
|
3408
3685
|
or the divisor that is zero. */
|
|
3409
3686
|
calculationMissing: (label: string) => string;
|
|
3687
|
+
/** The same for several: every missing given, as a list. */
|
|
3688
|
+
calculationMissingAll: (labels: readonly string[]) => string;
|
|
3410
3689
|
calculationDivisionByZero: (label: string) => string;
|
|
3411
3690
|
/** The target beside the result, with the target's number and unit. */
|
|
3412
3691
|
calculationAboveTarget: (target: string) => string;
|