@umriss-ui/core 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -6
- package/README.md +20 -12
- package/dist/core.css +1 -1
- package/dist/core.js +4387 -4643
- package/dist/de.d.ts +0 -74
- package/dist/formats-D0YRBdnl.js +62 -0
- package/dist/index.d.ts +169 -454
- package/dist/wording/de.js +6 -47
- package/docs/llms-full.md +602 -990
- package/package.json +5 -4
- package/dist/formats-DrB9TuzO.js +0 -65
package/dist/index.d.ts
CHANGED
|
@@ -4,15 +4,13 @@ import { ComponentPropsWithoutRef } from 'react';
|
|
|
4
4
|
import { CSSProperties } from 'react';
|
|
5
5
|
import { DialogHTMLAttributes } from 'react';
|
|
6
6
|
import { ElementType } from 'react';
|
|
7
|
-
import { ForwardedRef } from 'react';
|
|
8
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
9
7
|
import { HTMLAttributes } from 'react';
|
|
10
8
|
import { InputHTMLAttributes } from 'react';
|
|
11
9
|
import { JSX } from 'react';
|
|
12
10
|
import { ReactElement } from 'react';
|
|
13
11
|
import { ReactNode } from 'react';
|
|
14
12
|
import { ReactPortal } from 'react';
|
|
15
|
-
import {
|
|
13
|
+
import { Ref } from 'react';
|
|
16
14
|
import { RefObject } from 'react';
|
|
17
15
|
import { SelectHTMLAttributes } from 'react';
|
|
18
16
|
import { SVGAttributes } from 'react';
|
|
@@ -21,14 +19,14 @@ import { TextareaHTMLAttributes } from 'react';
|
|
|
21
19
|
|
|
22
20
|
/** Sections behind headers that open and close: one at a time (`single`) or
|
|
23
21
|
any number (`multiple`). The arrow keys move between the headers. */
|
|
24
|
-
export declare
|
|
22
|
+
export declare function Accordion({ ref, type, value: valueProp, defaultValue, onChange, headingLevel, className, onKeyDown, children, ...rest }: AccordionProps): JSX.Element;
|
|
25
23
|
|
|
26
24
|
/** One section of an `Accordion`: its header and the content it opens. */
|
|
27
|
-
export declare
|
|
25
|
+
export declare function AccordionItem({ ref, value, title, disabled, className, children, ...rest }: AccordionItemProps): JSX.Element;
|
|
28
26
|
|
|
29
27
|
/** The props of `AccordionItem`: a div's attributes, with `title` taking the
|
|
30
28
|
header's node instead of the HTML attribute. */
|
|
31
|
-
export declare interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
29
|
+
export declare interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
|
|
32
30
|
/** What names the section in the accordion's `value`. */
|
|
33
31
|
value: string;
|
|
34
32
|
/** The header's text. It names the section's region too. */
|
|
@@ -38,7 +36,7 @@ export declare interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivE
|
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
/** The props of `Accordion`. */
|
|
41
|
-
export declare interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
39
|
+
export declare interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
|
|
42
40
|
/** `single` keeps at most one section open, `multiple` any number. */
|
|
43
41
|
type?: "single" | "multiple";
|
|
44
42
|
/** Controlled: the values of the open sections. A list for both types, so
|
|
@@ -69,11 +67,11 @@ export declare function age(asOf: Instant, now: Instant): number | null;
|
|
|
69
67
|
/** A message that stays put in the page - for what a toast would carry away
|
|
70
68
|
too soon. Warning and danger interrupt the screen reader, the other tones
|
|
71
69
|
report politely. */
|
|
72
|
-
export declare
|
|
70
|
+
export declare function Alert({ ref, tone, title, actions, onDismiss, dismissLabel, className, children, ...rest }: AlertProps): JSX.Element;
|
|
73
71
|
|
|
74
72
|
/** The props of `Alert`: a div's attributes, with `title` taking a heading
|
|
75
73
|
node instead of the HTML attribute. */
|
|
76
|
-
export declare interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
74
|
+
export declare interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
|
|
77
75
|
/** How urgent the message is. Only `warning` and `danger` interrupt the
|
|
78
76
|
screen reader - the other two report politely. */
|
|
79
77
|
tone?: AlertTone;
|
|
@@ -102,7 +100,7 @@ export declare function allBranches<K, S extends Key = string>(roots: readonly K
|
|
|
102
100
|
|
|
103
101
|
/** The chevron that expands and collapses a branch. Drawn pointing right;
|
|
104
102
|
rotate it by 90 degrees for an open branch. */
|
|
105
|
-
export declare
|
|
103
|
+
export declare function AngleGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
106
104
|
|
|
107
105
|
/**
|
|
108
106
|
* The library's one voice: says `text` in a polite live region, for what
|
|
@@ -131,9 +129,7 @@ export declare function announce(text: string, at?: Element | null): void;
|
|
|
131
129
|
* alarm, even where the value lies further beyond the warning.
|
|
132
130
|
*
|
|
133
131
|
* No hysteresis: that would need the previous state, and a function of a
|
|
134
|
-
* single value has none.
|
|
135
|
-
* duplicate; the trailing of an alarm belongs to its lifecycle and not to a
|
|
136
|
-
* bound.
|
|
132
|
+
* single value has none.
|
|
137
133
|
*/
|
|
138
134
|
export declare function assess(value: number | null | undefined, set?: LimitSet): Assessment;
|
|
139
135
|
|
|
@@ -148,18 +144,15 @@ export declare interface Assessment {
|
|
|
148
144
|
excess?: number;
|
|
149
145
|
/** The signed distance from the target. Absent where none is set: no target
|
|
150
146
|
means no deviation, not a deviation of zero.
|
|
151
|
-
|
|
152
|
-
Two fields, because they are two numbers. A single one meaning the one
|
|
153
|
-
thing when a bound is violated and the other otherwise reads well and is
|
|
154
|
-
wrong at three in the morning. */
|
|
147
|
+
*/
|
|
155
148
|
deviation?: number;
|
|
156
149
|
}
|
|
157
150
|
|
|
158
151
|
/** Compact status label; as a `pill` for counters. */
|
|
159
|
-
export declare
|
|
152
|
+
export declare function Badge({ ref, tone, pill, className, children, ...rest }: BadgeProps): JSX.Element;
|
|
160
153
|
|
|
161
154
|
/** The props of `Badge`. */
|
|
162
|
-
export declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
155
|
+
export declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
|
|
163
156
|
/** What the badge stands for. There is always a word beside it: a colour on
|
|
164
157
|
its own is not a statement. */
|
|
165
158
|
tone?: BadgeTone;
|
|
@@ -174,7 +167,7 @@ export declare type BadgeTone = "neutral" | "accent" | "success" | "warning" | "
|
|
|
174
167
|
|
|
175
168
|
/** Where a page stands: the trail from the root to the current page. Where it
|
|
176
169
|
is wider than its place, the middle levels fold into a menu. */
|
|
177
|
-
export declare
|
|
170
|
+
export declare function Breadcrumb({ ref, items, className, ...rest }: BreadcrumbProps): JSX.Element;
|
|
178
171
|
|
|
179
172
|
/** One level of the trail. */
|
|
180
173
|
export declare interface BreadcrumbEntry {
|
|
@@ -192,21 +185,21 @@ export declare interface BreadcrumbEntry {
|
|
|
192
185
|
}
|
|
193
186
|
|
|
194
187
|
/** The props of `Breadcrumb`. */
|
|
195
|
-
export declare interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
|
|
188
|
+
export declare interface BreadcrumbProps extends HTMLAttributes<HTMLElement>, RefProp<HTMLElement> {
|
|
196
189
|
/** The trail from the root to the current page; the last is the page. */
|
|
197
190
|
items: readonly BreadcrumbEntry[];
|
|
198
191
|
}
|
|
199
192
|
|
|
200
193
|
/** A button with a label. `primary` once per surface; `loading` shows a
|
|
201
194
|
spinner and locks it. `type` is `button` unless you say otherwise. */
|
|
202
|
-
export declare
|
|
195
|
+
export declare function Button({ ref, variant, size: ownSize, loading, disabled, className, children, type, ...rest }: ButtonProps): JSX.Element;
|
|
203
196
|
|
|
204
197
|
/** Buttons standing side by side as one control: square inside, rounded
|
|
205
198
|
outside, a hairline between them. `size` sets one height for all. */
|
|
206
|
-
export declare
|
|
199
|
+
export declare function ButtonGroup({ ref, size, className, children, ...rest }: ButtonGroupProps): JSX.Element;
|
|
207
200
|
|
|
208
201
|
/** The props of `ButtonGroup`. */
|
|
209
|
-
export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
202
|
+
export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
210
203
|
/** Label of the group for the screen reader. */
|
|
211
204
|
"aria-label"?: string;
|
|
212
205
|
/** The size of the buttons in it that do not say their own - one group,
|
|
@@ -216,7 +209,7 @@ export declare interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement>
|
|
|
216
209
|
}
|
|
217
210
|
|
|
218
211
|
/** The props of `Button`: a native button's attributes and its look. */
|
|
219
|
-
export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
212
|
+
export declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, RefProp<HTMLButtonElement> {
|
|
220
213
|
/** How loud the button is. `primary` exactly once per surface - two main
|
|
221
214
|
actions side by side are no longer a main action. `ghost` is quiet in the
|
|
222
215
|
accent, `plain` quiet and neutral. */
|
|
@@ -253,32 +246,32 @@ export declare function cadence(ages: FreshnessAges): number;
|
|
|
253
246
|
|
|
254
247
|
/** A calendar leaf: a sheet with its header and two rings. With `range`, a
|
|
255
248
|
bar across the sheet stands for the span a range picker chooses. */
|
|
256
|
-
export declare
|
|
257
|
-
range?: boolean;
|
|
258
|
-
}
|
|
249
|
+
export declare function CalendarGlyph({ ref, size, range, ...rest }: GlyphProps & {
|
|
250
|
+
range?: boolean;
|
|
251
|
+
}): JSX.Element;
|
|
259
252
|
|
|
260
253
|
/** A surface that groups content under a head: `CardHeader` and `CardBody`
|
|
261
254
|
inside a `section`. With `collapsible` the header gets a key that folds the
|
|
262
255
|
body away. */
|
|
263
|
-
export declare
|
|
256
|
+
export declare function Card({ ref, collapsible, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, className, children, ...rest }: CardProps): JSX.Element;
|
|
264
257
|
|
|
265
258
|
/** The content of a `Card`; the part that folds away in a collapsible card.
|
|
266
259
|
`flush` removes the padding for a table or a log. */
|
|
267
|
-
export declare
|
|
260
|
+
export declare function CardBody({ ref, flush, className, children, ...rest }: CardBodyProps): JSX.Element;
|
|
268
261
|
|
|
269
262
|
/** The props of `CardBody`. */
|
|
270
|
-
export declare interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
263
|
+
export declare interface CardBodyProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
271
264
|
/** Removes the inner padding, e.g. for flush tables. */
|
|
272
265
|
flush?: boolean;
|
|
273
266
|
}
|
|
274
267
|
|
|
275
268
|
/** The head of a `Card`: title, an optional eyebrow and actions on the right.
|
|
276
269
|
In a collapsible card it carries the fold key. */
|
|
277
|
-
export declare
|
|
270
|
+
export declare function CardHeader({ ref, title, eyebrow, actions, divider, className, ...rest }: CardHeaderProps): JSX.Element;
|
|
278
271
|
|
|
279
272
|
/** The props of `CardHeader`: a div's attributes, with `title` taking a node
|
|
280
273
|
instead of the HTML attribute. */
|
|
281
|
-
export declare interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
274
|
+
export declare interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
|
|
282
275
|
/** The heading of the card. A node and not merely text, so that an
|
|
283
276
|
identifier with markup can stand in it too. */
|
|
284
277
|
title: ReactNode;
|
|
@@ -295,7 +288,7 @@ export declare interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
295
288
|
}
|
|
296
289
|
|
|
297
290
|
/** The props of `Card`. */
|
|
298
|
-
export declare interface CardProps extends HTMLAttributes<HTMLElement> {
|
|
291
|
+
export declare interface CardProps extends HTMLAttributes<HTMLElement>, RefProp<HTMLElement> {
|
|
299
292
|
/** Allows collapsing and expanding the body through the header. */
|
|
300
293
|
collapsible?: boolean;
|
|
301
294
|
/** Initial state of the collapse mechanism; afterwards it belongs to the
|
|
@@ -312,37 +305,21 @@ export declare interface CardProps extends HTMLAttributes<HTMLElement> {
|
|
|
312
305
|
|
|
313
306
|
/** A native checkbox with its label beside it; `indeterminate` shows the mixed
|
|
314
307
|
state. Inside a `FormField` it takes the field's id and description. */
|
|
315
|
-
export declare
|
|
308
|
+
export declare function Checkbox({ ref, label, indeterminate, className, style, id, ...rest }: CheckboxProps): JSX.Element;
|
|
316
309
|
|
|
317
310
|
/** The props of `Checkbox`: a native checkbox's attributes and its label. */
|
|
318
|
-
export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
311
|
+
export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size">, RefProp<HTMLInputElement> {
|
|
319
312
|
/** Label to the right of the checkbox. */
|
|
320
313
|
label?: ReactNode;
|
|
321
314
|
/** Partially checked (e.g. "select all" with a mixed selection). */
|
|
322
315
|
indeterminate?: boolean;
|
|
323
316
|
}
|
|
324
317
|
|
|
325
|
-
/**
|
|
326
|
-
* The height the field is allowed to take on. Without an upper bound it
|
|
327
|
-
* grows with its content; with one, up to that many rows and then no
|
|
328
|
-
* further.
|
|
329
|
-
*
|
|
330
|
-
* A line height of 0 is treated as "not measurable yet" (the font has not
|
|
331
|
-
* been loaded), because otherwise the field visibly collapsed while
|
|
332
|
-
* loading.
|
|
333
|
-
*/
|
|
334
|
-
export declare const clampedHeight: (measured: number, lineHeight: number, maxRows: number | undefined) => number;
|
|
335
|
-
|
|
336
318
|
/** A clock face at a quarter past - the time pickers' character. */
|
|
337
|
-
export declare
|
|
338
|
-
|
|
339
|
-
/** Closes a branch. Returns the same snapshot where it is closed already. */
|
|
340
|
-
export declare function collapse<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
319
|
+
export declare function ClockGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
341
320
|
|
|
342
321
|
/** A searchable select field (the combobox pattern with a listbox panel). */
|
|
343
|
-
export declare
|
|
344
|
-
ref?: ForwardedRef<HTMLDivElement>;
|
|
345
|
-
}) => ReactElement;
|
|
322
|
+
export declare function Combobox<T extends string = string>({ ref, options, value, onChange, placeholder, size: ownSize, chars, disabled, invalid, emptyText, clearable, className, style, onKeyDown, onKeyDownCapture, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ComboboxProps<T>): JSX.Element;
|
|
346
323
|
|
|
347
324
|
/** One possibility of a `Combobox`: the value it stands for and the label it
|
|
348
325
|
is found by. */
|
|
@@ -357,7 +334,7 @@ export declare interface ComboboxOption<T extends string = string> {
|
|
|
357
334
|
}
|
|
358
335
|
|
|
359
336
|
/** The props of `Combobox`. */
|
|
360
|
-
export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
337
|
+
export declare interface ComboboxProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
|
|
361
338
|
/** The possibilities, in their natural order. Filtered while typing; never
|
|
362
339
|
reordered. */
|
|
363
340
|
options: readonly ComboboxOption<T>[];
|
|
@@ -393,7 +370,7 @@ export declare interface ComboboxProps<T extends string = string> extends Omit<H
|
|
|
393
370
|
/** A window above the application in which one types and finds: it searches
|
|
394
371
|
`items` by subsequence, ranks and marks the matches, and reports the chosen
|
|
395
372
|
candidate's `id` to `onChoose`. Controlled through `open` and `onClose`. */
|
|
396
|
-
export declare
|
|
373
|
+
export declare function CommandPalette({ ref, open, onClose, items, onChoose, restingItems, maxFinds, className, onCancel, onMouseDown, onKeyDown: callerKeyDown, onKeyDownCapture, ...rest }: CommandPaletteProps): JSX.Element;
|
|
397
374
|
|
|
398
375
|
/** A candidate the palette can find - the outside of the term CONTEXT.md lists
|
|
399
376
|
under "Finding" as a Candidate. */
|
|
@@ -430,7 +407,7 @@ export declare interface CommandPaletteItem {
|
|
|
430
407
|
}
|
|
431
408
|
|
|
432
409
|
/** The props of `CommandPalette`. */
|
|
433
|
-
export declare interface CommandPaletteProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "children"> {
|
|
410
|
+
export declare interface CommandPaletteProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "children">, RefProp<HTMLDialogElement> {
|
|
434
411
|
/** Controlled like the modal: opening is the caller's decision. */
|
|
435
412
|
open: boolean;
|
|
436
413
|
/** Reports every wish to close - Escape, an outside click, a choice. */
|
|
@@ -470,10 +447,10 @@ export declare interface CommandPaletteProps extends Omit<DialogHTMLAttributes<H
|
|
|
470
447
|
}
|
|
471
448
|
|
|
472
449
|
/** Compact confirmation dialog on the basis of Modal. */
|
|
473
|
-
export declare
|
|
450
|
+
export declare function ConfirmDialog({ ref, open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, tone, loading, ...rest }: ConfirmDialogProps): JSX.Element;
|
|
474
451
|
|
|
475
452
|
/** The props of `ConfirmDialog`. */
|
|
476
|
-
export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "title" | "children"> {
|
|
453
|
+
export declare interface ConfirmDialogProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "open" | "onClose" | "title" | "children">, RefProp<HTMLDialogElement> {
|
|
477
454
|
/** Whether the query stands. */
|
|
478
455
|
open: boolean;
|
|
479
456
|
/** Cancelling: Escape, cross, backdrop or the second button. */
|
|
@@ -550,21 +527,21 @@ export declare interface ControlSizeProviderProps {
|
|
|
550
527
|
|
|
551
528
|
/** The cross that clears a field, removes a tag or a chip, and closes a
|
|
552
529
|
dialog, a toast or an alert - one drawing at the size of its place. */
|
|
553
|
-
export declare
|
|
530
|
+
export declare function CrossGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
554
531
|
|
|
555
532
|
/** A date selection with a calendar panel; weeks begin on Monday. */
|
|
556
|
-
export declare
|
|
533
|
+
export declare function DatePicker({ ref, value, onChange, placeholder, disabled, invalid, size: ownSize, chars, clearable, className, ...rest }: DatePickerProps): JSX.Element;
|
|
557
534
|
|
|
558
535
|
/**
|
|
559
536
|
* The value contract: every way - the grid, "Today", clearing - hands out local
|
|
560
537
|
* midnight (resolution "day"). There is no path that delivers a time of day
|
|
561
538
|
* along with it.
|
|
562
539
|
*/
|
|
563
|
-
export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
540
|
+
export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
|
|
564
541
|
/** The day, as a `Date` on local midnight; `null` means none. */
|
|
565
542
|
value: Date | null;
|
|
566
|
-
/** Runs as soon as a day is settled - on a click in the grid, on "Today"
|
|
567
|
-
clearing (`null`)
|
|
543
|
+
/** Runs as soon as a day is settled - on a click in the grid, on "Today" and
|
|
544
|
+
on clearing (`null`). Every one of these ways hands out
|
|
568
545
|
local midnight; there is none that delivers a time along with it. */
|
|
569
546
|
onChange: (date: Date | null) => void;
|
|
570
547
|
/** What stands in the empty field. */
|
|
@@ -611,14 +588,14 @@ export declare interface DateRange {
|
|
|
611
588
|
* - Two chained months: paging on the outside, no day appears twice.
|
|
612
589
|
* - The same day clicked twice = a one-day time span.
|
|
613
590
|
*/
|
|
614
|
-
export declare
|
|
591
|
+
export declare function DateRangePicker({ ref, value, onChange, placeholder, disabled, invalid, size: ownSize, chars, clearable, presets, className, ...rest }: DateRangePickerProps): JSX.Element;
|
|
615
592
|
|
|
616
593
|
/**
|
|
617
594
|
* The value contract: both ends on local midnight (resolution "day"), and `from`
|
|
618
595
|
* never lies after `to` - a range dragged backwards is silently turned around.
|
|
619
596
|
* Both ends count inclusively. There is no error state.
|
|
620
597
|
*/
|
|
621
|
-
export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
598
|
+
export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
|
|
622
599
|
/** The time span, both ends on local midnight and both inclusive; `null`
|
|
623
600
|
means none. */
|
|
624
601
|
value: DateRange | null;
|
|
@@ -657,7 +634,7 @@ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLSp
|
|
|
657
634
|
an exact instant and is reported only on "Apply", "Now" or "Clear"; the
|
|
658
635
|
missing and doubled hours of a daylight-saving change are asked about, not
|
|
659
636
|
guessed. */
|
|
660
|
-
export declare
|
|
637
|
+
export declare function DateTimePicker({ ref, value, onChange, withSeconds, placeholder, disabled, size: ownSize, chars, invalid, clearable, className, ...rest }: DateTimePickerProps): JSX.Element;
|
|
661
638
|
|
|
662
639
|
/**
|
|
663
640
|
* The value contract: an exact instant (resolution "instant"), with seconds
|
|
@@ -667,7 +644,7 @@ export declare const DateTimePicker: ForwardRefExoticComponent<DateTimePickerPro
|
|
|
667
644
|
* panel applies (the default being the earlier one). A value is reported only
|
|
668
645
|
* with "Apply", "Now" or "Clear", not already on the click on a day.
|
|
669
646
|
*/
|
|
670
|
-
export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
647
|
+
export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
|
|
671
648
|
/** The instant; `null` means none. */
|
|
672
649
|
value: Date | null;
|
|
673
650
|
/** Runs only on completion - "Apply", "Now" or "Clear" - and not already on
|
|
@@ -713,7 +690,7 @@ export declare interface DateTimePickerProps extends Omit<HTMLAttributes<HTMLSpa
|
|
|
713
690
|
* - Missing and doubled hours of the daylight-saving change are recognised per
|
|
714
691
|
* end and treated honestly, as in the DateTimePicker.
|
|
715
692
|
*/
|
|
716
|
-
export declare
|
|
693
|
+
export declare function DateTimeRangePicker({ ref, value, onChange, withSeconds, placeholder, disabled, invalid, size: ownSize, chars, clearable, presets, className, ...rest }: DateTimeRangePickerProps): JSX.Element;
|
|
717
694
|
|
|
718
695
|
/**
|
|
719
696
|
* The props resemble the union of DateRangePickerProps and DateTimePickerProps -
|
|
@@ -726,7 +703,7 @@ export declare const DateTimeRangePicker: ForwardRefExoticComponent<DateTimeRang
|
|
|
726
703
|
* the daylight-saving change the same reservation holds as for the
|
|
727
704
|
* DateTimePicker, separately per end of the range.
|
|
728
705
|
*/
|
|
729
|
-
export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
706
|
+
export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue">, RefProp<HTMLSpanElement> {
|
|
730
707
|
/** The time span with times at both ends; `null` means none. */
|
|
731
708
|
value: DateRange | null;
|
|
732
709
|
/** Runs only on "Apply" and on clearing (`null`), never between the two
|
|
@@ -783,9 +760,8 @@ export declare const DEFAULT_WORDING: Wording;
|
|
|
783
760
|
|
|
784
761
|
/** How densely the library builds. A component with a density of its own
|
|
785
762
|
takes it through `useDensityFor` as the default for its `density` - in
|
|
786
|
-
@umriss-ui/table the table
|
|
787
|
-
the calculation; a compact set of tokens
|
|
788
|
-
B.13. */
|
|
763
|
+
@umriss-ui/table the table, in @umriss-ui/calculation
|
|
764
|
+
the calculation; a compact set of tokens does not exist. */
|
|
789
765
|
export declare type Density = "comfortable" | "compact";
|
|
790
766
|
|
|
791
767
|
/** Where the active node moves: up and down the visible rows, in and out of a
|
|
@@ -793,10 +769,10 @@ export declare type Density = "comfortable" | "compact";
|
|
|
793
769
|
export declare type Direction = "up" | "down" | "in" | "out" | "start" | "end";
|
|
794
770
|
|
|
795
771
|
/** A line between rows or columns; with `label` a named separator. */
|
|
796
|
-
export declare
|
|
772
|
+
export declare function Divider({ ref, orientation, strong, label, className, ...rest }: DividerProps): JSX.Element;
|
|
797
773
|
|
|
798
774
|
/** The props of `Divider`. */
|
|
799
|
-
export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
775
|
+
export declare interface DividerProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
800
776
|
/** Horizontally it separates rows, vertically it separates columns. */
|
|
801
777
|
orientation?: "horizontal" | "vertical";
|
|
802
778
|
/** A stronger line - for section boundaries rather than row separation. */
|
|
@@ -805,76 +781,10 @@ export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
805
781
|
label?: ReactNode;
|
|
806
782
|
}
|
|
807
783
|
|
|
808
|
-
/** A strip of tools that lies at an edge of one surface and carries the
|
|
809
|
-
actions for it. It moves to another edge by pointer or keyboard and reports
|
|
810
|
-
the place through `onPlaceChange`; at a side edge it stands upright, where
|
|
811
|
-
there is room. */
|
|
812
|
-
export declare const Dock: ForwardRefExoticComponent<DockProps & RefAttributes<HTMLDivElement>>;
|
|
813
|
-
|
|
814
|
-
/** The outside of the resting place: one of the four edges of the host.
|
|
815
|
-
There is no fifth and no corner. */
|
|
816
|
-
export declare type DockPlace = "top" | "right" | "bottom" | "left";
|
|
817
|
-
|
|
818
|
-
/** The props of `Dock`. */
|
|
819
|
-
export declare interface DockProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
820
|
-
/**
|
|
821
|
-
* The tools - a property and expressly not children.
|
|
822
|
-
*
|
|
823
|
-
* Children would read more flexibly and would cost exactly the one number
|
|
824
|
-
* that is needed: the dock must know how many tools it has in order to answer
|
|
825
|
-
* whether it would have room at a side edge at all - and to answer that
|
|
826
|
-
* before it is there.
|
|
827
|
-
*/
|
|
828
|
-
tools: readonly DockTool[];
|
|
829
|
-
/** Controlled: the dock reports and waits, it does not move itself. */
|
|
830
|
-
place?: DockPlace;
|
|
831
|
-
/** Uncontrolled: the resting place it starts with. */
|
|
832
|
-
defaultPlace?: DockPlace;
|
|
833
|
-
/** Reports the desired resting place. Controlled, the dock moves only once
|
|
834
|
-
`place` follows; uncontrolled it is merely a message. */
|
|
835
|
-
onPlaceChange?: (place: DockPlace) => void;
|
|
836
|
-
/**
|
|
837
|
-
* The mode - the tool the dock stands in. At most one, and without a value
|
|
838
|
-
* NONE is marked: a dock whose tools simply fire has no mode. None is
|
|
839
|
-
* invented either, and none is preset to the first tool - that would be a
|
|
840
|
-
* statement about the state of the application which this component cannot
|
|
841
|
-
* make.
|
|
842
|
-
*/
|
|
843
|
-
mode?: string;
|
|
844
|
-
/**
|
|
845
|
-
* Reported is only what is a CHANGE, and only as long as there is a mode at
|
|
846
|
-
* all: without `mode` there is no change of mode to report, and the taking
|
|
847
|
-
* itself reports `onUse`.
|
|
848
|
-
*/
|
|
849
|
-
onModeChange?: (id: string) => void;
|
|
850
|
-
/** A tool was taken. */
|
|
851
|
-
onUse?: (id: string) => void;
|
|
852
|
-
/** The accessible name of the dock.
|
|
853
|
-
@default the wording's "Tools" */
|
|
854
|
-
label?: string;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
/** A tool: something one TAKES. That distinguishes it from the candidate of the
|
|
858
|
-
command palette, which one FINDS (CONTEXT.md, "Reaching for a tool"). */
|
|
859
|
-
export declare interface DockTool {
|
|
860
|
-
/** What is reported on taking. */
|
|
861
|
-
id: string;
|
|
862
|
-
/** The name. It reaches the eye through the tooltip and the screen reader
|
|
863
|
-
through the accessible name - it never stands written, because a standing
|
|
864
|
-
dock has no room for text. */
|
|
865
|
-
label: string;
|
|
866
|
-
/** The glyph. Drawn according to `packages/core/docs/glyphs.md`: only `currentColor`. */
|
|
867
|
-
icon: ReactNode;
|
|
868
|
-
/** Shows the tool but does not let it be taken. It stays standing in the
|
|
869
|
-
strip: a dock whose tools come and go grows and shrinks under the hand
|
|
870
|
-
reaching for them. */
|
|
871
|
-
disabled?: boolean;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
784
|
/** A `Modal` that stands at an edge of the window and enters from it - the
|
|
875
785
|
same dialog with the same head, body and foot. Its width is the token
|
|
876
786
|
`--u-drawer-width`. */
|
|
877
|
-
export declare
|
|
787
|
+
export declare function Drawer({ ref, side, className, ...rest }: DrawerProps): JSX.Element;
|
|
878
788
|
|
|
879
789
|
/** The props of `Drawer`: a `Modal`'s, with `side` in place of `size`. */
|
|
880
790
|
export declare interface DrawerProps extends Omit<ModalProps, "size"> {
|
|
@@ -883,16 +793,16 @@ export declare interface DrawerProps extends Omit<ModalProps, "size"> {
|
|
|
883
793
|
}
|
|
884
794
|
|
|
885
795
|
/** The first key that occurs twice, otherwise null. Two nodes with the same
|
|
886
|
-
key break the cascade and the active node silently -
|
|
796
|
+
key break the cascade and the active node silently - `useTree` reports
|
|
887
797
|
that during development. */
|
|
888
798
|
export declare function duplicateKey<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>): S | null;
|
|
889
799
|
|
|
890
800
|
/** An empty surface as an invitation to act - not as a dead end. */
|
|
891
|
-
export declare
|
|
801
|
+
export declare function EmptyState({ ref, title, description, action, icon, className, ...rest }: EmptyStateProps): JSX.Element;
|
|
892
802
|
|
|
893
803
|
/** The props of `EmptyState`: a div's attributes, with `title` taking a node
|
|
894
804
|
instead of the HTML attribute. */
|
|
895
|
-
export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
805
|
+
export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
|
|
896
806
|
/** What is missing here - as a statement, not as an apology. */
|
|
897
807
|
title: ReactNode;
|
|
898
808
|
/** One sentence on why nothing is here and what would put something here. */
|
|
@@ -903,16 +813,13 @@ export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
903
813
|
icon?: ReactNode;
|
|
904
814
|
}
|
|
905
815
|
|
|
906
|
-
/** Opens a branch. Returns the same snapshot where it is open already. */
|
|
907
|
-
export declare function expand<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
908
|
-
|
|
909
816
|
/** A file field with a drop zone: choose or drop files, and remove them from
|
|
910
817
|
the list again. Nothing is uploaded - that is the application's. */
|
|
911
|
-
export declare
|
|
818
|
+
export declare function FileInput({ ref, value, onChange, invalid, accept, multiple, disabled, className, style, id, ...rest }: FileInputProps): JSX.Element;
|
|
912
819
|
|
|
913
820
|
/** The props of `FileInput`: a native file input's attributes, with the files
|
|
914
821
|
as the value. */
|
|
915
|
-
export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size"> {
|
|
822
|
+
export declare interface FileInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "size">, RefProp<HTMLInputElement> {
|
|
916
823
|
/** Controlled: the chosen files. Uncontrolled, the input keeps its own and
|
|
917
824
|
starts empty. */
|
|
918
825
|
value?: readonly File[];
|
|
@@ -1001,7 +908,7 @@ export declare interface Formats {
|
|
|
1001
908
|
/** A label, a hint or error and the control they belong to. The control
|
|
1002
909
|
inside takes the field's id, description, required and invalid state by
|
|
1003
910
|
itself - no wiring by hand. */
|
|
1004
|
-
export declare
|
|
911
|
+
export declare function FormField({ ref, label, hint, error, required, fieldId, className, children, ...rest }: FormFieldProps): JSX.Element;
|
|
1005
912
|
|
|
1006
913
|
/**
|
|
1007
914
|
* Resets the FormField context. For the innards of panels (search field,
|
|
@@ -1029,7 +936,7 @@ declare interface FormFieldContextValue {
|
|
|
1029
936
|
}
|
|
1030
937
|
|
|
1031
938
|
/** The props of `FormField`. */
|
|
1032
|
-
export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
939
|
+
export declare interface FormFieldProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
1033
940
|
/** The label of the field. It is mandatory: a field without a name is a
|
|
1034
941
|
field without a question for a screen reader. */
|
|
1035
942
|
label: ReactNode;
|
|
@@ -1094,17 +1001,17 @@ export declare interface FreshnessReading {
|
|
|
1094
1001
|
}
|
|
1095
1002
|
|
|
1096
1003
|
/** The props of a glyph: an SVG's attributes and its edge length. */
|
|
1097
|
-
export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children"> {
|
|
1004
|
+
export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children">, RefProp<SVGSVGElement> {
|
|
1098
1005
|
/**
|
|
1099
|
-
* Edge length in pixels. The default is the size the glyph is
|
|
1100
|
-
*
|
|
1006
|
+
* Edge length in pixels. The default is the size the glyph is drawn at in
|
|
1007
|
+
* the components.
|
|
1101
1008
|
*/
|
|
1102
1009
|
size?: number;
|
|
1103
1010
|
}
|
|
1104
1011
|
|
|
1105
1012
|
/** Children in a grid: a fixed number of columns, a list of column widths,
|
|
1106
1013
|
or as many columns as fit at `minItemWidth`. */
|
|
1107
|
-
export declare
|
|
1014
|
+
export declare function Grid({ ref, columns, minItemWidth, gap, className, style, children, ...rest }: GridProps): JSX.Element;
|
|
1108
1015
|
|
|
1109
1016
|
/** The width of one column in `Grid`'s list: a number in pixels, or
|
|
1110
1017
|
`"fill"` for a share of what the other columns leave. */
|
|
@@ -1112,10 +1019,10 @@ export declare type GridColumnWidth = number | "fill";
|
|
|
1112
1019
|
|
|
1113
1020
|
/** The grid laid over an area. Two by two lines; the frame is missing on
|
|
1114
1021
|
purpose, otherwise it would be a window. */
|
|
1115
|
-
export declare
|
|
1022
|
+
export declare function GridGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
1116
1023
|
|
|
1117
1024
|
/** The props of `Grid`. */
|
|
1118
|
-
export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
1025
|
+
export declare interface GridProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
1119
1026
|
/** How many columns, all of one width - or a list with one width per
|
|
1120
1027
|
column: a number in pixels, or `"fill"` for a share of what is left.
|
|
1121
1028
|
Overridden by minItemWidth. */
|
|
@@ -1128,23 +1035,16 @@ export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1128
1035
|
gap?: SpaceStep;
|
|
1129
1036
|
}
|
|
1130
1037
|
|
|
1131
|
-
/** The grip a
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
The grooves stand the same way in both orientations of the dock. Turning
|
|
1136
|
-
them with it would be prettier and would need a `rotate()` in a component
|
|
1137
|
-
whose acceptance (ADR-0014, ticket 04) rules exactly that out - a glyph
|
|
1138
|
-
that has to be rotated to be right is one that would be rotated along at
|
|
1139
|
-
the change. */
|
|
1140
|
-
export declare const GripGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1038
|
+
/** The grip a drag is taken by: two grooves. Dots are fill, and point 4 of
|
|
1039
|
+
the specification draws with the stroke. */
|
|
1040
|
+
export declare function GripGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
1141
1041
|
|
|
1142
1042
|
/** A heading whose level and size are independent: a small heading can still
|
|
1143
1043
|
be the second level of the page. */
|
|
1144
|
-
export declare
|
|
1044
|
+
export declare function Heading({ ref, level, size, weight, tone, className, children, ...rest }: HeadingProps): JSX.Element;
|
|
1145
1045
|
|
|
1146
1046
|
/** The props of `Heading`. */
|
|
1147
|
-
export declare interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
1047
|
+
export declare interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>, RefProp<HTMLHeadingElement> {
|
|
1148
1048
|
/** The page's outline level (h1–h6). */
|
|
1149
1049
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
1150
1050
|
/** Optical size; independent of the level.
|
|
@@ -1158,7 +1058,7 @@ export declare interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>
|
|
|
1158
1058
|
|
|
1159
1059
|
/** A button that shows only an icon: square, named by its `aria-label`, and
|
|
1160
1060
|
that name shown as a tooltip. Everything else is a `Button`'s. */
|
|
1161
|
-
export declare
|
|
1061
|
+
export declare function IconButton({ ref, variant, className, ...rest }: IconButtonProps): JSX.Element;
|
|
1162
1062
|
|
|
1163
1063
|
/** The props of `IconButton`: a `Button`'s, with a required `aria-label` and
|
|
1164
1064
|
the icon as its only child. */
|
|
@@ -1177,11 +1077,11 @@ export declare interface IconButtonProps extends Omit<ButtonProps, "aria-label"
|
|
|
1177
1077
|
/** A one-line text field. `chars` sets its width in characters, `numeric`
|
|
1178
1078
|
sets figures right-aligned and tabular, `clearable` offers a cross. Inside
|
|
1179
1079
|
a `FormField` it takes the field's id, description and invalid state. */
|
|
1180
|
-
export declare
|
|
1080
|
+
export declare function Input({ ref, size: ownSize, chars, invalid, numeric, clearable, onClear, className, style, id, disabled, ...rest }: InputProps): JSX.Element;
|
|
1181
1081
|
|
|
1182
1082
|
/** The props of `Input`: a native input's attributes, with `size` meaning the
|
|
1183
1083
|
control's height. */
|
|
1184
|
-
export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
1084
|
+
export declare interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, RefProp<HTMLInputElement> {
|
|
1185
1085
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
1186
1086
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
1187
1087
|
size?: "sm" | "md";
|
|
@@ -1211,11 +1111,6 @@ declare type Instant = Date | number | null | undefined;
|
|
|
1211
1111
|
/** A node's key, as `reader.key` returns it. */
|
|
1212
1112
|
export declare type Key = string | number;
|
|
1213
1113
|
|
|
1214
|
-
/** The checkable keys between two visible nodes, both ends included and
|
|
1215
|
-
independent of their order. Whatever may not be checked drops out: the
|
|
1216
|
-
gesture does what it can instead of nothing. */
|
|
1217
|
-
export declare function keysBetween<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], from: S, to: S): S[];
|
|
1218
|
-
|
|
1219
1114
|
/** A complete language: the formats for numbers and dates, and the wording. */
|
|
1220
1115
|
export declare interface Language {
|
|
1221
1116
|
formats: Formats;
|
|
@@ -1251,8 +1146,7 @@ export declare interface LanguageProviderProps extends LanguageOptions {
|
|
|
1251
1146
|
|
|
1252
1147
|
No tolerance band as input. A band is derived - two limits of equal
|
|
1253
1148
|
severity on opposite sides enclose one - and as an input type it would
|
|
1254
|
-
force a `null` on one edge in the one-sided case.
|
|
1255
|
-
case, not the exception. */
|
|
1149
|
+
force a `null` on one edge in the one-sided case. */
|
|
1256
1150
|
export declare interface Limit {
|
|
1257
1151
|
value: number;
|
|
1258
1152
|
side: Side;
|
|
@@ -1262,8 +1156,7 @@ export declare interface Limit {
|
|
|
1262
1156
|
/** The set a value is read against.
|
|
1263
1157
|
|
|
1264
1158
|
The target stands beside the limits and is not one: it is missed, never
|
|
1265
|
-
violated, and it is never the edge of a region.
|
|
1266
|
-
tile turns red for being above target. */
|
|
1159
|
+
violated, and it is never the edge of a region. */
|
|
1267
1160
|
export declare interface LimitSet {
|
|
1268
1161
|
/** In any order; none, one or several. */
|
|
1269
1162
|
limits?: readonly Limit[];
|
|
@@ -1272,19 +1165,19 @@ export declare interface LimitSet {
|
|
|
1272
1165
|
|
|
1273
1166
|
/** A link in the size of its text; `external` opens it in a new tab with the
|
|
1274
1167
|
protective attributes set. */
|
|
1275
|
-
export declare
|
|
1168
|
+
export declare function Link({ ref, size, external, className, children, ...rest }: LinkProps): JSX.Element;
|
|
1276
1169
|
|
|
1277
1170
|
/** The props of `Link`. */
|
|
1278
|
-
export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
1171
|
+
export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, RefProp<HTMLAnchorElement> {
|
|
1279
1172
|
/** Size from the token set – a link has to match its body text. */
|
|
1280
1173
|
size?: TextSize;
|
|
1281
1174
|
/** Opens in a new tab and sets the necessary protective attributes. */
|
|
1282
1175
|
external?: boolean;
|
|
1283
1176
|
}
|
|
1284
1177
|
|
|
1285
|
-
/** Measuring: a line with two end marks. Not a ruler with a scale
|
|
1178
|
+
/** Measuring: a line with two end marks. Not a ruler with a scale: the teeth
|
|
1286
1179
|
would be a grey stripe at ten nominal units. */
|
|
1287
|
-
export declare
|
|
1180
|
+
export declare function MeasureGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
1288
1181
|
|
|
1289
1182
|
/** A dropdown menu: `trigger` opens a panel of `MenuItem`s below it. The arrow
|
|
1290
1183
|
keys, Home and End move between the entries; Escape and an outside click
|
|
@@ -1293,11 +1186,11 @@ export declare function Menu({ trigger, children, align }: MenuProps): JSX.Eleme
|
|
|
1293
1186
|
|
|
1294
1187
|
/** An entry of a `Menu` or a `ContextMenu`. It runs `onSelect` and closes the
|
|
1295
1188
|
menu. */
|
|
1296
|
-
export declare
|
|
1189
|
+
export declare function MenuItem({ ref, onSelect, tone, className, children, onClick, ...rest }: MenuItemProps): JSX.Element;
|
|
1297
1190
|
|
|
1298
1191
|
/** The props of `MenuItem`: a button's attributes, with `onSelect` for what
|
|
1299
1192
|
the entry does. */
|
|
1300
|
-
export declare interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"> {
|
|
1193
|
+
export declare interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">, RefProp<HTMLButtonElement> {
|
|
1301
1194
|
/** What the entry does. The menu closes afterwards by itself: a menu that
|
|
1302
1195
|
stays open after something has happened hides the result. */
|
|
1303
1196
|
onSelect?: () => void;
|
|
@@ -1317,16 +1210,16 @@ export declare interface MenuProps {
|
|
|
1317
1210
|
}
|
|
1318
1211
|
|
|
1319
1212
|
/** Fine dividing line between groups of menu entries. */
|
|
1320
|
-
export declare
|
|
1213
|
+
export declare function MenuSeparator({ ref, className, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
|
|
1321
1214
|
|
|
1322
1215
|
/** Builds a complete instance from the default and a partial value. */
|
|
1323
|
-
export declare function mergeLanguage(
|
|
1216
|
+
export declare function mergeLanguage(options: LanguageOptions | undefined): Language;
|
|
1324
1217
|
|
|
1325
1218
|
/** A narrow fill-level bar, e.g. for utilisation in table cells. */
|
|
1326
|
-
export declare
|
|
1219
|
+
export declare function Meter({ ref, value, tone, showLabel, label, className, ...rest }: MeterProps): JSX.Element;
|
|
1327
1220
|
|
|
1328
1221
|
/** The props of `Meter`. */
|
|
1329
|
-
export declare interface MeterProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1222
|
+
export declare interface MeterProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
|
|
1330
1223
|
/** Fill level from 0 to 1. */
|
|
1331
1224
|
value: number;
|
|
1332
1225
|
/** The colour of the bar. It comes from an assessment and not from taste:
|
|
@@ -1352,28 +1245,28 @@ export declare interface MeterProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
1352
1245
|
export declare type MeterTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
1353
1246
|
|
|
1354
1247
|
/** The minus of `NumberInput`'s step buttons. */
|
|
1355
|
-
export declare
|
|
1248
|
+
export declare function MinusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
1356
1249
|
|
|
1357
1250
|
/** A dialog window in the middle of the screen, on the native `<dialog>`:
|
|
1358
1251
|
focus trap, Escape and scroll lock come from the browser. Controlled through
|
|
1359
1252
|
`open` and `onClose`; inside it stand `ModalHeader`, `ModalBody` and
|
|
1360
1253
|
`ModalFooter`. */
|
|
1361
|
-
export declare
|
|
1254
|
+
export declare function Modal({ ref, size, closeOnBackdrop, ...rest }: ModalProps): JSX.Element;
|
|
1362
1255
|
|
|
1363
1256
|
/** The content of a `Modal` or `Drawer` - the part that scrolls while head and
|
|
1364
1257
|
foot stand fast. */
|
|
1365
|
-
export declare
|
|
1258
|
+
export declare function ModalBody({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
|
|
1366
1259
|
|
|
1367
1260
|
/** The foot of a `Modal` or `Drawer`, for its buttons; they stand at the end. */
|
|
1368
|
-
export declare
|
|
1261
|
+
export declare function ModalFooter({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
|
|
1369
1262
|
|
|
1370
1263
|
/** The head of a `Modal` or `Drawer`: its title, which names the dialog for a
|
|
1371
1264
|
screen reader, an optional sentence below it, and the close cross. */
|
|
1372
|
-
export declare
|
|
1265
|
+
export declare function ModalHeader({ ref, title, description, hideClose, className, ...rest }: ModalHeaderProps): JSX.Element;
|
|
1373
1266
|
|
|
1374
1267
|
/** The props of `ModalHeader`: a div's attributes, with `title` taking a node
|
|
1375
1268
|
instead of the HTML attribute. */
|
|
1376
|
-
export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1269
|
+
export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefProp<HTMLDivElement> {
|
|
1377
1270
|
/** The heading of the window. It names it for the screen reader at the same
|
|
1378
1271
|
time – a dialog without a name says only "dialog". */
|
|
1379
1272
|
title: ReactNode;
|
|
@@ -1385,7 +1278,7 @@ export declare interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivEle
|
|
|
1385
1278
|
|
|
1386
1279
|
/** The props of `Modal`: a native dialog's attributes, controlled through
|
|
1387
1280
|
`open` and `onClose`. */
|
|
1388
|
-
export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "onClose"> {
|
|
1281
|
+
export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, "onClose">, RefProp<HTMLDialogElement> {
|
|
1389
1282
|
/** Whether the window stands. Controlled: the opening is the caller's
|
|
1390
1283
|
decision, and only the caller knows whether something may be open. */
|
|
1391
1284
|
open: boolean;
|
|
@@ -1401,16 +1294,6 @@ export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialog
|
|
|
1401
1294
|
/** The width of a `Modal`. */
|
|
1402
1295
|
export declare type ModalSize = "sm" | "md" | "lg";
|
|
1403
1296
|
|
|
1404
|
-
/**
|
|
1405
|
-
* Move the active node.
|
|
1406
|
-
*
|
|
1407
|
-
* `in` and `out` have two meanings each, and that is intended: one key goes
|
|
1408
|
-
* deeper, no matter whether something has to be opened for it first. Doing
|
|
1409
|
-
* both at once - opening *and* stepping inside - makes the tree impossible to
|
|
1410
|
-
* inspect without expanding it.
|
|
1411
|
-
*/
|
|
1412
|
-
export declare function move<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], snapshot: TreeSnapshot<S>, direction: Direction): TreeSnapshot<S>;
|
|
1413
|
-
|
|
1414
1297
|
/**
|
|
1415
1298
|
* Multiple selection. The trigger always stays on one line and measures the
|
|
1416
1299
|
* room: as many chips as fit, the rest as a "+N" counter. Chips are removed by
|
|
@@ -1424,9 +1307,7 @@ export declare function move<K, S extends Key = string>(flattening: readonly Fla
|
|
|
1424
1307
|
* "selected" scope, rows that have been unticked stay visible until the scope
|
|
1425
1308
|
* changes, so that nothing jumps away from under the mouse pointer.
|
|
1426
1309
|
*/
|
|
1427
|
-
export declare
|
|
1428
|
-
ref?: ForwardedRef<HTMLDivElement>;
|
|
1429
|
-
}) => ReactElement;
|
|
1310
|
+
export declare function MultiSelect<T extends string = string>({ ref, options, value, onChange, placeholder, searchPlaceholder, emptyText, size: ownSize, chars, disabled, invalid, clearable, className, style, onClick, onKeyDown, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: MultiSelectProps<T>): JSX.Element;
|
|
1430
1311
|
|
|
1431
1312
|
/** One possibility of a `MultiSelect`: the value it stands for and its label. */
|
|
1432
1313
|
export declare interface MultiSelectOption<T extends string = string> {
|
|
@@ -1440,7 +1321,7 @@ export declare interface MultiSelectOption<T extends string = string> {
|
|
|
1440
1321
|
}
|
|
1441
1322
|
|
|
1442
1323
|
/** The props of `MultiSelect`. */
|
|
1443
|
-
export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
1324
|
+
export declare interface MultiSelectProps<T extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
|
|
1444
1325
|
/** The possibilities, in their natural order. The list never re-sorts –
|
|
1445
1326
|
not even in the "selected" scope. */
|
|
1446
1327
|
options: readonly MultiSelectOption<T>[];
|
|
@@ -1462,8 +1343,8 @@ export declare interface MultiSelectProps<T extends string = string> extends Omi
|
|
|
1462
1343
|
padding and chevron. Given, the field is that wide wherever it stands,
|
|
1463
1344
|
and never wider than its place. Without it the field fills its place,
|
|
1464
1345
|
and is 20 characters wide where the place asks - in a toolbar or a row,
|
|
1465
|
-
room for two short chips and the counter. Either way, choosing and removing
|
|
1466
|
-
do not fit stand as "+N". */
|
|
1346
|
+
room for two short chips and the counter. Either way, choosing and removing
|
|
1347
|
+
values never moves it: the chips that do not fit stand as "+N". */
|
|
1467
1348
|
chars?: number;
|
|
1468
1349
|
/** Locks field and panel. */
|
|
1469
1350
|
disabled?: boolean;
|
|
@@ -1490,9 +1371,7 @@ export declare interface NodeReader<K, S extends Key = string> {
|
|
|
1490
1371
|
it stays navigable (ADR-0005). */
|
|
1491
1372
|
disabled?: (node: K) => boolean;
|
|
1492
1373
|
/** Can this branch have children that are not present? Without an answer:
|
|
1493
|
-
no.
|
|
1494
|
-
against `undefined` would be the kind of distinction that is got wrong
|
|
1495
|
-
more often than right. */
|
|
1374
|
+
no. */
|
|
1496
1375
|
unloaded?: (node: K) => boolean;
|
|
1497
1376
|
/** Does this node match? Given, it filters instead of the search text,
|
|
1498
1377
|
which is then not read - a table matches by its columns and filters,
|
|
@@ -1510,11 +1389,11 @@ export declare interface NodeReader<K, S extends Key = string> {
|
|
|
1510
1389
|
* present on hover or focus. Holding one down repeats the step (a short
|
|
1511
1390
|
* run-up, then briskly); min/max disable the respective button.
|
|
1512
1391
|
*/
|
|
1513
|
-
export declare
|
|
1392
|
+
export declare function NumberInput({ ref, value, onChange, min, max, step, decimals, prefix, suffix, size: ownSize, chars, invalid, disabled, className, style, id, onFocus, onBlur, onKeyDown, ...rest }: NumberInputProps): JSX.Element;
|
|
1514
1393
|
|
|
1515
1394
|
/** The props of `NumberInput`: a native input's attributes, with the value a
|
|
1516
1395
|
number or `null`. */
|
|
1517
|
-
export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "prefix" | "type"> {
|
|
1396
|
+
export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "prefix" | "type">, RefProp<HTMLInputElement> {
|
|
1518
1397
|
/** The number, or `null` for "not stated". An empty field is not zero:
|
|
1519
1398
|
a quantity that was not measured is not a quantity of zero. */
|
|
1520
1399
|
value: number | null;
|
|
@@ -1552,12 +1431,8 @@ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLI
|
|
|
1552
1431
|
invalid?: boolean;
|
|
1553
1432
|
}
|
|
1554
1433
|
|
|
1555
|
-
/** The keys from the root down to the target, the target included; null if
|
|
1556
|
-
the key does not exist in the data. */
|
|
1557
|
-
export declare function pathTo<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, key: S): S[] | null;
|
|
1558
|
-
|
|
1559
1434
|
/** The plus of `NumberInput`'s step buttons. */
|
|
1560
|
-
export declare
|
|
1435
|
+
export declare function PlusGlyph({ ref, size, ...rest }: GlyphProps): JSX.Element;
|
|
1561
1436
|
|
|
1562
1437
|
/**
|
|
1563
1438
|
* The one closable, anchored surface. It owns: the portal, the position
|
|
@@ -1565,15 +1440,14 @@ export declare const PlusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"
|
|
|
1565
1440
|
* return, travelling along on scroll, stacking order, entrance from its motion
|
|
1566
1441
|
* origin and exit.
|
|
1567
1442
|
*
|
|
1568
|
-
* Two things it takes off the callers' hands
|
|
1569
|
-
* itself before:
|
|
1443
|
+
* Two things it takes off the callers' hands:
|
|
1570
1444
|
*
|
|
1571
1445
|
* - It portals into the nearest <dialog> ancestor of the anchor, otherwise
|
|
1572
|
-
* into the body. A menu in a modal
|
|
1446
|
+
* into the body. A menu in a modal would land behind the dialog otherwise,
|
|
1573
1447
|
* because a portal at the body does not reach the top layer.
|
|
1574
1448
|
* - It resets the FormField context inside the panel. Without that, form
|
|
1575
1449
|
* elements in the panel inherit the field id of the trigger, and a click on
|
|
1576
|
-
* their label closes the panel
|
|
1450
|
+
* their label closes the panel.
|
|
1577
1451
|
*/
|
|
1578
1452
|
export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role, ariaLabel, id, className, children, }: PopoverProps): ReactPortal | null;
|
|
1579
1453
|
|
|
@@ -1632,10 +1506,10 @@ export declare type PortalTarget = HTMLElement | (() => HTMLElement | null) | nu
|
|
|
1632
1506
|
|
|
1633
1507
|
/** How far a task has come, from 0 to 1 - or, without a value, that it runs.
|
|
1634
1508
|
It has no tone: a measured value judged against limits is a `Meter`. */
|
|
1635
|
-
export declare
|
|
1509
|
+
export declare function ProgressBar({ ref, value, label, valueText, showLabel, className, ...rest }: ProgressBarProps): JSX.Element;
|
|
1636
1510
|
|
|
1637
1511
|
/** The props of `ProgressBar`. */
|
|
1638
|
-
export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
1512
|
+
export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
1639
1513
|
/** How far the task has come, from 0 to 1. Left out, the bar is
|
|
1640
1514
|
indeterminate: the task runs, and nobody knows how far it is. */
|
|
1641
1515
|
value?: number;
|
|
@@ -1657,12 +1531,10 @@ export declare interface ProgressBarProps extends HTMLAttributes<HTMLDivElement>
|
|
|
1657
1531
|
/** One choice out of a few possibilities, all of them visible. Controlled
|
|
1658
1532
|
through `value` and `onChange`, or uncontrolled from `defaultValue`; the
|
|
1659
1533
|
arrow keys move between the possibilities. */
|
|
1660
|
-
export declare
|
|
1661
|
-
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
1662
|
-
}) => React.ReactElement;
|
|
1534
|
+
export declare function RadioGroup<T extends string>({ ref, options, value, defaultValue, onChange, orientation, size: ownSize, disabled, name, className, onKeyDown, ...rest }: RadioGroupProps<T>): JSX.Element;
|
|
1663
1535
|
|
|
1664
1536
|
/** The props of `RadioGroup`. */
|
|
1665
|
-
export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
1537
|
+
export declare interface RadioGroupProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
|
|
1666
1538
|
/** The possibilities, in the order in which they are meant to stand. */
|
|
1667
1539
|
options: readonly RadioOption<T>[];
|
|
1668
1540
|
/** The chosen possibility; `null` means: none yet. Together with
|
|
@@ -1715,32 +1587,11 @@ export declare interface RangePreset {
|
|
|
1715
1587
|
range: () => DateRange;
|
|
1716
1588
|
}
|
|
1717
1589
|
|
|
1718
|
-
/**
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
* Negative is allowed and intended: a value set from outside does not know
|
|
1724
|
-
* `maxLength`, and then the display is meant to show that.
|
|
1725
|
-
*/
|
|
1726
|
-
export declare const remainingChars: (value: string, maxLength: number | undefined) => number | undefined;
|
|
1727
|
-
|
|
1728
|
-
/**
|
|
1729
|
-
* Expands along a path as far as the data reaches, and reports the deepest
|
|
1730
|
-
* key it got to.
|
|
1731
|
-
*
|
|
1732
|
-
* The path is handed over and not searched for: a deep link knows it, the
|
|
1733
|
-
* data does not know it yet. If the run gets stuck at an unloaded branch,
|
|
1734
|
-
* that branch's key is the answer - and because it is expanded in the
|
|
1735
|
-
* process, it triggers the loading at the same time. The caller loads and
|
|
1736
|
-
* calls again; the same loop it already has for expanding anyway.
|
|
1737
|
-
*
|
|
1738
|
-
* The target itself is not expanded: it is meant to be shown, not opened.
|
|
1739
|
-
*/
|
|
1740
|
-
export declare function revealPath<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, path: readonly S[]): {
|
|
1741
|
-
snapshot: TreeSnapshot<S>;
|
|
1742
|
-
reached: S | null;
|
|
1743
|
-
};
|
|
1590
|
+
/** The `ref` of a component: the element it renders at its root. */
|
|
1591
|
+
export declare interface RefProp<E extends Element> {
|
|
1592
|
+
/** Receives the component's root element. */
|
|
1593
|
+
ref?: Ref<E>;
|
|
1594
|
+
}
|
|
1744
1595
|
|
|
1745
1596
|
/** What `scrollForRow` needs to know about a scroll area. */
|
|
1746
1597
|
export declare interface RowPlacement {
|
|
@@ -1767,9 +1618,8 @@ export declare interface RowWindow {
|
|
|
1767
1618
|
/**
|
|
1768
1619
|
* The scroll position at which a row is visible - or null where it already is.
|
|
1769
1620
|
*
|
|
1770
|
-
* This is the arithmetic the keyboard handling hangs on
|
|
1771
|
-
* moves into a row that is not rendered
|
|
1772
|
-
* virtualised table that cannot do this is worse than a paged one.
|
|
1621
|
+
* This is the arithmetic the keyboard handling hangs on: without it the focus
|
|
1622
|
+
* moves into a row that is not rendered.
|
|
1773
1623
|
*
|
|
1774
1624
|
* The sticky header counts against the upper edge: a row standing exactly at
|
|
1775
1625
|
* `scrollTop` lies behind it.
|
|
@@ -1780,12 +1630,10 @@ export declare function scrollForRow(index: number, { rowHeight, scrollTop, view
|
|
|
1780
1630
|
segment for each - a radio group in what it says and how the keys move.
|
|
1781
1631
|
Controlled through `value` and `onChange`, or uncontrolled from
|
|
1782
1632
|
`defaultValue`. */
|
|
1783
|
-
export declare
|
|
1784
|
-
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
1785
|
-
}) => React.ReactElement;
|
|
1633
|
+
export declare function SegmentedControl<T extends string>({ ref, options, value, defaultValue, onChange, size: ownSize, variant, fill, disabled, name, className, onKeyDown, ...rest }: SegmentedControlProps<T>): JSX.Element;
|
|
1786
1634
|
|
|
1787
1635
|
/** The props of `SegmentedControl`. */
|
|
1788
|
-
export declare interface SegmentedControlProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
1636
|
+
export declare interface SegmentedControlProps<T extends string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
|
|
1789
1637
|
/** The possibilities, two to four, in the order in which they stand. */
|
|
1790
1638
|
options: readonly SegmentedOption<T>[];
|
|
1791
1639
|
/** The chosen possibility; `null` means: none yet. Together with
|
|
@@ -1836,11 +1684,11 @@ export declare interface SegmentedOption<T extends string> {
|
|
|
1836
1684
|
* Combobox's - and under a finger the system's picker (ADR-0043). The arrow is
|
|
1837
1685
|
* drawn in CSS and therefore follows the theme tokens.
|
|
1838
1686
|
*/
|
|
1839
|
-
export declare
|
|
1687
|
+
export declare function Select({ ref, size: ownSize, chars, invalid, clearable, onClear, className, style, id, children, disabled, onPointerDown, onMouseDown, onKeyDown, onBlur, ...rest }: SelectProps): JSX.Element;
|
|
1840
1688
|
|
|
1841
1689
|
/** The props of `Select`: a native select's attributes, with `size` meaning
|
|
1842
1690
|
the control's height. */
|
|
1843
|
-
export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
1691
|
+
export declare interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size">, RefProp<HTMLSelectElement> {
|
|
1844
1692
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
1845
1693
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
1846
1694
|
size?: "sm" | "md";
|
|
@@ -1875,35 +1723,13 @@ export declare interface Separators {
|
|
|
1875
1723
|
/** The separators a set of formats writes, read off the formats themselves.
|
|
1876
1724
|
|
|
1877
1725
|
A field that formats a number must be able to read its own output back, and
|
|
1878
|
-
an application may have replaced `number` with anything
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
decimal place, digits struck out, and what remains is the notation's own
|
|
1882
|
-
punctuation. */
|
|
1726
|
+
an application may have replaced `number` with anything. So the
|
|
1727
|
+
separators are measured: one number with one decimal place, digits struck
|
|
1728
|
+
out, and what remains is the notation's own punctuation. */
|
|
1883
1729
|
export declare function separatorsOf(formats: Formats): Separators;
|
|
1884
1730
|
|
|
1885
|
-
/** Sets the active node; `null` for none. Returns the same snapshot where
|
|
1886
|
-
nothing changes. */
|
|
1887
|
-
export declare function setActive<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
1888
|
-
|
|
1889
|
-
/** Sets the node a range selection spans from; `null` for none. Returns the
|
|
1890
|
-
same snapshot where nothing changes. */
|
|
1891
|
-
export declare function setAnchor<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
1892
|
-
|
|
1893
|
-
/**
|
|
1894
|
-
* Sets a set of nodes to checked or unchecked - and does not toggle.
|
|
1895
|
-
*
|
|
1896
|
-
* That is the decision which separates a range from a sequence of single
|
|
1897
|
-
* clicks: if it contains a branch *and* one of its children, a sequence of
|
|
1898
|
-
* toggles would touch the child twice and uncheck it again. Every target is
|
|
1899
|
-
* set together with its descendants; afterwards all ancestors of the targets
|
|
1900
|
-
* are reconciled, from the bottom up - and only those.
|
|
1901
|
-
*/
|
|
1902
|
-
export declare function setChecked<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, targets: readonly S[], on: boolean): TreeSnapshot<S>;
|
|
1903
|
-
|
|
1904
1731
|
/** How seriously a violation weighs: one severity that advises and one that
|
|
1905
|
-
calls for action. Exactly two
|
|
1906
|
-
the screen, and five colours are noise. For a third distinction one sets a
|
|
1732
|
+
calls for action. Exactly two; for a third distinction one sets a
|
|
1907
1733
|
second limit. */
|
|
1908
1734
|
export declare type Severity = "warning" | "alarm";
|
|
1909
1735
|
|
|
@@ -1911,10 +1737,10 @@ export declare type Severity = "warning" | "alarm";
|
|
|
1911
1737
|
export declare type Side = "upper" | "lower";
|
|
1912
1738
|
|
|
1913
1739
|
/** Loading placeholder with a restrained pulse; respects prefers-reduced-motion. */
|
|
1914
|
-
export declare
|
|
1740
|
+
export declare function Skeleton({ ref, width, height, circle, className, style, ...rest }: SkeletonProps): JSX.Element;
|
|
1915
1741
|
|
|
1916
1742
|
/** The props of `Skeleton`. */
|
|
1917
|
-
export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1743
|
+
export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
|
|
1918
1744
|
/** Width, e.g. "120px" or "60%".
|
|
1919
1745
|
@default "100%" */
|
|
1920
1746
|
width?: string | number;
|
|
@@ -1927,7 +1753,7 @@ export declare interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
1927
1753
|
|
|
1928
1754
|
/** One value on a track between `min` and `max`, on the native range input;
|
|
1929
1755
|
`marks` set labelled points on the track. */
|
|
1930
|
-
export declare
|
|
1756
|
+
export declare function Slider({ ref, value: valueProp, defaultValue, onChange, min, max, step, marks, format, showValue, className, style, id, disabled, onKeyDown, ...rest }: SliderProps): JSX.Element;
|
|
1931
1757
|
|
|
1932
1758
|
/** A mark on the track: a value, or a value with the word beneath it. */
|
|
1933
1759
|
export declare type SliderMark = number | {
|
|
@@ -1936,7 +1762,7 @@ export declare type SliderMark = number | {
|
|
|
1936
1762
|
};
|
|
1937
1763
|
|
|
1938
1764
|
/** The props of `Slider`. */
|
|
1939
|
-
export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step"> {
|
|
1765
|
+
export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">, RefProp<HTMLInputElement> {
|
|
1940
1766
|
/** Controlled: the value. */
|
|
1941
1767
|
value?: number;
|
|
1942
1768
|
/** Uncontrolled: the value to start at.
|
|
@@ -1967,10 +1793,10 @@ export declare interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputE
|
|
|
1967
1793
|
export declare type SpaceStep = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
1968
1794
|
|
|
1969
1795
|
/** A miniature trend line for table cells; the end point carries the accent. */
|
|
1970
|
-
export declare
|
|
1796
|
+
export declare function Sparkline({ ref, data, width, height, tone, className, ...rest }: SparklineProps): JSX.Element | null;
|
|
1971
1797
|
|
|
1972
1798
|
/** The props of `Sparkline`. */
|
|
1973
|
-
export declare interface SparklineProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1799
|
+
export declare interface SparklineProps extends HTMLAttributes<HTMLSpanElement>, RefProp<HTMLSpanElement> {
|
|
1974
1800
|
/** Values in chronological order; at least two. */
|
|
1975
1801
|
data: readonly number[];
|
|
1976
1802
|
/** Width in pixels; the default is a row width, not a chart width. `"fill"`
|
|
@@ -1987,10 +1813,10 @@ export declare interface SparklineProps extends HTMLAttributes<HTMLSpanElement>
|
|
|
1987
1813
|
}
|
|
1988
1814
|
|
|
1989
1815
|
/** Restrained loading indicator; inherits the text colour of its context. */
|
|
1990
|
-
export declare
|
|
1816
|
+
export declare function Spinner({ ref, size, className, ...rest }: SpinnerProps): JSX.Element;
|
|
1991
1817
|
|
|
1992
1818
|
/** The props of `Spinner`. */
|
|
1993
|
-
export declare interface SpinnerProps extends SVGAttributes<SVGSVGElement> {
|
|
1819
|
+
export declare interface SpinnerProps extends SVGAttributes<SVGSVGElement>, RefProp<SVGSVGElement> {
|
|
1994
1820
|
/** Edge length in pixels. */
|
|
1995
1821
|
size?: number;
|
|
1996
1822
|
}
|
|
@@ -1998,7 +1824,7 @@ export declare interface SpinnerProps extends SVGAttributes<SVGSVGElement> {
|
|
|
1998
1824
|
/** A main action with a menu of its variants: the button on the left runs
|
|
1999
1825
|
`onClick`, the arrow on the right opens `menu`. The ref goes to the main
|
|
2000
1826
|
button. */
|
|
2001
|
-
export declare
|
|
1827
|
+
export declare function SplitButton({ ref, children, menu, variant, size: ownSize, menuLabel, align, disabled, className, ...rest }: SplitButtonProps): JSX.Element;
|
|
2002
1828
|
|
|
2003
1829
|
/** The props of `SplitButton`: a `Button`'s for the main action, plus the
|
|
2004
1830
|
menu's entries. */
|
|
@@ -2023,10 +1849,10 @@ export declare interface SplitButtonProps extends Omit<ButtonProps, "children" |
|
|
|
2023
1849
|
|
|
2024
1850
|
/** Two panes and the line between them. The line can be dragged, moved with
|
|
2025
1851
|
the arrow keys, and Enter collapses the first pane and brings it back. */
|
|
2026
|
-
export declare
|
|
1852
|
+
export declare function Splitter({ ref, orientation, value: valueProp, defaultValue, onChange, min, max, step, separatorLabel, className, style, onKeyDown, children, ...rest }: SplitterProps): JSX.Element;
|
|
2027
1853
|
|
|
2028
1854
|
/** The props of `Splitter`. */
|
|
2029
|
-
export declare interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children"> {
|
|
1855
|
+
export declare interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children">, RefProp<HTMLDivElement> {
|
|
2030
1856
|
/** How the two panes stand: `horizontal` side by side, `vertical` one
|
|
2031
1857
|
above the other - a trend above, its alarms below. */
|
|
2032
1858
|
orientation?: "horizontal" | "vertical";
|
|
@@ -2051,10 +1877,10 @@ export declare interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
2051
1877
|
|
|
2052
1878
|
/** Children below or beside one another, spaced by a step of the spacing
|
|
2053
1879
|
scale. */
|
|
2054
|
-
export declare
|
|
1880
|
+
export declare function Stack({ ref, direction, gap, align, justify, wrap, className, style, children, ...rest }: StackProps): JSX.Element;
|
|
2055
1881
|
|
|
2056
1882
|
/** The props of `Stack`. */
|
|
2057
|
-
export declare interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
1883
|
+
export declare interface StackProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
2058
1884
|
/** Below one another or beside one another. Below is the direction content
|
|
2059
1885
|
stands in anyway, without being asked. */
|
|
2060
1886
|
direction?: "row" | "column";
|
|
@@ -2069,10 +1895,10 @@ export declare interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2069
1895
|
}
|
|
2070
1896
|
|
|
2071
1897
|
/** Metric tile: one value, read against its limits. */
|
|
2072
|
-
export declare
|
|
1898
|
+
export declare function Stat({ ref, label, value, unit, decimals, limits, history, asOf, ages, className, ...rest }: StatProps): JSX.Element;
|
|
2073
1899
|
|
|
2074
1900
|
/** The props of `Stat`. */
|
|
2075
|
-
export declare interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
1901
|
+
export declare interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">, RefProp<HTMLDivElement> {
|
|
2076
1902
|
/** What is being measured. */
|
|
2077
1903
|
label: string;
|
|
2078
1904
|
/** The measured value. Absent or non-finite gives the verdict `unknown` –
|
|
@@ -2097,10 +1923,10 @@ export declare interface StatProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
2097
1923
|
|
|
2098
1924
|
/** Where a procedure stands: its steps in order, done, current, upcoming or
|
|
2099
1925
|
failed. Moving on is yours - `current` is a prop. */
|
|
2100
|
-
export declare
|
|
1926
|
+
export declare function Stepper({ ref, steps, current, orientation, className, ...rest }: StepperProps): JSX.Element;
|
|
2101
1927
|
|
|
2102
1928
|
/** The props of `Stepper`. */
|
|
2103
|
-
export declare interface StepperProps extends HTMLAttributes<HTMLOListElement> {
|
|
1929
|
+
export declare interface StepperProps extends HTMLAttributes<HTMLOListElement>, RefProp<HTMLOListElement> {
|
|
2104
1930
|
/** The steps in the order they are walked. */
|
|
2105
1931
|
steps: readonly StepperStep[];
|
|
2106
1932
|
/** The index of the step being worked on. The steps before it are done,
|
|
@@ -2124,10 +1950,10 @@ export declare interface StepperStep {
|
|
|
2124
1950
|
|
|
2125
1951
|
/** An on/off switch that takes effect at once - a native checkbox with
|
|
2126
1952
|
`role="switch"`. Where the choice waits for a Save button, use `Checkbox`. */
|
|
2127
|
-
export declare
|
|
1953
|
+
export declare function Switch({ ref, label, size: ownSize, invalid, className, style, id, ...rest }: SwitchProps): JSX.Element;
|
|
2128
1954
|
|
|
2129
1955
|
/** The props of `Switch`: a native checkbox's attributes and its label. */
|
|
2130
|
-
export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "role"> {
|
|
1956
|
+
export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "role">, RefProp<HTMLInputElement> {
|
|
2131
1957
|
/** Label to the right of the switch. */
|
|
2132
1958
|
label?: ReactNode;
|
|
2133
1959
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
@@ -2140,18 +1966,18 @@ export declare interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputE
|
|
|
2140
1966
|
|
|
2141
1967
|
/** One tab of a `TabList`; choosing it shows the `TabPanel` of the same
|
|
2142
1968
|
`value`. */
|
|
2143
|
-
export declare
|
|
1969
|
+
export declare function Tab({ ref, value, className, children, onClick, ...rest }: TabProps): JSX.Element;
|
|
2144
1970
|
|
|
2145
1971
|
/** The row of `Tab`s inside `Tabs`. The arrow keys, Home and End move
|
|
2146
1972
|
between the tabs and choose them. */
|
|
2147
|
-
export declare
|
|
1973
|
+
export declare function TabList({ ref, className, children, onKeyDown, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): JSX.Element;
|
|
2148
1974
|
|
|
2149
1975
|
/** The content of one tab. Only the panel whose `value` is chosen stands in
|
|
2150
1976
|
the document. */
|
|
2151
|
-
export declare
|
|
1977
|
+
export declare function TabPanel({ ref, value, className, children, ...rest }: TabPanelProps): JSX.Element | null;
|
|
2152
1978
|
|
|
2153
1979
|
/** The props of `TabPanel`. */
|
|
2154
|
-
export declare interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
1980
|
+
export declare interface TabPanelProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
2155
1981
|
/** The value of the tab this panel belongs to. Only the matching panel
|
|
2156
1982
|
stands in the document – a hidden panel would keep focus, scroll
|
|
2157
1983
|
position and live regions that nobody sees. */
|
|
@@ -2159,17 +1985,17 @@ export declare interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2159
1985
|
}
|
|
2160
1986
|
|
|
2161
1987
|
/** The props of `Tab`. */
|
|
2162
|
-
export declare interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1988
|
+
export declare interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement>, RefProp<HTMLButtonElement> {
|
|
2163
1989
|
/** The value this tab reports – and under which its panel stands. */
|
|
2164
1990
|
value: string;
|
|
2165
1991
|
}
|
|
2166
1992
|
|
|
2167
1993
|
/** Tabs: a `TabList` of `Tab`s and one `TabPanel` per value. Controlled
|
|
2168
1994
|
through `value` and `onChange`, or uncontrolled from `defaultValue`. */
|
|
2169
|
-
export declare
|
|
1995
|
+
export declare function Tabs({ ref, value, defaultValue, onChange, className, children, ...rest }: TabsProps): JSX.Element;
|
|
2170
1996
|
|
|
2171
1997
|
/** The props of `Tabs`. */
|
|
2172
|
-
export declare interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
1998
|
+
export declare interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, RefProp<HTMLDivElement> {
|
|
2173
1999
|
/** The value of the visible tab. Controlled, `Tabs` remember nothing, so
|
|
2174
2000
|
that the tab can come out of an address. */
|
|
2175
2001
|
value?: string;
|
|
@@ -2184,20 +2010,20 @@ export declare interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
2184
2010
|
/** A short label with a tone; with `onRemove` it carries a cross that removes
|
|
2185
2011
|
it. Inside a `TagGroup` it is a list entry, and Delete or Backspace remove
|
|
2186
2012
|
it too. */
|
|
2187
|
-
export declare
|
|
2013
|
+
export declare function Tag({ ref, tone, children, onRemove, removeLabel, disabled, className, onKeyDown, ...rest }: TagProps): JSX.Element;
|
|
2188
2014
|
|
|
2189
2015
|
/** A list of `Tag`s with one tab stop: the arrow keys move between them, and
|
|
2190
2016
|
the focus stays in the group when one is removed. */
|
|
2191
|
-
export declare
|
|
2017
|
+
export declare function TagGroup({ ref, className, children, onKeyDown, onFocus, ...rest }: TagGroupProps): JSX.Element;
|
|
2192
2018
|
|
|
2193
2019
|
/** The props of `TagGroup`: a div's attributes, with a required name. */
|
|
2194
|
-
export declare interface TagGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
2020
|
+
export declare interface TagGroupProps extends HTMLAttributes<HTMLDivElement>, RefProp<HTMLDivElement> {
|
|
2195
2021
|
/** Label of the group for the screen reader. */
|
|
2196
2022
|
"aria-label": string;
|
|
2197
2023
|
}
|
|
2198
2024
|
|
|
2199
2025
|
/** The props of `Tag`. */
|
|
2200
|
-
export declare interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onRemove"> {
|
|
2026
|
+
export declare interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onRemove">, RefProp<HTMLSpanElement> {
|
|
2201
2027
|
/** What the label stands for. The tone is never the only information: the
|
|
2202
2028
|
text beside it says the same thing once more. */
|
|
2203
2029
|
tone?: TagTone;
|
|
@@ -2220,18 +2046,18 @@ export declare type TagTone = "neutral" | "accent" | "success" | "warning" | "da
|
|
|
2220
2046
|
|
|
2221
2047
|
/** Body text from the token set; `as` chooses the element, independent of the
|
|
2222
2048
|
size. */
|
|
2223
|
-
declare
|
|
2049
|
+
declare function Text_2({ ref, as: Element, size, weight, tone, mono, tracking, leading, className, children, ...rest }: TextProps): JSX.Element;
|
|
2224
2050
|
export { Text_2 as Text }
|
|
2225
2051
|
|
|
2226
2052
|
/** A text field for several lines. `chars` sets the length of a line,
|
|
2227
2053
|
`autoGrow` lets it grow with its content up to `maxRows`, `showCount` counts
|
|
2228
2054
|
against `maxLength`. Inside a `FormField` it takes the field's id,
|
|
2229
2055
|
description and invalid state. */
|
|
2230
|
-
export declare
|
|
2056
|
+
export declare function Textarea({ ref, size: ownSize, chars, invalid, autoGrow, maxRows, showCount, resize, className, style, id, disabled, rows, onInput, ...rest }: TextareaProps): JSX.Element;
|
|
2231
2057
|
|
|
2232
2058
|
/** The props of `Textarea`: a native textarea's attributes, with `chars` in
|
|
2233
2059
|
place of `cols`. */
|
|
2234
|
-
export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "cols"> {
|
|
2060
|
+
export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "cols">, RefProp<HTMLTextAreaElement> {
|
|
2235
2061
|
/** `sm` for a toolbar and dense forms, `md` otherwise.
|
|
2236
2062
|
@default the size of a `ControlSizeProvider` around it, else `"md"` */
|
|
2237
2063
|
size?: "sm" | "md";
|
|
@@ -2259,7 +2085,7 @@ export declare interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLT
|
|
|
2259
2085
|
export declare type TextLeading = "normal" | "tight";
|
|
2260
2086
|
|
|
2261
2087
|
/** The props of `Text`. */
|
|
2262
|
-
export declare interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
2088
|
+
export declare interface TextProps extends HTMLAttributes<HTMLElement>, RefProp<HTMLElement> {
|
|
2263
2089
|
/** Element to render as. */
|
|
2264
2090
|
as?: ElementType;
|
|
2265
2091
|
/** Type size from the token set. It is independent of the element: a `p`
|
|
@@ -2373,19 +2199,6 @@ export declare function ToastProvider({ children }: {
|
|
|
2373
2199
|
/** How the message turns out; `loading` is a toast still at work. */
|
|
2374
2200
|
export declare type ToastTone = "neutral" | "success" | "warning" | "danger" | "loading";
|
|
2375
2201
|
|
|
2376
|
-
/** Everything checkable on - or empty, if everything is on already. */
|
|
2377
|
-
export declare function toggleAll<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>): TreeSnapshot<S>;
|
|
2378
|
-
|
|
2379
|
-
/**
|
|
2380
|
-
* Toggle a check: cascade downwards, reconcile upwards.
|
|
2381
|
-
*
|
|
2382
|
-
* A single check is a range of one target - which is why the arithmetic
|
|
2383
|
-
* stands there only once, and the direction comes from the same definition of
|
|
2384
|
-
* "full" as in toggleAll. If the node is not checkable or does not exist, the
|
|
2385
|
-
* snapshot stays unchanged.
|
|
2386
|
-
*/
|
|
2387
|
-
export declare function toggleCheck<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
2388
|
-
|
|
2389
2202
|
/** Appears on hover and keyboard focus; purely descriptive (role="tooltip"). */
|
|
2390
2203
|
export declare function Tooltip({ content, children, delay }: TooltipProps): JSX.Element;
|
|
2391
2204
|
|
|
@@ -2494,18 +2307,15 @@ export declare interface TreeOptions<K, S extends Key = string> {
|
|
|
2494
2307
|
*/
|
|
2495
2308
|
onLoadChildren?: (node: K) => void;
|
|
2496
2309
|
/**
|
|
2497
|
-
* Render only what stands in the scroll area.
|
|
2498
|
-
*
|
|
2499
|
-
* whoever has not ordered it should not have to think about row heights.
|
|
2310
|
+
* Render only what stands in the scroll area. Optional: without it every
|
|
2311
|
+
* row is rendered and no row height is needed.
|
|
2500
2312
|
*/
|
|
2501
2313
|
virtual?: VirtualOptions;
|
|
2502
2314
|
}
|
|
2503
2315
|
|
|
2504
2316
|
/** The search field of a tree: an `Input` that writes into the tree's search
|
|
2505
2317
|
text, so that the `TreeView` filters on it. */
|
|
2506
|
-
export declare
|
|
2507
|
-
ref?: ForwardedRef<HTMLInputElement>;
|
|
2508
|
-
}) => ReactNode;
|
|
2318
|
+
export declare function TreeSearch<K, S extends Key = string>({ ref, tree, placeholder, ...rest }: TreeSearchProps<K, S>): JSX.Element;
|
|
2509
2319
|
|
|
2510
2320
|
/** The props of `TreeSearch`: an `Input`'s, with the tree in place of `value`
|
|
2511
2321
|
and `onChange`. */
|
|
@@ -2532,12 +2342,10 @@ export declare interface TreeSnapshot<S extends Key = string> {
|
|
|
2532
2342
|
/** The tree as a control: draws the nodes of a `Tree` from `useTree` as a
|
|
2533
2343
|
`tree` with keyboard navigation, typeahead and, with `checkable`, ticks.
|
|
2534
2344
|
What a node says is yours - `children` renders it. */
|
|
2535
|
-
export declare
|
|
2536
|
-
ref?: ForwardedRef<HTMLDivElement>;
|
|
2537
|
-
}) => ReactNode;
|
|
2345
|
+
export declare function TreeView<K, S extends Key = string>({ ref, tree, ariaLabel, checkable, children, className, onKeyDown, onFocus, onBlur, onScroll, ...rest }: TreeViewProps<K, S>): JSX.Element;
|
|
2538
2346
|
|
|
2539
2347
|
/** The props of `TreeView`. */
|
|
2540
|
-
export declare interface TreeViewProps<K, S extends Key = string> extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
2348
|
+
export declare interface TreeViewProps<K, S extends Key = string> extends Omit<HTMLAttributes<HTMLDivElement>, "children">, RefProp<HTMLDivElement> {
|
|
2541
2349
|
/** The tree from `useTree`. It is the whole state: flattening, active node,
|
|
2542
2350
|
checks, anchor. The view holds nothing beside it. */
|
|
2543
2351
|
tree: Tree<K, S>;
|
|
@@ -2550,20 +2358,6 @@ export declare interface TreeViewProps<K, S extends Key = string> extends Omit<H
|
|
|
2550
2358
|
children: (entry: FlatteningEntry<K, S>) => ReactNode;
|
|
2551
2359
|
}
|
|
2552
2360
|
|
|
2553
|
-
/**
|
|
2554
|
-
* The next visible node whose label starts like this - or null.
|
|
2555
|
-
*
|
|
2556
|
-
* A single letter searches **behind** the active node, so that the same
|
|
2557
|
-
* letter pressed twice jumps onwards instead of finding the same node again.
|
|
2558
|
-
* Several letters search **from** the active node, so that refining does not
|
|
2559
|
-
* jump onwards. Both are intended and are the reason why the length of the
|
|
2560
|
-
* prefix matters here.
|
|
2561
|
-
*
|
|
2562
|
-
* At the end it wraps around. Disabled and unloaded nodes are valid targets:
|
|
2563
|
-
* typeahead moves only the focus, and both are navigable.
|
|
2564
|
-
*/
|
|
2565
|
-
export declare function typeaheadTarget<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], prefix: string, active: S | null): S | null;
|
|
2566
|
-
|
|
2567
2361
|
/** The settings of `UmrissProvider` as the components read them, every value
|
|
2568
2362
|
filled in. */
|
|
2569
2363
|
export declare interface UmrissConfig {
|
|
@@ -2585,7 +2379,7 @@ export declare function UmrissProvider({ density, portalTarget, toast, language,
|
|
|
2585
2379
|
export declare interface UmrissProviderProps {
|
|
2586
2380
|
/**
|
|
2587
2381
|
* The default for the `density` of every component that reads it with
|
|
2588
|
-
* `useDensityFor` - in `@umriss-ui/table` `Table
|
|
2382
|
+
* `useDensityFor` - in `@umriss-ui/table` `Table`, in
|
|
2589
2383
|
* `@umriss-ui/calculation` `Calculation` ("comfortable" means "regular").
|
|
2590
2384
|
*
|
|
2591
2385
|
* @default none - a component keeps its own density
|
|
@@ -2627,8 +2421,7 @@ export declare const useDensity: () => Density;
|
|
|
2627
2421
|
* A component's `density`: its own value, else the density the provider
|
|
2628
2422
|
* explicitly configured, else its own default.
|
|
2629
2423
|
*
|
|
2630
|
-
* "comfortable" means "regular" here. A compact set of tokens does not exist
|
|
2631
|
-
* that is work package B.13; here only what exists is wired up.
|
|
2424
|
+
* "comfortable" means "regular" here. A compact set of tokens does not exist.
|
|
2632
2425
|
*/
|
|
2633
2426
|
export declare function useDensityFor(own: "regular" | "compact" | undefined, fallback: "regular" | "compact"): "regular" | "compact";
|
|
2634
2427
|
|
|
@@ -2686,9 +2479,8 @@ export declare const useUmriss: () => UmrissConfig;
|
|
|
2686
2479
|
* from them.
|
|
2687
2480
|
*
|
|
2688
2481
|
* It is measured on the first rendered row rather than taken from the caller's
|
|
2689
|
-
* value: row height depends on density, font size and zoom, and
|
|
2690
|
-
*
|
|
2691
|
-
* forty thousand pixels.
|
|
2482
|
+
* value: row height depends on density, font size and zoom, and a small error
|
|
2483
|
+
* adds up over many rows to a scrollbar that lies.
|
|
2692
2484
|
*/
|
|
2693
2485
|
export declare function useVirtual(count: number, options: VirtualOptions): VirtualRows;
|
|
2694
2486
|
|
|
@@ -2698,9 +2490,8 @@ export declare const useWording: () => Wording;
|
|
|
2698
2490
|
/** What a value is. Four outcomes, ordered by severity, `unknown` between
|
|
2699
2491
|
`ok` and `warning`: a value nobody has is a reason to look.
|
|
2700
2492
|
|
|
2701
|
-
The fourth outcome is not a `null
|
|
2702
|
-
call site
|
|
2703
|
-
against: a dead data source would look like a healthy service. */
|
|
2493
|
+
The fourth outcome is not a `null`, which would invite `?? "ok"` at the
|
|
2494
|
+
call site: a dead data source would look like a healthy service. */
|
|
2704
2495
|
export declare type Verdict = "ok" | "unknown" | "warning" | "alarm";
|
|
2705
2496
|
|
|
2706
2497
|
/** How heavily a verdict weighs - for sorting and comparing, as when a matrix
|
|
@@ -2753,9 +2544,7 @@ export declare function visibleWindow({ count, rowHeight, scrollTop, viewportHei
|
|
|
2753
2544
|
|
|
2754
2545
|
/** Content for the screen reader only: out of sight, but read out. With
|
|
2755
2546
|
`focusable` it shows once it has the focus - a skip link. */
|
|
2756
|
-
export declare
|
|
2757
|
-
ref?: ForwardedRef<HTMLElement>;
|
|
2758
|
-
}) => React.ReactElement;
|
|
2547
|
+
export declare function VisuallyHidden<E extends ElementType = "span">({ ref, as, focusable, className, children, ...rest }: VisuallyHiddenProps<E>): JSX.Element;
|
|
2759
2548
|
|
|
2760
2549
|
/** The props of `VisuallyHidden`: those of the element `as` names, `span` by
|
|
2761
2550
|
default. */
|
|
@@ -2765,7 +2554,7 @@ export declare type VisuallyHiddenProps<E extends ElementType = "span"> = {
|
|
|
2765
2554
|
as?: E;
|
|
2766
2555
|
/** Becomes visible as soon as the content receives the focus (skip link). */
|
|
2767
2556
|
focusable?: boolean;
|
|
2768
|
-
} & Omit<ComponentPropsWithoutRef<E>, "as">;
|
|
2557
|
+
} & Omit<ComponentPropsWithoutRef<E>, "as" | "ref"> & RefProp<HTMLElement>;
|
|
2769
2558
|
|
|
2770
2559
|
/** What `visibleWindow` needs to know about a scroll area and its rows. */
|
|
2771
2560
|
export declare interface WindowInput {
|
|
@@ -2858,20 +2647,6 @@ export declare interface Wording {
|
|
|
2858
2647
|
therefore do not stand here; "Esc" is a word and is called something else
|
|
2859
2648
|
elsewhere. */
|
|
2860
2649
|
paletteKeyEsc: string;
|
|
2861
|
-
/** Accessible name of a dock's tools. */
|
|
2862
|
-
dockTools: string;
|
|
2863
|
-
/** Accessible name of the grip - it says what it does, not what it is. */
|
|
2864
|
-
dockGrip: string;
|
|
2865
|
-
/** The four resting places, named. The keys are the `DockPlace` type's, and a
|
|
2866
|
-
register translates them: the German one answers "oben" where the
|
|
2867
|
-
English one answers "top". */
|
|
2868
|
-
dockPlace: (place: "top" | "right" | "bottom" | "left") => string;
|
|
2869
|
-
/** What the screen reader hears once the dock has taken a place. */
|
|
2870
|
-
dockPlaced: (place: string) => string;
|
|
2871
|
-
/** And what it hears when a place has refused. A refusal is not a fault: a
|
|
2872
|
-
wide, flat host with no room for a standing dock is not a mistake anyone
|
|
2873
|
-
made. */
|
|
2874
|
-
dockNoPlace: (place: string) => string;
|
|
2875
2650
|
datePlaceholder: string;
|
|
2876
2651
|
/** Accessible name of the panel. Deliberately kept apart from the
|
|
2877
2652
|
placeholder: whoever labels the field differently does not thereby rename
|
|
@@ -3135,66 +2910,6 @@ export declare interface Wording {
|
|
|
3135
2910
|
freshnessDisconnected: string;
|
|
3136
2911
|
/** "As of: 3 minutes ago", where the duration comes from the formats. */
|
|
3137
2912
|
asOfAgo: (duration: string) => string;
|
|
3138
|
-
asOfUnknown: string;
|
|
3139
|
-
alarms: string;
|
|
3140
|
-
noAlarms: string;
|
|
3141
|
-
/** Empty, but the line is down - that is something other than quiet. */
|
|
3142
|
-
noAlarmsDisconnected: string;
|
|
3143
|
-
acknowledgeAlarm: string;
|
|
3144
|
-
/** Bulk acknowledgement; the number stands in the text on purpose. */
|
|
3145
|
-
acknowledgeAlarms: (count: number) => string;
|
|
3146
|
-
/** The alarm list's snooze menu, beside "Acknowledge": the word on its
|
|
3147
|
-
button, and the sentence with the number of alarms it acts on. */
|
|
3148
|
-
snoozeAlarm: string;
|
|
3149
|
-
snoozeAlarms: (count: number) => string;
|
|
3150
|
-
/** The labels in the panel that opens with `snoozeReason`: the duration to
|
|
3151
|
-
choose and the reason to give. The panel's own button is `snoozeAlarm`. */
|
|
3152
|
-
snoozeDuration: string;
|
|
3153
|
-
snoozeReason: string;
|
|
3154
|
-
/** Ends the snooze of the ticked alarms before its time. */
|
|
3155
|
-
unsnoozeAlarm: string;
|
|
3156
|
-
unsnoozeAlarms: (count: number) => string;
|
|
3157
|
-
priorityHigh: string;
|
|
3158
|
-
priorityMedium: string;
|
|
3159
|
-
priorityLow: string;
|
|
3160
|
-
/** The four lifecycle states, written out. */
|
|
3161
|
-
lifecycleActiveUnacknowledged: string;
|
|
3162
|
-
lifecycleActiveAcknowledged: string;
|
|
3163
|
-
lifecycleResolvedUnacknowledged: string;
|
|
3164
|
-
lifecycleResolvedAcknowledged: string;
|
|
3165
|
-
/** "Alarm flood: 12 in quick succession" - a flood is marked, never
|
|
3166
|
-
suppressed. */
|
|
3167
|
-
floodHint: (count: number) => string;
|
|
3168
|
-
/** "40×" on a chattering alarm type. */
|
|
3169
|
-
chatterHint: (count: number) => string;
|
|
3170
|
-
/** The text of the live region: the number of active unacknowledged alarms. */
|
|
3171
|
-
activeUnacknowledged: (count: number) => string;
|
|
3172
|
-
columnAlarm: string;
|
|
3173
|
-
columnLifecycleState: string;
|
|
3174
|
-
columnPriority: string;
|
|
3175
|
-
columnRaised: string;
|
|
3176
|
-
columnDuration: string;
|
|
3177
|
-
columnFrequency: string;
|
|
3178
|
-
/** The two columns of the alarm model the list does not show, but which do
|
|
3179
|
-
land in the column menu and the CSV header (`alarmColumns`). */
|
|
3180
|
-
columnAcknowledgement: string;
|
|
3181
|
-
columnAge: string;
|
|
3182
|
-
/** The availability of an alarm (ISA-18.2's special states), written out.
|
|
3183
|
-
A snooze names its end and who snoozed it - a snooze is tracked, not
|
|
3184
|
-
anonymous; the time comes from the formats. The reason, when the snooze
|
|
3185
|
-
has one, comes last and is optional: a wording of two parameters fits. */
|
|
3186
|
-
availabilitySnoozed: (until: string, by: string, reason?: string) => string;
|
|
3187
|
-
/** A snooze as one word - the alarm list's badge; the sentence above stands
|
|
3188
|
-
in its tooltip and in what is spoken. */
|
|
3189
|
-
availabilitySnoozedShort: string;
|
|
3190
|
-
availabilitySuppressed: string;
|
|
3191
|
-
availabilityDisabled: string;
|
|
3192
|
-
/** "Hidden: 3" - the count of the view of snoozed, suppressed and disabled
|
|
3193
|
-
alarms, and its name where the list offers the view as a switch. */
|
|
3194
|
-
hiddenAlarms: (count: number) => string;
|
|
3195
|
-
/** The availability column of the alarm model: the column menu and the CSV
|
|
3196
|
-
header, like the two above. */
|
|
3197
|
-
columnAvailability: string;
|
|
3198
2913
|
close: string;
|
|
3199
2914
|
closeToast: string;
|
|
3200
2915
|
/** The count on the front toast of a closed deck; pressing it shows them all. */
|